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


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

import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Looper;
import android.text.InputFilter;
import android.text.SpannableString;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import bw3.h65;
import bw3.yv3;
import cn.s;
import com.tencent.mm.R;
import com.tencent.mm.booter.notification.MMNotification;
import com.tencent.mm.plugin.mmsight.segment.FFmpegMetadataRetriever;
import com.tencent.mm.plugin.newtips.NormalIconNewTipPreference;
import com.tencent.mm.plugin.report.service.q;
import com.tencent.mm.plugin.setting.ui.widget.PrivacyUpdatePreference;
import com.tencent.mm.sdk.http.HttpWrapperBase;
import com.tencent.mm.sdk.platformtools.BuildInfo;
import com.tencent.mm.sdk.platformtools.ChannelUtil;
import com.tencent.mm.sdk.platformtools.LocaleUtil;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.sdk.platformtools.MMApplicationContext;
import com.tencent.mm.sdk.platformtools.MMEntryLock;
import com.tencent.mm.sdk.platformtools.MTimerHandler;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.sdk.platformtools.WeChatBrands;
import com.tencent.mm.sdk.platformtools.WeChatHosts;
import com.tencent.mm.smiley.t0;
import com.tencent.mm.storage.w1;
import com.tencent.mm.ui.MMAppMgr;
import com.tencent.mm.ui.base.preference.IconPreference;
import com.tencent.mm.ui.base.preference.IconSummaryPreference;
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.t1;
import com.tencent.tav.coremedia.TimeUtil;
import com.tencent.thumbplayer.tplayer.plugins.report.TPReportParams;
import d03.d;
import d60.f0;
import d60.m0;
import d60.z;
import g21.i;
import hy3.k;
import i14.j;
import ie1.h;
import j00.e;
import j00.f;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import k14.g;
import lh4.m;
import lo.p;
import uu3.g;
import yf0.b0;
import yf0.n;
import yf0.y;

@f0
public class SettingsAboutMicroMsgUI extends MMPreference implements n {

    /* renamed from: x  reason: collision with root package name */
    public static final /* synthetic */ int f144806x = 0;

    /* renamed from: e  reason: collision with root package name */
    public g f144807e;

    /* renamed from: f  reason: collision with root package name */
    public String f144808f;

    /* renamed from: g  reason: collision with root package name */
    public boolean f144809g = false;

    /* renamed from: h  reason: collision with root package name */
    public boolean f144810h = false;

    /* renamed from: i  reason: collision with root package name */
    public boolean f144811i = false;

    /* renamed from: j  reason: collision with root package name */
    public i f144812j;

    /* renamed from: n  reason: collision with root package name */
    public long f144813n = 0;

    /* renamed from: o  reason: collision with root package name */
    public boolean f144814o = false;

    /* renamed from: p  reason: collision with root package name */
    public boolean f144815p = false;

    /* renamed from: q  reason: collision with root package name */
    public ProgressDialog f144816q;

    /* renamed from: r  reason: collision with root package name */
    public MTimerHandler f144817r;

    /* renamed from: s  reason: collision with root package name */
    public n f144818s = null;

    /* renamed from: t  reason: collision with root package name */
    public wh3.c f144819t = new c();

    /* renamed from: u  reason: collision with root package name */
    public boolean f144820u = false;

    /* renamed from: v  reason: collision with root package name */
    public boolean f144821v = false;

    /* renamed from: w  reason: collision with root package name */
    public boolean f144822w = false;

    public class a implements MenuItem.OnMenuItemClickListener {
        public a() {
        }

        public boolean onMenuItemClick(MenuItem menuItem) {
            SettingsAboutMicroMsgUI.this.hideVKB();
            SettingsAboutMicroMsgUI.this.finish();
            return true;
        }
    }

    public class b implements Runnable {
        public b() {
        }

        public void run() {
            SettingsAboutMicroMsgUI settingsAboutMicroMsgUI = SettingsAboutMicroMsgUI.this;
            int i15 = SettingsAboutMicroMsgUI.f144806x;
            settingsAboutMicroMsgUI.V7(false);
        }
    }

    public class c implements wh3.c {
        public c() {
        }

        @Override // wh3.c
        public void a(boolean z15, i iVar) {
            if (z15) {
                SettingsAboutMicroMsgUI settingsAboutMicroMsgUI = SettingsAboutMicroMsgUI.this;
                int i15 = SettingsAboutMicroMsgUI.f144806x;
                settingsAboutMicroMsgUI.V7(false);
            }
        }
    }

