WeChat.apk(点击下载) / SettingsPermissionIndexUI.java


package com.tencent.mm.plugin.setting.ui.setting;

import android.content.Intent;
import android.os.Bundle;
import android.text.SpannableString;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.tencent.mm.R;
import com.tencent.mm.autogen.mmdata.rpt.UserPrivacySettingClientReportStruct;
import com.tencent.mm.protocal.GeneralControlWrapper;
import com.tencent.mm.protocal.JsapiPermissionWrapper;
import com.tencent.mm.sdk.platformtools.LocaleUtil;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.ui.base.preference.MMPreference;
import com.tencent.mm.ui.base.preference.Preference;
import com.tencent.mm.ui.t2;
import com.tencent.mm.ui.tools.u1;
import com.tencent.xweb.ProxyConfig;
import d60.e;
import d60.z;
import dv3.t0;
import ek4.y;
import ie1.h;
import java.util.ArrayList;
import kh4.l;
import kotlin.Metadata;
import kv3.e0;
import lh4.f0;
import lh4.m;
import lh4.o;
import wg4.b0;
import wg4.g;
import wg4.h;
import wg4.n;
import yz3.j;

@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI;", "Lcom/tencent/mm/ui/base/preference/MMPreference;", "<init>", "()V", "plugin-setting_release"}, k = 1, mv = {1, 7, 1})
public final class SettingsPermissionIndexUI extends MMPreference {

    /* renamed from: e  reason: collision with root package name */
    public String f145197e = "";

    /* renamed from: f  reason: collision with root package name */
    public final g f145198f = h.a(e.f145205d);

    public static final class a extends o implements l<View, b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ SettingsPermissionIndexUI f145199d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ f0<String> f145200e;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public a(SettingsPermissionIndexUI settingsPermissionIndexUI, f0<String> f0Var) {
            super(1);
            this.f145199d = settingsPermissionIndexUI;
            this.f145200e = f0Var;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kh4.l
        public b0 invoke(View view) {
            m.g(view, LocaleUtil.ITALIAN);
            String string = this.f145199d.getString(R.string.gba, "infopage", this.f145200e.f253292d);
            m.f(string, "getString(\n             …ode\n                    )");
            SettingsPermissionIndexUI.T7(this.f145199d, string);
            return b0.f332794a;
        }
    }

    public static final class b extends o implements l<View, b0> {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ SettingsPermissionIndexUI f145201d;

        /* renamed from: e  reason: collision with root package name */
        public final /* synthetic */ f0<String> f145202e;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public b(SettingsPermissionIndexUI settingsPermissionIndexUI, f0<String> f0Var) {
            super(1);
            this.f145201d = settingsPermissionIndexUI;
            this.f145202e = f0Var;
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
        @Override // kh4.l
        public b0 invoke(View view) {
            m.g(view, LocaleUtil.ITALIAN);
            String string = this.f145201d.getString(R.string.gbc, LocaleUtil.getApplicationLanguage(), this.f145202e.f253292d, "setting", 0, 0);
            m.f(string, "getString(\n             …      0\n                )");
            SettingsPermissionIndexUI.T7(this.f145201d, string);
            return b0.f332794a;
        }
    }

    public static final class c implements MenuItem.OnMenuItemClickListener {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ SettingsPermissionIndexUI f145203d;

        public c(SettingsPermissionIndexUI settingsPermissionIndexUI) {
            this.f145203d = settingsPermissionIndexUI;
        }

        public final boolean onMenuItemClick(MenuItem menuItem) {
            this.f145203d.finish();
            return true;
        }
    }

    public static final class d extends e0 {

        /* renamed from: d  reason: collision with root package name */
        public final /* synthetic */ l<View, b0> f145204d;

        /* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kh4.l<? super android.view.View, wg4.b0> */
        /* JADX WARN: Multi-variable type inference failed */
        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public d(l<? super View, b0> lVar) {
            super(1, (t0) null);
            this.f145204d = lVar;
        }

