导航菜单

页面标题

页面副标题

Uptodown App Store v6.80 - CmpActivity.java 源代码

正在查看: Uptodown App Store v6.80 应用的 CmpActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.inmobi.cmp.presentation.components;

import R2.n;
import R2.s;
import T3.f;
import V2.d;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.LifecycleOwnerKt;
import c.i;
import com.inmobi.cmp.ChoiceCmp;
import com.inmobi.cmp.ChoiceCmpCallback;
import com.inmobi.cmp.core.cmpapi.status.CmpStatus;
import com.inmobi.cmp.core.cmpapi.status.DisplayStatus;
import com.inmobi.cmp.data.model.ChoiceColor;
import com.inmobi.cmp.data.model.ThemeMode;
import com.inmobi.cmp.model.ChoiceError;
import com.mbridge.msdk.foundation.download.core.DownloadCommon;
import d3.p;
import d4.c;
import kotlin.coroutines.jvm.internal.l;
import kotlin.jvm.internal.m;
import o3.L;
import o3.Y;
import o3.g;

public final class CmpActivity extends AppCompatActivity {
    public static final int b = 0;
    public c a;

    public class a {
        public static final int[] a;

        static {
            int[] iArr = new int[ThemeMode.values().length];
            iArr[ThemeMode.LIGHT.ordinal()] = 1;
            iArr[ThemeMode.DARK.ordinal()] = 2;
            a = iArr;
        }
    }

    public static final class b extends l implements p {
        public int a;

        public b(d dVar) {
            super(2, dVar);
        }

        @Override
        public final d create(Object obj, d dVar) {
            return CmpActivity.this.new b(dVar);
        }

        @Override
        public Object invoke(Object obj, Object obj2) {
            return CmpActivity.this.new b((d) obj2).invokeSuspend(s.a);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c = W2.b.c();
            int i = this.a;
            c cVar = null;
            if (i == 0) {
                n.b(obj);
                c cVar2 = CmpActivity.this.a;
                if (cVar2 != null) {
                    this.a = 1;
                    obj = g.g(Y.b(), new d4.b(cVar2, (d) null), this);
                    if (obj == c) {
                        return c;
                    }
                }
                return s.a;
            }
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            n.b(obj);
            b4.d dVar = b4.d.a;
            b4.d.f = (V3.c) obj;
            FragmentActivity fragmentActivity = CmpActivity.this;
            int i4 = CmpActivity.b;
            Bundle extras = fragmentActivity.getIntent().getExtras();
            String string = extras == null ? null : extras.getString("EXTRA_ACTION");
            if (string != null) {
                int hashCode = string.hashCode();
                if (hashCode != -2113348999) {
                    if (hashCode != -1969243076) {
                        if (hashCode != 1166950650) {
                            if (hashCode == 1517267649 && string.equals("ACTION_SHOW_CCPA_SCREEN")) {
                                if (!fragmentActivity.isFinishing()) {
                                    FragmentManager supportFragmentManager = fragmentActivity.getSupportFragmentManager();
                                    m.d(supportFragmentManager, "supportFragmentManager");
                                    if (!supportFragmentManager.isDestroyed() && !supportFragmentManager.isStateSaved()) {
                                        if (ChoiceCmp.INSTANCE.isViewModelAvailable$app_release()) {
                                            T3.m mVar = T3.m.a;
                                            mVar.e(f.b, false);
                                            if (i.b) {
                                                mVar.e(f.f, false);
                                            }
                                            supportFragmentManager.beginTransaction().add(new c4.d(), c4.d.y).commit();
                                        } else {
                                            C2.b.a(C2.b.a, ChoiceError.MISSING_INITIALIZATION, null, null, null, null, 30);
                                            fragmentActivity.finish();
                                        }
                                    }
                                }
                            }
                        } else if (string.equals("ACTION_SHOW_CMP_DIALOG")) {
                            Bundle extras2 = fragmentActivity.getIntent().getExtras();
                            boolean z = extras2 != null ? extras2.getBoolean("EXTRA_FORCE", false) : false;
                            V3.g c4 = dVar.p().c();
                            if (c4.a.length() <= 0 || c4.b.length() <= 0 || c4.c.length() <= 0 || c4.d.length() <= 0) {
                                C2.b.a(C2.b.a, ChoiceError.MISSING_INIT_SCREEN_TEXTS, null, null, null, null, 30);
                                fragmentActivity.finish();
                            } else {
                                T3.m mVar2 = T3.m.a;
                                boolean z3 = !z;
                                mVar2.e(f.c, z3);
                                if (i.b) {
                                    mVar2.e(f.e, z3);
                                }
                                J2.f fVar = new J2.f();
                                String simpleName = J2.f.class.getSimpleName();
                                m.d(simpleName, "PrivacyBottomSheet::class.java.simpleName");
                                if (!fragmentActivity.isFinishing()) {
                                    FragmentManager supportFragmentManager2 = fragmentActivity.getSupportFragmentManager();
                                    m.d(supportFragmentManager2, "supportFragmentManager");
                                    if (!supportFragmentManager2.isDestroyed() && !supportFragmentManager2.isStateSaved()) {
                                        fVar.show(supportFragmentManager2, simpleName);
                                    }
                                }
                                ChoiceCmp choiceCmp = ChoiceCmp.INSTANCE;
                                ChoiceCmpCallback callback = choiceCmp.getCallback();
                                if (callback != null) {
                                    callback.onCmpUIShown(choiceCmp.ping$app_release(true, CmpStatus.LOADED, DisplayStatus.VISIBLE));
                                }
                            }
                        }
                    } else if (string.equals("ACTION_SHOW_GBC_SCREEN")) {
                        if (!fragmentActivity.isFinishing()) {
                            FragmentManager supportFragmentManager3 = fragmentActivity.getSupportFragmentManager();
                            m.d(supportFragmentManager3, "supportFragmentManager");
                            if (!supportFragmentManager3.isDestroyed() && !supportFragmentManager3.isStateSaved()) {
                                if (ChoiceCmp.INSTANCE.isViewModelAvailable$app_release()) {
                                    T3.m.a.e(f.d, false);
                                    supportFragmentManager3.beginTransaction().add(new c.c(), c.c.r).commit();
                                } else {
                                    C2.b.a(C2.b.a, ChoiceError.MISSING_INITIALIZATION, null, null, null, null, 30);
                                    fragmentActivity.finish();
                                }
                            }
                        }
                    }
                } else if (string.equals("ACTION_SHOW_US_REGULATION_SCREEN")) {
                    Bundle extras3 = fragmentActivity.getIntent().getExtras();
                    boolean z4 = extras3 == null ? false : extras3.getBoolean("EXTRA_FORCE", false);
                    if (!fragmentActivity.isFinishing()) {
                        FragmentManager supportFragmentManager4 = fragmentActivity.getSupportFragmentManager();
                        m.d(supportFragmentManager4, "supportFragmentManager");
                        if (!supportFragmentManager4.isDestroyed() && !supportFragmentManager4.isStateSaved()) {
                            if (ChoiceCmp.INSTANCE.isViewModelAvailable$app_release()) {
                                if (i.b) {
                                    T3.m.a.e(f.f, false);
                                }
                                c cVar3 = fragmentActivity.a;
                                if (cVar3 != null) {
                                    cVar = cVar3;
                                } else {
                                    m.u("viewModel");
                                }
                                if (cVar.b.b.M) {
                                    String str = b4.d.n;
                                    A3.g state = A3.g.a;
                                    m.e(state, "state");
                                    if (m.a(str, DownloadCommon.DOWNLOAD_REPORT_CANCEL)) {
                                        T3.m.a.e(f.b, false);
                                        supportFragmentManager4.beginTransaction().add(new c4.d(), c4.d.y).commit();
                                    }
                                }
                                T3.m.a.e(f.g, !z4);
                                supportFragmentManager4.beginTransaction().add(new n.f(), n.f.y).commit();
                            } else {
                                C2.b.a(C2.b.a, ChoiceError.MISSING_INITIALIZATION, null, null, null, null, 30);
                                fragmentActivity.finish();
                            }
                        }
                    }
                }
                return s.a;
            }
            fragmentActivity.finish();
            return s.a;
        }
    }

