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


package kn0;

import a50.g;
import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.tencent.mm.R;
import com.tencent.mm.plugin.appbrand.AppBrandRuntimeWC;
import com.tencent.mm.plugin.appbrand.config.AppBrandCustomLoadingConfig;
import com.tencent.mm.plugin.appbrand.config.AppBrandGlobalSystemConfig;
import com.tencent.mm.plugin.appbrand.config.AppBrandInitConfigWC;
import com.tencent.mm.plugin.appbrand.custom_loading.MagicGameLoadingImpl;
import com.tencent.mm.plugin.appbrand.page.AppBrandPageContainerWC;
import com.tencent.mm.plugin.appbrand.page.capsulebar.AppBrandEmbedCapsuleView;
import com.tencent.mm.plugin.appbrand.page.capsulebar.AppBrandeEmbedSingleCloseCapsuleBar;
import com.tencent.mm.plugin.appbrand.ui.AppBrandCircleProgressView;
import com.tencent.mm.plugin.appbrand.ui.k2;
import com.tencent.mm.plugin.appbrand.ui.l4;
import com.tencent.mm.plugin.appbrand.ui.w4;
import com.tencent.mm.sdk.platformtools.Log;
import com.tencent.mm.ui.t2;
import com.tencent.mm.ui.widget.RoundCornerLinearLayout;
import gy3.a;
import java.util.Objects;
import kz.e;
import lh4.m;
import mv0.c;
import t2.a;
import vf0.b;
import vf0.j;
import wg4.b0;

public class f extends FrameLayout implements l4 {

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

    /* renamed from: d  reason: collision with root package name */
    public final AppBrandRuntimeWC f247506d;

