正在查看: Perplexity v2.48.1 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Perplexity v2.48.1 应用的 MainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package ai.perplexity.app.android.ui.main;
import Ak.a;
import B5.e;
import Ec.i;
import J3.C0296m;
import Jk.b;
import L2.C0424o;
import L2.C0428q;
import L2.K1;
import L2.L1;
import Lk.c;
import O9.t;
import ai.perplexity.app.android.ui.main.MainActivity;
import android.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Size;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import androidx.activity.ComponentActivity;
import androidx.lifecycle.k0;
import androidx.lifecycle.r0;
import g9.AbstractC2468f;
import gm.d;
import java.util.concurrent.Executor;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.internal.Intrinsics;
import l0.C3111A;
import l0.C3138b0;
import l0.C3142c0;
import l0.C3146d0;
import l0.C3224z;
import n0.C3326a;
import om.F;
import om.H;
import p3.A1;
import p3.C3679x1;
import p3.O;
import p3.P;
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\b²\u0006\f\u0010\u0005\u001a\u00020\u00048\nX\u008a\u0084\u0002²\u0006\f\u0010\u0007\u001a\u00020\u00068\nX\u008a\u0084\u0002"}, d2 = {"Lai/perplexity/app/android/ui/main/MainActivity;", "Landroidx/activity/ComponentActivity;", "<init>", "()V", "LB/a;", "config", "Ll0/d;", "currentMode", "PerplexityAndroid_v260454(2.48.1)_20250618_122841_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
public final class MainActivity extends ComponentActivity implements c {
public static final int f19558r0 = 0;
public C3326a f19560Y;
public C0424o f19561Z;
public i f19562x;
public volatile b f19563y;
public final Object f19564z = new Object();
public boolean f19559X = false;
public MainActivity() {
addOnContextAvailableListener(new C0296m(this, 1));
}
public final Object a() {
return e().a();
}
public final b e() {
if (this.f19563y == null) {
synchronized (this.f19564z) {
try {
if (this.f19563y == null) {
this.f19563y = new b(this);
}
} finally {
}
}
}
return this.f19563y;
}
public final C3326a f() {
C3326a c3326a = this.f19560Y;
if (c3326a != null) {
return c3326a;
}
Intrinsics.n("activityDependencies");
throw null;
}
public final void g(Bundle bundle) {
super.onCreate(bundle);
if (getApplication() instanceof Lk.b) {
i c10 = e().c();
this.f19562x = c10;
if (c10.u()) {
this.f19562x.w = getDefaultViewModelCreationExtras();
}
}
}
@Override
public final r0 getDefaultViewModelProviderFactory() {
return t.x(this, super.getDefaultViewModelProviderFactory());
}
@Override
public final void onCreate(Bundle bundle) {
g(bundle);
AbstractC2468f.B(getWindow(), false);
C3138b0 c3138b0 = f().f36080i;
c3138b0.getClass();
DisplayMetrics displayMetrics = new DisplayMetrics();
Object systemService = getSystemService("window");
Intrinsics.f(systemService, "null cannot be cast to non-null type android.view.WindowManager");
((WindowManager) systemService).getDefaultDisplay().getMetrics(displayMetrics);
long l4 = W5.c.l(displayMetrics.widthPixels, displayMetrics.heightPixels);
c3138b0.f34842a = new Size((int) (l4 >> 32), (int) (l4 & 4294967295L));
C3111A c3111a = f().f36087p;
c3111a.getClass();
H.o(c3111a.f34612a, (CoroutineContext) null, (F) null, new C3224z(c3111a, this, null), 3);
e eVar = new e(new C0428q(this, 1), true, -1869791111);
ViewGroup.LayoutParams layoutParams = L1.f7370a;
View childAt = ((ViewGroup) getWindow().getDecorView().findViewById(R.id.content)).getChildAt(0);
K1 k12 = childAt instanceof K1 ? (K1) childAt : null;
if (k12 != null) {
k12.setParentCompositionContext(null);
k12.setContent(eVar);
} else {
K1 k13 = new K1(this);
k13.setParentCompositionContext(null);
k13.setContent(eVar);
View decorView = getWindow().getDecorView();
Intrinsics.g(decorView, "getDecorView(...)");
if (k0.f(decorView) == null) {
k0.m(decorView, this);
}
if (k0.g(decorView) == null) {
k0.n(decorView, this);
}
if (d.p(decorView) == null) {
d.y(decorView, this);
}
setContentView(k13, L1.f7370a);
}
C3326a f4 = f();
Intent intent = getIntent();
Intrinsics.g(intent, "getIntent(...)");
A1 a12 = f4.f36086o;
a12.getClass();
H.o(a12.f37831f, (CoroutineContext) null, (F) null, new C3679x1(a12, intent, null), 3);
addOnNewIntentListener(new B4.F(this, 4));
}
@Override
public final void onDestroy() {
super.onDestroy();
i iVar = this.f19562x;
if (iVar != null) {
iVar.w = null;
}
}
@Override
public final void onStart() {
Executor mainExecutor;
super.onStart();
if (Build.VERSION.SDK_INT >= 34) {
try {
?? r02 = new Activity.ScreenCaptureCallback() {
@Override
public final void onScreenCaptured() {
MainActivity mainActivity = MainActivity.this;
int i10 = MainActivity.f19558r0;
C3146d0 c3146d0 = mainActivity.f().f36081j;
om.H.o(c3146d0.f34862a, (CoroutineContext) null, (om.F) null, new C3142c0(c3146d0, null), 3);
}
};
this.f19561Z = r02;
mainExecutor = getMainExecutor();
a.m(this, mainExecutor, (C0424o) r02);
} catch (Exception e10) {
Jn.c.a.j(e10, "Failed to register screen capture callback: %s", new Object[]{e10.getLocalizedMessage()});
}
}
P p10 = f().f36088q;
H.o(p10.f37964a, (CoroutineContext) null, (F) null, new O(p10, null), 3);
f().f36089r.a();
}
@Override
public final void onStop() {
super.onStop();
if (Build.VERSION.SDK_INT >= 34) {
try {
C0424o c0424o = this.f19561Z;
if (c0424o == null) {
c0424o = null;
}
if (c0424o != null) {
a.l(this, c0424o);
}
} catch (Exception e10) {
Jn.c.a.j(e10, "Failed to unregister screen capture callback: %s", new Object[]{e10.getLocalizedMessage()});
}
}
}
}