正在查看: Uptodown App Store v6.80 应用的 v2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 v2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package d2;
import N1.k;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;
import b2.C0563l;
import c2.C0595n;
import c2.C0599p;
import com.uptodown.UptodownApp;
import com.uptodown.activities.AbstractC0740a;
import com.uptodown.activities.LoginActivity;
import com.uptodown.activities.MainActivity;
import com.uptodown.activities.MyApps;
import com.uptodown.activities.MyDownloads;
import com.uptodown.activities.NotificationsRegistryActivity;
import com.uptodown.activities.PreregistrationActivity;
import com.uptodown.activities.PublicProfileActivity;
import com.uptodown.activities.RecommendedActivity;
import com.uptodown.activities.RollbackActivity;
import com.uptodown.activities.SecurityActivity;
import com.uptodown.activities.Updates;
import com.uptodown.activities.UserAvatarActivity;
import com.uptodown.activities.UserCommentsActivity;
import com.uptodown.activities.UserDeviceDetailsActivity;
import com.uptodown.activities.UserDevicesActivity;
import com.uptodown.activities.UserEditProfileActivity;
import com.uptodown.activities.WishlistActivity;
import com.uptodown.activities.a0;
import com.uptodown.activities.preferences.PreferencesActivity;
import com.uptodown.activities.preferences.a;
import com.uptodown.util.views.UsernameTextView;
import d2.v2;
import g2.S;
import u2.H;
import u2.p;
import u2.v;
public final class v2 extends Fragment {
public c2.X0 a;
private final R2.g b = FragmentViewModelLazyKt.createViewModelLazy(this, kotlin.jvm.internal.D.b(x2.class), new g(new f(this)), (d3.a) null);
private final R2.g c = FragmentViewModelLazyKt.createViewModelLazy(this, kotlin.jvm.internal.D.b(com.uptodown.activities.a0.class), new i(new h(this)), (d3.a) null);
private String d;
private final ActivityResultLauncher e;
private final ActivityResultLauncher f;
private final ActivityResultLauncher g;
private final ActivityResultLauncher h;
private final ActivityResultLauncher i;
static final class a extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class C0200a implements r3.f {
final v2 a;
static final class C0201a extends kotlin.coroutines.jvm.internal.d {
Object a;
Object b;
Object c;
int e;
C0201a(V2.d dVar) {
super(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
this.c = obj;
this.e |= Integer.MIN_VALUE;
return C0200a.this.emit(null, this);
}
}
C0200a(v2 v2Var) {
this.a = v2Var;
}
public final java.lang.Object emit(u2.H r5, V2.d r6) {
throw new UnsupportedOperationException("Method not decompiled: d2.v2.a.C0200a.emit(u2.H, V2.d):java.lang.Object");
}
}
a(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return v2.this.new a(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 j = v2.this.d0().j();
C0200a c0200a = new C0200a(v2.this);
this.a = 1;
if (j.collect(c0200a, 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 ((a) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
static final class b extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final v2 a;
a(v2 v2Var) {
this.a = v2Var;
}
public final Object emit(u2.H h, V2.d dVar) {
if (!kotlin.jvm.internal.m.a(h, H.a.a)) {
if (h instanceof H.c) {
if (this.a.isAdded()) {
u2.p pVar = new u2.p();
FragmentActivity requireActivity = this.a.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
pVar.p(requireActivity, (String) ((H.c) h).a(), this.a.getString(2131952782));
}
} else if (!kotlin.jvm.internal.m.a(h, H.b.a)) {
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 v2.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 h = v2.this.d0().h();
a aVar = new a(v2.this);
this.a = 1;
if (h.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;
static final class a implements r3.f {
final v2 a;
a(v2 v2Var) {
this.a = v2Var;
}
public final Object emit(u2.H h, V2.d dVar) {
if (!kotlin.jvm.internal.m.a(h, H.a.a)) {
if (h instanceof H.c) {
g2.T a = ((a0.a) ((H.c) h).a()).a();
Intent intent = new Intent(this.a.requireContext(), (Class<?>) UserDeviceDetailsActivity.class);
intent.putExtra("user_device", a);
v2 v2Var = this.a;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
} else if (!kotlin.jvm.internal.m.a(h, H.b.a)) {
throw new R2.k();
}
}
return R2.s.a;
}
}
c(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return v2.this.new c(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 c4 = v2.this.c0().c();
a aVar = new a(v2.this);
this.a = 1;
if (c4.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 ((c) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
static final class d extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final v2 a;
a(v2 v2Var) {
this.a = v2Var;
}
public static final void e(v2 v2Var, View view) {
if (v2Var.d != null) {
u2.p pVar = new u2.p();
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
String str = v2Var.d;
kotlin.jvm.internal.m.b(str);
u2.p.q(pVar, requireActivity, str, null, 4, null);
}
}
public final Object emit(u2.H h, V2.d dVar) {
if (!kotlin.jvm.internal.m.a(h, H.a.a)) {
if (h instanceof H.c) {
this.a.d = (String) ((H.c) h).a();
this.a.b0().p.setVisibility(0);
LinearLayout linearLayout = this.a.b0().p;
final v2 v2Var = this.a;
linearLayout.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
v2.d.a.e(v2.this, view);
}
});
} else if (!kotlin.jvm.internal.m.a(h, H.b.a)) {
throw new R2.k();
}
}
return R2.s.a;
}
}
d(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return v2.this.new d(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 f = v2.this.d0().f();
a aVar = new a(v2.this);
this.a = 1;
if (f.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 ((d) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
public static final class f extends kotlin.jvm.internal.n implements d3.a {
final Fragment a;
public f(Fragment fragment) {
super(0);
this.a = fragment;
}
@Override
public final Fragment invoke() {
return this.a;
}
}
public static final class g extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
public g(d3.a aVar) {
super(0);
this.a = aVar;
}
@Override
public final ViewModelStore invoke() {
ViewModelStore viewModelStore = ((ViewModelStoreOwner) this.a.invoke()).getViewModelStore();
kotlin.jvm.internal.m.d(viewModelStore, "ownerProducer().viewModelStore");
return viewModelStore;
}
}
public static final class h extends kotlin.jvm.internal.n implements d3.a {
final Fragment a;
public h(Fragment fragment) {
super(0);
this.a = fragment;
}
@Override
public final Fragment invoke() {
return this.a;
}
}
public static final class i extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
public i(d3.a aVar) {
super(0);
this.a = aVar;
}
@Override
public final ViewModelStore invoke() {
ViewModelStore viewModelStore = ((ViewModelStoreOwner) this.a.invoke()).getViewModelStore();
kotlin.jvm.internal.m.d(viewModelStore, "ownerProducer().viewModelStore");
return viewModelStore;
}
}
static final class j extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
j(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return v2.this.new j(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);
v2.this.f0();
return R2.s.a;
}
@Override
public final Object invoke(o3.J j, V2.d dVar) {
return ((j) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
public v2() {
ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
v2.g0(v2.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult, "registerForActivityResult(...)");
this.e = registerForActivityResult;
ActivityResultLauncher registerForActivityResult2 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
v2.J0(v2.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult2, "registerForActivityResult(...)");
this.f = registerForActivityResult2;
ActivityResultLauncher registerForActivityResult3 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
v2.a0(v2.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult3, "registerForActivityResult(...)");
this.g = registerForActivityResult3;
ActivityResultLauncher registerForActivityResult4 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
v2.O0(v2.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult4, "registerForActivityResult(...)");
this.h = registerForActivityResult4;
ActivityResultLauncher registerForActivityResult5 = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
v2.N0(v2.this, (ActivityResult) obj);
}
});
kotlin.jvm.internal.m.d(registerForActivityResult5, "registerForActivityResult(...)");
this.i = registerForActivityResult5;
}
public static final void A0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
if (bVar.e(requireContext) == null) {
v2Var.D0();
return;
}
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) WishlistActivity.class);
MainActivity activity = v2Var.getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.MainActivity");
intent.putExtra("downloadResultReceiver", activity.E5());
ActivityResultLauncher activityResultLauncher = v2Var.g;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
activityResultLauncher.launch(intent, aVar.b(requireActivity));
}
public static final void B0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
if (bVar.e(requireContext) == null) {
v2Var.D0();
return;
}
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) RecommendedActivity.class);
MainActivity activity = v2Var.getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.MainActivity");
intent.putExtra("downloadResultReceiver", activity.E5());
ActivityResultLauncher activityResultLauncher = v2Var.g;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
activityResultLauncher.launch(intent, aVar.b(requireActivity));
}
private final void C0(g2.S s) {
Intent intent = new Intent(requireContext(), (Class<?>) UserAvatarActivity.class);
intent.putExtra("user", s);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
startActivity(intent, aVar.a(requireActivity));
}
private final void D0() {
Intent intent = new Intent(requireContext(), (Class<?>) LoginActivity.class);
ActivityResultLauncher activityResultLauncher = this.e;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
activityResultLauncher.launch(intent, aVar.b(requireActivity));
}
private final void E0() {
UptodownApp.a aVar = UptodownApp.F;
if (aVar.a0()) {
Intent intent = new Intent(requireContext(), (Class<?>) SecurityActivity.class);
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
startActivity(intent, aVar.a(requireActivity));
}
}
private final void F0() {
Intent intent = new Intent(requireContext(), (Class<?>) PreferencesActivity.class);
ActivityResultLauncher activityResultLauncher = this.f;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
activityResultLauncher.launch(intent, aVar.b(requireActivity));
}
private final void H0() {
a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
Context requireContext = requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
c0191a.r0(requireContext, "yes");
AppCompatDelegate.setDefaultNightMode(2);
UptodownApp.F.t0(true);
}
private final void I0() {
a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
Context requireContext = requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
c0191a.r0(requireContext, "no");
AppCompatDelegate.setDefaultNightMode(1);
UptodownApp.F.t0(true);
}
public static final void J0(v2 v2Var, ActivityResult activityResult) {
int resultCode = activityResult.getResultCode();
if (resultCode != 1003) {
if (resultCode != 1004) {
return;
}
UptodownApp.a aVar = UptodownApp.F;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
aVar.e(requireContext);
if (v2Var.getActivity() != null) {
v2Var.requireActivity().finish();
v2Var.startActivity(v2Var.requireActivity().getIntent());
return;
}
return;
}
v.a aVar2 = u2.v.v;
Context requireContext2 = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext2, "requireContext(...)");
u2.v a4 = aVar2.a(requireContext2);
a4.a();
a4.p();
a4.i();
if (v2Var.getActivity() != null) {
v2Var.requireActivity().finish();
v2Var.startActivity(v2Var.requireActivity().getIntent());
}
}
public final void K0(int i4, int i5) {
if (i4 > 0) {
b0().H.setVisibility(0);
if (i4 > 99) {
b0().H.setText(getString(2131952285));
} else {
b0().H.setText(String.valueOf(i4));
}
} else {
b0().H.setVisibility(4);
}
if (i5 <= 0) {
b0().G.setVisibility(4);
return;
}
b0().G.setVisibility(0);
if (i5 > 99) {
b0().G.setText(getString(2131952285));
} else {
b0().G.setText(String.valueOf(i5));
}
}
public static final void N0(v2 v2Var, ActivityResult activityResult) {
if (activityResult.getResultCode() != 2 || v2Var.getContext() == null) {
return;
}
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
v2Var.R(requireContext);
v2Var.D0();
}
public static final void O0(v2 v2Var, ActivityResult activityResult) {
if (activityResult.getResultCode() != 5 || v2Var.getContext() == null) {
return;
}
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
v2Var.R(requireContext);
}
private final void R(Context context) {
d0().d(context);
b0().g.setImageResource(2131231569);
ImageView ivUserAvatarUserFragment = b0().g;
kotlin.jvm.internal.m.d(ivUserAvatarUserFragment, "ivUserAvatarUserFragment");
int dimension = (int) getResources().getDimension(2131166020);
ivUserAvatarUserFragment.setPadding(dimension, dimension, dimension, dimension);
b0().g.setBackground(null);
b0().T.setText(getString(2131952634));
UsernameTextView.a aVar = UsernameTextView.k;
UsernameTextView tvUsernameUserFragment = b0().T;
kotlin.jvm.internal.m.d(tvUsernameUserFragment, "tvUsernameUserFragment");
aVar.b(tvUsernameUserFragment);
b0().T.setTextColor(ContextCompat.getColor(requireContext(), 2131100648));
b0().Q.setText(getString(2131952661));
b0().L.setVisibility(8);
b0().C.setVisibility(8);
b0().p.setVisibility(8);
this.d = null;
b0().e.setImageDrawable(ContextCompat.getDrawable(requireContext(), 2131231528));
b0().f.setVisibility(8);
if (getActivity() == null || requireActivity().isFinishing() || !(getActivity() instanceof MainActivity)) {
return;
}
MainActivity activity = getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.MainActivity");
activity.V7();
}
private final void S(final Context context) {
Object obj;
final kotlin.jvm.internal.C c4 = new kotlin.jvm.internal.C();
C0595n c5 = C0595n.c(getLayoutInflater());
kotlin.jvm.internal.m.d(c5, "inflate(...)");
TextView textView = c5.f;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
c5.c.setTypeface(aVar.x());
c5.b.setTypeface(aVar.x());
c5.d.setTypeface(aVar.x());
String f4 = com.uptodown.activities.preferences.a.a.f(context);
if (m3.m.p(f4, "yes", true)) {
c5.c.setChecked(true);
} else if (m3.m.p(f4, "no", true)) {
c5.b.setChecked(true);
} else {
c5.d.setChecked(true);
}
c5.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
v2.T(kotlin.jvm.internal.C.this, this, compoundButton, z);
}
});
c5.b.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
v2.U(kotlin.jvm.internal.C.this, this, compoundButton, z);
}
});
c5.d.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
v2.V(kotlin.jvm.internal.C.this, context, compoundButton, z);
}
});
c5.e.setTypeface(aVar.w());
c5.e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
v2.W(kotlin.jvm.internal.C.this, view);
}
});
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setView((View) c5.getRoot());
builder.setCancelable(true);
c4.a = builder.create();
if (getActivity() == null || requireActivity().isFinishing() || (obj = c4.a) == null) {
return;
}
Window window = ((AlertDialog) obj).getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(0));
}
((AlertDialog) c4.a).show();
}
public static final void T(kotlin.jvm.internal.C c4, v2 v2Var, CompoundButton compoundButton, boolean z) {
if (z) {
Object obj = c4.a;
kotlin.jvm.internal.m.b(obj);
((AlertDialog) obj).dismiss();
v2Var.H0();
}
}
public static final void U(kotlin.jvm.internal.C c4, v2 v2Var, CompoundButton compoundButton, boolean z) {
if (z) {
Object obj = c4.a;
kotlin.jvm.internal.m.b(obj);
((AlertDialog) obj).dismiss();
v2Var.I0();
}
}
public static final void V(kotlin.jvm.internal.C c4, Context context, CompoundButton compoundButton, boolean z) {
if (z) {
Object obj = c4.a;
kotlin.jvm.internal.m.b(obj);
((AlertDialog) obj).dismiss();
com.uptodown.activities.preferences.a.a.r0(context, "system");
AppCompatDelegate.setDefaultNightMode(-1);
UptodownApp.F.t0(true);
}
}
public static final void W(kotlin.jvm.internal.C c4, View view) {
Object obj = c4.a;
kotlin.jvm.internal.m.b(obj);
((AlertDialog) obj).dismiss();
}
private final void X(final Context context) {
Object obj;
final kotlin.jvm.internal.C c4 = new kotlin.jvm.internal.C();
C0599p c5 = C0599p.c(getLayoutInflater());
kotlin.jvm.internal.m.d(c5, "inflate(...)");
TextView textView = c5.d;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.x());
c5.d.setText(getString(2131952165));
c5.e.setTypeface(aVar.w());
c5.e.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
v2.Y(v2.this, context, c4, view);
}
});
c5.c.setTypeface(aVar.w());
c5.c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
v2.Z(kotlin.jvm.internal.C.this, view);
}
});
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setView(c5.getRoot());
builder.setCancelable(true);
c4.a = builder.create();
if (getActivity() == null || requireActivity().isFinishing() || (obj = c4.a) == null) {
return;
}
Window window = ((AlertDialog) obj).getWindow();
if (window != null) {
window.setBackgroundDrawable(new ColorDrawable(0));
}
((AlertDialog) c4.a).show();
}
public static final void Y(v2 v2Var, Context context, kotlin.jvm.internal.C c4, View view) {
v2Var.R(context);
Object obj = c4.a;
kotlin.jvm.internal.m.b(obj);
((AlertDialog) obj).dismiss();
}
public static final void Z(kotlin.jvm.internal.C c4, View view) {
Object obj = c4.a;
kotlin.jvm.internal.m.b(obj);
((AlertDialog) obj).dismiss();
}
public static final void a0(v2 v2Var, ActivityResult activityResult) {
if (activityResult.getResultCode() == 1 && v2Var.isAdded()) {
MainActivity activity = v2Var.getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.MainActivity");
activity.s5(0);
}
}
public final com.uptodown.activities.a0 c0() {
return (com.uptodown.activities.a0) this.c.getValue();
}
private final void e0(g2.S s) {
if (s.b() != null) {
com.squareup.picasso.w l = com.squareup.picasso.s.h().l(g2.S.m.c(s.a()));
UptodownApp.a aVar = UptodownApp.F;
Context requireContext = requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
l.n(aVar.h0(requireContext)).i(b0().g);
b0().g.setBackground(ContextCompat.getDrawable(requireContext(), 2131231294));
} else {
b0().g.setImageResource(2131231573);
}
ImageView ivUserAvatarUserFragment = b0().g;
kotlin.jvm.internal.m.d(ivUserAvatarUserFragment, "ivUserAvatarUserFragment");
ivUserAvatarUserFragment.setPadding(0, 0, 0, 0);
b0().T.setText(s.h());
if (!s.n() || kotlin.jvm.internal.m.a(s.l(), "type0")) {
UsernameTextView.a aVar2 = UsernameTextView.k;
UsernameTextView tvUsernameUserFragment = b0().T;
kotlin.jvm.internal.m.d(tvUsernameUserFragment, "tvUsernameUserFragment");
aVar2.b(tvUsernameUserFragment);
} else {
UsernameTextView.a aVar3 = UsernameTextView.k;
UsernameTextView tvUsernameUserFragment2 = b0().T;
kotlin.jvm.internal.m.d(tvUsernameUserFragment2, "tvUsernameUserFragment");
aVar3.a(tvUsernameUserFragment2, s.n(), s.l());
}
if (s.n()) {
b0().f.setVisibility(0);
p.a aVar4 = u2.p.a;
ImageView ivUserAvatarUserFragment2 = b0().g;
kotlin.jvm.internal.m.d(ivUserAvatarUserFragment2, "ivUserAvatarUserFragment");
aVar4.a(ivUserAvatarUserFragment2);
b0().Q.setText(getString(2131952736));
b0().e.setImageDrawable(ContextCompat.getDrawable(requireContext(), 2131231529));
} else {
b0().Q.setText(getString(2131952661));
b0().e.setImageDrawable(ContextCompat.getDrawable(requireContext(), 2131231528));
}
b0().C.setVisibility(0);
if (!s.n()) {
b0().p.setVisibility(8);
} else if (this.d == null) {
x2 d0 = d0();
Context requireContext2 = requireContext();
kotlin.jvm.internal.m.d(requireContext2, "requireContext(...)");
d0.g(requireContext2);
} else {
b0().p.setVisibility(0);
}
if (getActivity() != null && !requireActivity().isFinishing() && (getActivity() instanceof MainActivity)) {
MainActivity activity = getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.MainActivity");
activity.V7();
}
b0().L.setVisibility(0);
}
public final void f0() {
if (getContext() != null) {
S.b bVar = g2.S.m;
Context requireContext = requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
g2.S e4 = bVar.e(requireContext);
if ((e4 != null ? e4.g() : null) != null) {
Context requireContext2 = requireContext();
kotlin.jvm.internal.m.d(requireContext2, "requireContext(...)");
if (e4.m(requireContext2)) {
e0(e4);
UptodownApp.a aVar = UptodownApp.F;
Context requireContext3 = requireContext();
kotlin.jvm.internal.m.d(requireContext3, "requireContext(...)");
aVar.m0(requireContext3);
Context requireContext4 = requireContext();
kotlin.jvm.internal.m.d(requireContext4, "requireContext(...)");
aVar.l0(requireContext4);
return;
}
}
Context requireContext5 = requireContext();
kotlin.jvm.internal.m.d(requireContext5, "requireContext(...)");
R(requireContext5);
}
}
public static final void g0(v2 v2Var, ActivityResult activityResult) {
int resultCode = activityResult.getResultCode();
if (resultCode != -1) {
if (resultCode != 1002) {
return;
}
v2Var.F0();
} else {
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
v2Var.R(requireContext);
}
}
public static final void h0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
g2.S e4 = bVar.e(requireContext);
if (e4 != null) {
v2Var.C0(e4);
} else {
v2Var.D0();
}
}
public static final void i0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
if (bVar.e(requireContext) == null) {
v2Var.D0();
}
}
public static final void j0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
if (bVar.e(requireContext) == null) {
v2Var.D0();
return;
}
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) PreregistrationActivity.class);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public static final void k0(v2 v2Var, View view) {
String g4;
if (v2Var.getContext() != null) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
g2.S e4 = bVar.e(requireContext);
if (e4 == null || (g4 = e4.g()) == null || g4.length() == 0 || !e4.n()) {
AbstractC0740a activity = v2Var.getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.BaseActivity");
activity.Z2();
} else {
x2 d0 = v2Var.d0();
Context requireContext2 = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext2, "requireContext(...)");
d0.i(requireContext2);
}
}
}
public static final void l0(v2 v2Var, View view) {
v2Var.E0();
}
public static final void m0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
if (bVar.e(requireContext) == null) {
v2Var.D0();
return;
}
ActivityResultLauncher activityResultLauncher = v2Var.h;
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) UserDevicesActivity.class);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
activityResultLauncher.launch(intent, aVar.b(requireActivity));
}
public static final void n0(v2 v2Var, View view) {
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) NotificationsRegistryActivity.class);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public static final void o0(v2 v2Var, View view) {
v2Var.F0();
}
public static final void p0(v2 v2Var, View view) {
if (v2Var.getActivity() != null) {
String string = v2Var.getString(2131952795);
kotlin.jvm.internal.m.d(string, "getString(...)");
S.b bVar = g2.S.m;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
g2.S e4 = bVar.e(requireActivity);
if (e4 != null && e4.n()) {
string = v2Var.getString(2131952796);
}
u2.p pVar = new u2.p();
FragmentActivity requireActivity2 = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity2, "requireActivity(...)");
pVar.p(requireActivity2, string, v2Var.getString(2131952667));
}
}
public static final void q0(v2 v2Var, View view) {
if (v2Var.getActivity() == null || v2Var.requireActivity().isFinishing()) {
return;
}
String str = v2Var.getString(2131952783) + "/android";
u2.p pVar = new u2.p();
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
u2.p.q(pVar, requireActivity, str, null, 4, null);
}
public static final void r0(v2 v2Var, View view) {
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
v2Var.X(requireContext);
}
public static final void s0(v2 v2Var, View view) {
if (v2Var.getContext() == null || !UptodownApp.F.a0()) {
return;
}
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
v2Var.S(requireContext);
}
public static final void t0(v2 v2Var, View view) {
String g4;
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
g2.S e4 = bVar.e(requireContext);
if (e4 == null || (g4 = e4.g()) == null || g4.length() == 0) {
return;
}
Context requireContext2 = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext2, "requireContext(...)");
C0563l c0563l = new C0563l(requireContext2, LifecycleOwnerKt.getLifecycleScope(v2Var));
String g5 = e4.g();
kotlin.jvm.internal.m.b(g5);
c0563l.c(g5, v2Var.new e());
}
public static final void u0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
g2.S e4 = bVar.e(requireContext);
if (e4 != null) {
Context requireContext2 = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext2, "requireContext(...)");
if (e4.m(requireContext2)) {
Intent intent = new Intent(v2Var.getContext(), (Class<?>) UserEditProfileActivity.class);
ActivityResultLauncher activityResultLauncher = v2Var.i;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
activityResultLauncher.launch(intent, aVar.b(requireActivity));
return;
}
}
v2Var.D0();
}
public static final void v0(v2 v2Var, View view) {
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) Updates.class);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public static final void w0(v2 v2Var, View view) {
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) MyApps.class);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public static final void x0(v2 v2Var, View view) {
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) MyDownloads.class);
MainActivity activity = v2Var.getActivity();
kotlin.jvm.internal.m.c(activity, "null cannot be cast to non-null type com.uptodown.activities.MainActivity");
intent.putExtra("downloadResultReceiver", activity.E5());
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public static final void y0(v2 v2Var, View view) {
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) RollbackActivity.class);
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public static final void z0(v2 v2Var, View view) {
S.b bVar = g2.S.m;
Context requireContext = v2Var.requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
g2.S e4 = bVar.e(requireContext);
if (e4 == null) {
v2Var.D0();
return;
}
Intent intent = new Intent(v2Var.requireContext(), (Class<?>) UserCommentsActivity.class);
intent.putExtra("userID", e4.g());
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
public final void G0(c2.X0 x02) {
kotlin.jvm.internal.m.e(x02, "<set-?>");
this.a = x02;
}
public final void L0() {
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), (V2.g) null, (o3.L) null, new j(null), 3, (Object) null);
}
public final void M0() {
if (!isAdded() || getContext() == null) {
return;
}
x2 d0 = d0();
Context requireContext = requireContext();
kotlin.jvm.internal.m.d(requireContext, "requireContext(...)");
d0.e(requireContext);
}
public final c2.X0 b0() {
c2.X0 x02 = this.a;
if (x02 != null) {
return x02;
}
kotlin.jvm.internal.m.u("binding");
return null;
}
public final x2 d0() {
return (x2) this.b.getValue();
}
public View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle bundle) {
kotlin.jvm.internal.m.e(inflater, "inflater");
G0(c2.X0.c(inflater, viewGroup, false));
RelativeLayout root = b0().getRoot();
kotlin.jvm.internal.m.d(root, "getRoot(...)");
return root;
}
public void onResume() {
super.onResume();
new u2.z(getContext()).e("UserFragment");
M0();
if (new u2.p().o(getContext())) {
b0().b.setImageDrawable(ContextCompat.getDrawable(requireContext(), 2131231449));
} else {
b0().b.setImageDrawable(ContextCompat.getDrawable(requireContext(), 2131231527));
}
f0();
}
public void onViewCreated(View view, Bundle bundle) {
kotlin.jvm.internal.m.e(view, "view");
super.onViewCreated(view, bundle);
TextView textView = b0().O;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
b0().T.setTypeface(aVar.w());
b0().L.setTypeface(aVar.w());
b0().D.setTypeface(aVar.w());
b0().S.setTypeface(aVar.w());
b0().H.setTypeface(aVar.w());
b0().B.setTypeface(aVar.w());
b0().G.setTypeface(aVar.w());
b0().J.setTypeface(aVar.w());
b0().V.setTypeface(aVar.w());
b0().I.setTypeface(aVar.w());
b0().R.setTypeface(aVar.w());
b0().K.setTypeface(aVar.w());
b0().Q.setTypeface(aVar.w());
b0().p.setVisibility(8);
b0().P.setTypeface(aVar.x());
b0().E.setTypeface(aVar.x());
b0().M.setTypeface(aVar.x());
b0().F.setTypeface(aVar.x());
b0().N.setTypeface(aVar.x());
b0().U.setTypeface(aVar.x());
b0().C.setTypeface(aVar.x());
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new a(null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new b(null), 2, (Object) null);
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new d(null), 2, (Object) null);
M0();
b0().g.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.h0(v2.this, view2);
}
});
b0().A.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.i0(v2.this, view2);
}
});
b0().L.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.t0(v2.this, view2);
}
});
b0().y.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.v0(v2.this, view2);
}
});
b0().h.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.w0(v2.this, view2);
}
});
b0().u.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.x0(v2.this, view2);
}
});
b0().m.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.y0(v2.this, view2);
}
});
b0().l.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.z0(v2.this, view2);
}
});
b0().t.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.A0(v2.this, view2);
}
});
b0().k.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.B0(v2.this, view2);
}
});
b0().r.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.j0(v2.this, view2);
}
});
b0().q.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.k0(v2.this, view2);
}
});
b0().c.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.l0(v2.this, view2);
}
});
b0().i.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.m0(v2.this, view2);
}
});
b0().j.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.n0(v2.this, view2);
}
});
b0().n.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.o0(v2.this, view2);
}
});
b0().o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.p0(v2.this, view2);
}
});
b0().U.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.q0(v2.this, view2);
}
});
b0().C.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.r0(v2.this, view2);
}
});
b0().b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.s0(v2.this, view2);
}
});
b0().d.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
v2.u0(v2.this, view2);
}
});
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new c(null), 2, (Object) null);
}
public static final class e implements f2.J {
e() {
}
@Override
public void a(g2.S user) {
kotlin.jvm.internal.m.e(user, "user");
Intent intent = new Intent(v2.this.requireContext(), (Class<?>) PublicProfileActivity.class);
intent.putExtra("user", user);
v2 v2Var = v2.this;
UptodownApp.a aVar = UptodownApp.F;
FragmentActivity requireActivity = v2Var.requireActivity();
kotlin.jvm.internal.m.d(requireActivity, "requireActivity(...)");
v2Var.startActivity(intent, aVar.a(requireActivity));
}
@Override
public void b() {
}
}
}