    public static void T7(SettingsAboutMicroMsgUI settingsAboutMicroMsgUI) {
        settingsAboutMicroMsgUI.getClass();
        b0 d15 = z.d();
        f1 f1Var = new f1(settingsAboutMicroMsgUI);
        settingsAboutMicroMsgUI.f144818s = f1Var;
        d15.a(255, f1Var);
        com.tencent.mm.modelsimple.b0 b0Var = new com.tencent.mm.modelsimple.b0(2);
        b0Var.f79310f = 1;
        z.d().f(b0Var);
        MTimerHandler mTimerHandler = new MTimerHandler(Looper.getMainLooper(), (MTimerHandler.CallBack) new g1(settingsAboutMicroMsgUI, b0Var), false);
        settingsAboutMicroMsgUI.f144817r = mTimerHandler;
        mTimerHandler.startTimer(3000);
        settingsAboutMicroMsgUI.f144816q = j.Q(settingsAboutMicroMsgUI.getContext(), settingsAboutMicroMsgUI.getString(R.string.f367625yv), settingsAboutMicroMsgUI.getString(R.string.lbd), true, false, new h1(settingsAboutMicroMsgUI, b0Var));
    }

    public static void U7(SettingsAboutMicroMsgUI settingsAboutMicroMsgUI) {
        settingsAboutMicroMsgUI.getClass();
        MMEntryLock.unlock("welcome_page_show");
        m0.a(settingsAboutMicroMsgUI, true);
        d.a().C30();
        ((MMNotification) ((np2.d) yz3.j.c(np2.d.class)).BF()).h();
        g.a aVar = uu3.g.f320474a;
        AppCompatActivity context = settingsAboutMicroMsgUI.getContext();
        ((s.c) aVar).getClass();
        MMAppMgr.e(context, true);
        settingsAboutMicroMsgUI.finish();
    }

