导航菜单

页面标题

页面副标题

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

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

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


package finance.empower.android.app.support;

import Fd.k;
import Jd.t;
import Je.B;
import Ke.C0870y;
import Vd.n;
import ac.C0995g;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.widget.FrameLayout;
import bc.AbstractC1046m;
import com.withpersona.sdk2.inquiry.network.HttpStatusCode;
import finance.empower.android.app.support.SupportActivity;
import finance.empower.android.app.support.d;
import gc.C1337N;
import java.util.List;
import java.util.Map;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.P;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import oe.C2122y;
import sf.l;
import sf.m;
import sf.x;
import support.ada.embed.widget.AdaEmbedView;

@Metadata(d1 = {"\u0000\u0086\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0015\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\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\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u000f\b\u0007\u0018\u0000 U2\u00020\u00012\u00020\u0002:\u0001VB\u0007¢\u0006\u0004\b\u0003\u0010\u0004J\u001d\u0010\b\u001a\u00020\u00062\f\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005H\u0002¢\u0006\u0004\b\b\u0010\tJ\u0019\u0010\f\u001a\u00020\u00062\b\u0010\u000b\u001a\u0004\u0018\u00010\nH\u0015¢\u0006\u0004\b\f\u0010\rJ\u000f\u0010\u000e\u001a\u00020\u0006H\u0014¢\u0006\u0004\b\u000e\u0010\u0004J\u000f\u0010\u000f\u001a\u00020\u0006H\u0014¢\u0006\u0004\b\u000f\u0010\u0004J)\u0010\u0015\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00102\u0006\u0010\u0012\u001a\u00020\u00102\b\u0010\u0014\u001a\u0004\u0018\u00010\u0013H\u0015¢\u0006\u0004\b\u0015\u0010\u0016J/\u0010\u001c\u001a\u00020\u00062\u0006\u0010\u0011\u001a\u00020\u00102\u000e\u0010\u0019\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00180\u00172\u0006\u0010\u001b\u001a\u00020\u001aH\u0016¢\u0006\u0004\b\u001c\u0010\u001dJ\u0017\u0010 \u001a\u00020\u00062\u0006\u0010\u001f\u001a\u00020\u001eH\u0016¢\u0006\u0004\b \u0010!J\u0019\u0010$\u001a\u00020\u00062\b\u0010#\u001a\u0004\u0018\u00010\"H\u0016¢\u0006\u0004\b$\u0010%R*\u0010.\u001a\u00020&2\u0006\u0010'\u001a\u00020&8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\b(\u0010)\u001a\u0004\b*\u0010+\"\u0004\b,\u0010-R*\u00106\u001a\u00020/2\u0006\u0010'\u001a\u00020/8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\b0\u00101\u001a\u0004\b2\u00103\"\u0004\b4\u00105R*\u0010>\u001a\u0002072\u0006\u0010'\u001a\u0002078\u0006@GX\u0086.¢\u0006\u0012\n\u0004\b8\u00109\u001a\u0004\b:\u0010;\"\u0004\b<\u0010=R\u0018\u0010A\u001a\u0004\u0018\u00010?8\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b$\u0010@R\u001b\u0010G\u001a\u00020B8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bC\u0010D\u001a\u0004\bE\u0010FR*\u0010O\u001a\u00020H2\u0006\u0010'\u001a\u00020H8\u0006@GX\u0086.¢\u0006\u0012\n\u0004\bI\u0010J\u001a\u0004\bK\u0010L\"\u0004\bM\u0010NR\u001c\u0010T\u001a\u0004\u0018\u00010\u00188\u0014X\u0094\u0004¢\u0006\f\n\u0004\bP\u0010Q\u001a\u0004\bR\u0010S¨\u0006W"}, d2 = {"Lfinance/empower/android/app/support/SupportActivity;", "Lbc/m;", "Lfinance/empower/android/app/support/d$b;", "<init>", "()V", "Lkotlin/Function0;", "", "onPermissionGranted", "U1", "(Lkotlin/jvm/functions/Function0;)V", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "onStart", "onStop", "", "requestCode", "resultCode", "Landroid/content/Intent;", "data", "onActivityResult", "(IILandroid/content/Intent;)V", "", "", "permissions", "", "grantResults", "onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "Lfinance/empower/android/app/support/d$b$b;", "viewState", "T1", "(Lfinance/empower/android/app/support/d$b$b;)V", "Lfinance/empower/android/app/support/d$a;", "adaUser", "l0", "(Lfinance/empower/android/app/support/d$a;)V", "Lfinance/empower/android/app/support/d;", "value", "i0", "Lfinance/empower/android/app/support/d;", "R1", "()Lfinance/empower/android/app/support/d;", "Z1", "(Lfinance/empower/android/app/support/d;)V", "presenter", "Loe/y;", "j0", "Loe/y;", "getAuthService", "()Loe/y;", "X1", "(Loe/y;)V", "authService", "LFd/k;", "k0", "LFd/k;", "S1", "()LFd/k;", "a2", "(LFd/k;)V", "supportPreferences", "Lsupport/ada/embed/widget/AdaEmbedView$d;", "Lsupport/ada/embed/widget/AdaEmbedView$d;", "filePickerCall", "LKe/y;", "m0", "Lsf/l;", "P1", "()LKe/y;", "binding", "Lgc/N;", "n0", "Lgc/N;", "Q1", "()Lgc/N;", "Y1", "(Lgc/N;)V", "permissionsComponent", "o0", "Ljava/lang/String;", "C1", "()Ljava/lang/String;", "pageName", "p0", "a", "empower-app_productionRelease"}, k = 1, mv = {2, 1, HttpStatusCode.NETWORK_ERROR_0}, xi = 48)
public final class SupportActivity extends a implements d.b {

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

    public d presenter;

    public C2122y authService;

    public k supportPreferences;

    private AdaEmbedView.d filePickerCall;

    private final l binding = m.a(new Function0() {
        @Override
        public final Object invoke() {
            C0870y O1;
            O1 = SupportActivity.O1(SupportActivity.this);
            return O1;
        }
    });

    public C1337N permissionsComponent;

    private final String pageName;

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

        public static Intent b(Companion companion, Context context, String str, int i, Object obj) {
            if ((i & 2) != 0) {
                str = null;
            }
            return companion.a(context, str);
        }

        public final Intent a(Context context, String str) {
            Intrinsics.checkNotNullParameter(context, "context");
            Intent a = C0995g.a(context, SupportActivity.class, new Pair[0]);
            a.putExtra("finance.empower.769ff0d6-1608-4203-b374-d3f5949d6946", str);
            return a;
        }

        private Companion() {
        }
    }

    public static final class b implements C1337N.a {
        final Function0 a;
        final SupportActivity b;

        b(Function0 function0, SupportActivity supportActivity) {
            this.a = function0;
            this.b = supportActivity;
        }

        public static final Unit e(SupportActivity supportActivity) {
            AdaEmbedView.d dVar = supportActivity.filePickerCall;
            if (dVar != null) {
                dVar.a((Uri) null);
            }
            return Unit.a;
        }

        @Override
        public void a(List permissions) {
            Intrinsics.checkNotNullParameter(permissions, "permissions");
            this.a.invoke();
        }

        @Override
        public void b() {
            C1337N.a.C0517a.a(this);
        }

        @Override
        public void c(List permissions) {
            Intrinsics.checkNotNullParameter(permissions, "permissions");
            C1337N Q1 = this.b.Q1();
            int i = B.A8;
            final SupportActivity supportActivity = this.b;
            Q1.n(i, new Function0() {
                @Override
                public final Object invoke() {
                    Unit e;
                    e = SupportActivity.b.e(SupportActivity.this);
                    return e;
                }
            });
        }
    }

    public static final C0870y O1(SupportActivity supportActivity) {
        return C0870y.c(supportActivity.getLayoutInflater());
    }

    private final C0870y P1() {
        return (C0870y) this.binding.getValue();
    }

    private final void U1(Function0 onPermissionGranted) {
        final b bVar = new b(onPermissionGranted, this);
        if (Q1().j("android.permission.READ_EXTERNAL_STORAGE")) {
            onPermissionGranted.invoke();
        } else if (Q1().m("android.permission.READ_EXTERNAL_STORAGE")) {
            Q1().r(B.A8, new Function0() {
                @Override
                public final Object invoke() {
                    Unit W1;
                    W1 = SupportActivity.W1(SupportActivity.this, bVar);
                    return W1;
                }
            }, new Function0() {
                @Override
                public final Object invoke() {
                    Unit V1;
                    V1 = SupportActivity.V1(SupportActivity.this);
                    return V1;
                }
            });
        } else {
            Q1().l(bVar, "android.permission.READ_EXTERNAL_STORAGE");
        }
    }

    public static final Unit V1(SupportActivity supportActivity) {
        AdaEmbedView.d dVar = supportActivity.filePickerCall;
        if (dVar != null) {
            dVar.a((Uri) null);
        }
        return Unit.a;
    }

    public static final Unit W1(SupportActivity supportActivity, b bVar) {
        supportActivity.Q1().l(bVar, "android.permission.READ_EXTERNAL_STORAGE");
        return Unit.a;
    }

    public static final void b2(C0870y c0870y) {
        FrameLayout layoutHelpSupportLoading = c0870y.e;
        Intrinsics.checkNotNullExpressionValue(layoutHelpSupportLoading, "layoutHelpSupportLoading");
        n.c(layoutHelpSupportLoading);
    }

    public static final boolean c2(final SupportActivity supportActivity, AdaEmbedView.d filePicker) {
        Intrinsics.checkNotNullParameter(filePicker, "filePicker");
        supportActivity.filePickerCall = filePicker;
        supportActivity.U1(new Function0() {
            @Override
            public final Object invoke() {
                Unit d2;
                d2 = SupportActivity.d2(SupportActivity.this);
                return d2;
            }
        });
        return true;
    }

    public static final Unit d2(SupportActivity supportActivity) {
        supportActivity.R1().u();
        return Unit.a;
    }

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

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

    public final d R1() {
        d dVar = this.presenter;
        if (dVar != null) {
            return dVar;
        }
        Intrinsics.x("presenter");
        return null;
    }

    public final k S1() {
        k kVar = this.supportPreferences;
        if (kVar != null) {
            return kVar;
        }
        Intrinsics.x("supportPreferences");
        return null;
    }

    @Override
    public void E(d.b.AbstractC0485b viewState) {
        Intrinsics.checkNotNullParameter(viewState, "viewState");
        C0870y P1 = P1();
        if (viewState instanceof d.b.AbstractC0485b.C0486b) {
            FrameLayout layoutHelpSupportLoading = P1.e;
            Intrinsics.checkNotNullExpressionValue(layoutHelpSupportLoading, "layoutHelpSupportLoading");
            n.r(layoutHelpSupportLoading);
        } else {
            if (!(viewState instanceof d.b.AbstractC0485b.a)) {
                throw new NoWhenBranchMatchedException();
            }
            FrameLayout layoutHelpSupportLoading2 = P1.e;
            Intrinsics.checkNotNullExpressionValue(layoutHelpSupportLoading2, "layoutHelpSupportLoading");
            n.c(layoutHelpSupportLoading2);
        }
    }

    public final void X1(C2122y c2122y) {
        Intrinsics.checkNotNullParameter(c2122y, "<set-?>");
        this.authService = c2122y;
    }

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

    public final void Z1(d dVar) {
        Intrinsics.checkNotNullParameter(dVar, "<set-?>");
        this.presenter = dVar;
    }

    public final void a2(k kVar) {
        Intrinsics.checkNotNullParameter(kVar, "<set-?>");
        this.supportPreferences = kVar;
    }

    @Override
    public void l0(d.a adaUser) {
        final C0870y P1 = P1();
        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
            @Override
            public final void run() {
                SupportActivity.b2(C0870y.this);
            }
        }, 3000L);
        Map l = adaUser != null ? P.l(x.a("first_name", adaUser.c()), x.a("last_name", adaUser.e()), x.a("email", adaUser.b()), x.a("id", adaUser.d()), x.a("ada_token", adaUser.a())) : null;
        AdaEmbedView adaEmbedView = P1.b;
        Intrinsics.f(adaEmbedView);
        Fd.a.a(adaEmbedView, l);
        adaEmbedView.setFilePickerCallback(new Function1() {
            @Override
            public final Object invoke(Object obj) {
                boolean c2;
                c2 = SupportActivity.c2(SupportActivity.this, (AdaEmbedView.d) obj);
                return Boolean.valueOf(c2);
            }
        });
        Fd.a.b(adaEmbedView, getIntent().getStringExtra("finance.empower.769ff0d6-1608-4203-b374-d3f5949d6946"), l, S1().a());
        k.d(S1(), null, 1, null);
    }

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        Uri data2;
        AdaEmbedView.d dVar;
        AdaEmbedView.d dVar2;
        super/*androidx.fragment.app.i*/.onActivityResult(requestCode, resultCode, data);
        if (requestCode == 8395) {
            if (resultCode != -1) {
                if (resultCode == 0 && (dVar2 = this.filePickerCall) != null) {
                    dVar2.a((Uri) null);
                    return;
                }
                return;
            }
            if (data == null || (data2 = data.getData()) == null || (dVar = this.filePickerCall) == null) {
                return;
            }
            dVar.a(data2);
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(P1().getRoot());
        AbstractC1046m.G1(this, null, null, t.i, P1().d.c.b, false, null, 51, null);
    }

    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);
        Q1().k(requestCode, permissions, grantResults);
    }

    @Override
    protected void onStart() {
        super.onStart();
        R1().v();
    }

    protected void onStop() {
        R1().f();
        super.onStop();
    }
}