CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 UserProfileActivity.java 源代码,内容仅作参考
package org.godfootsteps.more.user;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Handler;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import carbon.widget.ImageView;
import com.blankj.utilcode.picturecropper.PictureCropper;
import com.blankj.utilcode.util.NetworkUtils;
import com.blankj.utilcode.util.ToastUtils;
import d.c.a.g.e;
import d.c.a.j.s;
import d.c.a.j.v;
import d.c.g.g3.g;
import d.c.i.d;
import e.q.j;
import i.c.a.c.a0;
import i.c.a.c.k;
import i.c.a.c.l;
import i.c.a.c.m;
import i.c.a.c.n;
import i.c.a.c.n0;
import i.c.a.c.o;
import i.d.a.l.p.i;
import i.j.a.e.t.d;
import java.io.File;
import java.lang.ref.WeakReference;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import kotlin.Metadata;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1;
import n.c;
import n.i.a.p;
import n.i.a.q;
import n.i.b.h;
import n.m.t.a.p.m.e1.a;
import o.b.e0;
import o.b.t1.b;
import o.b.y;
import org.godfootsteps.arch.R$string;
import org.godfootsteps.arch.api.AppClient;
import org.godfootsteps.arch.api.model.BaseModel;
import org.godfootsteps.arch.api.model.User;
import org.godfootsteps.arch.api.util.UserRequest;
import org.godfootsteps.arch.base.BaseActivity;
import org.godfootsteps.arch.dialog.AlertDialogBuilder;
import org.godfootsteps.arch.util.GAEventSendUtil;
import org.godfootsteps.arch.view.ExpandTextInputLayout;
import org.godfootsteps.more.R$color;
import org.godfootsteps.more.R$drawable;
import org.godfootsteps.more.R$id;
import org.godfootsteps.more.R$layout;
import org.godfootsteps.more.db.UserContext;
import org.godfootsteps.more.db.UserMessageRepository;
import org.godfootsteps.more.user.RecoveryEmailActivity;
import org.godfootsteps.more.user.UserHelper;
import org.godfootsteps.more.user.UserModifyPwdActivity;
import org.godfootsteps.more.user.UserProfileActivity;
import r.z;
import razerdp.basepopup.QuickPopupBuilder;
import razerdp.widget.QuickPopup;
import u.w;
@Metadata(d1 = {"\u0000t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u0003B\u0005¢\u0006\u0002\u0010\u0004J\b\u0010+\u001a\u00020\u0017H\u0014J\b\u0010,\u001a\u00020-H\u0014J\b\u0010.\u001a\u00020-H\u0014J\"\u0010/\u001a\u00020-2\u0006\u00100\u001a\u00020\u00172\u0006\u00101\u001a\u00020\u00172\b\u00102\u001a\u0004\u0018\u000103H\u0014J\b\u00104\u001a\u00020-H\u0016J\u0012\u00105\u001a\u00020-2\b\u00106\u001a\u0004\u0018\u00010\nH\u0016J\b\u00107\u001a\u00020-H\u0014J\b\u00108\u001a\u00020-H\u0002J\b\u00109\u001a\u00020-H\u0002J\u0011\u0010:\u001a\u00020-H\u0082@ø\u0001\u0000¢\u0006\u0002\u0010;R\u0012\u0010\u0005\u001a\u00020\u0006X\u0096\u0005¢\u0006\u0006\u001a\u0004\b\u0007\u0010\bR\u0010\u0010\t\u001a\u0004\u0018\u00010\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\fX\u0082\u000e¢\u0006\u0002\n\u0000R\u001b\u0010\r\u001a\u00020\u000e8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u0011\u0010\u0012\u001a\u0004\b\u000f\u0010\u0010R\u0012\u0010\u0013\u001a\u00060\u0014j\u0002`\u0015X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0017X\u0082\u000e¢\u0006\u0002\n\u0000R\u001b\u0010\u0018\u001a\u00020\u00198BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u001c\u0010\u0012\u001a\u0004\b\u001a\u0010\u001bR\u001b\u0010\u001d\u001a\u00020\u001e8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b!\u0010\u0012\u001a\u0004\b\u001f\u0010 R\u0010\u0010\"\u001a\u0004\u0018\u00010#X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010$\u001a\u00020%X\u0082.¢\u0006\u0002\n\u0000R\u001b\u0010&\u001a\u00020'8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b*\u0010\u0012\u001a\u0004\b(\u0010)\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006<"}, d2 = {"Lorg/godfootsteps/more/user/UserProfileActivity;", "Lorg/godfootsteps/arch/base/BaseActivity;", "Lcom/blankj/utilcode/picturecropper/PictureCropper$CropListener;", "Lkotlinx/coroutines/CoroutineScope;", "()V", "coroutineContext", "Lkotlin/coroutines/CoroutineContext;", "getCoroutineContext", "()Lkotlin/coroutines/CoroutineContext;", "imagePath", "", "isChangeInfo", "", "mHandler", "Landroid/os/Handler;", "getMHandler", "()Landroid/os/Handler;", "mHandler$delegate", "Lkotlin/Lazy;", "mRunnable", "Ljava/lang/Runnable;", "Lkotlinx/coroutines/Runnable;", "mUserInsiderClickSum", "", "pictureCropper", "Lcom/blankj/utilcode/picturecropper/PictureCropper;", "getPictureCropper", "()Lcom/blankj/utilcode/picturecropper/PictureCropper;", "pictureCropper$delegate", "progressDialog", "Lorg/godfootsteps/arch/dialog/LoadingDialog;", "getProgressDialog", "()Lorg/godfootsteps/arch/dialog/LoadingDialog;", "progressDialog$delegate", "takePhotoPopup", "Lrazerdp/widget/QuickPopup;", "user", "Lorg/godfootsteps/arch/api/model/User;", "userHelper", "Lorg/godfootsteps/more/user/UserHelper;", "getUserHelper", "()Lorg/godfootsteps/more/user/UserHelper;", "userHelper$delegate", "getLayoutId", "initData", "", "initView", "onActivityResult", "requestCode", "resultCode", "data", "Landroid/content/Intent;", "onBackPressed", "onCropped", "path", "onDestroy", "save", "toolbarOnClick", "uploadAvatar", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public final class UserProfileActivity extends BaseActivity implements PictureCropper.b, y {
public static final int f16088v = 0;
public User f16090l;
public String f16091m;
public boolean f16092n;
public QuickPopup f16096r;
public int f16098t;
public final y f16089k = n.m.t.a.p.m.e1.a.d();
public final c f16093o = d.n3(new n.i.a.a<PictureCropper>() {
{
super(0);
}
@Override
public final PictureCropper invoke() {
return new PictureCropper(UserProfileActivity.this);
}
});
public final c f16094p = d.n3(new n.i.a.a<UserHelper>() {
@Override
public final UserHelper invoke() {
return new UserHelper(null, 1);
}
});
public final c f16095q = d.n3(new n.i.a.a<e>() {
{
super(0);
}
@Override
public final e invoke() {
return new e(UserProfileActivity.this);
}
});
public final c f16097s = d.n3(new n.i.a.a<Handler>() {
@Override
public final Handler invoke() {
return new Handler();
}
});
public Runnable f16099u = new b();
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¨\u0006\u0005"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "org/godfootsteps/arch/util/ViewKt$haveInternetClick$1"}, k = 3, mv = {1, 5, 1}, xi = 48)
public static final class a implements View.OnClickListener {
public final View f16100i;
public final UserProfileActivity f16101j;
public a(View view, UserProfileActivity userProfileActivity) {
this.f16100i = view;
this.f16101j = userProfileActivity;
}
@Override
public final void onClick(View view) {
if (!NetworkUtils.c()) {
ToastUtils.b(R$string.app_no_internet);
return;
}
UserProfileActivity userProfileActivity = this.f16101j;
int i2 = UserProfileActivity.f16088v;
userProfileActivity.c0().b();
n.b(userProfileActivity);
n.m.t.a.p.m.e1.a.z1(userProfileActivity, null, null, new UserProfileActivity$save$1(userProfileActivity, null), 3, null);
GAEventSendUtil.a.x("用户修改资料");
}
}
@Metadata(d1 = {"\u0000\u0015\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00060\u0001j\u0002`\u0002J\b\u0010\u0003\u001a\u00020\u0004H\u0016¨\u0006\u0005"}, d2 = {"org/godfootsteps/more/user/UserProfileActivity$mRunnable$1", "Ljava/lang/Runnable;", "Lkotlinx/coroutines/Runnable;", "run", "", "more_release"}, k = 1, mv = {1, 5, 1}, xi = 48)
public static final class b implements Runnable {
public b() {
}
@Override
public void run() {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
if (userProfileActivity.f16098t != 0) {
userProfileActivity.a0().postDelayed(this, 500L);
UserProfileActivity.this.f16098t = 0;
return;
}
userProfileActivity.a0().removeCallbacks(this);
}
}
public static final Object Z(UserProfileActivity userProfileActivity, n.g.c cVar) {
UserProfileActivity$uploadAvatar$1 userProfileActivity$uploadAvatar$1;
int i2;
String j0;
w wVar;
Objects.requireNonNull(userProfileActivity);
if (cVar instanceof UserProfileActivity$uploadAvatar$1) {
userProfileActivity$uploadAvatar$1 = (UserProfileActivity$uploadAvatar$1) cVar;
int i3 = userProfileActivity$uploadAvatar$1.label;
if ((i3 & Integer.MIN_VALUE) != 0) {
userProfileActivity$uploadAvatar$1.label = i3 - Integer.MIN_VALUE;
Object obj = userProfileActivity$uploadAvatar$1.result;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
i2 = userProfileActivity$uploadAvatar$1.label;
if (i2 != 0) {
d.Q4(obj);
z.a aVar = new z.a();
User user = userProfileActivity.f16090l;
if (user != null) {
String userId = user.getUserId();
h.d(userId, "user.userId");
j0 = n.m.t.a.p.m.e1.a.j0(userId, (r2 & 1) != 0 ? "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjaVHmBid5Zx/6sKltt396TEDWt55xO1aCHqtUZh2XMC1Yrzm3CzhW+cbIyuQTZP2nLPDpkfk/UdBNafaqzTYNFPqwBKbcrlDukKcRTytS5mVQDwP7g0CJpJtDOQhBX4Vl/5aL8H91cSXqGa2E6PnR77uRwsyihufRWM6zcwf6QQIDAQAB" : null);
aVar.a("userId", j0);
byte[] a2 = k.a(l.j(userProfileActivity.f16091m), null);
h.d(a2, "readFile2BytesByStream(imagePath)");
h.e(a2, "bytes");
byte[] e2 = e.c0.a.e(a2);
h.d(e2, "base64Encode(bytes)");
aVar.a("avatar", n.m.t.a.p.m.e1.a.i0(new String(e2, n.o.b.a)));
z c = aVar.c();
o.b.w wVar2 = e0.b;
UserProfileActivity$uploadAvatar$userModelResponse$1 userProfileActivity$uploadAvatar$userModelResponse$1 = new UserProfileActivity$uploadAvatar$userModelResponse$1(c, null);
userProfileActivity$uploadAvatar$1.L$0 = userProfileActivity;
userProfileActivity$uploadAvatar$1.label = 1;
obj = n.m.t.a.p.m.e1.a.R2(wVar2, userProfileActivity$uploadAvatar$userModelResponse$1, userProfileActivity$uploadAvatar$1);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else {
h.l("user");
throw null;
}
} else if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
userProfileActivity = (UserProfileActivity) userProfileActivity$uploadAvatar$1.L$0;
d.Q4(obj);
}
wVar = (w) obj;
BaseModel baseModel = (BaseModel) wVar.b;
if (wVar.a.f16523k != 200 && baseModel != null) {
if (baseModel.getStatus() == 1) {
UserContext userContext = UserContext.a;
Objects.requireNonNull(AppClient.a);
String j2 = h.j("https://appservercn.kingdomsalvation.org", ((User) m.a(n.m.t.a.p.m.e1.a.Z((String) baseModel.getResult(), null, 1), User.class)).getAvatar());
h.e(j2, "avatar");
UserContext.e().a(j2);
UserContext.c.setAvatar(j2);
userProfileActivity.b0().cleanTempFiles();
UserHelper userHelper = UserHelper.f16078d;
for (Map.Entry<UserHelper.UserListenerObserver, j> entry : UserHelper.f16079e.entrySet()) {
d.b bVar = entry.getKey().f16080i;
if (bVar != null) {
bVar.e();
}
}
ToastUtils.b(org.godfootsteps.more.R$string.user_modify_pwd_success);
userProfileActivity.finish();
} else {
ToastUtils.b(org.godfootsteps.more.R$string.app_error_occurred);
}
} else {
ToastUtils.b(org.godfootsteps.more.R$string.app_wrong_internet);
}
userProfileActivity.c0().a();
return n.e.a;
}
}
userProfileActivity$uploadAvatar$1 = new UserProfileActivity$uploadAvatar$1(userProfileActivity, cVar);
Object obj2 = userProfileActivity$uploadAvatar$1.result;
CoroutineSingletons coroutineSingletons2 = CoroutineSingletons.COROUTINE_SUSPENDED;
i2 = userProfileActivity$uploadAvatar$1.label;
if (i2 != 0) {
}
wVar = (w) obj2;
BaseModel baseModel2 = (BaseModel) wVar.b;
if (wVar.a.f16523k != 200) {
}
ToastUtils.b(org.godfootsteps.more.R$string.app_wrong_internet);
userProfileActivity.c0().a();
return n.e.a;
}
@Override
public int Q() {
return R$layout.activity_user_profile;
}
@Override
public void R() {
}
@Override
public void W() {
int i2 = R$id.iv_avatar;
((ImageView) findViewById(i2)).setFocusable(true);
((ImageView) findViewById(i2)).setFocusableInTouchMode(true);
((ImageView) findViewById(i2)).requestFocus();
int i3 = R$id.et_email;
((EditText) findViewById(i3)).setEnabled(false);
int i4 = R$id.til_email;
((ExpandTextInputLayout) findViewById(i4)).setEnabled(false);
if (v.i()) {
View findViewById = findViewById(R$id.view_line);
h.d(findViewById, "view_line");
n0.c(findViewById, false, 1);
} else {
((EditText) findViewById(i3)).setBackground(null);
}
RelativeLayout relativeLayout = (RelativeLayout) findViewById(R$id.container);
h.d(relativeLayout, "container");
n.m.t.a.p.m.e1.a.s2(this, relativeLayout);
int i5 = R$id.toolbar;
((Toolbar) findViewById(i5)).setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i6 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
userProfileActivity.onBackPressed();
}
});
if (s.l()) {
((Toolbar) findViewById(i5)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i6 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
int i7 = userProfileActivity.f16098t + 1;
userProfileActivity.f16098t = i7;
if (i7 == 10) {
int i8 = R$id.til_insider_code;
ExpandTextInputLayout expandTextInputLayout = (ExpandTextInputLayout) userProfileActivity.findViewById(i8);
n.i.b.h.d(expandTextInputLayout, "til_insider_code");
if (i.c.a.c.n0.g(expandTextInputLayout)) {
ToastUtils.b(org.godfootsteps.more.R$string.user_inside_code_hint);
}
userProfileActivity.f16098t = 0;
ExpandTextInputLayout expandTextInputLayout2 = (ExpandTextInputLayout) userProfileActivity.findViewById(i8);
n.i.b.h.d(expandTextInputLayout2, "til_insider_code");
i.c.a.c.n0.t(expandTextInputLayout2);
}
userProfileActivity.a0().removeCallbacks(userProfileActivity.f16099u);
userProfileActivity.a0().postDelayed(userProfileActivity.f16099u, 500L);
}
});
}
UserContext userContext = UserContext.a;
this.f16090l = UserContext.c;
ImageView imageView = (ImageView) findViewById(i2);
h.d(imageView, "iv_avatar");
User user = this.f16090l;
if (user != null) {
String avatar = user.getAvatar();
h.d(avatar, "user.avatar");
n.m.t.a.p.m.e1.a.D1(imageView, avatar, Integer.valueOf(R$drawable.ic_avatar));
if (s.n()) {
LinearLayout linearLayout = (LinearLayout) findViewById(R$id.ll_container);
View childAt = linearLayout.getChildAt(1);
linearLayout.removeViewAt(1);
linearLayout.addView(childAt, 2);
}
int i6 = R$id.et_first_name;
EditText editText = (EditText) findViewById(i6);
Context c = i.c.a.c.w.c();
User user2 = this.f16090l;
if (user2 != null) {
editText.setText(e.c0.a.I(c, user2.getFirstName()));
int i7 = R$id.et_last_name;
EditText editText2 = (EditText) findViewById(i7);
Context c2 = i.c.a.c.w.c();
User user3 = this.f16090l;
if (user3 != null) {
editText2.setText(e.c0.a.I(c2, user3.getLastName()));
int i8 = R$id.et_signature;
EditText editText3 = (EditText) findViewById(i8);
Context c3 = i.c.a.c.w.c();
User user4 = this.f16090l;
if (user4 != null) {
editText3.setText(e.c0.a.I(c3, user4.getSignature()));
int i9 = R$id.et_country;
EditText editText4 = (EditText) findViewById(i9);
Context c4 = i.c.a.c.w.c();
User user5 = this.f16090l;
if (user5 != null) {
editText4.setText(e.c0.a.I(c4, user5.getCountry()));
EditText editText5 = (EditText) findViewById(i3);
User user6 = this.f16090l;
if (user6 != null) {
editText5.setText(user6.getUserId());
int i10 = R$id.et_user_url;
EditText editText6 = (EditText) findViewById(i10);
User user7 = this.f16090l;
if (user7 != null) {
editText6.setText(user7.getUserUrl());
int i11 = R$id.tv_save;
TextView textView = (TextView) findViewById(i11);
h.d(textView, "tv_save");
n0.j(textView, false, 0.0f, 2);
EditText editText7 = (EditText) findViewById(i6);
h.d(editText7, "et_first_name");
EditText editText8 = (EditText) findViewById(i7);
h.d(editText8, "et_last_name");
EditText editText9 = (EditText) findViewById(i8);
h.d(editText9, "et_signature");
EditText editText10 = (EditText) findViewById(i9);
h.d(editText10, "et_country");
EditText editText11 = (EditText) findViewById(i10);
h.d(editText11, "et_user_url");
EditText editText12 = (EditText) findViewById(R$id.et_insider_code);
h.d(editText12, "et_insider_code");
EditText editText13 = (EditText) findViewById(i3);
h.d(editText13, "et_email");
final o.b.t1.b[] bVarArr = {d.c.a.m.a.w0(editText7), d.c.a.m.a.w0(editText8), d.c.a.m.a.w0(editText9), d.c.a.m.a.w0(editText10), d.c.a.m.a.w0(editText11), d.c.a.m.a.w0(editText12), d.c.a.m.a.w0(editText13)};
n.m.t.a.p.m.e1.a.A1(new FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1(new o.b.t1.d(new o.b.t1.b<n.e>() {
@Metadata(d1 = {"\u0000\u0016\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0000\u0010\u0000\u001a\u00020\u0001\"\u0006\b\u0000\u0010\u0002\u0018\u0001\"\u0004\b\u0001\u0010\u0003*\b\u0012\u0004\u0012\u0002H\u00030\u00042\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0006H\u008a@¨\u0006\u0007"}, d2 = {"<anonymous>", "", "T", "R", "Lkotlinx/coroutines/flow/FlowCollector;", "it", "", "kotlinx/coroutines/flow/FlowKt__ZipKt$combine$5$2"}, k = 3, mv = {1, 5, 1}, xi = 48)
@n.g.f.a.c(c = "org.godfootsteps.more.user.UserProfileActivity$initView$$inlined$combine$1$3", f = "UserProfileActivity.kt", l = {333}, m = "invokeSuspend")
public static final class AnonymousClass3 extends SuspendLambda implements q<o.b.t1.c<? super n.e>, CharSequence[], n.g.c<? super n.e>, Object> {
private Object L$0;
public Object L$1;
public int label;
public AnonymousClass3(n.g.c cVar) {
super(3, cVar);
}
@Override
public final Object invoke(o.b.t1.c<? super n.e> cVar, CharSequence[] charSequenceArr, n.g.c<? super n.e> cVar2) {
AnonymousClass3 anonymousClass3 = new AnonymousClass3(cVar2);
anonymousClass3.L$0 = cVar;
anonymousClass3.L$1 = charSequenceArr;
return anonymousClass3.invokeSuspend(n.e.a);
}
@Override
public final Object invokeSuspend(Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i2 = this.label;
if (i2 == 0) {
i.j.a.e.t.d.Q4(obj);
CharSequence[] charSequenceArr = (CharSequence[]) ((Object[]) this.L$1);
n.e eVar = n.e.a;
this.label = 1;
if (((o.b.t1.c) this.L$0).emit(eVar, this) == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i2 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
i.j.a.e.t.d.Q4(obj);
}
return n.e.a;
}
}
@Override
public Object a(o.b.t1.c<? super n.e> cVar, n.g.c cVar2) {
final b[] bVarArr2 = bVarArr;
Object J = a.J(cVar, bVarArr2, new n.i.a.a<CharSequence[]>() {
{
super(0);
}
@Override
public final CharSequence[] invoke() {
return new CharSequence[bVarArr2.length];
}
}, new AnonymousClass3(null), cVar2);
return J == CoroutineSingletons.COROUTINE_SUSPENDED ? J : n.e.a;
}
}, 1), new UserProfileActivity$initView$5(this, null)), this);
if (!UserContext.k()) {
ExpandTextInputLayout expandTextInputLayout = (ExpandTextInputLayout) findViewById(i4);
h.d(expandTextInputLayout, "til_email");
n0.t(expandTextInputLayout);
}
if (UserContext.j()) {
TextView textView2 = (TextView) findViewById(R$id.tv_recovery_email);
h.d(textView2, "tv_recovery_email");
n0.t(textView2);
TextView textView3 = (TextView) findViewById(R$id.tv_modify_pwd);
h.d(textView3, "tv_modify_pwd");
n0.t(textView3);
}
TextView textView4 = (TextView) findViewById(i11);
h.d(textView4, "tv_save");
e.c0.a.b(textView4, 500L, new a(textView4, this));
((ImageView) findViewById(i2)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
QuickPopup quickPopup;
final UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i12 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
QuickPopupBuilder quickPopupBuilder = new QuickPopupBuilder(userProfileActivity);
quickPopupBuilder.f16902i.a = R$layout.popup_take_photo;
o0 o0Var = new o0();
o0Var.d(R$id.tv_camera, new View.OnClickListener() {
@Override
public final void onClick(View view2) {
UserProfileActivity userProfileActivity2 = UserProfileActivity.this;
int i13 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity2, "this$0");
PictureCropper b0 = userProfileActivity2.b0();
Objects.requireNonNull(b0);
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra("output", b0.f1967j);
intent.putExtra("return-data", false);
intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.toString());
intent.putExtra("noFaceDetection", true);
if (Build.VERSION.SDK_INT >= 24) {
intent.addFlags(2);
}
if (intent.resolveActivity(b0.f1966i.getPackageManager()) != null) {
b0.g().startActivityForResult(intent, 11);
}
QuickPopup quickPopup2 = userProfileActivity2.f16096r;
if (quickPopup2 == null) {
return;
}
quickPopup2.k();
}
});
o0Var.d(R$id.tv_photo, new View.OnClickListener() {
@Override
public final void onClick(View view2) {
UserProfileActivity userProfileActivity2 = UserProfileActivity.this;
int i13 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity2, "this$0");
PictureCropper b0 = userProfileActivity2.b0();
Objects.requireNonNull(b0);
Intent intent = new Intent("android.intent.action.GET_CONTENT");
intent.setType("image/*");
if (intent.resolveActivity(b0.f1966i.getPackageManager()) != null) {
b0.g().startActivityForResult(intent, 10);
}
QuickPopup quickPopup2 = userProfileActivity2.f16096r;
if (quickPopup2 == null) {
return;
}
quickPopup2.k();
}
});
t.a.k kVar = quickPopupBuilder.f16902i;
if (o0Var != kVar) {
o0Var.a = kVar.a;
}
quickPopupBuilder.f16902i = o0Var;
WeakReference<Object> weakReference = quickPopupBuilder.f16903j;
Object obj = weakReference == null ? null : weakReference.get();
if (obj instanceof Context) {
quickPopup = new QuickPopup((Context) obj, 0, 0, quickPopupBuilder.f16902i);
} else if (obj instanceof Fragment) {
quickPopup = new QuickPopup((Fragment) obj, 0, 0, quickPopupBuilder.f16902i);
} else if (obj instanceof Dialog) {
quickPopup = new QuickPopup((Dialog) obj, 0, 0, quickPopupBuilder.f16902i);
} else {
throw new NullPointerException("宿主已经被销毁");
}
quickPopup.J(view);
userProfileActivity.f16096r = quickPopup;
}
});
((TextView) findViewById(R$id.tv_recovery_email)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i12 = UserProfileActivity.f16088v;
e.c0.a.k0(RecoveryEmailActivity.class);
}
});
((TextView) findViewById(R$id.tv_modify_pwd)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
int i12 = UserProfileActivity.f16088v;
e.c0.a.k0(UserModifyPwdActivity.class);
}
});
((TextView) findViewById(R$id.tv_logout)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i12 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
final UserHelper userHelper = (UserHelper) userProfileActivity.f16094p.getValue();
Objects.requireNonNull(userHelper);
AlertDialogBuilder alertDialogBuilder = new AlertDialogBuilder(i.c.a.c.w.c(), 0, 2);
alertDialogBuilder.f15254l = e.i.b.a.b(i.c.a.c.w.c(), R$color.warning);
alertDialogBuilder.j(org.godfootsteps.more.R$string.user_logout_notice);
alertDialogBuilder.o(org.godfootsteps.more.R$string.user_logout_success, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i13) {
final UserHelper userHelper2 = UserHelper.this;
n.i.b.h.e(userHelper2, "this$0");
userHelper2.d(false, new n.i.a.a<n.e>() {
{
super(0);
}
@Override
public n.e invoke() {
invoke2();
return n.e.a;
}
public final void invoke2() {
UserHelper.a(UserHelper.this);
UserHelper.b(UserHelper.this);
}
});
}
});
alertDialogBuilder.l(org.godfootsteps.more.R$string.app_cancel, null);
alertDialogBuilder.h();
}
});
a0.a.postDelayed(new Runnable() {
@Override
public final void run() {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i12 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
((ExpandTextInputLayout) userProfileActivity.findViewById(R$id.til_first_name)).setHintAnimationEnabled(true);
((ExpandTextInputLayout) userProfileActivity.findViewById(R$id.til_last_name)).setHintAnimationEnabled(true);
((ExpandTextInputLayout) userProfileActivity.findViewById(R$id.til_country)).setHintAnimationEnabled(true);
((ExpandTextInputLayout) userProfileActivity.findViewById(R$id.til_signature)).setHintAnimationEnabled(true);
((ExpandTextInputLayout) userProfileActivity.findViewById(R$id.til_user_url)).setHintAnimationEnabled(true);
}
}, 50L);
((TextView) findViewById(R$id.tv_delete_account)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i12 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
final UserHelper userHelper = (UserHelper) userProfileActivity.f16094p.getValue();
Objects.requireNonNull(userHelper);
AlertDialogBuilder alertDialogBuilder = new AlertDialogBuilder(i.c.a.c.w.c(), 0, 2);
alertDialogBuilder.f15254l = e.i.b.a.b(i.c.a.c.w.c(), R$color.warning);
alertDialogBuilder.j(org.godfootsteps.more.R$string.user_delete_account_prompt);
alertDialogBuilder.o(org.godfootsteps.more.R$string.user_delete_account, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i13) {
final UserHelper userHelper2 = UserHelper.this;
n.i.b.h.e(userHelper2, "this$0");
final d.c.a.g.e eVar = new d.c.a.g.e(i.c.a.c.w.c());
eVar.f6087d = false;
eVar.b();
q0 q0Var = userHelper2.c;
final n.i.a.l<Boolean, n.e> lVar = new n.i.a.l<Boolean, n.e>() {
{
super(1);
}
@Override
public n.e invoke(Boolean bool) {
invoke(bool.booleanValue());
return n.e.a;
}
public final void invoke(boolean z) {
e.this.a();
if (z) {
UserHelper.a(userHelper2);
UserMessageRepository userMessageRepository = UserMessageRepository.a;
g c5 = UserMessageRepository.c();
UserContext userContext2 = UserContext.a;
c5.d(UserContext.f());
UserHelper.b(userHelper2);
return;
}
ToastUtils.b(org.godfootsteps.more.R$string.app_error_occurred);
}
};
Objects.requireNonNull(q0Var);
n.i.b.h.e(lVar, "invoke");
UserContext userContext2 = UserContext.a;
final User user8 = UserContext.c;
n.m.t.a.p.m.e1.a.N2(new n.i.a.l<UserRequest<String, BaseModel<String>>, n.e>() {
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001H\u008a@"}, d2 = {"<anonymous>", "Lorg/godfootsteps/arch/api/model/BaseModel;", ""}, k = 3, mv = {1, 5, 1}, xi = 48)
@n.g.f.a.c(c = "org.godfootsteps.more.user.UserDataSource$deleteAccount$1$1", f = "UserDataSource.kt", l = {449, 455}, m = "invokeSuspend")
public static final class AnonymousClass1 extends SuspendLambda implements n.i.a.l<n.g.c<? super BaseModel<String>>, Object> {
public final User $user;
public int label;
public AnonymousClass1(User user, n.g.c<? super AnonymousClass1> cVar) {
super(1, cVar);
this.$user = user;
}
@Override
public final n.g.c<n.e> create(n.g.c<?> cVar) {
return new AnonymousClass1(this.$user, cVar);
}
@Override
public final Object invoke(n.g.c<? super BaseModel<String>> cVar) {
return ((AnonymousClass1) create(cVar)).invokeSuspend(n.e.a);
}
@Override
public final Object invokeSuspend(Object obj) {
String j0;
String j02;
String j03;
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i2 = this.label;
if (i2 != 0) {
if (i2 == 1) {
i.j.a.e.t.d.Q4(obj);
return (BaseModel) obj;
} else if (i2 != 2) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
i.j.a.e.t.d.Q4(obj);
return (BaseModel) obj;
}
}
i.j.a.e.t.d.Q4(obj);
if (this.$user.getAccountType() == 0) {
o.a(this.$user);
Objects.requireNonNull(AppClient.a);
AppClient appClient = AppClient.Companion.f15176d;
String userId = this.$user.getUserId();
h.d(userId, "user.userId");
j03 = a.j0(userId, (r2 & 1) != 0 ? "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjaVHmBid5Zx/6sKltt396TEDWt55xO1aCHqtUZh2XMC1Yrzm3CzhW+cbIyuQTZP2nLPDpkfk/UdBNafaqzTYNFPqwBKbcrlDukKcRTytS5mVQDwP7g0CJpJtDOQhBX4Vl/5aL8H91cSXqGa2E6PnR77uRwsyihufRWM6zcwf6QQIDAQAB" : null);
String pwd = this.$user.getPwd();
h.d(pwd, "user.pwd");
String n2 = e.c0.a.n(a.Y(pwd, null, 1));
h.d(n2, "encryptMD5ToString(\n … )");
String lowerCase = n2.toLowerCase();
h.d(lowerCase, "this as java.lang.String).toLowerCase()");
String valueOf = String.valueOf(this.$user.getAccountType());
this.label = 1;
obj = appClient.q(j03, lowerCase, "", valueOf, this);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
return (BaseModel) obj;
}
Objects.requireNonNull(AppClient.a);
AppClient appClient2 = AppClient.Companion.f15176d;
String userId2 = this.$user.getUserId();
h.d(userId2, "user.userId");
j0 = a.j0(userId2, (r2 & 1) != 0 ? "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjaVHmBid5Zx/6sKltt396TEDWt55xO1aCHqtUZh2XMC1Yrzm3CzhW+cbIyuQTZP2nLPDpkfk/UdBNafaqzTYNFPqwBKbcrlDukKcRTytS5mVQDwP7g0CJpJtDOQhBX4Vl/5aL8H91cSXqGa2E6PnR77uRwsyihufRWM6zcwf6QQIDAQAB" : null);
String userSignature = this.$user.getUserSignature();
h.d(userSignature, "user.userSignature");
j02 = a.j0(userSignature, (r2 & 1) != 0 ? "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjaVHmBid5Zx/6sKltt396TEDWt55xO1aCHqtUZh2XMC1Yrzm3CzhW+cbIyuQTZP2nLPDpkfk/UdBNafaqzTYNFPqwBKbcrlDukKcRTytS5mVQDwP7g0CJpJtDOQhBX4Vl/5aL8H91cSXqGa2E6PnR77uRwsyihufRWM6zcwf6QQIDAQAB" : null);
String valueOf2 = String.valueOf(this.$user.getAccountType());
this.label = 2;
obj = appClient2.q(j0, "", j02, valueOf2, this);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
return (BaseModel) obj;
}
}
{
super(1);
}
@Override
public n.e invoke(UserRequest<String, BaseModel<String>> userRequest) {
invoke2(userRequest);
return n.e.a;
}
public final void invoke2(UserRequest<String, BaseModel<String>> userRequest) {
h.e(userRequest, "$this$userRequest");
userRequest.f(new AnonymousClass1(User.this, null));
final n.i.a.l<Boolean, n.e> lVar2 = lVar;
userRequest.f15180l = new n.i.a.l<String, n.e>() {
{
super(1);
}
@Override
public n.e invoke(String str) {
invoke2(str);
return n.e.a;
}
public final void invoke2(String str) {
h.e(str, "it");
lVar2.invoke(Boolean.TRUE);
}
};
final n.i.a.l<Boolean, n.e> lVar3 = lVar;
userRequest.f15181m = new p<Integer, String, n.e>() {
{
super(2);
}
@Override
public n.e invoke(Integer num, String str) {
invoke(num.intValue(), str);
return n.e.a;
}
public final void invoke(int i14, String str) {
h.e(str, "$noName_1");
lVar3.invoke(Boolean.FALSE);
}
};
}
});
}
});
alertDialogBuilder.l(org.godfootsteps.more.R$string.app_cancel, null);
alertDialogBuilder.h();
}
});
return;
}
h.l("user");
throw null;
}
h.l("user");
throw null;
}
h.l("user");
throw null;
}
h.l("user");
throw null;
}
h.l("user");
throw null;
}
h.l("user");
throw null;
}
h.l("user");
throw null;
}
public final Handler a0() {
return (Handler) this.f16097s.getValue();
}
public final PictureCropper b0() {
return (PictureCropper) this.f16093o.getValue();
}
public final e c0() {
return (e) this.f16095q.getValue();
}
@Override
public void onActivityResult(int i2, int i3, Intent intent) {
super.onActivityResult(i2, i3, intent);
if (i2 == 11 && v.i()) {
h.e(this, "base");
Locale g2 = s.g();
Locale.setDefault(g2);
Resources resources = getResources();
Configuration configuration = new Configuration(resources.getConfiguration());
configuration.setLocale(g2);
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
}
}
@Override
public void onBackPressed() {
if (((TextView) findViewById(R$id.tv_save)).isEnabled()) {
AlertDialogBuilder alertDialogBuilder = new AlertDialogBuilder(this, 0, 2);
alertDialogBuilder.j(org.godfootsteps.more.R$string.user_signature_unsaved);
alertDialogBuilder.o(org.godfootsteps.more.R$string.app_ensure, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i2) {
UserProfileActivity userProfileActivity = UserProfileActivity.this;
int i3 = UserProfileActivity.f16088v;
n.i.b.h.e(userProfileActivity, "this$0");
userProfileActivity.finish();
}
});
alertDialogBuilder.l(org.godfootsteps.more.R$string.app_cancel, null);
alertDialogBuilder.h();
return;
}
super.onBackPressed();
}
@Override
public void onDestroy() {
if (a0() != null) {
a0().removeCallbacksAndMessages(null);
}
n.m.t.a.p.m.e1.a.y(this, null, 1);
super.onDestroy();
}
@Override
public void t(String str) {
TextView textView = (TextView) findViewById(R$id.tv_save);
h.d(textView, "tv_save");
n0.j(textView, true, 0.0f, 2);
this.f16091m = str;
if (str == null || str.length() == 0) {
return;
}
((d.c.a.b.q) n.m.t.a.p.m.e1.a.Q2(this).k().P(new File(str))).Y(i.a).l0(true).M((ImageView) findViewById(R$id.iv_avatar));
}
@Override
public n.g.e x() {
return this.f16089k.x();
}
}