导航菜单

页面标题

页面副标题

Empower MX v1.29.4.340 - PermissionsCollectionActivity.java 源代码

正在查看: Empower MX v1.29.4.340 应用的 PermissionsCollectionActivity.java JAVA 源代码文件

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


package finance.empower.android.app.onboarding.permissions;

import Jc.D;
import Ke.C0865t;
import Vd.n;
import ac.C0995g;
import android.content.Context;
import android.content.Intent;
import android.location.LocationManager;
import android.net.ConnectivityManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import bc.L0;
import bd.AbstractC1082c;
import bd.C1081b;
import bd.C1087h;
import cd.AbstractC1139c;
import com.withpersona.sdk2.inquiry.network.HttpStatusCode;
import com.withpersona.sdk2.inquiry.network.dto.ui.UiComponentConfig;
import d.C;
import ec.S;
import finance.empower.android.app.onboarding.permissions.PermissionsCollectionActivity;
import finance.empower.android.app.onboarding.permissions.e;
import finance.empower.android.data.model.firebase.PermissionDetails;
import finance.empower.android.data.model.firebase.PermissionsDetailsResponse;
import finance.empower.android.data.model.firebase.TextDetails;
import gc.C1337N;
import gc.C1360p;
import gc.y0;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import s0.o;
import sf.l;
import sf.m;
import z6.p;
import zc.wOp.MLaDOyJKvyl;
import ze.AbstractC2536b;