    /* JADX WARNING: Removed duplicated region for block: B:24:0x0300  */
    /* JADX WARNING: Removed duplicated region for block: B:26:0x0335  */
    public f(Context context, AppBrandRuntimeWC appBrandRuntimeWC) {
        super(context);
        this.f247506d = appBrandRuntimeWC;
        setBackgroundColor(0);
        setLayoutParams(new FrameLayout.LayoutParams(-1, -1));
        AppBrandInitConfigWC f25 = appBrandRuntimeWC.z1();
        c cVar = appBrandRuntimeWC.Q1;
        b bVar = cVar.f247486a;
        AppBrandCustomLoadingConfig appBrandCustomLoadingConfig = f25.f55431p0;
        Objects.requireNonNull(appBrandCustomLoadingConfig);
        String str = appBrandCustomLoadingConfig.f85408d;
        AppBrandInitConfigWC f26 = cVar.f247487b.z1();
        d dVar = new d(cVar, this);
        MagicGameLoadingImpl magicGameLoadingImpl = (MagicGameLoadingImpl) bVar;
        magicGameLoadingImpl.getClass();
        m.g(context, "context");
        m.g(str, "note");
        m.g(f26, "initConfig");
        String str2 = f26.f85470d;
        m.f(str2, "initConfig.appId");
        magicGameLoadingImpl.f85923c = str2;
        Log.i("MicroMsg.MagicGameLoadingImpl", "[gameload] init " + magicGameLoadingImpl.f85923c);
        magicGameLoadingImpl.f85934n = dVar;
        View inflate = t2.b(context).inflate(R.layout.db_, (ViewGroup) null);
        m.e(inflate, "null cannot be cast to non-null type android.view.ViewGroup");
        ViewGroup viewGroup = (ViewGroup) inflate;
        magicGameLoadingImpl.f85924d = viewGroup;
        magicGameLoadingImpl.f85925e = (ConstraintLayout) viewGroup.findViewById(R.id.pwo);
        ViewGroup viewGroup2 = magicGameLoadingImpl.f85924d;
        m.d(viewGroup2);
        Log.i("MicroMsg.MagicGameLoadingImpl", "[gameload] setUpDefaultView");
        magicGameLoadingImpl.f85926f = (ConstraintLayout) viewGroup2.findViewById(R.id.pwp);
        ConstraintLayout constraintLayout = (ConstraintLayout) viewGroup2.findViewById(R.id.pwo);
        FrameLayout frameLayout = (FrameLayout) viewGroup2.findViewById(R.id.pwu);
        LinearLayout linearLayout = (LinearLayout) viewGroup2.findViewById(R.id.pwt);
        ImageView imageView = (ImageView) viewGroup2.findViewById(R.id.pws);
        magicGameLoadingImpl.f85927g = imageView;
        m.d(imageView);
        imageView.setImageDrawable(w4.a());
        magicGameLoadingImpl.f85928h = (TextView) viewGroup2.findViewById(R.id.pww);
        magicGameLoadingImpl.f85929i = (ImageView) viewGroup2.findViewById(R.id.pwx);
        magicGameLoadingImpl.f85930j = (TextView) viewGroup2.findViewById(R.id.pwr);
        magicGameLoadingImpl.f85931k = (ImageView) viewGroup2.findViewById(R.id.pwq);
        float g15 = a.g(context) * ((float) magicGameLoadingImpl.f85922b);
        TextView textView = magicGameLoadingImpl.f85930j;
        if (textView != null) {
            textView.setTextSize(0, g15);
        }
        RoundCornerLinearLayout roundCornerLinearLayout = (RoundCornerLinearLayout) viewGroup2.findViewById(R.id.pwy);
        magicGameLoadingImpl.f85932l = roundCornerLinearLayout;
        if (roundCornerLinearLayout != null) {
            roundCornerLinearLayout.setOnClickListener(new n(magicGameLoadingImpl));
        }
        AppBrandCircleProgressView appBrandCircleProgressView = (AppBrandCircleProgressView) viewGroup2.findViewById(R.id.pwv);
        magicGameLoadingImpl.f85933m = appBrandCircleProgressView;
        m.d(appBrandCircleProgressView);
        Object obj = t2.a.f309129a;
        appBrandCircleProgressView.setCircleColor(a.d.a(context, R.color.BW_0_Alpha_0_1));
        AppBrandCircleProgressView appBrandCircleProgressView2 = magicGameLoadingImpl.f85933m;
        m.d(appBrandCircleProgressView2);
        appBrandCircleProgressView2.setDotWidth((float) context.getResources().getDimensionPixelSize(R.dimen.afg));
        AppBrandCircleProgressView appBrandCircleProgressView3 = magicGameLoadingImpl.f85933m;
        m.d(appBrandCircleProgressView3);
        appBrandCircleProgressView3.setDotColor(a.d.a(context, R.color.f357939m));
        AppBrandCircleProgressView appBrandCircleProgressView4 = magicGameLoadingImpl.f85933m;
        m.d(appBrandCircleProgressView4);
        appBrandCircleProgressView4.setCircleStrokeWidth((float) context.getResources().getDimensionPixelSize(R.dimen.aff));
        AppBrandCircleProgressView appBrandCircleProgressView5 = magicGameLoadingImpl.f85933m;
        m.d(appBrandCircleProgressView5);
        appBrandCircleProgressView5.setProgressColor(a.d.a(context, R.color.f357939m));
        AppBrandCircleProgressView appBrandCircleProgressView6 = magicGameLoadingImpl.f85933m;
        m.d(appBrandCircleProgressView6);
        appBrandCircleProgressView6.setProgressWidth((float) context.getResources().getDimensionPixelSize(R.dimen.afh));
        AppBrandCircleProgressView appBrandCircleProgressView7 = magicGameLoadingImpl.f85933m;
        m.d(appBrandCircleProgressView7);
        appBrandCircleProgressView7.f();
        k2.a(magicGameLoadingImpl.f85927g, magicGameLoadingImpl.f85933m, magicGameLoadingImpl.f85928h);
        String str3 = f26.f85472f;
        m.f(str3, "initConfig.iconUrl");
        String str4 = f26.f85471e;
        m.f(str4, "initConfig.brandName");
        Log.i("MicroMsg.MagicGameLoadingImpl", "[gameload] setAppInfo name:" + str4 + ",icon:" + str3);
        String str5 = b.f325587g;
        b bVar2 = b.q.f325637a;
        ImageView imageView2 = magicGameLoadingImpl.f85927g;
        m.d(imageView2);
        bVar2.b(imageView2, str3, null, j.f325646d);
        TextView textView2 = magicGameLoadingImpl.f85928h;
        m.d(textView2);
        textView2.setText(str4);
        if (f26.f85476j == 1) {
            ImageView imageView3 = magicGameLoadingImpl.f85929i;
            m.d(imageView3);
            imageView3.setVisibility(0);
        } else {
            ImageView imageView4 = magicGameLoadingImpl.f85929i;
            m.d(imageView4);
            imageView4.setVisibility(8);
        }
        int i15 = f26.f85478o;
        String str6 = f26.f85470d;
        m.f(str6, "initConfig.appId");
        if (i15 > 0) {
            try {
                Log.i("MicroMsg.MagicGameLoadingImpl", "[gameload] setAgeAppropriateImageView ageAppropriateLevel:%d,ageAppropriateIcon:%s", Integer.valueOf(i15), AppBrandGlobalSystemConfig.b().V);
                Object obj2 = new g(AppBrandGlobalSystemConfig.b().V).get(String.valueOf(i15));
                m.e(obj2, "null cannot be cast to non-null type kotlin.String");
                TextView textView3 = magicGameLoadingImpl.f85930j;
                m.d(textView3);
                textView3.setGravity(19);
                ImageView imageView5 = magicGameLoadingImpl.f85931k;
                m.d(imageView5);
                imageView5.setVisibility(0);
                String str7 = "https://game.weixin.qq.com/cgi-bin/minigame/static/age-tips/index.html?appid=" + str6 + "&age=" + i15 + "#wechat_redirect";
                ImageView imageView6 = magicGameLoadingImpl.f85931k;
                m.d(imageView6);
                imageView6.setOnClickListener(new l(context, str7));
                ImageView imageView7 = magicGameLoadingImpl.f85931k;
                m.d(imageView7);
                bVar2.b(imageView7, (String) obj2, null, new m(context));
            } catch (a50.f e15) {
                Log.printErrStackTrace("MicroMsg.MagicGameLoadingImpl", e15, "JSONException: setAgeAppropriateImageView ageAppropriateIcon age error", new Object[0]);
            } catch (Exception e16) {
                Log.printErrStackTrace("MicroMsg.MagicGameLoadingImpl", e16, "Exception: setAgeAppropriateImageView ageAppropriateIcon age error", new Object[0]);
            }
        } else {
            ImageView imageView8 = magicGameLoadingImpl.f85931k;
            m.d(imageView8);
            imageView8.setVisibility(8);
            TextView textView4 = magicGameLoadingImpl.f85930j;
            m.d(textView4);
            textView4.setGravity(17);
        }
        ((e) yz3.j.c(e.class)).N40(magicGameLoadingImpl.f85923c, str, magicGameLoadingImpl.f85925e);
        ((e) yz3.j.c(e.class)).Yz0(new k(magicGameLoadingImpl, dVar));
        View view = magicGameLoadingImpl.f85924d;
        m.e(view, "null cannot be cast to non-null type android.view.ViewGroup");
        MagicGameLoadingImpl magicGameLoadingImpl2 = (MagicGameLoadingImpl) cVar.f247486a;
        magicGameLoadingImpl2.getClass();
        Log.i("MicroMsg.MagicGameLoadingImpl", "[gameload] onStartHalfScreen");
        ((e) yz3.j.c(e.class)).cT("halfScreenStart", magicGameLoadingImpl2.f85923c, "");
        if (f25.f55431p0 == null) {
            FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -1);
            layoutParams.gravity = 17;
            addView(view, layoutParams);
            FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(-2, -2);
            layoutParams2.gravity = 53;
            AppBrandEmbedCapsuleView appBrandEmbedCapsuleView = new AppBrandEmbedCapsuleView(context, false, true);
            appBrandEmbedCapsuleView.setCloseBtnListener(new f$$a(appBrandRuntimeWC));
            appBrandEmbedCapsuleView.setExtendBtnListener(new f$$b(appBrandRuntimeWC));
            addView(appBrandEmbedCapsuleView, layoutParams2);
            return;
        }
        throw new IllegalStateException("initConfig.customLoadingConfig is null");
        ImageView imageView9 = magicGameLoadingImpl.f85931k;
        m.d(imageView9);
        imageView9.setVisibility(8);
        TextView textView5 = magicGameLoadingImpl.f85930j;
        m.d(textView5);
        textView5.setGravity(17);
        ((e) yz3.j.c(e.class)).N40(magicGameLoadingImpl.f85923c, str, magicGameLoadingImpl.f85925e);
        ((e) yz3.j.c(e.class)).Yz0(new k(magicGameLoadingImpl, dVar));
        View view2 = magicGameLoadingImpl.f85924d;
        m.e(view2, "null cannot be cast to non-null type android.view.ViewGroup");
        MagicGameLoadingImpl magicGameLoadingImpl22 = (MagicGameLoadingImpl) cVar.f247486a;
        magicGameLoadingImpl22.getClass();
        Log.i("MicroMsg.MagicGameLoadingImpl", "[gameload] onStartHalfScreen");
        ((e) yz3.j.c(e.class)).cT("halfScreenStart", magicGameLoadingImpl22.f85923c, "");
        if (f25.f55431p0 == null) {
        }
    }

    @Override // com.tencent.mm.plugin.appbrand.ui.l4
    public void F(kh4.a<b0> aVar) {
    }

    public void a() {
        View view;
        fx0.b bVar;
        View rootView;
        AppBrandRuntimeWC appBrandRuntimeWC = this.f247506d;
        m.g(appBrandRuntimeWC, "runtime");
        AppBrandPageContainerWC j25 = appBrandRuntimeWC.g0();
        if (j25 == null || (rootView = j25.getRootView()) == null) {
            view = null;
        } else {
            view = rootView.findViewById(R.id.w_);
        }
        if (view instanceof fx0.b) {
            bVar = (fx0.b) view;
        } else {
            bVar = null;
        }
        Activity X = this.f247506d.X();
        if (X != null) {
            c cVar = (c) this.f247506d.Y().a(X, c.class);
            if (bVar != null && cVar != null) {
                AppBrandeEmbedSingleCloseCapsuleBar appBrandeEmbedSingleCloseCapsuleBar = new AppBrandeEmbedSingleCloseCapsuleBar((Context) X, false);
                View findViewById = appBrandeEmbedSingleCloseCapsuleBar.findViewById(R.id.mn5);
                if (findViewById != null) {
                    k30.a aVar = new k30.a();
                    ThreadLocal<k30.a> threadLocal = k30.c.f244265a;
                    aVar.c(8);
                    j30.a.d(findViewById, aVar.b(), "com/tencent/mm/plugin/appbrand/custom_loading/CustomLoadingSplashView", "attachHeaderView", "()V", "android/view/View_EXEC_", "setVisibility", "(I)V");
                    findViewById.setVisibility(((Integer) aVar.a(0)).intValue());
                    j30.a.e(findViewById, "com/tencent/mm/plugin/appbrand/custom_loading/CustomLoadingSplashView", "attachHeaderView", "()V", "android/view/View_EXEC_", "setVisibility", "(I)V");
                }
                appBrandeEmbedSingleCloseCapsuleBar.setTitle(this.f247506d.z1().f85471e);
                appBrandeEmbedSingleCloseCapsuleBar.setWxaIconUrl(this.f247506d.z1().f85472f);
                AppBrandRuntimeWC appBrandRuntimeWC2 = this.f247506d;
                m.g(appBrandRuntimeWC2, "runtime");
                appBrandeEmbedSingleCloseCapsuleBar.setTitleClickListener(new g(appBrandRuntimeWC2));
                bVar.setExternalHeaderContainer(cVar);
                bVar.a(appBrandeEmbedSingleCloseCapsuleBar.getView(), null);
                bVar.setExternalHeaderAnchor(this.f247506d.f83188r);
                bVar.setExternalHeaderVisibility(0);
            }
        }
    }

    @Override // com.tencent.mm.plugin.appbrand.ui.l4
    public View getView() {
        return this;
    }

    @Override // com.tencent.mm.plugin.appbrand.ui.l4
    public void q(String str, String str2) {
    }

    @Override // com.tencent.mm.plugin.appbrand.ui.l4
    public void r(int i15) {
    }

    @Override // com.tencent.mm.plugin.appbrand.ui.l4
    public void setProgress(int i15) {
    }
}