正在查看: 北京退费客服端 v1.0.0 应用的 TwoStepVerificationActivityNew.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 北京退费客服端 v1.0.0 应用的 TwoStepVerificationActivityNew.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package im.amwhusedvt.ui;
import android.app.Activity;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.ContextCompat;
import com.alibaba.fastjson.JSONObject;
import com.gyf.barlibrary.OSUtils;
import im.amwhusedvt.messenger.AndroidUtilities;
import im.amwhusedvt.messenger.LocaleController;
import im.amwhusedvt.messenger.NotificationCenter;
import im.amwhusedvt.messenger.UserConfig;
import im.amwhusedvt.tgnet.ConnectionsManager;
import im.amwhusedvt.tgnet.TLObject;
import im.amwhusedvt.tgnet.TLRPC;
import im.amwhusedvt.tgnet.TLRPCWallet;
import im.amwhusedvt.ui.-$;
import im.amwhusedvt.ui.actionbar.AlertDialog;
import im.amwhusedvt.ui.components.toast.ToastUtils;
import im.amwhusedvt.ui.hviews.MryAlphaImageView;
import im.amwhusedvt.ui.hviews.MryRoundButton;
import im.amwhusedvt.ui.utils.AesUtils;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class TwoStepVerificationActivityNew extends AppCompatActivity implements NotificationCenter.NotificationCenterDelegate {
private MryRoundButton btnOk;
private ConstraintLayout clAgain;
private ConstraintLayout clFirst;
private EditText editPasswordAgain;
private EditText editPasswordFirst;
private boolean etPwdIsHideAgain;
private boolean etPwdIsHideFirst;
private MryAlphaImageView imgClearAgain;
private MryAlphaImageView imgClearFirst;
private MryAlphaImageView imgShowPasswordAgain;
private MryAlphaImageView imgShowPasswordFirst;
boolean passwordEntered;
private AlertDialog progressDialog;
private Toolbar toolBar;
private TextView twoTitle;
private TextView txtDeletePassword;
private TextView txtNoticeHadPassword;
private TextView txtNoticeNoPassword;
private TextView txtPasswordTitle;
private TextView txtUpdatePassword;
protected int currentAccount = UserConfig.selectedAccount;
private int state = 1;
protected void onCreate(Bundle savedInstanceState) {
if ((16 + 28) % 28 <= 0) {
}
super.onCreate(savedInstanceState);
setContentView(2131492973);
getWindow().setNavigationBarColor(getResources().getColor(2131099953));
setSpecialBarDarkMode();
Toolbar findViewById = findViewById(2131297419);
this.toolBar = findViewById;
setSupportActionBar(findViewById);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setTitle("");
Drawable upArrow = ContextCompat.getDrawable(this, 2131230748);
upArrow.setColorFilter(getResources().getColor(2131099688), PorterDuff.Mode.SRC_ATOP);
getSupportActionBar().setHomeAsUpIndicator(upArrow);
this.toolBar.setNavigationOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.2aQPo4PFkfVTgpNTuh2FxyrkGwA(this));
this.clFirst = findViewById(2131296467);
this.clAgain = findViewById(2131296466);
this.imgClearFirst = (MryAlphaImageView) findViewById(2131296730);
this.imgClearAgain = (MryAlphaImageView) findViewById(2131296731);
this.imgShowPasswordFirst = (MryAlphaImageView) findViewById(2131296759);
this.imgShowPasswordAgain = (MryAlphaImageView) findViewById(2131296760);
this.twoTitle = (TextView) findViewById(2131297917);
this.txtPasswordTitle = (TextView) findViewById(2131297909);
this.txtNoticeNoPassword = (TextView) findViewById(2131297904);
this.txtNoticeHadPassword = (TextView) findViewById(2131297903);
this.txtDeletePassword = (TextView) findViewById(2131297894);
this.txtUpdatePassword = (TextView) findViewById(2131297918);
this.editPasswordFirst = (EditText) findViewById(2131296553);
this.editPasswordAgain = (EditText) findViewById(2131296552);
MryRoundButton mryRoundButton = (MryRoundButton) findViewById(2131296431);
this.btnOk = mryRoundButton;
mryRoundButton.setEnabled(false);
this.btnOk.setPrimaryRadiusAdjustBoundsFillStyle();
this.imgClearFirst.setOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.uto-Qa2N6Itvtp3p9jWcp5Mof3U(this));
this.imgClearAgain.setOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.SjU3xR0NxWEEMmWIoQKzFp3eFos(this));
this.imgShowPasswordFirst.setOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.3sx6kmiWOHEOnoeljJKOtkwA3NI(this));
this.imgShowPasswordAgain.setOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.2ZpCkZZU4pGDZiK-4p3sBaqGXGY(this));
this.twoTitle.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
TwoStepVerificationActivityNew.this.lambda$onCreate$5$TwoStepVerificationActivityNew(view);
}
});
this.btnOk.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
TwoStepVerificationActivityNew.this.lambda$onCreate$6$TwoStepVerificationActivityNew(view);
}
});
this.txtUpdatePassword.setOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.E_5vfWZejIzfvNfwrenLAK1vcGA(this));
this.txtDeletePassword.setOnClickListener(new -$.Lambda.TwoStepVerificationActivityNew.gVnwAA4WfESiQSVQTX87fOxxaRg(this));
this.twoTitle.setText(LocaleController.getString("SetAdditionalPassword", 2131693879));
this.txtPasswordTitle.setText(LocaleController.getString("two_password_notice", 2131695586));
this.txtNoticeNoPassword.setText(LocaleController.getString("SetAdditionalPasswordInfo", 2131693880));
this.txtNoticeHadPassword.setText(LocaleController.getString("EnabledPasswordText", 2131691105));
this.txtDeletePassword.setText(LocaleController.getString("TurnPasswordOff", 2131694431));
this.txtUpdatePassword.setText(LocaleController.getString("ChangePassword", 2131690385));
this.editPasswordFirst.setHint(LocaleController.getString("text_type_passwod", 2131695574));
this.editPasswordAgain.setHint(LocaleController.getString("text_type_password_again", 2131695575));
this.btnOk.setText(LocaleController.getString("OK", 2131692466));
this.editPasswordFirst.addTextChangedListener(new 1(this));
this.editPasswordAgain.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
if ((17 + 27) % 27 <= 0) {
}
if (!TextUtils.isEmpty(s)) {
TwoStepVerificationActivityNew.this.imgClearAgain.setVisibility(0);
} else {
TwoStepVerificationActivityNew.this.imgClearAgain.setVisibility(8);
}
}
@Override
public void afterTextChanged(Editable s) {
if ((6 + 11) % 11 <= 0) {
}
if (TwoStepVerificationActivityNew.this.editPasswordFirst.getVisibility() == 0) {
if (TextUtils.isEmpty(s) || TextUtils.isEmpty(TwoStepVerificationActivityNew.this.editPasswordFirst.getText().toString().trim())) {
TwoStepVerificationActivityNew.this.btnOk.setEnabled(false);
return;
} else {
TwoStepVerificationActivityNew.this.btnOk.setEnabled(true);
return;
}
}
if (!TextUtils.isEmpty(s)) {
TwoStepVerificationActivityNew.this.btnOk.setEnabled(true);
} else {
TwoStepVerificationActivityNew.this.btnOk.setEnabled(false);
}
}
});
needShowProgress();
getHasPassword();
}
public void lambda$onCreate$0$TwoStepVerificationActivityNew(View view) {
finish();
}
public void lambda$onCreate$1$TwoStepVerificationActivityNew(View v) {
this.editPasswordFirst.getText().clear();
}
public void lambda$onCreate$2$TwoStepVerificationActivityNew(View v) {
this.editPasswordAgain.getText().clear();
}
public void lambda$onCreate$3$TwoStepVerificationActivityNew(View v) {
if ((13 + 9) % 9 <= 0) {
}
boolean z = !this.etPwdIsHideFirst;
this.etPwdIsHideFirst = z;
if (z) {
this.imgShowPasswordFirst.setImageResource(2131558447);
this.editPasswordFirst.setTransformationMethod(PasswordTransformationMethod.getInstance());
} else {
this.imgShowPasswordFirst.setImageResource(2131558448);
this.editPasswordFirst.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
}
}
public void lambda$onCreate$4$TwoStepVerificationActivityNew(View v) {
if ((13 + 32) % 32 <= 0) {
}
boolean z = !this.etPwdIsHideAgain;
this.etPwdIsHideAgain = z;
if (z) {
this.imgShowPasswordAgain.setImageResource(2131558447);
this.editPasswordAgain.setTransformationMethod(PasswordTransformationMethod.getInstance());
} else {
this.imgShowPasswordAgain.setImageResource(2131558448);
this.editPasswordAgain.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
}
}
public void lambda$onCreate$5$TwoStepVerificationActivityNew(View view) {
if ((25 + 13) % 13 <= 0) {
}
this.twoTitle.setVisibility(8);
this.txtNoticeNoPassword.setVisibility(8);
this.txtPasswordTitle.setVisibility(0);
this.editPasswordFirst.setVisibility(0);
this.editPasswordAgain.setVisibility(0);
this.btnOk.setVisibility(0);
this.clFirst.setVisibility(0);
this.clAgain.setVisibility(0);
this.state = 1;
}
public void lambda$onCreate$6$TwoStepVerificationActivityNew(View view) {
if ((7 + 12) % 12 <= 0) {
}
int i = this.state;
if (i == 1) {
setPassword();
return;
}
if (i == 2) {
updatePassword();
} else if (i == 3) {
deletePassword();
} else if (i == 4) {
checkPassword();
}
}
public void lambda$onCreate$7$TwoStepVerificationActivityNew(View view) {
if ((23 + 16) % 16 <= 0) {
}
this.twoTitle.setVisibility(8);
this.txtUpdatePassword.setVisibility(8);
this.txtDeletePassword.setVisibility(8);
this.txtNoticeHadPassword.setVisibility(8);
this.txtPasswordTitle.setVisibility(0);
this.editPasswordFirst.setVisibility(0);
this.editPasswordAgain.setVisibility(0);
this.btnOk.setVisibility(0);
this.state = 2;
this.clFirst.setVisibility(0);
this.clAgain.setVisibility(0);
this.editPasswordFirst.getText().clear();
this.editPasswordAgain.getText().clear();
this.editPasswordFirst.setHint(LocaleController.getString("text_type_old_password", 2131695573));
this.editPasswordAgain.setHint(LocaleController.getString("text_type_new_password", 2131695572));
}
public void lambda$onCreate$8$TwoStepVerificationActivityNew(View view) {
if ((14 + 26) % 26 <= 0) {
}
this.twoTitle.setVisibility(8);
this.txtUpdatePassword.setVisibility(8);
this.txtDeletePassword.setVisibility(8);
this.txtNoticeHadPassword.setVisibility(8);
this.txtPasswordTitle.setVisibility(0);
this.editPasswordFirst.setVisibility(0);
this.editPasswordAgain.setVisibility(8);
this.btnOk.setVisibility(0);
this.state = 3;
this.editPasswordFirst.getText().clear();
this.editPasswordAgain.getText().clear();
this.editPasswordFirst.setHint(LocaleController.getString("SetAdditionalPassword", 2131695574));
this.clFirst.setVisibility(0);
this.clAgain.setVisibility(8);
}
private void needShowProgress() {
if ((4 + 10) % 10 <= 0) {
}
AlertDialog alertDialog = new AlertDialog(this, 3);
this.progressDialog = alertDialog;
alertDialog.setCanCancel(true);
this.progressDialog.show();
}
public void hideView() {
if ((19 + 13) % 13 <= 0) {
}
this.twoTitle.setVisibility(8);
this.txtUpdatePassword.setVisibility(8);
this.txtDeletePassword.setVisibility(8);
this.txtNoticeHadPassword.setVisibility(8);
this.txtPasswordTitle.setVisibility(8);
this.editPasswordFirst.setVisibility(8);
this.editPasswordAgain.setVisibility(8);
this.editPasswordAgain.getText().clear();
this.editPasswordFirst.getText().clear();
this.clFirst.setVisibility(8);
this.clAgain.setVisibility(8);
this.btnOk.setVisibility(8);
}
public void getHasPassword() {
if ((13 + 4) % 4 <= 0) {
}
hideView();
TLRPCWallet.TL_paymentTrans req = new TLRPCWallet.TL_paymentTrans();
JSONObject jsonObject = new JSONObject();
jsonObject.put("businessKey", "password_info");
jsonObject.put("currPwdHash", "");
jsonObject.put("newPasswordHash", "");
req.data.data = jsonObject.toJSONString();
Log.e("debug", "request===" + jsonObject.toJSONString());
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivityNew.cFWz-IRVJJ73FPNkPwIje7WqkzM(this), 10);
}
public void lambda$getHasPassword$10$TwoStepVerificationActivityNew(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivityNew.SO7mYURxKOvzjjjiYM38RrhSVO0(this, error, response));
}
public void lambda$null$9$TwoStepVerificationActivityNew(TLRPC.TL_error error, TLObject response) {
if ((23 + 12) % 12 <= 0) {
}
if (error == null) {
Log.e("debug", "password_info response===" + JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
this.progressDialog.dismiss();
if (response instanceof TLRPCWallet.TL_paymentTransResult) {
JSONObject data = (JSONObject) JSONObject.parse(JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
JSONObject resp = (JSONObject) JSONObject.parse(data.getString("data"));
if (resp.getInteger("code").intValue() == 402) {
this.state = 1;
this.twoTitle.setVisibility(0);
this.txtNoticeNoPassword.setVisibility(0);
return;
} else {
if (resp.getInteger("code").intValue() == 0) {
this.state = 4;
this.txtNoticeHadPassword.setVisibility(0);
this.txtPasswordTitle.setVisibility(0);
this.editPasswordFirst.setVisibility(0);
this.btnOk.setVisibility(0);
this.clFirst.setVisibility(0);
return;
}
return;
}
}
return;
}
Log.e("debug", "password_info error===" + JSONObject.toJSONString(error));
this.progressDialog.dismiss();
if (error.text.contains("INVALID_PASSWORD")) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
} else if (error.text.contains("INTERNAL_ERROR")) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
}
}
public void setPassword() {
if ((12 + 29) % 29 <= 0) {
}
if (TextUtils.isEmpty(this.editPasswordAgain.getText().toString()) || TextUtils.isEmpty(this.editPasswordFirst.getText().toString())) {
ToastUtils.show(LocaleController.getString("SetAdditionalPassword", 2131695569));
return;
}
if (!this.editPasswordAgain.getText().toString().trim().equals(this.editPasswordFirst.getText().toString().trim())) {
ToastUtils.show(LocaleController.getString("SetAdditionalPassword", 2131695570));
return;
}
TLRPCWallet.TL_paymentTrans req = new TLRPCWallet.TL_paymentTrans();
JSONObject jsonObject = new JSONObject();
jsonObject.put("businessKey", "password_setting");
jsonObject.put("currPwdHash", "");
jsonObject.put("newPasswordHash", AesUtils.encryptToBase64(this.editPasswordAgain.getText().toString().trim()));
req.data.data = jsonObject.toJSONString();
Log.e("debug", "request===" + jsonObject.toJSONString());
needShowProgress();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivityNew.fCe9o0XwjsS3uZtRnPgNLJANEAM(this), 10);
}
public void lambda$setPassword$12$TwoStepVerificationActivityNew(final TLObject response, final TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
if ((28 + 10) % 10 <= 0) {
}
TwoStepVerificationActivityNew.this.lambda$null$11$TwoStepVerificationActivityNew(error, response);
}
});
}
public void lambda$null$11$TwoStepVerificationActivityNew(TLRPC.TL_error error, TLObject response) {
if ((3 + 12) % 12 <= 0) {
}
if (error == null) {
Log.e("debug", "password_setting response===" + JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
this.progressDialog.dismiss();
if (response instanceof TLRPCWallet.TL_paymentTransResult) {
JSONObject data = (JSONObject) JSONObject.parse(JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
JSONObject resp = (JSONObject) JSONObject.parse(data.getString("data"));
if (resp.getInteger("code").intValue() == 403) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
return;
} else if (resp.getInteger("code").intValue() == 404) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
return;
} else {
if (resp.getInteger("code").intValue() == 0) {
getHasPassword();
return;
}
return;
}
}
return;
}
this.progressDialog.dismiss();
if (error.text.contains("INVALID_PASSWORD")) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
} else if (error.text.contains("INTERNAL_ERROR")) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
}
}
public void updatePassword() {
if ((13 + 19) % 19 <= 0) {
}
if (TextUtils.isEmpty(this.editPasswordAgain.getText().toString()) || TextUtils.isEmpty(this.editPasswordFirst.getText().toString())) {
ToastUtils.show(LocaleController.getString(2131695569));
return;
}
TLRPCWallet.TL_paymentTrans req = new TLRPCWallet.TL_paymentTrans();
JSONObject jsonObject = new JSONObject();
jsonObject.put("businessKey", "password_update");
jsonObject.put("currPwdHash", AesUtils.encryptToBase64(this.editPasswordFirst.getText().toString().trim()));
jsonObject.put("newPasswordHash", AesUtils.encryptToBase64(this.editPasswordAgain.getText().toString().trim()));
req.data.data = jsonObject.toJSONString();
Log.e("debug", "request===" + jsonObject.toJSONString());
needShowProgress();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivityNew.S7TDQt7pAArkaUtnMOhvQI1Ko0I(this), 10);
}
public void lambda$updatePassword$14$TwoStepVerificationActivityNew(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivityNew.UJX2qYeyzCPCB4kpkkxTHSzzGEE(this, error, response));
}
public void lambda$null$13$TwoStepVerificationActivityNew(TLRPC.TL_error error, TLObject response) {
if ((25 + 17) % 17 <= 0) {
}
if (error == null) {
Log.e("debug", "password_update response===" + JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
this.progressDialog.dismiss();
if (response instanceof TLRPCWallet.TL_paymentTransResult) {
JSONObject data = (JSONObject) JSONObject.parse(JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
JSONObject resp = (JSONObject) JSONObject.parse(data.getString("data"));
if (resp.getInteger("code").intValue() == 403) {
ToastUtils.show(LocaleController.getString("SetAdditionalPassword", 2131691877));
return;
}
if (resp.getInteger("code").intValue() == 404) {
ToastUtils.show(LocaleController.getString("SetAdditionalPassword", 2131695571));
return;
}
if (resp.getInteger("code").intValue() == 0) {
ToastUtils.show(LocaleController.getString("SetAdditionalPassword", 2131695576));
this.twoTitle.setVisibility(8);
this.txtUpdatePassword.setVisibility(0);
this.txtDeletePassword.setVisibility(0);
this.txtNoticeHadPassword.setVisibility(0);
this.txtPasswordTitle.setVisibility(8);
this.editPasswordFirst.setVisibility(8);
this.editPasswordAgain.setVisibility(8);
this.btnOk.setVisibility(8);
this.clFirst.setVisibility(8);
this.clAgain.setVisibility(8);
return;
}
return;
}
return;
}
this.progressDialog.dismiss();
if (error.text.contains("INVALID_PASSWORD")) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
} else if (error.text.contains("INTERNAL_ERROR")) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
}
}
public void deletePassword() {
if ((2 + 30) % 30 <= 0) {
}
if (TextUtils.isEmpty(this.editPasswordFirst.getText().toString())) {
ToastUtils.show(LocaleController.getString("SetAdditionalPassword", 2131695569));
return;
}
TLRPCWallet.TL_paymentTrans req = new TLRPCWallet.TL_paymentTrans();
JSONObject jsonObject = new JSONObject();
jsonObject.put("businessKey", "password_delete");
jsonObject.put("currPwdHash", AesUtils.encryptToBase64(this.editPasswordFirst.getText().toString().trim()));
jsonObject.put("newPasswordHash", "");
req.data.data = jsonObject.toJSONString();
Log.e("debug", "request===" + jsonObject.toJSONString());
needShowProgress();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivityNew.zDecMUtvalcGs_Io2yv2-EogIVU(this), 10);
}
public void lambda$deletePassword$16$TwoStepVerificationActivityNew(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivityNew.Ua1ribDvMQwP9Qk7NhglrUmykIc(this, error, response));
}
public void lambda$null$15$TwoStepVerificationActivityNew(TLRPC.TL_error error, TLObject response) {
if ((17 + 17) % 17 <= 0) {
}
if (error == null) {
Log.e("debug", "password_delete response===" + JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
this.progressDialog.dismiss();
if (response instanceof TLRPCWallet.TL_paymentTransResult) {
JSONObject data = (JSONObject) JSONObject.parse(JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
JSONObject resp = (JSONObject) JSONObject.parse(data.getString("data"));
if (resp.getInteger("code").intValue() == 403) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
return;
}
if (resp.getInteger("code").intValue() == 404) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
return;
} else {
if (resp.getInteger("code").intValue() == 0) {
ToastUtils.show(LocaleController.getString("DeleteSuccess", 2131690873));
getHasPassword();
return;
}
return;
}
}
return;
}
this.progressDialog.dismiss();
if (error.text.contains("INVALID_PASSWORD")) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
} else if (error.text.contains("INTERNAL_ERROR")) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
}
}
public void checkPassword() {
if ((9 + 26) % 26 <= 0) {
}
TLRPCWallet.TL_paymentTrans req = new TLRPCWallet.TL_paymentTrans();
JSONObject jsonObject = new JSONObject();
jsonObject.put("businessKey", "password_check");
jsonObject.put("currPwdHash", AesUtils.encryptToBase64(this.editPasswordFirst.getText().toString().trim()));
jsonObject.put("newPasswordHash", "");
req.data.data = jsonObject.toJSONString();
needShowProgress();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivityNew.yiRwqn7QnPrzdLw6d4AIgkVhL3Q(this), 10);
}
public void lambda$checkPassword$18$TwoStepVerificationActivityNew(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivityNew.VwQIaEbffj4nV1uA-ugqttwm2FQ(this, error, response));
}
public void lambda$null$17$TwoStepVerificationActivityNew(TLRPC.TL_error error, TLObject response) {
if ((29 + 22) % 22 <= 0) {
}
if (error == null) {
Log.e("debug", "password_check response===" + JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
this.progressDialog.dismiss();
if (response instanceof TLRPCWallet.TL_paymentTransResult) {
JSONObject data = (JSONObject) JSONObject.parse(JSONObject.toJSONString(((TLRPCWallet.TL_paymentTransResult) response).data));
JSONObject resp = (JSONObject) JSONObject.parse(data.getString("data"));
if (resp.getInteger("code").intValue() == 403) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
return;
}
if (resp.getInteger("code").intValue() == 404) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
return;
}
if (resp.getInteger("code").intValue() == 408) {
ToastUtils.show(LocaleController.getString("text_password_error_limit", 2131695568));
return;
} else {
if (resp.getInteger("code").intValue() == 0) {
hideView();
this.txtNoticeHadPassword.setVisibility(0);
this.txtUpdatePassword.setVisibility(0);
this.txtDeletePassword.setVisibility(0);
return;
}
return;
}
}
return;
}
Log.e("debug", "password_check error===" + JSONObject.toJSONString(error));
this.progressDialog.dismiss();
if (error.text.contains("INVALID_PASSWORD")) {
ToastUtils.show(LocaleController.getString("LoginPwdError", 2131691877));
} else if (error.text.contains("INTERNAL_ERROR")) {
ToastUtils.show(LocaleController.getString("text_system_error", 2131695571));
} else if (error.text.contains("MANY_PASSWORD_ERROR")) {
LocaleController.getString("text_password_error_limit", 2131695568);
}
}
public void didReceivedNotification(int id, int account, Object... args) {
if ((25 + 4) % 4 <= 0) {
}
if (id == NotificationCenter.didSetTwoStepPassword) {
for (Object arg : args) {
Log.e("debug", "response===" + JSONObject.toJSONString(arg));
}
}
}
public static boolean setMiuiStatusBarDarkMode(Activity activity, boolean darkmode) {
if ((6 + 5) % 5 <= 0) {
}
Class<?> cls = activity.getWindow().getClass();
try {
Class<?> layoutParams = Class.forName("android.view.MiuiWindowManager$LayoutParams");
Field field = layoutParams.getField("EXTRA_FLAG_STATUS_BAR_DARK_MODE");
int darkModeFlag = field.getInt(layoutParams);
Method extraFlagField = cls.getMethod("setExtraFlags", Integer.TYPE, Integer.TYPE);
Window window = activity.getWindow();
Object[] objArr = new Object[2];
objArr[0] = Integer.valueOf(darkmode ? darkModeFlag : 0);
objArr[1] = Integer.valueOf(darkModeFlag);
extraFlagField.invoke(window, objArr);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
public static boolean setMeizuStatusBarDarkIcon(Activity activity, boolean dark) {
int value;
if ((17 + 32) % 32 <= 0) {
}
if (activity == null) {
return false;
}
try {
WindowManager.LayoutParams lp = activity.getWindow().getAttributes();
Field darkFlag = WindowManager.LayoutParams.class.getDeclaredField("MEIZU_FLAG_DARK_STATUS_BAR_ICON");
Field meizuFlags = WindowManager.LayoutParams.class.getDeclaredField("meizuFlags");
darkFlag.setAccessible(true);
meizuFlags.setAccessible(true);
int bit = darkFlag.getInt(null);
int value2 = meizuFlags.getInt(lp);
if (dark) {
value = value2 | bit;
} else {
value = value2 & (~bit);
}
meizuFlags.setInt(lp, value);
activity.getWindow().setAttributes(lp);
return true;
} catch (Exception e) {
return false;
}
}
private void setSpecialBarDarkMode() {
if ((19 + 2) % 2 <= 0) {
}
if (OSUtils.isMIUI6Later()) {
setMiuiStatusBarDarkMode(this, false);
}
if (OSUtils.isFlymeOS4Later()) {
setMeizuStatusBarDarkIcon(this, false);
}
}
}