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


package o12;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import androidx.lifecycle.a0;
import bw3.bv1;
import bw3.qu1;
import bw3.xz1;
import com.tencent.mm.plugin.FinderCommonFeatureService;
import com.tencent.mm.plugin.finder.extension.reddot.e1;
import com.tencent.mm.plugin.finder.extension.reddot.x0;
import com.tencent.mm.plugin.finder.utils.x1;
import com.tencent.mm.plugin.newtips.NewTipPreference;
import com.tencent.mm.sdk.platformtools.Util;
import com.tencent.mm.ui.MMActivity;
import com.tencent.mm.ui.base.preference.Preference;
import com.tenpay.android.wechat.PayuSecureEncrypt;
import d32.ta;
import d60.z;
import ez1.c1;
import ez1.f1;
import jt3.b;
import k14.g;
import lh4.m;
import yz3.d;
import yz3.j;
import zz1.e;

public final class f implements i {

    /* renamed from: a  reason: collision with root package name */
    public final String f274205a;

    /* renamed from: b  reason: collision with root package name */
    public final g f274206b;

    /* renamed from: c  reason: collision with root package name */
    public final Context f274207c;

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

    public static final class a<T> implements a0 {

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

        public a(f fVar) {
            this.f274209d = fVar;
        }

        @Override // androidx.lifecycle.a0
        public void onChanged(Object obj) {
            boolean z15;
            String str;
            bv1 bv12;
            qu1 qu12;
            x0.a aVar = (x0.a) obj;
            f fVar = this.f274209d;
            Preference a15 = fVar.f274206b.a(fVar.f274205a);
            m.e(a15, "null cannot be cast to non-null type com.tencent.mm.plugin.newtips.NewTipPreference");
            NewTipPreference newTipPreference = (NewTipPreference) a15;
            boolean z16 = false;
            if (aVar != null) {
                z15 = aVar.f109520a;
            } else {
                z15 = false;
            }
            newTipPreference.i(z15);
            if (aVar != null && aVar.f109520a) {
                z16 = true;
            }
            if (z16) {
                xz1 l15 = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).lJ0().l("OriginalEntrance");
                e1 c65 = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).lJ0().c6("OriginalEntrance");
                if (c65 == null || (qu12 = c65.field_ctrInfo) == null || (str = qu12.f34624h) == null) {
                    str = "";
                }
                if (!m.b(str, this.f274209d.f274208d)) {
                    f fVar2 = this.f274209d;
                    fVar2.f274208d = str;
                    if (c65 != null && l15 != null) {
                        c1 c1Var = c1.f210617a;
                        ta f15 = ta.W0.f(fVar2.f274207c);
                        if (f15 != null) {
                            bv12 = f15.l0();
                        } else {
                            bv12 = null;
                        }
                        c1.g(c1Var, PayuSecureEncrypt.ENCRYPT_VERSION_DEFAULT, c65, l15, 1, bv12, 0, null, 0, 0, 480, null);
                    }
                }
            }
        }
    }

    public f(String str, g gVar, Context context) {
        m.g(str, "name");
        m.g(gVar, "preferenceScreen");
        m.g(context, "context");
        this.f274205a = str;
        this.f274206b = gVar;
        this.f274207c = context;
    }

    @Override // o12.i
    public void a() {
        boolean z15;
        bv1 bv12;
        Preference a15 = this.f274206b.a(this.f274205a);
        m.e(a15, "null cannot be cast to non-null type com.tencent.mm.plugin.newtips.NewTipPreference");
        d c15 = j.c(f1.class);
        m.f(c15, "getService(FinderReportLogic::class.java)");
        f1 f1Var = (f1) c15;
        Context context = this.f274207c;
        View view = ((NewTipPreference) a15).N;
        if (view == null) {
            z15 = false;
        } else {
            z15 = view.getVisibility() == 0;
        }
        f1.EO0(f1Var, context, 6, 1, z15, 0, 0, null, 112, null);
        xz1 l15 = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).lJ0().l("OriginalEntrance");
        e1 c65 = ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).lJ0().c6("OriginalEntrance");
        if (!(c65 == null || l15 == null)) {
            c1 c1Var = c1.f210617a;
            ta f15 = ta.W0.f(this.f274207c);
            if (f15 != null) {
                bv12 = f15.l0();
            } else {
                bv12 = null;
            }
            c1.g(c1Var, PayuSecureEncrypt.ENCRYPT_VERSION_DEFAULT, c65, l15, 2, bv12, 0, null, 0, 0, 480, null);
        }
        ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).lJ0().e("OriginalEntrance");
        ((FinderCommonFeatureService) j.c(FinderCommonFeatureService.class)).lJ0().o("FinderPosterEntrance", new int[]{1000});
        e.f356376d.getClass();
        String d15 = ((b) z.q(b.class)).gv0().d("FinderShowOriginalCertificationUrl");
        if (Util.isNullOrNil(d15)) {
            d15 = "https://support.weixin.qq.com/cgi-bin/mmfindersupport-bin/newreadtemplate?t=page/outer_page/original_plan&wechat_real_lang=zh_CN";
        } else {
            m.f(d15, "url");
        }
        Intent intent = new Intent();
        intent.putExtra("rawUrl", d15);
        sv3.b.j(this.f274207c, "webview", ".ui.tools.WebViewUI", intent, null);
    }

    @Override // o12.i
    public void b(boolean z15) {
        this.f274206b.n(this.f274205a, true);
        if (x1.f119449a.d()) {
            this.f274206b.n(this.f274205a, false);
            x0 x0Var = x0.f109678a;
            androidx.lifecycle.z<x0.a> zVar = x0.f109696o;
            Context context = this.f274207c;
            m.e(context, "null cannot be cast to non-null type com.tencent.mm.ui.MMActivity");
            m60.d.t(zVar, (MMActivity) context, new a(this));
            if (z15) {
                d c15 = j.c(f1.class);
                m.f(c15, "getService(FinderReportLogic::class.java)");
                f1.EO0((f1) c15, this.f274207c, 6, 2, false, 0, 0, null, 120, null);
            }
        }
    }

    @Override // o12.i
    public String c() {
        return this.f274205a;
    }

    @Override // o12.i
    public void onCreate() {
    }

    @Override // o12.i
    public void onResume() {
    }

    @Override // o12.i
    public void onStop() {
        this.f274208d = "";
    }
}