正在查看: Uptodown App Store v6.80 应用的 UsernameEditActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Uptodown App Store v6.80 应用的 UsernameEditActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.uptodown.activities;
import N1.k;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.appcompat.widget.AppCompatTextView;
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 c2.b1;
import com.uptodown.activities.UsernameEditActivity;
import com.uptodown.activities.b0;
import com.uptodown.util.views.UsernameTextView;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.jvm.internal.AbstractC1009g;
import u2.H;
import w2.u;
public final class UsernameEditActivity extends AbstractC0740a {
public static final a M = new a(null);
private g2.S J;
private final R2.g K = new ViewModelLazy(kotlin.jvm.internal.D.b(b0.class), new g(this), new f(this), new h(null, this));
private final R2.g L = R2.h.a(new d3.a() {
@Override
public final Object invoke() {
c2.b1 r3;
r3 = UsernameEditActivity.r3(UsernameEditActivity.this);
return r3;
}
});
public static final class a {
public a(AbstractC1009g abstractC1009g) {
this();
}
private a() {
}
}
public static final class b implements TextWatcher {
public b() {
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i4, int i5) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i4, int i5) {
UsernameEditActivity.this.s3().y.setText(charSequence);
UsernameEditActivity.this.s3().z.setText(charSequence);
UsernameEditActivity.this.s3().A.setText(charSequence);
UsernameEditActivity.this.s3().B.setText(charSequence);
}
}
public static final class c implements TextWatcher {
c() {
}
@Override
public void afterTextChanged(Editable editable) {
}
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i4, int i5) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i4, int i5) {
if (charSequence != null) {
UsernameEditActivity.this.H3(charSequence.toString());
}
}
}
static final class d extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
final kotlin.jvm.internal.A c;
final kotlin.jvm.internal.C d;
static final class a implements r3.f {
final UsernameEditActivity a;
final kotlin.jvm.internal.A b;
final kotlin.jvm.internal.C c;
a(UsernameEditActivity usernameEditActivity, kotlin.jvm.internal.A a, kotlin.jvm.internal.C c) {
this.a = usernameEditActivity;
this.b = a;
this.c = c;
}
public final Object emit(ArrayList arrayList, V2.d dVar) {
Iterator it = arrayList.iterator();
kotlin.jvm.internal.m.d(it, "iterator(...)");
while (it.hasNext()) {
Object next = it.next();
kotlin.jvm.internal.m.d(next, "next(...)");
g2.W w = (g2.W) next;
int b = w.b();
if (b == 0) {
this.a.s3().m.setChecked(w.d());
UsernameTextView.a aVar = UsernameTextView.k;
UsernameTextView tvUsernameType0 = this.a.s3().y;
kotlin.jvm.internal.m.d(tvUsernameType0, "tvUsernameType0");
aVar.a(tvUsernameType0, w.e(), w.c());
} else if (b == 1) {
this.a.s3().n.setChecked(w.d());
UsernameTextView.a aVar2 = UsernameTextView.k;
UsernameTextView tvUsernameType1 = this.a.s3().z;
kotlin.jvm.internal.m.d(tvUsernameType1, "tvUsernameType1");
aVar2.a(tvUsernameType1, w.e(), w.c());
} else if (b == 2) {
this.a.s3().o.setChecked(w.d());
UsernameTextView.a aVar3 = UsernameTextView.k;
UsernameTextView tvUsernameType2 = this.a.s3().A;
kotlin.jvm.internal.m.d(tvUsernameType2, "tvUsernameType2");
aVar3.a(tvUsernameType2, w.e(), w.c());
} else if (b == 3) {
this.a.s3().p.setChecked(w.d());
UsernameTextView.a aVar4 = UsernameTextView.k;
UsernameTextView tvUsernameType3 = this.a.s3().B;
kotlin.jvm.internal.m.d(tvUsernameType3, "tvUsernameType3");
aVar4.a(tvUsernameType3, w.e(), w.c());
}
if (w.d()) {
this.b.a = w.b();
kotlin.jvm.internal.C c = this.c;
String c4 = w.c();
kotlin.jvm.internal.m.b(c4);
if (c4.length() == 0) {
c4 = "type0";
}
c.a = c4;
}
}
return R2.s.a;
}
}
d(kotlin.jvm.internal.A a4, kotlin.jvm.internal.C c, V2.d dVar) {
super(2, dVar);
this.c = a4;
this.d = c;
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return UsernameEditActivity.this.new d(this.c, this.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 = UsernameEditActivity.this.t3().f();
a aVar = new a(UsernameEditActivity.this, this.c, this.d);
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);
}
}
static final class e extends kotlin.coroutines.jvm.internal.l implements d3.p {
int a;
static final class a implements r3.f {
final UsernameEditActivity a;
a(UsernameEditActivity usernameEditActivity) {
this.a = usernameEditActivity;
}
public final Object emit(u2.H h, V2.d dVar) {
if (h instanceof H.a) {
this.a.s3().l.setVisibility(0);
} else if (h instanceof H.c) {
H.c cVar = (H.c) h;
if (((b0.a) cVar.a()).c() == 0 || ((b0.a) cVar.a()).a()) {
String b = ((b0.a) cVar.a()).b();
if (b == null || b.length() == 0) {
?? r22 = this.a;
String string = r22.getString(2131952006);
kotlin.jvm.internal.m.d(string, "getString(...)");
r22.r0(string);
} else {
this.a.r0(((b0.a) cVar.a()).b());
}
} else {
?? r23 = this.a;
String string2 = r23.getString(2131952808);
kotlin.jvm.internal.m.d(string2, "getString(...)");
r23.r0(string2);
this.a.setResult(10);
this.a.finish();
}
this.a.s3().l.setVisibility(8);
} else if (!(h instanceof H.b)) {
throw new R2.k();
}
return R2.s.a;
}
}
e(V2.d dVar) {
super(2, dVar);
}
@Override
public final V2.d create(Object obj, V2.d dVar) {
return UsernameEditActivity.this.new e(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 = UsernameEditActivity.this.t3().e();
a aVar = new a(UsernameEditActivity.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 ((e) create(j, dVar)).invokeSuspend(R2.s.a);
}
}
public static final class f extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public f(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelProvider.Factory invoke() {
return this.a.getDefaultViewModelProviderFactory();
}
}
public static final class g extends kotlin.jvm.internal.n implements d3.a {
final ComponentActivity a;
public g(ComponentActivity componentActivity) {
super(0);
this.a = componentActivity;
}
@Override
public final ViewModelStore invoke() {
return this.a.getViewModelStore();
}
}
public static final class h extends kotlin.jvm.internal.n implements d3.a {
final d3.a a;
final ComponentActivity b;
public h(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 void A3(UsernameEditActivity usernameEditActivity, kotlin.jvm.internal.A a4, kotlin.jvm.internal.C c4, View view) {
usernameEditActivity.s3().n.setChecked(false);
usernameEditActivity.s3().o.setChecked(false);
usernameEditActivity.s3().p.setChecked(false);
a4.a = 0;
c4.a = "type0";
}
public static final void B3(UsernameEditActivity usernameEditActivity, kotlin.jvm.internal.A a4, kotlin.jvm.internal.C c4, View view) {
usernameEditActivity.s3().m.setChecked(false);
usernameEditActivity.s3().o.setChecked(false);
usernameEditActivity.s3().p.setChecked(false);
a4.a = 1;
c4.a = "type1";
}
public static final void C3(UsernameEditActivity usernameEditActivity, kotlin.jvm.internal.A a4, kotlin.jvm.internal.C c4, View view) {
usernameEditActivity.s3().m.setChecked(false);
usernameEditActivity.s3().n.setChecked(false);
usernameEditActivity.s3().p.setChecked(false);
a4.a = 2;
c4.a = "type2";
}
public static final void D3(UsernameEditActivity usernameEditActivity, kotlin.jvm.internal.A a4, kotlin.jvm.internal.C c4, View view) {
usernameEditActivity.s3().m.setChecked(false);
usernameEditActivity.s3().n.setChecked(false);
usernameEditActivity.s3().o.setChecked(false);
a4.a = 3;
c4.a = "type3";
}
public static final void E3(UsernameEditActivity usernameEditActivity, View view) {
usernameEditActivity.Z2();
}
public static final void F3(UsernameEditActivity usernameEditActivity, View view) {
usernameEditActivity.Z2();
}
public static final void G3(UsernameEditActivity usernameEditActivity, View view) {
usernameEditActivity.Z2();
}
public final void H3(String str) {
if (str.length() <= 0 || str.length() < 3) {
s3().s.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231553), (Drawable) null, (Drawable) null, (Drawable) null);
} else {
s3().s.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231408), (Drawable) null, (Drawable) null, (Drawable) null);
}
if (str.length() <= 99) {
s3().r.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231408), (Drawable) null, (Drawable) null, (Drawable) null);
} else {
s3().r.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231553), (Drawable) null, (Drawable) null, (Drawable) null);
}
if (str.length() <= 0 || !new m3.j("^[a-zA-Z0-9_]+$").e(str)) {
s3().w.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231553), (Drawable) null, (Drawable) null, (Drawable) null);
} else {
s3().w.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231408), (Drawable) null, (Drawable) null, (Drawable) null);
}
}
public static final b1 r3(UsernameEditActivity usernameEditActivity) {
return b1.c(usernameEditActivity.getLayoutInflater());
}
public final b1 s3() {
return (b1) this.L.getValue();
}
public final b0 t3() {
return (b0) this.K.getValue();
}
private final void u3() {
Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
if (drawable != null) {
s3().q.setNavigationIcon(drawable);
s3().q.setNavigationContentDescription(getString(2131951721));
s3().q.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.v3(UsernameEditActivity.this, view);
}
});
}
TextView textView = s3().t;
k.a aVar = N1.k.g;
textView.setTypeface(aVar.w());
s3().v.setTypeface(aVar.x());
s3().u.setTypeface(aVar.x());
s3().f.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.z3(UsernameEditActivity.this, view);
}
});
s3().b.setTypeface(aVar.x());
EditText editText = s3().b;
g2.S s = this.J;
kotlin.jvm.internal.m.b(s);
editText.setText(s.h());
s3().x.setTypeface(aVar.w());
s3().s.setTypeface(aVar.x());
s3().r.setTypeface(aVar.x());
s3().w.setTypeface(aVar.x());
s3().y.setTypeface(aVar.w());
s3().z.setTypeface(aVar.w());
s3().A.setTypeface(aVar.w());
s3().B.setTypeface(aVar.w());
AppCompatTextView appCompatTextView = s3().y;
g2.S s3 = this.J;
kotlin.jvm.internal.m.b(s3);
appCompatTextView.setText(s3.h());
AppCompatTextView appCompatTextView2 = s3().z;
g2.S s4 = this.J;
kotlin.jvm.internal.m.b(s4);
appCompatTextView2.setText(s4.h());
AppCompatTextView appCompatTextView3 = s3().A;
g2.S s5 = this.J;
kotlin.jvm.internal.m.b(s5);
appCompatTextView3.setText(s5.h());
AppCompatTextView appCompatTextView4 = s3().B;
g2.S s6 = this.J;
kotlin.jvm.internal.m.b(s6);
appCompatTextView4.setText(s6.h());
final kotlin.jvm.internal.A a4 = new kotlin.jvm.internal.A();
final kotlin.jvm.internal.C c4 = new kotlin.jvm.internal.C();
c4.a = "type0";
s3().m.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.A3(UsernameEditActivity.this, a4, c4, view);
}
});
s3().n.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.B3(UsernameEditActivity.this, a4, c4, view);
}
});
s3().o.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.C3(UsernameEditActivity.this, a4, c4, view);
}
});
s3().p.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.D3(UsernameEditActivity.this, a4, c4, view);
}
});
g2.S s7 = this.J;
kotlin.jvm.internal.m.b(s7);
if (!s7.n()) {
s3().u.setVisibility(0);
TextView textView2 = s3().u;
u.a aVar2 = w2.u.c;
String string = getString(2131952814);
kotlin.jvm.internal.m.d(string, "getString(...)");
textView2.setText(aVar2.a(this, string));
s3().u.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.E3(UsernameEditActivity.this, view);
}
});
s3().v.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.F3(UsernameEditActivity.this, view);
}
});
s3().f.setVisibility(8);
s3().m.setChecked(true);
s3().c.setVisibility(0);
s3().n.setEnabled(false);
s3().d.setVisibility(0);
s3().o.setEnabled(false);
s3().e.setVisibility(0);
s3().p.setEnabled(false);
s3().h.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.G3(UsernameEditActivity.this, view);
}
});
s3().i.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.w3(UsernameEditActivity.this, view);
}
});
s3().j.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.x3(UsernameEditActivity.this, view);
}
});
}
s3().b.addTextChangedListener(new c());
s3().x.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UsernameEditActivity.y3(UsernameEditActivity.this, a4, c4, view);
}
});
EditText etUsernameEdit = s3().b;
kotlin.jvm.internal.m.d(etUsernameEdit, "etUsernameEdit");
etUsernameEdit.addTextChangedListener(new b());
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new d(a4, c4, null), 2, (Object) null);
t3().d(this);
}
public static final void v3(UsernameEditActivity usernameEditActivity, View view) {
usernameEditActivity.getOnBackPressedDispatcher().onBackPressed();
}
public static final void w3(UsernameEditActivity usernameEditActivity, View view) {
usernameEditActivity.Z2();
}
public static final void x3(UsernameEditActivity usernameEditActivity, View view) {
usernameEditActivity.Z2();
}
public static final void y3(UsernameEditActivity usernameEditActivity, kotlin.jvm.internal.A a4, kotlin.jvm.internal.C c4, View view) {
N1.k.g.d(usernameEditActivity, usernameEditActivity.s3().b);
if (usernameEditActivity.s3().b.getText().toString().length() == 0) {
String string = usernameEditActivity.getString(2131952004);
kotlin.jvm.internal.m.d(string, "getString(...)");
usernameEditActivity.r0(string);
return;
}
if (usernameEditActivity.s3().b.getText().toString().length() < 3) {
String string2 = usernameEditActivity.getString(2131952821);
kotlin.jvm.internal.m.d(string2, "getString(...)");
usernameEditActivity.r0(string2);
} else {
if (usernameEditActivity.s3().b.getText().toString().length() > 99) {
String string3 = usernameEditActivity.getString(2131952818);
kotlin.jvm.internal.m.d(string3, "getString(...)");
usernameEditActivity.r0(string3);
return;
}
if (new m3.j("^[a-zA-Z0-9_]+$").e(usernameEditActivity.s3().b.getText().toString())) {
usernameEditActivity.t3().c(usernameEditActivity, usernameEditActivity.s3().b.getText().toString(), usernameEditActivity.J, a4.a, (String) c4.a);
return;
}
String string4 = usernameEditActivity.getString(2131952822);
kotlin.jvm.internal.m.d(string4, "getString(...)");
usernameEditActivity.r0(string4);
}
}
public static final void z3(UsernameEditActivity usernameEditActivity, View view) {
g2.S s = usernameEditActivity.J;
if (s != null) {
kotlin.jvm.internal.m.b(s);
if (s.m(usernameEditActivity)) {
g2.S s3 = usernameEditActivity.J;
kotlin.jvm.internal.m.b(s3);
if (s3.n()) {
return;
}
}
}
u2.p.q(new u2.p(), usernameEditActivity, u2.O.b.c(usernameEditActivity), null, 4, null);
}
@Override
protected void onCreate(Bundle bundle) {
Bundle extras;
Object parcelable;
super.onCreate(bundle);
setContentView(s3().getRoot());
if (getIntent() != null && (extras = getIntent().getExtras()) != null && extras.containsKey("user")) {
if (Build.VERSION.SDK_INT >= 33) {
parcelable = extras.getParcelable("user", g2.S.class);
this.J = (g2.S) parcelable;
} else {
this.J = (g2.S) extras.getParcelable("user");
}
u3();
}
g2.S s = this.J;
if (s != null) {
kotlin.jvm.internal.m.b(s);
String h4 = s.h();
if (h4 != null && h4.length() != 0) {
g2.S s3 = this.J;
kotlin.jvm.internal.m.b(s3);
String h5 = s3.h();
kotlin.jvm.internal.m.b(h5);
H3(h5);
}
}
o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new e(null), 2, (Object) null);
}
}