        @Override // kv3.e0
        public void onClick(View view) {
            ArrayList arrayList = new ArrayList();
            arrayList.add(view);
            Object[] array = arrayList.toArray();
            arrayList.clear();
            j30.a.b("com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI$setSpannableClick$1", "com/tencent/mm/pluginsdk/ui/span/PressableClickSpan", "onClick", "(Landroid/view/View;)V", this, array);
            m.g(view, "widget");
            this.f145204d.invoke(view);
            j30.a.g(this, "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI$setSpannableClick$1", "com/tencent/mm/pluginsdk/ui/span/PressableClickSpan", "onClick", "(Landroid/view/View;)V");
        }
    }

    public static final class e extends o implements kh4.a<String> {

        /* renamed from: d  reason: collision with root package name */
        public static final e f145205d = new e();

        public e() {
            super(0);
        }

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // kh4.a
        public String invoke() {
            return ((jt3.b) z.q(jt3.b.class)).gv0().d("ShowExportUserDataEntry");
        }
    }

    public static final void T7(SettingsPermissionIndexUI settingsPermissionIndexUI, String str) {
        settingsPermissionIndexUI.getClass();
        Intent intent = new Intent();
        intent.putExtra("rawUrl", str);
        intent.putExtra("showShare", false);
        intent.putExtra("show_bottom", false);
        intent.putExtra("needRedirect", false);
        intent.putExtra("neverGetA8Key", true);
        intent.putExtra("hardcode_jspermission", JsapiPermissionWrapper.f173510h);
        intent.putExtra("hardcode_general_ctrl", GeneralControlWrapper.f173507e);
        sv3.b.j(settingsPermissionIndexUI.getContext(), "webview", "com.tencent.mm.plugin.webview.ui.tools.WebViewUI", intent, null);
    }

    public final void U7(TextView textView, l<? super View, b0> lVar) {
        SpannableString spannableString = new SpannableString(textView.getText());
        spannableString.setSpan(new d(lVar), 0, spannableString.length(), 17);
        textView.setText(spannableString);
        ((hz.h) j.c(hz.h.class)).p4(textView, spannableString);
    }

    @Override // com.tencent.mm.ui.base.preference.MMPreference
    public View getBottomView() {
        View inflate = t2.b(getContext()).inflate(R.layout.clw, (ViewGroup) null);
        m.e(inflate, "null cannot be cast to non-null type android.widget.LinearLayout");
        LinearLayout linearLayout = (LinearLayout) inflate;
        f0 f0Var = new f0();
        T t15 = (T) z.s().i().e(274436, "").toString();
        f0Var.f253292d = t15;
        if (Util.isNullOrNil((String) t15)) {
            f0Var.f253292d = (T) LocaleUtil.getCurrentCountryCode();
        }
        if (!Util.isNullOrNil((String) f0Var.f253292d) && !Util.isAllAlpha(f0Var.f253292d)) {
            f0Var.f253292d = "";
        }
        if (y.l(f0Var.f253292d, "cn", true)) {
            TextView textView = (TextView) linearLayout.findViewById(R.id.mq5);
            m.f(textView, LocaleUtil.ITALIAN);
            U7(textView, new a(this, f0Var));
            textView.setVisibility(0);
        }
        View findViewById = linearLayout.findViewById(R.id.mq4);
        m.f(findViewById, "bottomView.findViewById<…settings_privacy_link_tv)");
        U7((TextView) findViewById, new b(this, f0Var));
        return linearLayout;
    }

    @Override // com.tencent.mm.ui.base.preference.MMPreference
    public int getResourceId() {
        return R.xml.f370606bz;
    }

