正在查看: Uptodown App Store v6.80 应用的 TvMainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 TvMainActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.tv.ui.activity;
import N1.j;
import R2.s;
import S2.AbstractC0525o;
import W1.C0536h;
import W1.G;
import android.R;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.leanback.app.BackgroundManager;
import androidx.lifecycle.LifecycleOwnerKt;
import b2.C0561j;
import com.mbridge.msdk.playercommon.exoplayer2.source.ExtractorMediaSource;
import com.uptodown.UptodownApp;
import com.uptodown.activities.preferences.a;
import com.uptodown.core.activities.InstallerActivity;
import com.uptodown.tv.preferences.TvPrivacyPreferences;
import com.uptodown.tv.ui.activity.TvMainActivity;
import f2.InterfaceC0934q;
import g2.C0955f;
import g2.C0965p;
import java.io.File;
import java.util.List;
import kotlin.jvm.internal.m;
import q2.AbstractC1115b;
import r2.C1158p;
import r2.C1164v;
import u2.C1217A;
import u2.C1233m;
import u2.p;
import u2.v;
import u2.z;
public final class TvMainActivity extends AbstractC1115b implements InterfaceC0934q {
private AlertDialog b;
public Fragment c;
private final ActivityResultLauncher d;
private final ActivityResultLauncher e;
public TvMainActivity() {
ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
TvMainActivity.z(TvMainActivity.this, (ActivityResult) obj);
}
});
m.d(registerForActivityResult, "registerForActivityResult(...)");
this.d = registerForActivityResult;
ActivityResultLauncher registerForActivityResult2 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
TvMainActivity.x(TvMainActivity.this, (ActivityResult) obj);
}
});
m.d(registerForActivityResult2, "registerForActivityResult(...)");
this.e = registerForActivityResult2;
}
private final boolean B(Intent intent) {
return (intent.getFlags() & ExtractorMediaSource.DEFAULT_LOADING_CHECK_INTERVAL_BYTES) == 1048576;
}
private final void s(String str) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(str);
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
TvMainActivity.t(dialogInterface, i);
}
});
builder.setCancelable(true);
AlertDialog create = builder.create();
if (isFinishing()) {
return;
}
create.show();
}
public static final void t(DialogInterface dialogInterface, int i) {
m.e(dialogInterface, "dialogInterface");
dialogInterface.dismiss();
}
private final void u() {
AlertDialog alertDialog;
AlertDialog alertDialog2 = this.b;
if (alertDialog2 != null) {
alertDialog2.dismiss();
}
a.C0191a c0191a = a.a;
if (!c0191a.Q(this) || c0191a.e0(this)) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(2131952692));
builder.setPositiveButton(2131952053, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
TvMainActivity.v(TvMainActivity.this, dialogInterface, i);
}
});
builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
TvMainActivity.w(dialogInterface, i);
}
});
builder.setCancelable(true);
this.b = builder.create();
if (isFinishing() || (alertDialog = this.b) == null) {
return;
}
alertDialog.show();
}
public static final void v(TvMainActivity tvMainActivity, DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
tvMainActivity.e.launch(new Intent((Context) tvMainActivity, (Class<?>) TvPrivacyPreferences.class));
}
public static final void w(DialogInterface dialogInterface, int i) {
m.e(dialogInterface, "dialogInterface");
dialogInterface.dismiss();
}
public static final void x(TvMainActivity tvMainActivity, ActivityResult activityResult) {
if (a.a.e0(tvMainActivity)) {
UptodownApp.a.P0(UptodownApp.F, tvMainActivity, false, 2, null);
}
}
public static final void z(TvMainActivity tvMainActivity, ActivityResult activityResult) {
Bundle extras;
if (activityResult.getResultCode() == 10) {
Intent data = activityResult.getData();
String string = (data == null || (extras = data.getExtras()) == null) ? null : extras.getString("realPath");
if (string == null || string.length() == 0) {
return;
}
boolean B = new C1233m().B(tvMainActivity);
File file = new File(string);
new j(tvMainActivity).c(file, null, B);
v a = v.v.a(tvMainActivity);
a.a();
String name = file.getName();
m.d(name, "getName(...)");
C0965p b0 = a.b0(name);
a.i();
Bundle bundle = new Bundle();
if ((b0 != null ? b0.w() : null) != null) {
C1217A c1217a = C1217A.a;
String w = b0.w();
m.b(w);
bundle = c1217a.b(tvMainActivity, w, bundle);
bundle.putString("packagename", b0.w());
}
bundle.putString("type", "start");
z l = tvMainActivity.l();
if (l != null) {
l.d("install", bundle);
}
}
}
public final void A(Fragment fragment) {
m.e(fragment, "<set-?>");
this.c = fragment;
}
@Override
public void c(int i) {
s(getString(2131952291));
}
@Override
public void d(C0955f appInfo) {
m.e(appInfo, "appInfo");
Intent intent = new Intent((Context) this, (Class<?>) TvAppDetailActivity.class);
intent.putExtra("appInfo", appInfo);
startActivity(intent, UptodownApp.F.a(this));
}
public void onBackPressed() {
List fragments = getSupportFragmentManager().getFragments();
m.d(fragments, "getFragments(...)");
if (AbstractC0525o.P(fragments) instanceof C1158p) {
finish();
} else {
super/*androidx.activity.ComponentActivity*/.onBackPressed();
}
}
@Override
public void onCreate(Bundle bundle) {
Uri data;
super.onCreate(bundle);
setContentView(2131558842);
A(new C1164v());
getSupportFragmentManager().beginTransaction().replace(2131362183, y()).commit();
if (a.a.e0(this)) {
UptodownApp.a.P0(UptodownApp.F, this, false, 2, null);
}
BackgroundManager backgroundManager = BackgroundManager.getInstance(this);
Drawable drawable = ContextCompat.getDrawable(this, 2131231379);
if (backgroundManager != null) {
backgroundManager.setDrawable(drawable);
}
Intent intent = getIntent();
if (intent == null || B(intent) || (data = intent.getData()) == null) {
return;
}
String j = new C0536h().j(data, this);
if (j == null || !(G.b.a(j) || m3.m.o(j, ".apk", false, 2, null))) {
new C0561j(this, new p().j(data), this, LifecycleOwnerKt.getLifecycleScope(this));
return;
}
Intent intent2 = new Intent(getApplicationContext(), (Class<?>) InstallerActivity.class);
intent2.setData(data);
this.d.launch(intent2);
s sVar = s.a;
}
protected void onResume() {
super.onResume();
u();
}
public final Fragment y() {
Fragment fragment = this.c;
if (fragment != null) {
return fragment;
}
m.u("tvMainFragment");
return null;
}
}