    public final void V7(boolean z15) {
        String str;
        k14.g preferenceScreen = getPreferenceScreen();
        this.f144807e = preferenceScreen;
        preferenceScreen.removeAll();
        this.f144807e.b(R.xml.f370608c1);
        SettingsAboutMMHeaderPreference settingsAboutMMHeaderPreference = (SettingsAboutMMHeaderPreference) this.f144807e.a("settings_about_mm_header");
        int i15 = yv3.d.f349176g;
        if (i15 < 671088896 || i15 > 671089151) {
            str = ChannelUtil.formatVersion(getContext(), yv3.d.f349176g);
        } else {
            str = "8.0.1";
        }
        if (yv3.d.f349180k || BuildInfo.IS_FLAVOR_BLUE) {
            str = str + " " + k.b(this);
        }
        settingsAboutMMHeaderPreference.L = str;
        if (LocaleUtil.isSimplifiedChineseAppLang()) {
            NormalIconNewTipPreference normalIconNewTipPreference = (NormalIconNewTipPreference) this.f144807e.a("settings_update");
            int nullAsNil = Util.nullAsNil((Integer) z.s().i().e(12304, null));
            if (nullAsNil < 1) {
                ro2.b.YN0().k(normalIconNewTipPreference);
            }
            normalIconNewTipPreference.l0(this.f144807e);
            normalIconNewTipPreference.j0();
            if (!normalIconNewTipPreference.n(nullAsNil > 0)) {
                if (nullAsNil > 0) {
                    normalIconNewTipPreference.a0(0);
                    String str2 = "" + nullAsNil;
                    int b15 = t1.b(getContext(), nullAsNil);
                    normalIconNewTipPreference.R = str2;
                    normalIconNewTipPreference.S = b15;
                    normalIconNewTipPreference.l(com.tencent.mm.plugin.newtips.model.n.MMNEWTIPS_SHOWTYPE_COUNTER, true);
                } else {
                    normalIconNewTipPreference.a0(8);
                    normalIconNewTipPreference.R = "";
                    normalIconNewTipPreference.S = -1;
                }
            }
        }
        ro2.b.YN0().k((PrivacyUpdatePreference) this.f144807e.a("privacy_update"));
        if (z15) {
            this.f144807e.o("funtion_update");
        } else if (((wh3.b) yz3.j.c(wh3.b.class)).DY()) {
            IconPreference iconPreference = (IconPreference) this.f144807e.a("funtion_check_update");
            SharedPreferences sharedPreferences = MMApplicationContext.getContext().getSharedPreferences("UpdaterConfigSharedPreferences", 0);
            m.f(sharedPreferences, "getContext().getSharedPr…me, Context.MODE_PRIVATE)");
            String formatVersion = ChannelUtil.formatVersion(null, sharedPreferences.getInt("KeyTinkerPatchVersion", 0));
            SharedPreferences sharedPreferences2 = MMApplicationContext.getContext().getSharedPreferences("UpdaterConfigSharedPreferences", 0);
            m.f(sharedPreferences2, "getContext().getSharedPr…me, Context.MODE_PRIVATE)");
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "updateUpdate,versionTmp = %s, version = %s, UpdaterConfig.INSTANCE.getUpdaterSharePreference().getInt(ConstantsUpdater.KeyTinkerPatchVersion, 0) = %s, ConstantsProtocal.CLIENT_VERSION = %s", formatVersion, str, Integer.valueOf(sharedPreferences2.getInt("KeyTinkerPatchVersion", 0)), Integer.valueOf(yv3.d.f349176g));
            if (Util.isNullOrNil(formatVersion) || Util.isNullOrNil(str) || formatVersion.equals(str) || formatVersion.equals("0.0")) {
                iconPreference.M("");
            } else {
                i iVar = this.f144812j;
                if (iVar == null || iVar.i() != 2) {
                    iconPreference.M(formatVersion);
                } else {
                    iconPreference.M("");
                }
            }
            if (((h) yz3.j.c(h.class)).Xj0(h.c.f232262q5, 0) == 1) {
                iconPreference.a0(8);
                iconPreference.M("");
            } else {
                i iVar2 = this.f144812j;
                if (iVar2 == null || iVar2.i() != 2) {
                    iconPreference.a0(0);
                    iconPreference.R = getString(R.string.f367553wv);
                    iconPreference.S = R.drawable.asx;
                } else {
                    iconPreference.a0(8);
                }
            }
            i iVar3 = this.f144812j;
            if (iVar3 != null) {
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "updateUpdate response= %s", iVar3);
            }
            this.f144807e.o("funtion_update");
        } else if (((wh3.b) yz3.j.c(wh3.b.class)).TL0()) {
            IconSummaryPreference iconSummaryPreference = (IconSummaryPreference) this.f144807e.a("funtion_update");
            iconSummaryPreference.N = 0;
            iconSummaryPreference.L = getString(R.string.f367553wv);
            iconSummaryPreference.M = R.drawable.asx;
            iconSummaryPreference.S = 0;
            TextView textView = iconSummaryPreference.W;
            if (textView != null) {
                textView.setVisibility(0);
            }
            this.f144807e.o("funtion_check_update");
        } else {
            this.f144807e.o("funtion_update");
        }
        if (!LocaleUtil.isSimplifiedChineseAppLang()) {
            this.f144807e.n("settings_report", true);
        }
        uu3.g.f320474a.getClass();
        this.f144807e.n("funtion_about_wechat", true);
        if (!Util.isNullOrNil((String) z.s().i().f(w1.a.P8, null))) {
            IconPreference iconPreference2 = (IconPreference) this.f144807e.a("funtion_crowdtest_update");
            if (((l30.a) ((ut.c) yz3.j.c(ut.c.class)).aU()).b(262157, 266263)) {
                iconPreference2.d0(0);
            }
        } else {
            this.f144807e.o("funtion_crowdtest_update");
        }
        if (!BuildInfo.IS_FLAVOR_BLUE) {
            this.f144807e.n("funtion_about_flavor_blue", true);
            this.f144807e.n("funtion_invite_flavor_blue", true);
        } else {
            IconPreference iconPreference3 = (IconPreference) this.f144807e.a("funtion_about_flavor_blue");
            if (((l30.a) ((ut.c) yz3.j.c(ut.c.class)).aU()).b(262164, 266270)) {
                iconPreference3.d0(0);
            }
        }
        if (WeChatBrands.Business.Entries.MeSetAboutIntros.banned()) {
            this.f144807e.o("settings_update");
        }
        this.f144807e.notifyDataSetChanged();
    }

    /* JADX WARNING: Removed duplicated region for block: B:29:0x0255  */
    /* JADX WARNING: Removed duplicated region for block: B:32:0x025d  */
    @Override // com.tencent.mm.ui.base.preference.MMPreference
    public View getBottomView() {
        LinearLayout linearLayout;
        int i15;
        char c15;
        int i16;
        LinearLayout linearLayout2 = (LinearLayout) t2.b(getContext()).inflate(R.layout.ckz, (ViewGroup) null);
        TextView textView = (TextView) linearLayout2.findViewById(R.id.o2s);
        TextView textView2 = (TextView) linearLayout2.findViewById(R.id.o2q);
        TextView textView3 = (TextView) linearLayout2.findViewById(R.id.o2r);
        TextView textView4 = (TextView) linearLayout2.findViewById(R.id.h1s);
        TextView textView5 = (TextView) linearLayout2.findViewById(R.id.o2p);
        TextView textView6 = (TextView) linearLayout2.findViewById(R.id.cj8);
        textView.setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359312ja)) * gy3.a.l(getContext()));
        textView2.setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359312ja)) * gy3.a.l(getContext()));
        textView3.setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359312ja)) * gy3.a.l(getContext()));
        textView4.setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359312ja)) * gy3.a.l(getContext()));
        textView5.setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359312ja)) * gy3.a.l(getContext()));
        textView6.setTextSize(0, ((float) gy3.a.f(getContext(), R.dimen.f359312ja)) * gy3.a.l(getContext()));
        String obj = z.s().i().e(274436, "").toString();
        if (Util.isNullOrNil(obj)) {
            obj = LocaleUtil.getCurrentCountryCode();
        }
        if (!Util.isNullOrNil(obj) && !Util.isAllAlpha(obj)) {
            obj = "";
        }
        if (obj.equalsIgnoreCase("cn")) {
            textView3.setVisibility(0);
            int Xj0 = ((h) yz3.j.c(h.class)).Xj0(h.c.UE, 1);
            if (Xj0 == 1) {
                i16 = 0;
                this.f144820u = true;
                this.f144821v = false;
                this.f144822w = false;
            } else if (Xj0 == 2) {
                i16 = 0;
                this.f144820u = true;
                this.f144821v = true;
                this.f144822w = false;
            } else if (Xj0 != 3) {
                i16 = 0;
                this.f144820u = false;
                this.f144821v = false;
                this.f144822w = false;
            } else {
                i16 = 0;
                this.f144820u = true;
                this.f144821v = true;
                this.f144822w = true;
            }
            if (this.f144820u) {
                textView4.setVisibility(i16);
                textView4.setText(R.string.fyz);
                if (this.f144821v || this.f144822w) {
                    SpannableString spannableString = new SpannableString(textView4.getText());
                    linearLayout = linearLayout2;
                    spannableString.setSpan(new a1(this, 1, null), 0, getString(R.string.fyz).length(), 17);
                    textView4.setText(spannableString);
                    ((hz.h) yz3.j.c(hz.h.class)).p4(textView4, spannableString);
                    String string = getString(R.string.gbc, LocaleUtil.getApplicationLanguage(), obj, "setting", 0, 0);
                    String string2 = getString(R.string.gba, "aboutpage", obj);
                    String string3 = getString(R.string.k4f, LocaleUtil.getApplicationLanguage(), obj);
                    String string4 = getString(R.string.gb6, LocaleUtil.getApplicationLanguage(), obj);
                    textView.setText(String.format("<a href='%s'>%s</a>", string3, getString(R.string.gb8)));
                    textView2.setText(String.format("<a href='%s'>%s</a>", string, getString(R.string.hln)));
                    textView3.setText(String.format("<a href='%s'>%s</a>", string2, getString(R.string.hlo)));
                    textView5.setText(String.format("<a href='%s'>%s</a>", string4, getString(R.string.gb5)));
                    ((hz.h) yz3.j.c(hz.h.class)).hJ(textView, 1);
                    ((hz.h) yz3.j.c(hz.h.class)).hJ(textView2, 1);
                    ((hz.h) yz3.j.c(hz.h.class)).hJ(textView5, 1);
                    ((hz.h) yz3.j.c(hz.h.class)).hJ(textView3, 1);
                    if (obj.equalsIgnoreCase("KR")) {
                        textView5.setVisibility(0);
                    }
                    if (s34.d.f299149a != null) {
                        t0.WN0().getClass();
                        InputFilter[] filters = textView6.getFilters();
                        ArrayList arrayList = new ArrayList();
                        for (InputFilter inputFilter : filters) {
                            if (!(inputFilter instanceof n34.a)) {
                                arrayList.add(inputFilter);
                            }
                        }
                        textView6.setFilters((InputFilter[]) arrayList.toArray(new InputFilter[0]));
                    }
                    i15 = 2022;
                    if (!Util.isNullOrNil(BuildInfo.TIME) && !BuildInfo.TIME.equals("null")) {
                        Date parse = new SimpleDateFormat(TimeUtil.YYYY2MM2DD_HH1MM1SS).parse(BuildInfo.TIME);
                        Calendar instance = Calendar.getInstance();
                        instance.setTime(parse);
                        i15 = instance.get(1);
                    }
                    c15 = 0;
                    Resources resources = linearLayout.getResources();
                    Object[] objArr = new Object[1];
                    objArr[c15] = Integer.valueOf(i15);
                    textView6.setText(resources.getString(R.string.f367408su, objArr));
                    return linearLayout;
                }
            }
        }
        linearLayout = linearLayout2;
        String string5 = getString(R.string.gbc, LocaleUtil.getApplicationLanguage(), obj, "setting", 0, 0);
        String string22 = getString(R.string.gba, "aboutpage", obj);
        String string32 = getString(R.string.k4f, LocaleUtil.getApplicationLanguage(), obj);
        String string42 = getString(R.string.gb6, LocaleUtil.getApplicationLanguage(), obj);
        textView.setText(String.format("<a href='%s'>%s</a>", string32, getString(R.string.gb8)));
        textView2.setText(String.format("<a href='%s'>%s</a>", string5, getString(R.string.hln)));
        textView3.setText(String.format("<a href='%s'>%s</a>", string22, getString(R.string.hlo)));
        textView5.setText(String.format("<a href='%s'>%s</a>", string42, getString(R.string.gb5)));
        ((hz.h) yz3.j.c(hz.h.class)).hJ(textView, 1);
        ((hz.h) yz3.j.c(hz.h.class)).hJ(textView2, 1);
        ((hz.h) yz3.j.c(hz.h.class)).hJ(textView5, 1);
        ((hz.h) yz3.j.c(hz.h.class)).hJ(textView3, 1);
        if (obj.equalsIgnoreCase("KR")) {
        }
        if (s34.d.f299149a != null) {
        }
        i15 = 2022;
        try {
            Date parse2 = new SimpleDateFormat(TimeUtil.YYYY2MM2DD_HH1MM1SS).parse(BuildInfo.TIME);
            Calendar instance2 = Calendar.getInstance();
            instance2.setTime(parse2);
            i15 = instance2.get(1);
            c15 = 0;
        } catch (Exception e15) {
            c15 = 0;
            Log.printErrStackTrace("MicroMsg.SettingsAboutMicroMsgUI", e15, "", new Object[0]);
        }
        Resources resources2 = linearLayout.getResources();
        Object[] objArr2 = new Object[1];
        objArr2[c15] = Integer.valueOf(i15);
        textView6.setText(resources2.getString(R.string.f367408su, objArr2));
        return linearLayout;
    }

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

    @Override // com.tencent.mm.ui.MMActivity
    public void initView() {
        setMMTitle("");
        setActionbarColor(getContext().getResources().getColor(R.color.f357929c));
        setNavigationbarColor(getContext().getResources().getColor(R.color.f357929c));
        setBackGroundColorResource(R.color.aaw);
        setBackBtn(new a());
        if (getListView() != null) {
            int dimensionPixelSize = getContext().getResources().getDimensionPixelSize(R.dimen.f359087cz);
            getListView().setPadding(dimensionPixelSize, 0, dimensionPixelSize, 0);
            getListView().setBackgroundColor(getContext().getResources().getColor(R.color.f357929c));
        }
        if (((wh3.b) yz3.j.c(wh3.b.class)).DY()) {
            this.f144809g = true;
        }
    }

    @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);
        hideActionbarLine();
        initView();
        z.d().a(3899, this);
        ((wh3.b) yz3.j.c(wh3.b.class)).rb(this.f144819t);
        String Ea = ((wh3.b) yz3.j.c(wh3.b.class)).Ea(true);
        this.f144808f = Ea;
        if (!Util.isNullOrNil(Ea)) {
            q.INSTANCE.idkeyStat(1429, 32, 1, false);
        }
        ((wh3.b) yz3.j.c(wh3.b.class)).lx(false, true, true);
        if (getIntent().getBooleanExtra("mmdiff_udpate_maunal_cgi", false)) {
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "start. manualCheckUpdate");
            if (((wh3.b) yz3.j.c(wh3.b.class)).dQ()) {
                ((wh3.b) yz3.j.c(wh3.b.class)).TI(0, this);
            }
        }
        V7(true);
        this.f144813n = System.currentTimeMillis();
        Log.i("MicroMsg.SettingsAboutMicroMsgUI", "");
        if (((wh3.b) yz3.j.c(wh3.b.class)).dQ()) {
            String Sz0 = ((wh3.b) yz3.j.c(wh3.b.class)).Sz0();
            String ls02 = ((wh3.b) yz3.j.c(wh3.b.class)).ls0();
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "NetSceneManualCheckWxUpdate,basePatchId = %s, tinkerPatchId = %s.", Sz0, ls02);
            LinkedList<yv3> rq4 = ((wh3.b) yz3.j.c(wh3.b.class)).rq();
            Iterator<yv3> it = rq4.iterator();
            while (it.hasNext()) {
                yv3 next = it.next();
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "NetSceneManualCheckWxUpdate,item.key = %s, item.value = %s, item.op = %s, item.values = %s.", next.f43805d, next.f43806e, next.f43807f, next.f43808g);
            }
            z.d().f((y) ((f) yz3.j.c(f.class)).Zb0(Sz0, ls02, rq4, 4));
        }
    }

    @Override // 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
    public void onDestroy() {
        ((wh3.b) yz3.j.c(wh3.b.class)).bn(this.f144819t);
        z.d().p(3899, this);
        if (this.f144811i) {
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "clear red dot for maunal when it has clicked.");
            ((wh3.b) yz3.j.c(wh3.b.class)).ay(true);
        }
        ((PrivacyUpdatePreference) this.f144807e.a("privacy_update")).getClass();
        if (PrivacyUpdatePreference.R) {
            PrivacyUpdatePreference.R = false;
        }
        super.onDestroy();
    }

    @Override // com.tencent.mm.ui.vas.VASActivity
    public void onPageEnterAnimEnd() {
        super.onPageEnterAnimEnd();
        if (this.f144814o) {
            V7(false);
        } else {
            this.f144814o = true;
        }
    }

    @Override // com.tencent.mm.ui.base.preference.MMPreference
    public boolean onPreferenceTreeClick(k14.g gVar, Preference preference) {
        boolean z15;
        String str;
        String str2 = preference.f177766r;
        Log.i("MicroMsg.SettingsAboutMicroMsgUI", str2 + " item has been clicked!");
        if (str2.equals("settings_update")) {
            if (LocaleUtil.isSimplifiedChineseAppLang()) {
                ro2.b.YN0().a(39);
                String string = getString(R.string.iz_, Integer.valueOf(z.b().g()), Integer.valueOf(Util.nullAsNil((Integer) z.s().i().e(12304, null))));
                if (string != null) {
                    z.s().i().K(12304, 0);
                    if (((ku.f) yz3.j.c(ku.f.class)).Jy("wxalite2ceddca8b296458a527661862c5664b2")) {
                        if (((ku.f) yz3.j.c(ku.f.class)).R00("wxalite2ceddca8b296458a527661862c5664b2") == null) {
                            if (((ku.f) yz3.j.c(ku.f.class)).Bj() == null) {
                                ((ku.f) yz3.j.c(ku.f.class)).Yy0();
                            }
                            ((ku.f) yz3.j.c(ku.f.class)).Dg0("wxalite2ceddca8b296458a527661862c5664b2", null);
                        } else {
                            Bundle bundle = new Bundle();
                            bundle.putString("appId", "wxalite2ceddca8b296458a527661862c5664b2");
                            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "open liteapp:wxalite2ceddca8b296458a527661862c5664b2,page:");
                            ((ku.f) yz3.j.c(ku.f.class)).V40(getContext(), bundle, true, false, new d1(this));
                        }
                    }
                    Intent intent = new Intent();
                    intent.putExtra(FFmpegMetadataRetriever.METADATA_KEY_TITLE, getString(R.string.iz9));
                    intent.putExtra("rawUrl", string);
                    intent.putExtra("showShare", false);
                    sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent, null);
                }
                return true;
            }
            if (((ku.f) yz3.j.c(ku.f.class)).Jy("wxalite2ceddca8b296458a527661862c5664b2")) {
                if (((ku.f) yz3.j.c(ku.f.class)).R00("wxalite2ceddca8b296458a527661862c5664b2") == null) {
                    if (((ku.f) yz3.j.c(ku.f.class)).Bj() == null) {
                        ((ku.f) yz3.j.c(ku.f.class)).Yy0();
                    }
                    ((ku.f) yz3.j.c(ku.f.class)).Dg0("wxalite2ceddca8b296458a527661862c5664b2", null);
                } else {
                    Bundle bundle2 = new Bundle();
                    bundle2.putString("appId", "wxalite2ceddca8b296458a527661862c5664b2");
                    Log.i("MicroMsg.SettingsAboutMicroMsgUI", "open liteapp:wxalite2ceddca8b296458a527661862c5664b2,page:");
                    ((ku.f) yz3.j.c(ku.f.class)).V40(getContext(), bundle2, true, false, new i1(this));
                    return true;
                }
            }
            String string2 = getString(R.string.ira, LocaleUtil.getApplicationLanguage(), Integer.valueOf(yv3.d.f349176g));
            Intent intent2 = new Intent();
            intent2.putExtra("rawUrl", string2);
            intent2.putExtra("showShare", false);
            intent2.putExtra("show_bottom", false);
            sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent2, null);
            return true;
        } else if (str2.equals("funtion_update")) {
            q qVar = q.INSTANCE;
            qVar.idkeyStat(405, 16, 1, true);
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "funtion_update, click, webViewUrl = %s", this.f144808f);
            if (Util.isNullOrNil(this.f144808f)) {
                Intent intent3 = new Intent();
                intent3.putExtra("showShare", true);
                intent3.putExtra("show_bottom", false);
                if (((wh3.b) yz3.j.c(wh3.b.class)).TL0()) {
                    str = getString(R.string.irb, LocaleUtil.getApplicationLanguage(), Integer.valueOf(((wh3.b) yz3.j.c(wh3.b.class)).HD0()), 1);
                    intent3.putExtra("showShare", false);
                } else {
                    str = "";
                }
                intent3.putExtra("rawUrl", str);
                sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent3, null);
                ((wh3.b) yz3.j.c(wh3.b.class)).Wk0();
                return true;
            }
            String str3 = this.f144808f;
            qVar.idkeyStat(1429, 31, 1, false);
            Intent intent4 = new Intent();
            intent4.putExtra("rawUrl", str3);
            sv3.b.j(MMApplicationContext.getContext(), "webview", ".ui.tools.WebViewUI", intent4, null);
            return true;
        } else {
            if (str2.equals("funtion_check_update")) {
                if (!this.f144810h) {
                    Log.i("MicroMsg.SettingsAboutMicroMsgUI", "onClick cgi no hasFinishCgi callback");
                }
                q.INSTANCE.idkeyStat(405, 17, 1, true);
                ((p) yz3.j.c(p.class)).Vq(2);
                i iVar = this.f144812j;
                if (iVar != null && !Util.isNullOrNil(iVar.p())) {
                    boolean Pb = ((wh3.b) yz3.j.c(wh3.b.class)).Pb(getContext(), this.f144812j.p());
                    Log.i("MicroMsg.SettingsAboutMicroMsgUI", "funtion_check_update, checkAndShowInstallPatchDialogm success = %s, response.newApkMd5 = %s, ", Boolean.valueOf(Pb), this.f144812j.p());
                    if (Pb) {
                        return true;
                    }
                }
                if (((j00.g) yz3.j.c(j00.g.class)).lY(getContext())) {
                    ((j00.g) yz3.j.c(j00.g.class)).La0(getContext());
                    return true;
                }
                boolean hY = ((wh3.b) yz3.j.c(wh3.b.class)).hY();
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "funtion_check_update, isHashApkToInstall = %s.", Boolean.valueOf(hY));
                this.f144811i = true;
                if (hY) {
                    if (this.f144809g) {
                        ((lo.n) yz3.j.c(lo.n.class)).BM(107, 4);
                    }
                    ((lo.n) yz3.j.c(lo.n.class)).BM(105, 4);
                    ((wh3.b) yz3.j.c(wh3.b.class)).ef();
                    return true;
                } else if (((wh3.b) yz3.j.c(wh3.b.class)).dQ()) {
                    Log.i("MicroMsg.SettingsAboutMicroMsgUI", "response = %s.", this.f144812j);
                    if (this.f144812j != null) {
                        ((lo.n) yz3.j.c(lo.n.class)).BM(TPReportParams.LIVE_STEP_PLAY, this.f144812j.i());
                    }
                    if (this.f144812j == null) {
                        ((wh3.b) yz3.j.c(wh3.b.class)).TI(0, this);
                    } else {
                        ((wh3.b) yz3.j.c(wh3.b.class)).OV(this.f144812j, 0, true);
                    }
                    if (this.f144809g) {
                        ((lo.n) yz3.j.c(lo.n.class)).BM(108, 4);
                    }
                    ((lo.n) yz3.j.c(lo.n.class)).BM(106, 4);
                    return true;
                }
            } else if (str2.equals("funtion_about_wechat")) {
                Intent intent5 = new Intent();
                intent5.putExtra("from_about", true);
                sv3.b.j(this, "whatsnew", ".ui.WhatsNewUI", intent5, null);
                return true;
            } else if (str2.equals("settings_report")) {
                Intent intent6 = new Intent();
                intent6.putExtra("showShare", false);
                intent6.putExtra("show_feedback", false);
                intent6.putExtra("rawUrl", HttpWrapperBase.PROTOCAL_HTTPS + WeChatHosts.domainString(R.string.fyn) + "/security/readtemplate?t=complaints/index");
                sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent6, null);
                return true;
            } else if (str2.equals("settings_quit_wechat")) {
                j.j(getContext(), R.string.gqs, R.string.gqr, R.string.f367660zu, R.string.f367555wx, new e1(this), null);
                return true;
            } else if (str2.equals("funtion_crowdtest_update")) {
                ((l30.a) ((ut.c) yz3.j.c(ut.c.class)).aU()).h(262157, 266263);
                Intent intent7 = new Intent();
                intent7.putExtra("rawUrl", (String) z.s().i().f(w1.a.P8, null));
                intent7.putExtra("showShare", false);
                intent7.putExtra("show_bottom", false);
                sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent7, null);
                return true;
            } else if (str2.equals("funtion_about_flavor_blue")) {
                ((l30.a) ((ut.c) yz3.j.c(ut.c.class)).aU()).h(262164, 266270);
                ((l30.a) ((ut.c) yz3.j.c(ut.c.class)).aU()).p(262164, false);
                AppCompatActivity context = getContext();
                Intent intent8 = new Intent(this, SettingsAboutMicroMsgFlavorBlue.class);
                k30.a aVar = new k30.a();
                aVar.c(intent8);
                j30.a.d(context, aVar.b(), "com/tencent/mm/plugin/setting/ui/setting/SettingsAboutMicroMsgUI", "showFlavorBlueActivity", "()Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
                context.startActivity((Intent) aVar.a(0));
                j30.a.e(context, "com/tencent/mm/plugin/setting/ui/setting/SettingsAboutMicroMsgUI", "showFlavorBlueActivity", "()Z", "Undefined", "startActivity", "(Landroid/content/Intent;)V");
            } else if (str2.equals("funtion_invite_flavor_blue")) {
                Intent intent9 = new Intent();
                intent9.putExtra(FFmpegMetadataRetriever.METADATA_KEY_TITLE, getString(R.string.fhh));
                intent9.putExtra("rawUrl", "https://mp.weixin.qq.com/wxawap/devwxsubscribe#wechat_redirect");
                intent9.putExtra("showShare", false);
                intent9.putExtra("show_bottom", false);
                sv3.b.j(getContext(), "webview", ".ui.tools.WebViewUI", intent9, null);
            } else if (str2.equals("privacy_update")) {
                PrivacyUpdatePreference privacyUpdatePreference = (PrivacyUpdatePreference) gVar.a("privacy_update");
                privacyUpdatePreference.getClass();
                PrivacyUpdatePreference.R = true;
                ImageView imageView = (ImageView) ((wg4.n) privacyUpdatePreference.Q).getValue();
                if (imageView != null) {
                    imageView.setVisibility(PrivacyUpdatePreference.R ? 8 : 0);
                }
                h65 h65 = privacyUpdatePreference.N;
                if (h65 != null) {
                    Intent intent10 = new Intent();
                    intent10.putExtra("rawUrl", h65.f23425t);
                    z15 = false;
                    intent10.putExtra("showShare", false);
                    sv3.b.j(privacyUpdatePreference.f177755d, "webview", ".ui.tools.WebViewUI", intent10, null);
                } else {
                    z15 = false;
                }
                ro2.b.YN0().a(42);
                return z15;
            }
            return false;
        }
    }

    @Override // 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 onResume() {
        super.onResume();
        if (!this.f144815p) {
            this.f144815p = true;
        } else {
            V7(false);
        }
    }

    @Override // yf0.n
    public void onSceneEnd(int i15, int i16, String str, y yVar) {
        boolean z15;
        int i17;
        if (yVar instanceof e) {
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "onscenend, cgi cost time = " + (System.currentTimeMillis() - this.f144813n));
            i H0 = ((e) yVar).H0();
            i BT = ((lo.j) yz3.j.c(lo.j.class)).BT();
            if (BT == null || !((wh3.b) yz3.j.c(wh3.b.class)).RK(BT)) {
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "no use hardcode respone");
            } else {
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "hardcode respone");
                H0 = BT;
            }
            if (H0 != null) {
                H0.v(false);
            }
            i w75 = ((f) yz3.j.c(f.class)).w7(H0, false);
            if (w75 == null || !((wh3.b) yz3.j.c(wh3.b.class)).RK(w75)) {
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "no use x key patch respone");
            } else {
                q.INSTANCE.idkeyStat(1429, 39, 1, false);
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "use x key patch respone");
                ((lo.n) yz3.j.c(lo.n.class)).BM(262, 4);
                H0 = w75;
            }
            if (H0 == null || !H0.l() || !H0.o() || H0.m() || H0.q()) {
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "not handle response");
                z15 = false;
            } else {
                z15 = true;
            }
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "onscenend, respense ok = " + (System.currentTimeMillis() - this.f144813n));
            Log.i("MicroMsg.SettingsAboutMicroMsgUI", "onSceneEnd, hasUpdatePatch = %s, response = %s.", Boolean.valueOf(z15), H0);
            this.f144810h = true;
            boolean lY = ((j00.g) yz3.j.c(j00.g.class)).lY(this);
            if (z15) {
                this.f144812j = H0;
                Log.i("MicroMsg.SettingsAboutMicroMsgUI", "TinkerSyncResponse packageType:%d", Integer.valueOf(H0.i()));
                if (H0.i() == 2 || H0.i() == 3 || H0.i() == 4) {
                    try {
                        i17 = Integer.decode(H0.getClientVersion()).intValue();
                    } catch (Exception unused) {
                        i17 = 0;
                    }
                    int Li0 = ((wh3.b) yz3.j.c(wh3.b.class)).Li0();
                    Log.i("MicroMsg.SettingsAboutMicroMsgUI", "save update client version %s %d, XkeyBaseMinApkVersion = %s", H0.getClientVersion(), Integer.valueOf(i17), Integer.valueOf(Li0));
                    if (i17 <= 0 || i17 < Li0) {
                        SharedPreferences sharedPreferences = MMApplicationContext.getContext().getSharedPreferences("UpdaterConfigSharedPreferences", 0);
                        m.f(sharedPreferences, "getContext().getSharedPr…me, Context.MODE_PRIVATE)");
                        sharedPreferences.edit().putInt("RedCheckManualUpdaterTab", 0).apply();
                        this.f144809g = false;
                    } else {
                        SharedPreferences sharedPreferences2 = MMApplicationContext.getContext().getSharedPreferences("UpdaterConfigSharedPreferences", 0);
                        m.f(sharedPreferences2, "getContext().getSharedPr…me, Context.MODE_PRIVATE)");
                        sharedPreferences2.edit().putInt("KeyTinkerPatchVersion", i17).putInt("RedCheckManualUpdaterTab", 1).apply();
                        this.f144809g = true;
                    }
                }
            } else if (lY) {
                this.f144809g = ((wh3.b) yz3.j.c(wh3.b.class)).DY();
                SharedPreferences sharedPreferences3 = MMApplicationContext.getContext().getSharedPreferences("UpdaterConfigSharedPreferences", 0);
                m.f(sharedPreferences3, "getContext().getSharedPr…me, Context.MODE_PRIVATE)");
                sharedPreferences3.edit().putInt("RedCheckManualUpdaterTab", 1).apply();
            } else {
                this.f144809g = false;
                ((wh3.b) yz3.j.c(wh3.b.class)).ay(true);
            }
            ((xc4.j) xc4.j.f338034d).z(new b());
        }
    }

    @Override // com.tencent.mm.ui.base.preference.MMPreference
    public Boolean showBottomMask() {
        return Boolean.TRUE;
    }
}