    /* JADX WARNING: Code restructure failed: missing block: B:6:0x008d, code lost:
        if (ek4.d0.x(r6, r0, false) != false) goto L_0x008f;
     */
    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.tencent.mm.ui.component.UIComponentActivity, com.tencent.mm.ui.MMActivity, com.tencent.mm.hellhoundlib.activities.HellActivity, com.tencent.mm.ui.vas.VASActivity, com.tencent.mm.ui.MMFragmentActivity, com.tencent.mm.ui.base.preference.MMPreference
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setMMTitle(R.string.f369203ix0);
        setBackBtn(new c(this));
        boolean z15 = false;
        if (z.b().d() == e.c.WeiXin) {
            String pi5 = ((ie1.h) j.c(ie1.h.class)).pi(h.c.sD, "https://ads.privacy.qq.com/ads/wxoptout.html?media_source=101001");
            m.f(pi5, "getService(IExptService:…ml?media_source=101001\" )");
            this.f145197e = pi5;
        } else {
            String pi6 = ((ie1.h) j.c(ie1.h.class)).pi(h.c.tD, "");
            m.f(pi6, "getService(IExptService:…dmanage_url_android, \"\" )");
            this.f145197e = pi6;
            String pi7 = ((ie1.h) j.c(ie1.h.class)).pi(h.c.uD, "");
            String I = z.s().i().I(274436, "");
            if (!Util.isNullOrNil(this.f145197e)) {
                m.f(pi7, "adMgrCloseCountry");
                String lowerCase = pi7.toLowerCase();
                m.f(lowerCase, "this as java.lang.String).toLowerCase()");
                m.f(I, "regCountry");
                String lowerCase2 = I.toLowerCase();
                m.f(lowerCase2, "this as java.lang.String).toLowerCase()");
            }
            this.f145197e = "";
        }
        String str = this.f145197e;
        if ((str == null || str.length() == 0) || !y.w(this.f145197e, ProxyConfig.MATCH_HTTP, false, 2, null)) {
            getPreferenceScreen().n("setting_privacy_personal_ad_mgr", true);
        }
        if (z.b().d() == e.c.WeChat) {
            getPreferenceScreen().n("setting_privacy_personal_info_export", true);
            String str2 = (String) ((n) this.f145198f).getValue();
            if (str2 == null || str2.length() == 0) {
                z15 = true;
            }
            if (z15) {
                getPreferenceScreen().n("setting_wechat_personal_info_export", true);
            }
        } else {
            getPreferenceScreen().n("setting_wechat_personal_info_export", true);
        }
        UserPrivacySettingClientReportStruct userPrivacySettingClientReportStruct = new UserPrivacySettingClientReportStruct();
        userPrivacySettingClientReportStruct.f70908d = 2;
        userPrivacySettingClientReportStruct.n();
    }