@Metadata(d1 = {"\u0000\u009e\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0011\n\u0000\n\u0002\u0010\u0015\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\n\b\u0007\u0018\u0000 o2\u00020\u00012\u00020\u0002:\u0001pB\u0007¢\u0006\u0004\b\u0003\u0010\u0004J7\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\f\u001a\u00020\u000b2\u0006\u0010\r\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u000f\u0010\u0010J/\u0010\u0014\u001a\u00020\u000e2\u0006\u0010\b\u001a\u00020\u00072\u0006\u0010\u0011\u001a\u00020\t2\u0006\u0010\u0012\u001a\u00020\u000b2\u0006\u0010\u0013\u001a\u00020\u000bH\u0002¢\u0006\u0004\b\u0014\u0010\u0015J\u0019\u0010\u0018\u001a\u00020\u000e2\b\u0010\u0017\u001a\u0004\u0018\u00010\u0016H\u0014¢\u0006\u0004\b\u0018\u0010\u0019J/\u0010 \u001a\u00020\u000e2\u0006\u0010\u001b\u001a\u00020\u001a2\u000e\u0010\u001d\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00050\u001c2\u0006\u0010\u001f\u001a\u00020\u001eH\u0016¢\u0006\u0004\b \u0010!J\u000f\u0010\"\u001a\u00020\u000eH\u0014¢\u0006\u0004\b\"\u0010\u0004J\u0017\u0010%\u001a\u00020\u000e2\u0006\u0010$\u001a\u00020#H\u0016¢\u0006\u0004\b%\u0010&R\u001a\u0010+\u001a\u00020\u00058\u0014X\u0094D¢\u0006\f\n\u0004\b'\u0010(\u001a\u0004\b)\u0010*R\u001b\u00101\u001a\u00020,8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b-\u0010.\u001a\u0004\b/\u00100R\u0014\u00105\u001a\u0002028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b3\u00104R*\u0010>\u001a\u0002062\u0006\u00107\u001a\u0002068\u0006@GX\u0086.¢\u0006\u0012\n\u0004\b8\u00109\u001a\u0004\b:\u0010;\"\u0004\b<\u0010=R*\u0010F\u001a\u00020?2\u0006\u00107\u001a\u00020?8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\b@\u0010A\u001a\u0004\bB\u0010C\"\u0004\bD\u0010ER*\u0010N\u001a\u00020G2\u0006\u00107\u001a\u00020G8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\bH\u0010I\u001a\u0004\bJ\u0010K\"\u0004\bL\u0010MR*\u0010V\u001a\u00020O2\u0006\u00107\u001a\u00020O8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\bP\u0010Q\u001a\u0004\bR\u0010S\"\u0004\bT\u0010UR*\u0010^\u001a\u00020W2\u0006\u00107\u001a\u00020W8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\bX\u0010Y\u001a\u0004\bZ\u0010[\"\u0004\b\\\u0010]R*\u0010f\u001a\u00020_2\u0006\u00107\u001a\u00020_8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\b`\u0010a\u001a\u0004\bb\u0010c\"\u0004\bd\u0010eR*\u0010n\u001a\u00020g2\u0006\u00107\u001a\u00020g8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\bh\u0010i\u001a\u0004\bj\u0010k\"\u0004\bl\u0010m¨\u0006q"}, d2 = {"Lfinance/empower/android/app/onboarding/permissions/PermissionsCollectionActivity;", "Lbc/m;", "Lfinance/empower/android/app/onboarding/permissions/e$b;", "<init>", "()V", "", "firebaseFlag", "Lfinance/empower/android/data/model/firebase/PermissionDetails;", "permissionDetails", "Landroid/widget/LinearLayout;", "uiComponent", "Landroid/widget/TextView;", "uiTitleComponent", "uiDetailsComponent", "", "b2", "(Ljava/lang/String;Lfinance/empower/android/data/model/firebase/PermissionDetails;Landroid/widget/LinearLayout;Landroid/widget/TextView;Landroid/widget/TextView;)V", "permissionSection", UiComponentConfig.Title.type, "details", "a2", "(Lfinance/empower/android/data/model/firebase/PermissionDetails;Landroid/widget/LinearLayout;Landroid/widget/TextView;Landroid/widget/TextView;)V", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "", "requestCode", "", "permissions", "", "grantResults", "onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "onStart", "Lfinance/empower/android/app/onboarding/permissions/e$b$a;", "viewState", "S1", "(Lfinance/empower/android/app/onboarding/permissions/e$b$a;)V", "i0", "Ljava/lang/String;", "C1", "()Ljava/lang/String;", "pageName", "LKe/t;", "j0", "Lsf/l;", "K1", "()LKe/t;", "binding", "Lfinance/empower/android/data/model/firebase/PermissionsDetailsResponse;", "k0", "Lfinance/empower/android/data/model/firebase/PermissionsDetailsResponse;", "firebaseConfigPermissions", "Lfinance/empower/android/app/onboarding/permissions/e;", "value", "l0", "Lfinance/empower/android/app/onboarding/permissions/e;", "Q1", "()Lfinance/empower/android/app/onboarding/permissions/e;", "Y1", "(Lfinance/empower/android/app/onboarding/permissions/e;)V", "presenter", "Lgc/N;", "m0", "Lgc/N;", "P1", "()Lgc/N;", "X1", "(Lgc/N;)V", "permissionsComponent", "Lec/S;", "n0", "Lec/S;", "M1", "()Lec/S;", "U1", "(Lec/S;)V", "navigationComponent", "Lgc/y0;", "o0", "Lgc/y0;", "getSmsPermissionsComponent", "()Lgc/y0;", "Z1", "(Lgc/y0;)V", "smsPermissionsComponent", "Lgc/p;", "p0", "Lgc/p;", "L1", "()Lgc/p;", "T1", "(Lgc/p;)V", "locationPermissionComponent", "LJc/D;", "q0", "LJc/D;", "N1", "()LJc/D;", "V1", "(LJc/D;)V", "onboardingPreferences", "Lbd/h;", "r0", "Lbd/h;", "O1", "()Lbd/h;", "W1", "(Lbd/h;)V", "permissionsCollectionPreferences", "s0", "a", "empower-app_productionRelease"}, k = 1, mv = {2, 1, HttpStatusCode.NETWORK_ERROR_0}, xi = 48)
public final class PermissionsCollectionActivity extends a implements e.b {

    public static final Companion INSTANCE = new Companion(null);
    public static final int t0 = 8;

    private final String pageName = "PermissionsCollection";

    private final l binding = m.a(new Function0() {
        @Override
        public final Object invoke() {
            C0865t J1;
            J1 = PermissionsCollectionActivity.J1(PermissionsCollectionActivity.this);
            return J1;
        }
    });

    private final PermissionsDetailsResponse firebaseConfigPermissions = L0.a.g();

    public e presenter;

    public C1337N permissionsComponent;

    public S navigationComponent;

    public y0 smsPermissionsComponent;

    public C1360p locationPermissionComponent;

    public D onboardingPreferences;

    public C1087h permissionsCollectionPreferences;

    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        public final Intent a(Context context) {
            Intrinsics.checkNotNullParameter(context, "context");
            return C0995g.a(context, PermissionsCollectionActivity.class, new Pair[0]);
        }

        private Companion() {
        }
    }

    public static final class b extends C {
        b() {
            super(true);
        }

        public void d() {
            PermissionsCollectionActivity.this.moveTaskToBack(true);
        }
    }

    static final class c implements Function2 {
        final e.b.a d;
        final PermissionsCollectionActivity e;

        c(e.b.a aVar, PermissionsCollectionActivity permissionsCollectionActivity) {
            this.d = aVar;
            this.e = permissionsCollectionActivity;
        }

        public static final Unit d(PermissionsCollectionActivity permissionsCollectionActivity) {
            permissionsCollectionActivity.O1().d(true);
            permissionsCollectionActivity.M1().d();
            return Unit.a;
        }

        public final void c(s0.l lVar, int i) {
            if ((i & 3) == 2 && lVar.w()) {
                lVar.F();
                return;
            }
            if (o.H()) {
                o.Q(-415737503, i, -1, "finance.empower.android.app.onboarding.permissions.PermissionsCollectionActivity.render.<anonymous>.<anonymous> (PermissionsCollectionActivity.kt:203)");
            }
            float b = ((e.b.a.C0438a) this.d).b();
            lVar.V(1742238067);
            boolean l = lVar.l(this.e);
            final PermissionsCollectionActivity permissionsCollectionActivity = this.e;
            Object f = lVar.f();
            if (l || f == s0.l.a.a()) {
                f = new Function0() {
                    @Override
                    public final Object invoke() {
                        Unit d;
                        d = PermissionsCollectionActivity.c.d(PermissionsCollectionActivity.this);
                        return d;
                    }
                };
                lVar.M(f);
            }
            lVar.L();
            AbstractC1139c.c(b, null, (Function0) f, lVar, 0, 2);
            if (o.H()) {
                o.P();
            }
        }

        @Override
        public Object invoke(Object obj, Object obj2) {
            c((s0.l) obj, ((Number) obj2).intValue());
            return Unit.a;
        }
    }

    public static final C0865t J1(PermissionsCollectionActivity permissionsCollectionActivity) {
        return C0865t.c(permissionsCollectionActivity.getLayoutInflater());
    }

    private final C0865t K1() {
        return (C0865t) this.binding.getValue();
    }

    public static final Unit R1(PermissionsCollectionActivity permissionsCollectionActivity, r4.b bVar, LocationManager locationManager, View it) {
        Intrinsics.checkNotNullParameter(it, "it");
        permissionsCollectionActivity.N1().r();
        permissionsCollectionActivity.Q1().g0(bVar, locationManager);
        return Unit.a;
    }

    private final void a2(PermissionDetails permissionDetails, LinearLayout permissionSection, TextView title, TextView details) {
        String str;
        String mxSpanishText;
        String str2;
        String usEnglishText;
        C0865t K1 = K1();
        if (!permissionDetails.getEnabled()) {
            LinearLayout permissionsSectionLocation = K1.l;
            Intrinsics.checkNotNullExpressionValue(permissionsSectionLocation, "permissionsSectionLocation");
            n.c(permissionsSectionLocation);
            return;
        }
        n.r(permissionSection);
        String locale = Ud.a.d().toString();
        Intrinsics.checkNotNullExpressionValue(locale, "toString(...)");
        String str3 = "";
        if (StringsKt.R(locale, "en_US", false, 2, null)) {
            TextDetails title2 = permissionDetails.getTitle();
            if (title2 == null || (str2 = title2.getUsEnglishText()) == null) {
                str2 = "";
            }
            title.setText(str2);
            TextDetails description = permissionDetails.getDescription();
            if (description != null && (usEnglishText = description.getUsEnglishText()) != null) {
                str3 = usEnglishText;
            }
            details.setText(str3);
            return;
        }
        TextDetails title3 = permissionDetails.getTitle();
        if (title3 == null || (str = title3.getMxSpanishText()) == null) {
            str = "";
        }
        title.setText(str);
        TextDetails description2 = permissionDetails.getDescription();
        if (description2 != null && (mxSpanishText = description2.getMxSpanishText()) != null) {
            str3 = mxSpanishText;
        }
        details.setText(str3);
    }

    private final void b2(String firebaseFlag, PermissionDetails permissionDetails, LinearLayout uiComponent, TextView uiTitleComponent, TextView uiDetailsComponent) {
        if (p.a(com.google.firebase.c.a).l(firebaseFlag)) {
            a2(permissionDetails, uiComponent, uiTitleComponent, uiDetailsComponent);
        }
    }

    @Override
    protected String getPageName() {
        return this.pageName;
    }

    public final C1360p L1() {
        C1360p c1360p = this.locationPermissionComponent;
        if (c1360p != null) {
            return c1360p;
        }
        Intrinsics.x("locationPermissionComponent");
        return null;
    }

    public final S M1() {
        S s = this.navigationComponent;
        if (s != null) {
            return s;
        }
        Intrinsics.x("navigationComponent");
        return null;
    }

    public final D N1() {
        D d = this.onboardingPreferences;
        if (d != null) {
            return d;
        }
        Intrinsics.x("onboardingPreferences");
        return null;
    }

    public final C1087h O1() {
        C1087h c1087h = this.permissionsCollectionPreferences;
        if (c1087h != null) {
            return c1087h;
        }
        Intrinsics.x("permissionsCollectionPreferences");
        return null;
    }

    public final C1337N P1() {
        C1337N c1337n = this.permissionsComponent;
        if (c1337n != null) {
            return c1337n;
        }
        Intrinsics.x("permissionsComponent");
        return null;
    }

    public final e Q1() {
        e eVar = this.presenter;
        if (eVar != null) {
            return eVar;
        }
        Intrinsics.x("presenter");
        return null;
    }

    @Override
    public void E(e.b.a viewState) {
        Intrinsics.checkNotNullParameter(viewState, "viewState");
        C0865t K1 = K1();
        if (viewState instanceof e.b.a.C0439b) {
            return;
        }
        if (viewState instanceof e.b.a.c) {
            ((e.b.a.c) viewState).b();
            AbstractC2536b.c(this);
        } else {
            if (!(viewState instanceof e.b.a.C0438a)) {
                throw new NoWhenBranchMatchedException();
            }
            K1.e.setContent(A0.c.c(-415737503, true, new c(viewState, this)));
        }
    }

    public final void T1(C1360p c1360p) {
        Intrinsics.checkNotNullParameter(c1360p, "<set-?>");
        this.locationPermissionComponent = c1360p;
    }

    public final void U1(S s) {
        Intrinsics.checkNotNullParameter(s, "<set-?>");
        this.navigationComponent = s;
    }

    public final void V1(D d) {
        Intrinsics.checkNotNullParameter(d, "<set-?>");
        this.onboardingPreferences = d;
    }

    public final void W1(C1087h c1087h) {
        Intrinsics.checkNotNullParameter(c1087h, "<set-?>");
        this.permissionsCollectionPreferences = c1087h;
    }

    public final void X1(C1337N c1337n) {
        Intrinsics.checkNotNullParameter(c1337n, "<set-?>");
        this.permissionsComponent = c1337n;
    }

    public final void Y1(e eVar) {
        Intrinsics.checkNotNullParameter(eVar, "<set-?>");
        this.presenter = eVar;
    }

    public final void Z1(y0 y0Var) {
        Intrinsics.checkNotNullParameter(y0Var, "<set-?>");
        this.smsPermissionsComponent = y0Var;
    }

    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
        Intrinsics.checkNotNullParameter(permissions, "permissions");
        Intrinsics.checkNotNullParameter(grantResults, "grantResults");
        super/*androidx.fragment.app.i*/.onRequestPermissionsResult(requestCode, permissions, grantResults);
        P1().k(requestCode, permissions, grantResults);
        AbstractC1082c.l(B1(), permissions, grantResults);
    }

    @Override
    protected void onStart() {
        super.onStart();
        Q1().f0();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        C0865t K1 = K1();
        setContentView(K1.getRoot());
        K1.e.setContent(C1081b.a.a());
        final r4.b a = r4.e.a(this);
        Intrinsics.checkNotNullExpressionValue(a, "getFusedLocationProviderClient(...)");
        Object systemService = getSystemService("location");
        Intrinsics.g(systemService, "null cannot be cast to non-null type android.location.LocationManager");
        final LocationManager locationManager = (LocationManager) systemService;
        L1().d(locationManager);
        Object systemService2 = getSystemService("connectivity");
        Intrinsics.g(systemService2, "null cannot be cast to non-null type android.net.ConnectivityManager");
        ConnectivityManager connectivityManager = (ConnectivityManager) systemService2;
        Q1().T(connectivityManager.getNetworkCapabilities(connectivityManager.getActiveNetwork()));
        Q1().z0();
        PermissionDetails locationPermissionData = this.firebaseConfigPermissions.getLocationPermissionData();
        LinearLayout permissionsSectionLocation = K1.l;
        Intrinsics.checkNotNullExpressionValue(permissionsSectionLocation, "permissionsSectionLocation");
        TextView locationTitle = K1.h;
        Intrinsics.checkNotNullExpressionValue(locationTitle, "locationTitle");
        TextView locationDetails = K1.g;
        Intrinsics.checkNotNullExpressionValue(locationDetails, "locationDetails");
        a2(locationPermissionData, permissionsSectionLocation, locationTitle, locationDetails);
        PermissionDetails smsPermissionData = this.firebaseConfigPermissions.getSmsPermissionData();
        LinearLayout permissionSectionSms = K1.j;
        Intrinsics.checkNotNullExpressionValue(permissionSectionSms, "permissionSectionSms");
        TextView smsTitle = K1.p;
        Intrinsics.checkNotNullExpressionValue(smsTitle, "smsTitle");
        TextView smsDetails = K1.o;
        Intrinsics.checkNotNullExpressionValue(smsDetails, "smsDetails");
        b2("permission_read_sms_enabled", smsPermissionData, permissionSectionSms, smsTitle, smsDetails);
        PermissionDetails calendarPermissionData = this.firebaseConfigPermissions.getCalendarPermissionData();
        LinearLayout permissionsSectionCalendar = K1.k;
        Intrinsics.checkNotNullExpressionValue(permissionsSectionCalendar, "permissionsSectionCalendar");
        TextView calendarTitle = K1.d;
        Intrinsics.checkNotNullExpressionValue(calendarTitle, "calendarTitle");
        TextView calendarDetails = K1.c;
        Intrinsics.checkNotNullExpressionValue(calendarDetails, "calendarDetails");
        b2("permission_read_calendar_enabled", calendarPermissionData, permissionsSectionCalendar, calendarTitle, calendarDetails);
        PermissionDetails readPhoneStatePermissionData = this.firebaseConfigPermissions.getReadPhoneStatePermissionData();
        LinearLayout linearLayout = K1.i;
        Intrinsics.checkNotNullExpressionValue(linearLayout, MLaDOyJKvyl.VOuT);
        TextView phoneStateTitle = K1.n;
        Intrinsics.checkNotNullExpressionValue(phoneStateTitle, "phoneStateTitle");
        TextView phoneStateDetails = K1.m;
        Intrinsics.checkNotNullExpressionValue(phoneStateDetails, "phoneStateDetails");
        b2("permission_read_phone_state_enabled", readPhoneStatePermissionData, linearLayout, phoneStateTitle, phoneStateDetails);
        Button btnSubmit = K1.b;
        Intrinsics.checkNotNullExpressionValue(btnSubmit, "btnSubmit");
        Wd.c.c(btnSubmit, new Function1() {
            @Override
            public final Object invoke(Object obj) {
                Unit R1;
                R1 = PermissionsCollectionActivity.R1(PermissionsCollectionActivity.this, a, locationManager, (View) obj);
                return R1;
            }
        });
        if (p.a(com.google.firebase.c.a).l("permission_read_sms_early_ask") && androidx.core.content.a.checkSelfPermission(this, "android.permission.READ_SMS") == 0) {
            Q1().d0();
        }
        i().h(this, new b());
    }
}