导航菜单

页面标题

页面副标题

Perplexity v2.48.1 - PermissionsActivity.java 源代码

正在查看: Perplexity v2.48.1 应用的 PermissionsActivity.java JAVA 源代码文件

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


package ai.perplexity.app.android.assistant.action;

import D3.s;
import Ec.i;
import J3.C0296m;
import Jk.b;
import Lk.c;
import O9.t;
import ai.d0;
import android.app.KeyguardManager;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.r0;
import c.m;
import d.B0;
import d.KeyguardManagerKeyguardDismissCallbackC1797j0;
import gm.j;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import t.C4067d;

@Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u0000:\u0001\u0003B\u0007¢\u0006\u0004\b\u0001\u0010\u0002¨\u0006\u0004"}, d2 = {"Lai/perplexity/app/android/assistant/action/PermissionsActivity;", "<init>", "()V", "com/google/android/gms/internal/measurement/v1", "assistant_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
public final class PermissionsActivity extends ComponentActivity implements c {

    public static Function0 f19516s0 = new d0(29);

    public static Function0 f19517t0 = new B0(0);

    public static boolean f19518u0;

    public C4067d f19520Y;

    public boolean f19521Z;

    public String f19522r0;

    public i f19523x;

    public volatile b f19524y;

    public final Object f19525z = new Object();

    public boolean f19519X = false;

    public PermissionsActivity() {
        addOnContextAvailableListener(new C0296m(this, 4));
        this.f19522r0 = "";
    }

    public final Object a() {
        return e().a();
    }

    public final b e() {
        if (this.f19524y == null) {
            synchronized (this.f19525z) {
                try {
                    if (this.f19524y == null) {
                        this.f19524y = new b(this);
                    }
                } finally {
                }
            }
        }
        return this.f19524y;
    }

    public final void f(Bundle bundle) {
        super.onCreate(bundle);
        if (getApplication() instanceof Lk.b) {
            i c10 = e().c();
            this.f19523x = c10;
            if (c10.u()) {
                this.f19523x.w = getDefaultViewModelCreationExtras();
            }
        }
    }

    public final void g(int[] iArr) {
        if (this.f19521Z) {
            return;
        }
        this.f19521Z = true;
        Integer valueOf = iArr.length == 0 ? null : Integer.valueOf(iArr[0]);
        if (valueOf != null && valueOf.intValue() == 0) {
            C4067d c4067d = this.f19520Y;
            if (c4067d == null) {
                Intrinsics.n("analytics");
                throw null;
            }
            c4067d.f41402l.d(this.f19522r0, "just in time");
            f19516s0.invoke();
        } else {
            C4067d c4067d2 = this.f19520Y;
            if (c4067d2 == null) {
                Intrinsics.n("analytics");
                throw null;
            }
            c4067d2.f41402l.c(this.f19522r0, "just in time");
            f19517t0.invoke();
        }
        m mVar = m.f22665y0;
        if (mVar != null) {
            mVar.a(f19518u0);
        }
        finish();
    }

    @Override
    public final r0 getDefaultViewModelProviderFactory() {
        return t.x(this, super.getDefaultViewModelProviderFactory());
    }

    @Override
    public final void onCreate(Bundle bundle) {
        String str;
        Bundle extras;
        s.a(this);
        f(bundle);
        Intent intent = getIntent();
        if (intent == null || (extras = intent.getExtras()) == null || (str = extras.getString("permission")) == null) {
            str = "";
        }
        this.f19522r0 = str;
        if (j.b0(str)) {
            finish();
        }
        this.f19521Z = false;
        requestPermissions(new String[]{str}, 137);
        KeyguardManager keyguardManager = (KeyguardManager) getSystemService(KeyguardManager.class);
        if (keyguardManager != null && keyguardManager.isKeyguardLocked()) {
            keyguardManager.requestDismissKeyguard(this, new KeyguardManagerKeyguardDismissCallbackC1797j0(2));
        }
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        i iVar = this.f19523x;
        if (iVar != null) {
            iVar.w = null;
        }
    }

    public final void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr, int i11) {
        Intrinsics.h(strArr, "permissions");
        Intrinsics.h(iArr, "grantResults");
        g(iArr);
    }

    @Override
    public final void onRequestPermissionsResult(int i10, String[] strArr, int[] iArr) {
        Intrinsics.h(strArr, "permissions");
        Intrinsics.h(iArr, "grantResults");
        super.onRequestPermissionsResult(i10, strArr, iArr);
        g(iArr);
    }
}