    @Override // com.tencent.mm.ui.base.preference.MMPreference
    public boolean onPreferenceTreeClick(k14.g gVar, Preference preference) {
        m.d(preference);
        String str = preference.f177766r;
        if (str != null) {
            switch (str.hashCode()) {
                case -2127957195:
                    if (str.equals("setting_privacy_personal_ad_mgr")) {
                        String str2 = this.f145197e;
                        if (!Util.isNullOrNil(str2)) {
                            str2 = u1.a(str2, "lang=" + LocaleUtil.getCurrentLanguage(this));
                            m.f(str2, "safelyUrlConcatParam(raw…tCurrentLanguage(this)}\")");
                        }
                        Intent intent = new Intent();
                        intent.putExtra("showShare", false);
                        intent.putExtra("rawUrl", str2);
                        intent.putExtra("show_feedback", false);
                        intent.putExtra("show_bottom", false);
                        intent.putExtra("needRedirect", false);
                        intent.putExtra("neverGetA8Key", false);
                        sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent, null);
                        UserPrivacySettingClientReportStruct userPrivacySettingClientReportStruct = new UserPrivacySettingClientReportStruct();
                        userPrivacySettingClientReportStruct.f70908d = 54;
                        userPrivacySettingClientReportStruct.n();
                        return true;
                    }
                    break;
                case -1179310352:
                    if (str.equals("setting_wechat_personal_info_export")) {
                        Intent intent2 = new Intent();
                        intent2.putExtra("showShare", false);
                        intent2.putExtra("rawUrl", (String) ((n) this.f145198f).getValue());
                        intent2.putExtra("show_feedback", false);
                        intent2.putExtra("show_bottom", false);
                        intent2.putExtra("needRedirect", false);
                        intent2.putExtra("neverGetA8Key", false);
                        sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent2, null);
                        UserPrivacySettingClientReportStruct userPrivacySettingClientReportStruct2 = new UserPrivacySettingClientReportStruct();
                        userPrivacySettingClientReportStruct2.f70908d = 51;
                        userPrivacySettingClientReportStruct2.n();
                        return true;
                    }
                    break;
                case 264218592:
                    if (str.equals("settings_privacy_app_permission")) {
                        Intent intent3 = new Intent(this, SettingsAuthUI.class);
                        k30.a aVar = new k30.a();
                        aVar.c(intent3);
                        j30.a.d(this, aVar.b(), "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI", "onPreferenceTreeClick", "(Lcom/tencent/mm/ui/base/preference/IPreferenceScreen;Lcom/tencent/mm/ui/base/preference/Preference;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                        startActivity((Intent) aVar.a(0));
                        j30.a.e(this, "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI", "onPreferenceTreeClick", "(Lcom/tencent/mm/ui/base/preference/IPreferenceScreen;Lcom/tencent/mm/ui/base/preference/Preference;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                        UserPrivacySettingClientReportStruct userPrivacySettingClientReportStruct3 = new UserPrivacySettingClientReportStruct();
                        userPrivacySettingClientReportStruct3.f70908d = 53;
                        userPrivacySettingClientReportStruct3.n();
                        return true;
                    }
                    break;
                case 765127884:
                    if (str.equals("setting_privacy_personal_info_export")) {
                        Intent intent4 = new Intent(getContext(), SettingsPersonalInfoPreviewUI.class);
                        k30.a aVar2 = new k30.a();
                        aVar2.c(intent4);
                        j30.a.d(this, aVar2.b(), "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI", "onPreferenceTreeClick", "(Lcom/tencent/mm/ui/base/preference/IPreferenceScreen;Lcom/tencent/mm/ui/base/preference/Preference;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                        startActivity((Intent) aVar2.a(0));
                        j30.a.e(this, "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI", "onPreferenceTreeClick", "(Lcom/tencent/mm/ui/base/preference/IPreferenceScreen;Lcom/tencent/mm/ui/base/preference/Preference;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                        UserPrivacySettingClientReportStruct userPrivacySettingClientReportStruct4 = new UserPrivacySettingClientReportStruct();
                        userPrivacySettingClientReportStruct4.f70908d = 51;
                        userPrivacySettingClientReportStruct4.n();
                        return true;
                    }
                    break;
                case 1795686324:
                    if (str.equals("settings_privacy_sys_permission")) {
                        Intent intent5 = new Intent(getContext(), SettingsSystemPermissionUI.class);
                        k30.a aVar3 = new k30.a();
                        aVar3.c(intent5);
                        j30.a.d(this, aVar3.b(), "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI", "onPreferenceTreeClick", "(Lcom/tencent/mm/ui/base/preference/IPreferenceScreen;Lcom/tencent/mm/ui/base/preference/Preference;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                        startActivity((Intent) aVar3.a(0));
                        j30.a.e(this, "com/tencent/mm/plugin/setting/ui/setting/SettingsPermissionIndexUI", "onPreferenceTreeClick", "(Lcom/tencent/mm/ui/base/preference/IPreferenceScreen;Lcom/tencent/mm/ui/base/preference/Preference;)Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                        UserPrivacySettingClientReportStruct userPrivacySettingClientReportStruct5 = new UserPrivacySettingClientReportStruct();
                        userPrivacySettingClientReportStruct5.f70908d = 52;
                        userPrivacySettingClientReportStruct5.n();
                        return true;
                    }
                    break;
            }
        }
        return false;
    }
}