    public void onCreate(Bundle bundle) {
        ChoiceColor darkModeColors;
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        b4.d dVar = b4.d.a;
        ThemeMode themeMode = b4.d.d.getThemeMode();
        int i = themeMode == null ? -1 : a.a[themeMode.ordinal()];
        if (i == 1) {
            getDelegate().setLocalNightMode(1);
        } else if (i == 2) {
            getDelegate().setLocalNightMode(2);
        }
        m.e(this, "context");
        m.e(this, "context");
        if (b4.d.z == null) {
            if (b4.d.d.getThemeMode() == ThemeMode.LIGHT) {
                darkModeColors = b4.d.d.getLightModeColors();
            } else if (b4.d.d.getThemeMode() == ThemeMode.DARK) {
                darkModeColors = b4.d.d.getDarkModeColors();
            } else if (b4.d.d.getLightModeColors() == null || b4.d.d.getDarkModeColors() == null) {
                if (b4.d.d.getLightModeColors() == null) {
                    darkModeColors = b4.d.d.getDarkModeColors();
                }
                darkModeColors = b4.d.d.getLightModeColors();
            } else {
                int i4 = getResources().getConfiguration().uiMode & 48;
                if (i4 != 16) {
                    if (i4 == 32) {
                        darkModeColors = b4.d.d.getDarkModeColors();
                    }
                    darkModeColors = b4.d.d.getLightModeColors();
                } else {
                    darkModeColors = b4.d.d.getLightModeColors();
                }
            }
            b4.d.z = new X3.b(darkModeColors, new Z3.a());
        }
        X3.a aVar = b4.d.z;
        if (aVar == null) {
            m.u("choiceStyleSheetRepository");
            aVar = null;
        }
        c cVar = new c(aVar, dVar.j());
        m.e(cVar, "<set-?>");
        this.a = cVar;
        g.d(LifecycleOwnerKt.getLifecycleScope(this), (V2.g) null, (L) null, new b(null), 3, (Object) null);
    }
}