正在查看: Uptodown App Store v6.80 应用的 PreregistrationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 PreregistrationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.activities;
import M1.C0466v;
import N1.k;
import android.R;
import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
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.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import c2.C0598o0;
import c2.C0606t;
import com.uptodown.UptodownApp;
import com.uptodown.activities.C0762x;
import com.uptodown.activities.PreregistrationActivity;
import d2.K1;
import g2.C0944E;
import g2.C0957h;
import java.util.ArrayList;
import java.util.HashMap;
import kotlin.jvm.internal.AbstractC1009g;
import u2.H;
public final class PreregistrationActivity extends AbstractC0740a {
public static final a Q = new a(null);
private C0466v L;
private final ActivityResultLauncher P;
private final R2.g J = new ViewModelLazy(kotlin.jvm.internal.D.b(C0762x.class), new e(this), new d(this), new f(null, this));
private final R2.g K = R2.h.a(new d3.a() {
@Override
public final Object invoke() {
C0598o0 v3;
v3 = PreregistrationActivity.v3(PreregistrationActivity.this);
return v3;
}
});
private C0762x.a M = C0762x.a.b;
private boolean N = true;
private final g O = new g();
public static final class a {
public a(AbstractC1009g abstractC1009g) {
this();
}
private a() {
}
}
static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final PreregistrationActivity a;
a(PreregistrationActivity preregistrationActivity) {
this.a = preregistrationActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (h instanceof H.a) {
if (this.a.L == null) {
this.a.z3().d.setVisibility(0);
}
} else if (h instanceof H.c) {
this.a.z3().b.getRoot().setVisibility(0);
H.c cVar = (H.c) h;
this.a.y3((ArrayList) cVar.a());
if (((ArrayList) cVar.a()).isEmpty()) {
this.a.z3().i.setVisibility(0);
this.a.z3().b.getRoot().setVisibility(8);
}
this.a.z3().h.setVisibility(0);
this.a.z3().f.setVisibility(0);
this.a.z3().d.setVisibility(8);
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
return R2.s.a;
}
}
b(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return PreregistrationActivity.this.new b(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
Object c = W2.b.c();
int i = this.a;
if (i == 0) {
R2.n.b(obj);
r3.I e = PreregistrationActivity.this.A3().e();
a aVar = new a(PreregistrationActivity.this);
this.a = 1;
if (e.collect(aVar, this) == c) {
return c;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
}
throw new R2.d();
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((b) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
static final class c extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
final C0944E c;
c(C0944E c0944e, V2.d dVar) {
super(2, dVar);
this.c = c0944e;
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return PreregistrationActivity.this.new c(this.c, dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
W2.b.c();
if (this.a != 0) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
R2.n.b(obj);
PreregistrationActivity.this.w3(this.c);
return R2.s.a;
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((c) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
public static final class d extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public d(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelProvider.Factory invoke() {
return this.a.getDefaultViewModelProviderFactory();
}
}
public static final class e extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public e(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelStore invoke() {
return this.a.getViewModelStore();
}
}
public static final class f extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
final ComponentActivity b;
public f(d3.a aVar, ComponentActivity componentActivity) {
super(0);
this.a = aVar;
this.b = componentActivity;
}
@Override
public final CreationExtras invoke() {
CreationExtras creationExtras;
d3.a aVar = this.a;
return (aVar == null || (creationExtras = (CreationExtras) aVar.invoke()) == null) ? this.b.getDefaultViewModelCreationExtras() : creationExtras;
}
}
public static final class g implements f2.U {
g() {
}
@Override
public void a(int i) {
if (!UptodownApp.F.a0() || PreregistrationActivity.this.L == null) {
return;
}
C0466v c0466v = PreregistrationActivity.this.L;
kotlin.jvm.internal.m.b(c0466v);
if (c0466v.b().isEmpty()) {
return;
}
C0466v c0466v2 = PreregistrationActivity.this.L;
kotlin.jvm.internal.m.b(c0466v2);
Object obj = c0466v2.b().get(i);
kotlin.jvm.internal.m.d(obj, "get(...)");
PreregistrationActivity.this.D2(((C0944E) obj).c());
}
@Override
public void f(int i) {
if (UptodownApp.F.a0()) {
if (g2.S.m.e(PreregistrationActivity.this) == null) {
PreregistrationActivity.this.N3();
return;
}
C0466v c0466v = PreregistrationActivity.this.L;
kotlin.jvm.internal.m.b(c0466v);
Object obj = c0466v.b().get(i);
kotlin.jvm.internal.m.d(obj, "get(...)");
PreregistrationActivity.this.J3((C0944E) obj);
}
}
}
public PreregistrationActivity() {
ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
PreregistrationActivity.I3(PreregistrationActivity.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
this.P = registerForActivityResult;
}
public final C0762x A3() {
return (C0762x) this.J.getValue();
}
private final void B3() {
setContentView(z3().getRoot());
Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
final C0598o0 z3 = z3();
if (drawable != null) {
z3.g.setNavigationIcon(drawable);
z3.g.setNavigationContentDescription(getString(2131951721));
}
z3.g.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.C3(PreregistrationActivity.this, view);
}
});
TextView textView = z3.j;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
z3.h.setTypeface(aVar.w());
z3.f.setLayoutManager(new LinearLayoutManager(this, 1, false));
z3.f.setItemAnimator(new DefaultItemAnimator());
int dimension = (int) getResources().getDimension(2131166020);
z3().f.addItemDecoration(new w2.l(dimension, dimension));
z3.i.setTypeface(aVar.x());
z3.d.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.D3(view);
}
});
z3.b.c.setTypeface(aVar.x());
z3.b.d.setTypeface(aVar.w());
z3.h.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.E3(PreregistrationActivity.this, view);
}
});
final HashMap hashMap = new HashMap();
hashMap.put(0, getString(2131952461));
hashMap.put(1, getString(2131952462));
z3.b.getRoot().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.F3(PreregistrationActivity.this, hashMap, z3, view);
}
});
}
public static final void C3(PreregistrationActivity preregistrationActivity, View view) {
preregistrationActivity.finish();
}
public static final void D3(View view) {
}
public static final void E3(PreregistrationActivity preregistrationActivity, View view) {
C0957h c0957h = new C0957h(1090, null, null, 6, null);
c0957h.s(true);
preregistrationActivity.Q3(c0957h);
}
public static final void F3(final PreregistrationActivity preregistrationActivity, HashMap hashMap, final C0598o0 c0598o0, View view) {
kotlin.jvm.internal.m.b(view);
new y2.q(preregistrationActivity, view, hashMap, new d3.p() {
@Override
public final Object invoke(Object obj, Object obj2) {
R2.s G3;
G3 = PreregistrationActivity.G3(PreregistrationActivity.this, c0598o0, ((Integer) obj).intValue(), (String) obj2);
return G3;
}
}).c();
}
public static final R2.s G3(PreregistrationActivity preregistrationActivity, C0598o0 c0598o0, int i, String selectedOption) {
kotlin.jvm.internal.m.e(selectedOption, "selectedOption");
if (i == 0) {
preregistrationActivity.M = C0762x.a.a;
preregistrationActivity.N = false;
} else if (i == 1) {
preregistrationActivity.M = C0762x.a.b;
preregistrationActivity.N = false;
}
if (((Number) preregistrationActivity.A3().f().getValue()).intValue() != i) {
preregistrationActivity.A3().f().setValue(Integer.valueOf(i));
c0598o0.b.d.setText(selectedOption);
preregistrationActivity.A3().h(false);
preregistrationActivity.H3(true);
}
return R2.s.a;
}
private final void H3(boolean z) {
A3().d(this, this.M, this.N, z);
}
public static final void I3(PreregistrationActivity preregistrationActivity, ActivityResult activityResult) {
if (activityResult.getResultCode() == 1) {
g2.S e4 = g2.S.m.e(preregistrationActivity);
if ((e4 != null ? e4.g() : null) == null || !e4.m(preregistrationActivity)) {
return;
}
UptodownApp.a aVar = UptodownApp.F;
aVar.m0(preregistrationActivity);
aVar.l0(preregistrationActivity);
}
}
public final void J3(final C0944E c0944e) {
AlertDialog k22;
if (isFinishing()) {
return;
}
if (k2() != null && (k22 = k2()) != null) {
k22.dismiss();
}
C0606t c4 = C0606t.c(getLayoutInflater());
kotlin.jvm.internal.m.d(c4, "inflate(...)");
TextView textView = c4.f;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
c4.f.setText(getString(2131951755));
c4.d.setTypeface(aVar.x());
TextView textView2 = c4.d;
u2.p pVar = new u2.p();
String string = getString(2131951813, c0944e.f());
kotlin.jvm.internal.m.d(string, "getString(...)");
String f4 = c0944e.f();
kotlin.jvm.internal.m.b(f4);
textView2.setText(pVar.d(string, f4, this));
c4.c.setTypeface(aVar.w());
c4.e.setTypeface(aVar.w());
c4.e.setText(getString(2131951920));
c4.c.setVisibility(0);
c4.c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.K3(PreregistrationActivity.this, view);
}
});
c4.e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.L3(PreregistrationActivity.this, c0944e, view);
}
});
c4.b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.M3(PreregistrationActivity.this, view);
}
});
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(c4.getRoot());
builder.setCancelable(true);
K2(builder.create());
if (k2() != null) {
AlertDialog k23 = k2();
kotlin.jvm.internal.m.b(k23);
Window window = k23.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(0));
}
AlertDialog k24 = k2();
kotlin.jvm.internal.m.b(k24);
k24.show();
}
}
public static final void K3(PreregistrationActivity preregistrationActivity, View view) {
AlertDialog k22 = preregistrationActivity.k2();
kotlin.jvm.internal.m.b(k22);
k22.dismiss();
}
public static final void L3(PreregistrationActivity preregistrationActivity, C0944E c0944e, View view) {
o3.g.d(o3.K.a(o3.Y.b()), (V2.g) null, (o3.L) null, preregistrationActivity.new c(c0944e, null), 3, (Object) null);
AlertDialog k22 = preregistrationActivity.k2();
kotlin.jvm.internal.m.b(k22);
k22.dismiss();
}
public static final void M3(PreregistrationActivity preregistrationActivity, View view) {
AlertDialog k22 = preregistrationActivity.k2();
kotlin.jvm.internal.m.b(k22);
k22.dismiss();
}
public final void N3() {
AlertDialog k22;
if (isFinishing()) {
return;
}
if (k2() != null && (k22 = k2()) != null) {
k22.dismiss();
}
C0606t c4 = C0606t.c(getLayoutInflater());
kotlin.jvm.internal.m.d(c4, "inflate(...)");
TextView textView = c4.f;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
c4.d.setTypeface(aVar.x());
c4.e.setTypeface(aVar.w());
c4.e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.O3(PreregistrationActivity.this, view);
}
});
c4.b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PreregistrationActivity.P3(PreregistrationActivity.this, view);
}
});
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(c4.getRoot());
builder.setCancelable(true);
K2(builder.create());
if (k2() != null) {
AlertDialog k23 = k2();
kotlin.jvm.internal.m.b(k23);
Window window = k23.getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(0));
}
AlertDialog k24 = k2();
kotlin.jvm.internal.m.b(k24);
k24.show();
}
}
public static final void O3(PreregistrationActivity preregistrationActivity, View view) {
preregistrationActivity.P.launch(new Intent(preregistrationActivity.getApplicationContext(), (Class<?>) LoginActivity.class), UptodownApp.F.b(preregistrationActivity));
AlertDialog k22 = preregistrationActivity.k2();
kotlin.jvm.internal.m.b(k22);
k22.dismiss();
}
public static final void P3(PreregistrationActivity preregistrationActivity, View view) {
AlertDialog k22 = preregistrationActivity.k2();
kotlin.jvm.internal.m.b(k22);
k22.dismiss();
}
private final void Q3(C0957h c0957h) {
getSupportFragmentManager().beginTransaction().setCustomAnimations(2130772032, 2130772029).add(R.id.content, K1.i.a(c0957h), (String) null).addToBackStack(String.valueOf(c0957h.b())).commit();
}
public static final C0598o0 v3(PreregistrationActivity preregistrationActivity) {
return C0598o0.c(preregistrationActivity.getLayoutInflater());
}
public final void w3(C0944E c0944e) {
A3().c(this, c0944e, new d3.a() {
@Override
public final Object invoke() {
R2.s x3;
x3 = PreregistrationActivity.x3(PreregistrationActivity.this);
return x3;
}
});
}
public static final R2.s x3(PreregistrationActivity preregistrationActivity) {
preregistrationActivity.H3(true);
return R2.s.a;
}
public final void y3(ArrayList arrayList) {
C0466v c0466v = this.L;
if (c0466v == null) {
this.L = new C0466v(arrayList, this, this.O);
z3().f.setAdapter(this.L);
} else {
kotlin.jvm.internal.m.b(c0466v);
c0466v.c(arrayList);
}
}
public final C0598o0 z3() {
return (C0598o0) this.K.getValue();
}
@Override
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
B3();
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new b(null), 2, (Object) null);
}
@Override
protected void onResume() {
super.onResume();
H3(false);
}
}