正在查看: 北京退费客服端 v1.0.0 应用的 TwoStepVerificationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 北京退费客服端 v1.0.0 应用的 TwoStepVerificationActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package im.amwhusedvt.ui;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Vibrator;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.text.method.PasswordTransformationMethod;
import android.text.method.TransformationMethod;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import im.amwhusedvt.messenger.AndroidUtilities;
import im.amwhusedvt.messenger.FileLog;
import im.amwhusedvt.messenger.LocaleController;
import im.amwhusedvt.messenger.NotificationCenter;
import im.amwhusedvt.messenger.SRPHelper;
import im.amwhusedvt.messenger.UserConfig;
import im.amwhusedvt.messenger.Utilities;
import im.amwhusedvt.messenger.browser.Browser;
import im.amwhusedvt.tgnet.ConnectionsManager;
import im.amwhusedvt.tgnet.RequestDelegate;
import im.amwhusedvt.tgnet.TLObject;
import im.amwhusedvt.tgnet.TLRPC;
import im.amwhusedvt.ui.-$;
import im.amwhusedvt.ui.actionbar.ActionBarMenu;
import im.amwhusedvt.ui.actionbar.ActionBarMenuItem;
import im.amwhusedvt.ui.actionbar.AlertDialog;
import im.amwhusedvt.ui.actionbar.BaseFragment;
import im.amwhusedvt.ui.actionbar.Theme;
import im.amwhusedvt.ui.actionbar.ThemeDescription;
import im.amwhusedvt.ui.cells.EditTextSettingsCell;
import im.amwhusedvt.ui.cells.TextInfoPrivacyCell;
import im.amwhusedvt.ui.cells.TextSettingsCell;
import im.amwhusedvt.ui.components.AlertsCreator;
import im.amwhusedvt.ui.components.ContextProgressView;
import im.amwhusedvt.ui.components.EditTextBoldCursor;
import im.amwhusedvt.ui.components.EmptyTextProgressView;
import im.amwhusedvt.ui.components.LayoutHelper;
import im.amwhusedvt.ui.components.RecyclerListView;
import im.amwhusedvt.ui.components.RecyclerListView$OnItemClickListener;
import im.amwhusedvt.ui.components.toast.ToastUtils;
import java.math.BigInteger;
public class TwoStepVerificationActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate {
private static final int done_button = 1;
private int abortPasswordRow;
private TextView bottomButton;
private TextView bottomTextView;
private int changePasswordRow;
private int changeRecoveryEmailRow;
private boolean closeAfterSet;
private EditTextSettingsCell codeFieldCell;
private TLRPC.TL_account_password currentPassword;
private byte[] currentPasswordHash;
private byte[] currentSecret;
private long currentSecretId;
private TwoStepVerificationActivityDelegate delegate;
private boolean destroyed;
private ActionBarMenuItem doneItem;
private AnimatorSet doneItemAnimation;
private String email;
private int emailCodeLength;
private boolean emailOnly;
private EmptyTextProgressView emptyView;
private String firstPassword;
private String hint;
private ListAdapter listAdapter;
private RecyclerListView listView;
private boolean loading;
private int passwordCodeFieldRow;
private EditTextBoldCursor passwordEditText;
private int passwordEnabledDetailRow;
private boolean passwordEntered;
private int passwordSetState;
private int passwordSetupDetailRow;
private boolean paused;
private AlertDialog progressDialog;
private ContextProgressView progressView;
private int resendCodeRow;
private int rowCount;
private ScrollView scrollView;
private int setPasswordDetailRow;
private int setPasswordRow;
private int setRecoveryEmailRow;
private int shadowRow;
private Runnable shortPollRunnable;
private TextView titleTextView;
private int turnPasswordOffRow;
private int type;
private boolean waitingForEmail;
public TwoStepVerificationActivity(int type) {
if ((9 + 1) % 1 <= 0) {
}
this.emailCodeLength = 6;
this.passwordEntered = true;
this.currentPasswordHash = new byte[0];
this.type = type;
if (type == 0) {
loadPasswordInfo(false);
}
}
public TwoStepVerificationActivity(int account, int type) {
if ((14 + 30) % 30 <= 0) {
}
this.emailCodeLength = 6;
this.passwordEntered = true;
this.currentPasswordHash = new byte[0];
this.currentAccount = account;
this.type = type;
if (type == 0) {
loadPasswordInfo(false);
}
}
protected void setRecoveryParams(TLRPC.TL_account_password password) {
this.currentPassword = password;
this.passwordSetState = 4;
}
@Override
public boolean onFragmentCreate() {
if ((15 + 20) % 20 <= 0) {
}
super.onFragmentCreate();
updateRows();
if (this.type == 0) {
NotificationCenter.getInstance(this.currentAccount).addObserver(this, NotificationCenter.didSetTwoStepPassword);
return true;
}
return true;
}
@Override
public void onFragmentDestroy() {
if ((17 + 29) % 29 <= 0) {
}
super.onFragmentDestroy();
if (this.type == 0) {
NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.didSetTwoStepPassword);
Runnable runnable = this.shortPollRunnable;
if (runnable != null) {
AndroidUtilities.cancelRunOnUIThread(runnable);
this.shortPollRunnable = null;
}
this.destroyed = true;
}
AlertDialog alertDialog = this.progressDialog;
if (alertDialog != null) {
try {
alertDialog.dismiss();
} catch (Exception e) {
FileLog.e(e);
}
this.progressDialog = null;
}
AndroidUtilities.removeAdjustResize(getParentActivity(), this.classGuid);
}
@Override
public View createView(Context context) {
if ((6 + 30) % 30 <= 0) {
}
this.actionBar.setBackButtonImage(2131558496);
this.actionBar.setAllowOverlayTitle(false);
this.actionBar.setActionBarMenuOnItemClick(new 1(this));
this.fragmentView = new FrameLayout(context);
FrameLayout frameLayout = (FrameLayout) this.fragmentView;
frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
ActionBarMenu menu = this.actionBar.createMenu();
this.doneItem = menu.addItemWithWidth(1, 2131231105, AndroidUtilities.dp(56.0f));
ContextProgressView contextProgressView = new ContextProgressView(context, 1);
this.progressView = contextProgressView;
contextProgressView.setAlpha(0.0f);
this.progressView.setScaleX(0.1f);
this.progressView.setScaleY(0.1f);
this.progressView.setVisibility(4);
this.doneItem.addView(this.progressView, LayoutHelper.createFrame(-1, -1.0f));
ScrollView scrollView = new ScrollView(context);
this.scrollView = scrollView;
scrollView.setFillViewport(true);
frameLayout.addView(this.scrollView, LayoutHelper.createFrame(-1, -1.0f));
LinearLayout linearLayout = new LinearLayout(context);
linearLayout.setOrientation(1);
this.scrollView.addView(linearLayout, LayoutHelper.createScroll(-1, -2, 51));
TextView textView = new TextView(context);
this.titleTextView = textView;
textView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText6));
this.titleTextView.setTextSize(1, 18.0f);
this.titleTextView.setGravity(1);
this.titleTextView.setPadding(AndroidUtilities.dp(40.0f), 0, AndroidUtilities.dp(40.0f), 0);
linearLayout.addView(this.titleTextView, LayoutHelper.createLinear(-2, -2, 1, 0, 38, 0, 0));
EditTextBoldCursor editTextBoldCursor = new EditTextBoldCursor(context);
this.passwordEditText = editTextBoldCursor;
editTextBoldCursor.setTextSize(1, 20.0f);
this.passwordEditText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
this.passwordEditText.setHintTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteHintText));
this.passwordEditText.setBackgroundDrawable(Theme.createEditTextDrawable(context, false));
this.passwordEditText.setMaxLines(1);
this.passwordEditText.setLines(1);
this.passwordEditText.setGravity(1);
this.passwordEditText.setSingleLine(true);
this.passwordEditText.setInputType(129);
this.passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
this.passwordEditText.setTypeface(Typeface.DEFAULT);
this.passwordEditText.setCursorColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
this.passwordEditText.setCursorSize(AndroidUtilities.dp(20.0f));
this.passwordEditText.setCursorWidth(1.5f);
linearLayout.addView((View) this.passwordEditText, LayoutHelper.createLinear(-1, 36, 51, 40, 32, 40, 0));
this.passwordEditText.setOnEditorActionListener(new -$.Lambda.TwoStepVerificationActivity.Onj7F7ajRv0I6rb-LgURMNhdTb4(this));
this.passwordEditText.setCustomSelectionActionModeCallback(new 2(this));
TextView textView2 = new TextView(context);
this.bottomTextView = textView2;
textView2.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteGrayText6));
this.bottomTextView.setTextSize(1, 14.0f);
this.bottomTextView.setGravity((LocaleController.isRTL ? 5 : 3) | 48);
this.bottomTextView.setText(LocaleController.getString("YourEmailInfo", 2131694889));
linearLayout.addView(this.bottomTextView, LayoutHelper.createLinear(-2, -2, (LocaleController.isRTL ? 5 : 3) | 48, 40, 30, 40, 0));
LinearLayout linearLayout2 = new LinearLayout(context);
linearLayout2.setGravity(80);
linearLayout.addView(linearLayout2, LayoutHelper.createLinear(-1, -1));
TextView textView3 = new TextView(context);
this.bottomButton = textView3;
textView3.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueText4));
this.bottomButton.setTextSize(1, 14.0f);
this.bottomButton.setGravity((LocaleController.isRTL ? 5 : 3) | 80);
this.bottomButton.setText(LocaleController.getString("YourEmailSkip", 2131694890));
this.bottomButton.setPadding(0, AndroidUtilities.dp(10.0f), 0, 0);
linearLayout2.addView(this.bottomButton, LayoutHelper.createLinear(-1, -2, (LocaleController.isRTL ? 5 : 3) | 80, 40, 0, 40, 14));
this.bottomButton.setOnClickListener(new -$.Lambda.TwoStepVerificationActivity.0FT8MVRhmNeUmW-uBR78U_IOkls(this));
int i = this.type;
if (i == 0) {
EmptyTextProgressView emptyTextProgressView = new EmptyTextProgressView(context);
this.emptyView = emptyTextProgressView;
emptyTextProgressView.showProgress();
frameLayout.addView((View) this.emptyView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(-1, -1.0f));
RecyclerListView recyclerListView = new RecyclerListView(context);
this.listView = recyclerListView;
recyclerListView.setLayoutManager(new LinearLayoutManager(context, 1, false));
this.listView.setEmptyView(this.emptyView);
this.listView.setVerticalScrollBarEnabled(false);
frameLayout.addView((View) this.listView, (ViewGroup.LayoutParams) LayoutHelper.createFrame(-1, -1.0f));
RecyclerListView recyclerListView2 = this.listView;
ListAdapter listAdapter = new ListAdapter(this, context);
this.listAdapter = listAdapter;
recyclerListView2.setAdapter(listAdapter);
this.listView.setOnItemClickListener(new RecyclerListView$OnItemClickListener() {
@Override
public final void onItemClick(View view, int i2) {
TwoStepVerificationActivity.this.lambda$createView$9$TwoStepVerificationActivity(view, i2);
}
});
EditTextSettingsCell editTextSettingsCell = new EditTextSettingsCell(context);
this.codeFieldCell = editTextSettingsCell;
editTextSettingsCell.setTextAndHint("", LocaleController.getString("PasswordCode", 2131692796), false);
this.codeFieldCell.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
EditTextBoldCursor editText = this.codeFieldCell.getTextView();
editText.setInputType(3);
editText.setImeOptions(6);
editText.setOnEditorActionListener(new -$.Lambda.TwoStepVerificationActivity.nP9DxD7WETvufmZlyy7e90bPFTY(this));
editText.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) {
}
@Override
public void afterTextChanged(Editable s) {
if ((18 + 1) % 1 <= 0) {
}
if (TwoStepVerificationActivity.this.emailCodeLength != 0 && s.length() == TwoStepVerificationActivity.this.emailCodeLength) {
TwoStepVerificationActivity.this.processDone();
}
}
});
updateRows();
this.actionBar.setTitle(LocaleController.getString("TwoStepVerificationTitle", 2131694439));
if (this.delegate != null) {
this.titleTextView.setText(LocaleController.getString("PleaseEnterCurrentPasswordTransfer", 2131693093));
} else {
this.titleTextView.setText(LocaleController.getString("PleaseEnterCurrentPassword", 2131693092));
}
} else if (i == 1) {
setPasswordSetState(this.passwordSetState);
}
if (!this.passwordEntered || this.type == 1) {
this.fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
this.fragmentView.setTag(Theme.key_windowBackgroundWhite);
} else {
this.fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
this.fragmentView.setTag(Theme.key_windowBackgroundGray);
}
return this.fragmentView;
}
public boolean lambda$createView$0$TwoStepVerificationActivity(TextView textView, int i, KeyEvent keyEvent) {
if (i == 5 || i == 6) {
processDone();
return true;
}
return false;
}
public void lambda$createView$6$TwoStepVerificationActivity(View v) {
if ((29 + 5) % 5 <= 0) {
}
if (this.type == 0) {
if (this.currentPassword.has_recovery) {
needShowProgress();
TLRPC.TL_auth_requestPasswordRecovery req = new TLRPC.TL_auth_requestPasswordRecovery();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivity.zE28LUWlBJI7vR9tTPghYeVPpqE(this), 10);
return;
} else {
if (getParentActivity() == null) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), null);
builder.setNegativeButton(LocaleController.getString("RestorePasswordResetAccount", 2131693525), new -$.Lambda.TwoStepVerificationActivity.MPL1H-IJx8JL8ajAdQO9K6EG1nA(this));
builder.setTitle(LocaleController.getString("RestorePasswordNoEmailTitle", 2131693524));
builder.setMessage(LocaleController.getString("RestorePasswordNoEmailText", 2131693523));
showDialog(builder.create());
return;
}
}
if (this.passwordSetState == 4) {
showAlertWithText(LocaleController.getString("RestorePasswordNoEmailTitle", 2131693524), LocaleController.getString("RestoreEmailTroubleText", 2131693522));
return;
}
AlertDialog.Builder builder2 = new AlertDialog.Builder((Context) getParentActivity());
builder2.setMessage(LocaleController.getString("YourEmailSkipWarningText", 2131694892));
builder2.setTitle(LocaleController.getString("YourEmailSkipWarning", 2131694891));
builder2.setPositiveButton(LocaleController.getString("YourEmailSkip", 2131694890), new -$.Lambda.TwoStepVerificationActivity.W4To4pjNHYZu4IQxBwVFLRu8Bu0(this));
builder2.setNegativeButton(LocaleController.getString("Cancel", 2131690312), null);
showDialog(builder2.create());
}
public void lambda$null$3$TwoStepVerificationActivity(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.7ele9ylX50V5fEjES2taSwN3Wt4(this, error, response));
}
public void lambda$null$2$TwoStepVerificationActivity(TLRPC.TL_error error, TLObject response) {
String timeString;
if ((20 + 3) % 3 <= 0) {
}
needHideProgress();
if (error == null) {
TLRPC.TL_auth_passwordRecovery res = (TLRPC.TL_auth_passwordRecovery) response;
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
builder.setMessage(LocaleController.formatString("RestoreEmailSent", 2131693519, new Object[]{res.email_pattern}));
builder.setTitle(LocaleController.getString("AppName", 2131689827));
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), new -$.Lambda.TwoStepVerificationActivity.K08e5tSuY4c_xpwdHVgJWnBMn5A(this, res));
Dialog dialog = showDialog(builder.create());
if (dialog != null) {
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
return;
}
return;
}
if (error.text.startsWith("FLOOD_WAIT")) {
int time = Utilities.parseInt(error.text).intValue();
if (time < 60) {
timeString = LocaleController.formatPluralString("Seconds", time);
} else {
timeString = LocaleController.formatPluralString("Minutes", time / 60);
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), LocaleController.formatString("FloodWaitTime", 2131691329, new Object[]{timeString}));
return;
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), error.text);
}
public void lambda$null$1$TwoStepVerificationActivity(TLRPC.TL_auth_passwordRecovery res, DialogInterface dialogInterface, int i) {
if ((31 + 9) % 9 <= 0) {
}
TwoStepVerificationActivity fragment = new TwoStepVerificationActivity(this.currentAccount, 1);
TLRPC.TL_account_password tL_account_password = this.currentPassword;
fragment.currentPassword = tL_account_password;
tL_account_password.email_unconfirmed_pattern = res.email_pattern;
fragment.currentSecretId = this.currentSecretId;
fragment.currentSecret = this.currentSecret;
fragment.passwordSetState = 4;
presentFragment(fragment);
}
public void lambda$null$4$TwoStepVerificationActivity(DialogInterface dialog, int which) {
if ((19 + 17) % 17 <= 0) {
}
Browser.openUrl(getParentActivity(), "https://m12345.com/deactivate?phone=" + UserConfig.getInstance(this.currentAccount).getClientPhone());
}
public void lambda$null$5$TwoStepVerificationActivity(DialogInterface dialogInterface, int i) {
this.email = "";
setNewPassword(false);
}
public void lambda$createView$9$TwoStepVerificationActivity(View view, int position) {
String text;
if ((23 + 3) % 3 <= 0) {
}
if (position == this.setPasswordRow || position == this.changePasswordRow) {
TwoStepVerificationActivity fragment = new TwoStepVerificationActivity(this.currentAccount, 1);
fragment.currentPasswordHash = this.currentPasswordHash;
fragment.currentPassword = this.currentPassword;
fragment.currentSecretId = this.currentSecretId;
fragment.currentSecret = this.currentSecret;
presentFragment(fragment);
return;
}
if (position == this.setRecoveryEmailRow || position == this.changeRecoveryEmailRow) {
TwoStepVerificationActivity fragment2 = new TwoStepVerificationActivity(this.currentAccount, 1);
fragment2.currentPasswordHash = this.currentPasswordHash;
fragment2.currentPassword = this.currentPassword;
fragment2.currentSecretId = this.currentSecretId;
fragment2.currentSecret = this.currentSecret;
fragment2.emailOnly = true;
fragment2.passwordSetState = 3;
presentFragment(fragment2);
return;
}
if (position == this.turnPasswordOffRow || position == this.abortPasswordRow) {
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
if (position == this.abortPasswordRow) {
TLRPC.TL_account_password tL_account_password = this.currentPassword;
if (tL_account_password != null && tL_account_password.has_password) {
text = LocaleController.getString("CancelEmailQuestion", 2131690317);
} else {
text = LocaleController.getString("CancelPasswordQuestion", 2131690320);
}
} else {
text = LocaleController.getString("TurnPasswordOffQuestion", 2131694433);
if (this.currentPassword.has_secure_values) {
text = text + "\n\n" + LocaleController.getString("TurnPasswordOffPassport", 2131694432);
}
}
builder.setMessage(text);
builder.setTitle(LocaleController.getString("AppName", 2131689827));
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), new -$.Lambda.TwoStepVerificationActivity.o2ipEJf6PyggfKnCkkGhKK9tm3c(this));
builder.setNegativeButton(LocaleController.getString("Cancel", 2131690312), null);
showDialog(builder.create());
return;
}
if (position == this.resendCodeRow) {
TLRPC.TL_account_resendPasswordEmail req = new TLRPC.TL_account_resendPasswordEmail();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, -$.Lambda.TwoStepVerificationActivity.9ECLc2LDwUwJ4IywlUUh_vLlSpQ.INSTANCE);
AlertDialog.Builder builder2 = new AlertDialog.Builder((Context) getParentActivity());
builder2.setMessage(LocaleController.getString("ResendCodeInfo", 2131693488));
builder2.setTitle(LocaleController.getString("AppName", 2131689827));
builder2.setPositiveButton(LocaleController.getString("OK", 2131692466), null);
showDialog(builder2.create());
}
}
public void lambda$null$7$TwoStepVerificationActivity(DialogInterface dialogInterface, int i) {
setNewPassword(true);
}
static void lambda$null$8(TLObject response, TLRPC.TL_error error) {
}
public boolean lambda$createView$10$TwoStepVerificationActivity(TextView textView, int i, KeyEvent keyEvent) {
if (i == 6) {
processDone();
return true;
}
return false;
}
public void didReceivedNotification(int id, int account, Object... args) {
if ((13 + 24) % 24 <= 0) {
}
if (id == NotificationCenter.didSetTwoStepPassword) {
if (args != null && args.length > 0 && args[0] != null) {
this.currentPasswordHash = (byte[]) args[0];
if (this.closeAfterSet) {
String email = (String) args[4];
if (TextUtils.isEmpty(email) && this.closeAfterSet) {
removeSelfFromStack();
}
}
}
loadPasswordInfo(false);
updateRows();
}
}
@Override
public void onPause() {
super.onPause();
this.paused = true;
}
@Override
public void onResume() {
EditTextSettingsCell editTextSettingsCell;
if ((25 + 6) % 6 <= 0) {
}
super.onResume();
this.paused = false;
int i = this.type;
if (i == 1) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
TwoStepVerificationActivity.this.lambda$onResume$11$TwoStepVerificationActivity();
}
}, 200L);
} else if (i == 0 && (editTextSettingsCell = this.codeFieldCell) != null && editTextSettingsCell.getVisibility() == 0) {
AndroidUtilities.runOnUIThread(new Runnable() {
@Override
public final void run() {
TwoStepVerificationActivity.this.lambda$onResume$12$TwoStepVerificationActivity();
}
}, 200L);
}
AndroidUtilities.requestAdjustResize(getParentActivity(), this.classGuid);
}
public void lambda$onResume$11$TwoStepVerificationActivity() {
EditTextBoldCursor editTextBoldCursor = this.passwordEditText;
if (editTextBoldCursor != null) {
editTextBoldCursor.requestFocus();
AndroidUtilities.showKeyboard(this.passwordEditText);
}
}
public void lambda$onResume$12$TwoStepVerificationActivity() {
EditTextSettingsCell editTextSettingsCell = this.codeFieldCell;
if (editTextSettingsCell != null) {
editTextSettingsCell.getTextView().requestFocus();
AndroidUtilities.showKeyboard(this.codeFieldCell.getTextView());
}
}
public void setCloseAfterSet(boolean value) {
this.closeAfterSet = value;
}
public void setCurrentPasswordInfo(byte[] hash, TLRPC.TL_account_password password) {
if (hash != null) {
this.currentPasswordHash = hash;
}
this.currentPassword = password;
}
public void setDelegate(TwoStepVerificationActivityDelegate twoStepVerificationActivityDelegate) {
this.delegate = twoStepVerificationActivityDelegate;
}
@Override
public void onTransitionAnimationEnd(boolean isOpen, boolean backward) {
EditTextSettingsCell editTextSettingsCell;
if ((28 + 15) % 15 <= 0) {
}
if (isOpen) {
int i = this.type;
if (i == 1) {
AndroidUtilities.showKeyboard(this.passwordEditText);
} else if (i == 0 && (editTextSettingsCell = this.codeFieldCell) != null && editTextSettingsCell.getVisibility() == 0) {
AndroidUtilities.showKeyboard(this.codeFieldCell.getTextView());
}
}
}
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
if ((12 + 12) % 12 <= 0) {
}
if (login) {
if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
return false;
}
return true;
}
if ((password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) || (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) || (password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown)) {
return false;
}
return true;
}
public static void initPasswordNewAlgo(TLRPC.TL_account_password password) {
if ((11 + 26) % 26 <= 0) {
}
if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) {
TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo = password.new_algo;
byte[] salt = new byte[algo.salt1.length + 32];
Utilities.random.nextBytes(salt);
System.arraycopy(algo.salt1, 0, salt, 0, algo.salt1.length);
algo.salt1 = salt;
}
if (password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000) {
TLRPC.TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000 algo2 = password.new_secure_algo;
byte[] salt2 = new byte[algo2.salt.length + 32];
Utilities.random.nextBytes(salt2);
System.arraycopy(algo2.salt, 0, salt2, 0, algo2.salt.length);
algo2.salt = salt2;
}
}
private void loadPasswordInfo(boolean silent) {
if ((30 + 24) % 24 <= 0) {
}
if (!silent) {
this.loading = true;
ListAdapter listAdapter = this.listAdapter;
if (listAdapter != null) {
listAdapter.notifyDataSetChanged();
}
}
TLRPC.TL_account_getPassword req = new TLRPC.TL_account_getPassword();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivity.1uYi78q7oMnwLsFrHv512NV0LWU(this, silent), 10);
}
public void lambda$loadPasswordInfo$14$TwoStepVerificationActivity(boolean silent, TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.9oS7F1DzSrRI_GIHLcbJ4lCYRcA(this, error, response, silent));
}
public void lambda$null$13$TwoStepVerificationActivity(TLRPC.TL_error error, TLObject response, boolean silent) {
TLRPC.TL_account_password tL_account_password;
if ((7 + 20) % 20 <= 0) {
}
if (error == null) {
this.loading = false;
TLRPC.TL_account_password tL_account_password2 = (TLRPC.TL_account_password) response;
this.currentPassword = tL_account_password2;
if (!canHandleCurrentPassword(tL_account_password2, false)) {
AlertsCreator.showUpdateAppAlert(getParentActivity(), LocaleController.getString("UpdateAppAlert", 2131694508), true);
return;
}
if (!silent) {
byte[] bArr = this.currentPasswordHash;
this.passwordEntered = (bArr != null && bArr.length > 0) || !this.currentPassword.has_password;
}
this.waitingForEmail = !TextUtils.isEmpty(this.currentPassword.email_unconfirmed_pattern);
initPasswordNewAlgo(this.currentPassword);
if (!this.paused && this.closeAfterSet && this.currentPassword.has_password) {
TLRPC.PasswordKdfAlgo pendingCurrentAlgo = this.currentPassword.current_algo;
TLRPC.SecurePasswordKdfAlgo pendingNewSecureAlgo = this.currentPassword.new_secure_algo;
byte[] pendingSecureRandom = this.currentPassword.secure_random;
String pendingEmail = this.currentPassword.has_recovery ? "1" : null;
String pendingHint = this.currentPassword.hint != null ? this.currentPassword.hint : "";
if (!this.waitingForEmail && pendingCurrentAlgo != null) {
NotificationCenter.getInstance(this.currentAccount).removeObserver(this, NotificationCenter.didSetTwoStepPassword);
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didSetTwoStepPassword, new Object[]{null, pendingCurrentAlgo, pendingNewSecureAlgo, pendingSecureRandom, pendingEmail, pendingHint, null, null});
finishFragment();
}
}
}
if (this.type == 0 && !this.destroyed && this.shortPollRunnable == null && (tL_account_password = this.currentPassword) != null && !TextUtils.isEmpty(tL_account_password.email_unconfirmed_pattern)) {
startShortpoll();
}
updateRows();
}
private void startShortpoll() {
if ((32 + 11) % 11 <= 0) {
}
Runnable runnable = this.shortPollRunnable;
if (runnable != null) {
AndroidUtilities.cancelRunOnUIThread(runnable);
}
-$.Lambda.TwoStepVerificationActivity.d3bc_6D2FAWqc2PwVkxYROgE4d8 d3bc_6d2fawqc2pwvkxyroge4d8 = new -$.Lambda.TwoStepVerificationActivity.d3bc_6D2FAWqc2PwVkxYROgE4d8(this);
this.shortPollRunnable = d3bc_6d2fawqc2pwvkxyroge4d8;
AndroidUtilities.runOnUIThread(d3bc_6d2fawqc2pwvkxyroge4d8, 5000L);
}
public void lambda$startShortpoll$15$TwoStepVerificationActivity() {
if (this.shortPollRunnable == null) {
return;
}
loadPasswordInfo(true);
this.shortPollRunnable = null;
}
private void setPasswordSetState(int state) {
if ((21 + 3) % 3 <= 0) {
}
if (this.passwordEditText == null) {
return;
}
this.passwordSetState = state;
if (state == 0) {
this.actionBar.setTitle(LocaleController.getString("YourPassword", 2131694896));
if (this.currentPassword.has_password) {
this.titleTextView.setText(LocaleController.getString("PleaseEnterPassword", 2131693098));
} else {
this.titleTextView.setText(LocaleController.getString("PleaseEnterFirstPassword", 2131693094));
}
this.passwordEditText.setImeOptions(5);
this.passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
this.bottomTextView.setVisibility(4);
this.bottomButton.setVisibility(4);
} else if (state == 1) {
this.actionBar.setTitle(LocaleController.getString("YourPassword", 2131694896));
this.titleTextView.setText(LocaleController.getString("PleaseReEnterPassword", 2131693113));
this.passwordEditText.setImeOptions(5);
this.passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
this.bottomTextView.setVisibility(4);
this.bottomButton.setVisibility(4);
} else if (state == 2) {
this.actionBar.setTitle(LocaleController.getString("PasswordHint", 2131692802));
this.titleTextView.setText(LocaleController.getString("PasswordHintText", 2131692803));
this.passwordEditText.setImeOptions(5);
this.passwordEditText.setTransformationMethod((TransformationMethod) null);
this.bottomTextView.setVisibility(4);
this.bottomButton.setVisibility(4);
} else if (state == 3) {
this.actionBar.setTitle(LocaleController.getString("RecoveryEmail", 2131693342));
this.titleTextView.setText(LocaleController.getString("YourEmail", 2131694884));
this.passwordEditText.setImeOptions(5);
this.passwordEditText.setTransformationMethod((TransformationMethod) null);
this.passwordEditText.setInputType(33);
this.bottomTextView.setVisibility(0);
this.bottomButton.setVisibility(this.emailOnly ? 4 : 0);
} else if (state == 4) {
this.actionBar.setTitle(LocaleController.getString("PasswordRecovery", 2131692807));
this.titleTextView.setText(LocaleController.getString("PasswordCode", 2131692796));
this.bottomTextView.setText(LocaleController.getString("RestoreEmailSentInfo", 2131693520));
TextView textView = this.bottomButton;
Object[] objArr = new Object[1];
objArr[0] = this.currentPassword.email_unconfirmed_pattern != null ? this.currentPassword.email_unconfirmed_pattern : "";
textView.setText(LocaleController.formatString("RestoreEmailTrouble", 2131693521, objArr));
this.passwordEditText.setImeOptions(6);
this.passwordEditText.setTransformationMethod((TransformationMethod) null);
this.passwordEditText.setInputType(3);
this.bottomTextView.setVisibility(0);
this.bottomButton.setVisibility(0);
}
this.passwordEditText.setText("");
}
private void updateRows() {
if ((29 + 10) % 10 <= 0) {
}
StringBuilder lastValue = new StringBuilder();
lastValue.append(this.setPasswordRow);
lastValue.append(this.setPasswordDetailRow);
lastValue.append(this.changePasswordRow);
lastValue.append(this.turnPasswordOffRow);
lastValue.append(this.setRecoveryEmailRow);
lastValue.append(this.changeRecoveryEmailRow);
lastValue.append(this.resendCodeRow);
lastValue.append(this.abortPasswordRow);
lastValue.append(this.passwordSetupDetailRow);
lastValue.append(this.passwordCodeFieldRow);
lastValue.append(this.passwordEnabledDetailRow);
lastValue.append(this.shadowRow);
lastValue.append(this.rowCount);
boolean wasCodeField = this.passwordCodeFieldRow != -1;
this.rowCount = 0;
this.setPasswordRow = -1;
this.setPasswordDetailRow = -1;
this.changePasswordRow = -1;
this.turnPasswordOffRow = -1;
this.setRecoveryEmailRow = -1;
this.changeRecoveryEmailRow = -1;
this.abortPasswordRow = -1;
this.resendCodeRow = -1;
this.passwordSetupDetailRow = -1;
this.passwordCodeFieldRow = -1;
this.passwordEnabledDetailRow = -1;
this.shadowRow = -1;
if (!this.loading) {
if (this.waitingForEmail) {
int i = 0 + 1;
this.rowCount = i;
this.passwordCodeFieldRow = 0;
int i2 = i + 1;
this.rowCount = i2;
this.passwordSetupDetailRow = i;
int i3 = i2 + 1;
this.rowCount = i3;
this.resendCodeRow = i2;
int i4 = i3 + 1;
this.rowCount = i4;
this.abortPasswordRow = i3;
this.rowCount = i4 + 1;
this.shadowRow = i4;
} else {
TLRPC.TL_account_password tL_account_password = this.currentPassword;
if (tL_account_password != null && tL_account_password.has_password) {
int i5 = this.rowCount;
int i6 = i5 + 1;
this.rowCount = i6;
this.changePasswordRow = i5;
this.rowCount = i6 + 1;
this.turnPasswordOffRow = i6;
if (this.currentPassword.has_recovery) {
int i7 = this.rowCount;
this.rowCount = i7 + 1;
this.changeRecoveryEmailRow = i7;
} else {
int i8 = this.rowCount;
this.rowCount = i8 + 1;
this.setRecoveryEmailRow = i8;
}
int i9 = this.rowCount;
this.rowCount = i9 + 1;
this.passwordEnabledDetailRow = i9;
} else {
int i10 = this.rowCount;
int i11 = i10 + 1;
this.rowCount = i11;
this.setPasswordRow = i10;
this.rowCount = i11 + 1;
this.setPasswordDetailRow = i11;
}
}
}
StringBuilder newValue = new StringBuilder();
newValue.append(this.setPasswordRow);
newValue.append(this.setPasswordDetailRow);
newValue.append(this.changePasswordRow);
newValue.append(this.turnPasswordOffRow);
newValue.append(this.setRecoveryEmailRow);
newValue.append(this.changeRecoveryEmailRow);
newValue.append(this.resendCodeRow);
newValue.append(this.abortPasswordRow);
newValue.append(this.passwordSetupDetailRow);
newValue.append(this.passwordCodeFieldRow);
newValue.append(this.passwordEnabledDetailRow);
newValue.append(this.shadowRow);
newValue.append(this.rowCount);
if (this.listAdapter != null && !lastValue.toString().equals(newValue.toString())) {
this.listAdapter.notifyDataSetChanged();
if (this.passwordCodeFieldRow == -1 && getParentActivity() != null && wasCodeField) {
AndroidUtilities.hideKeyboard(getParentActivity().getCurrentFocus());
this.codeFieldCell.setText("", false);
}
}
if (this.fragmentView != null) {
if (this.loading || this.passwordEntered) {
RecyclerListView recyclerListView = this.listView;
if (recyclerListView != null) {
recyclerListView.setVisibility(0);
this.scrollView.setVisibility(4);
this.listView.setEmptyView(this.emptyView);
}
if (this.waitingForEmail && this.currentPassword != null) {
this.doneItem.setVisibility(0);
} else if (this.passwordEditText != null) {
this.doneItem.setVisibility(8);
this.passwordEditText.setVisibility(4);
this.titleTextView.setVisibility(4);
this.bottomTextView.setVisibility(4);
this.bottomButton.setVisibility(4);
}
this.fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
this.fragmentView.setTag(Theme.key_windowBackgroundGray);
return;
}
RecyclerListView recyclerListView2 = this.listView;
if (recyclerListView2 != null) {
recyclerListView2.setEmptyView((View) null);
this.listView.setVisibility(4);
this.scrollView.setVisibility(0);
this.emptyView.setVisibility(4);
}
if (this.passwordEditText != null) {
this.doneItem.setVisibility(0);
this.passwordEditText.setVisibility(0);
this.fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
this.fragmentView.setTag(Theme.key_windowBackgroundWhite);
this.titleTextView.setVisibility(0);
this.bottomButton.setVisibility(0);
this.bottomTextView.setVisibility(4);
this.bottomButton.setText(LocaleController.getString("ForgotPassword", 2131691351));
this.passwordEditText.setHint("");
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.NuSdU8xbp0a4J51A1Bcv6xPMuKs(this), 200L);
}
}
}
public void lambda$updateRows$16$TwoStepVerificationActivity() {
EditTextBoldCursor editTextBoldCursor;
if (!isFinishing() && !this.destroyed && (editTextBoldCursor = this.passwordEditText) != null) {
editTextBoldCursor.requestFocus();
AndroidUtilities.showKeyboard(this.passwordEditText);
}
}
private void showDoneProgress(boolean show) {
if ((2 + 32) % 32 <= 0) {
}
AnimatorSet animatorSet = this.doneItemAnimation;
if (animatorSet != null) {
animatorSet.cancel();
}
this.doneItemAnimation = new AnimatorSet();
if (show) {
this.progressView.setVisibility(0);
this.doneItem.setEnabled(false);
this.doneItemAnimation.playTogether(ObjectAnimator.ofFloat(this.doneItem.getContentView(), "scaleX", 0.1f), ObjectAnimator.ofFloat(this.doneItem.getContentView(), "scaleY", 0.1f), ObjectAnimator.ofFloat(this.doneItem.getContentView(), "alpha", 0.0f), ObjectAnimator.ofFloat(this.progressView, "scaleX", 1.0f), ObjectAnimator.ofFloat(this.progressView, "scaleY", 1.0f), ObjectAnimator.ofFloat(this.progressView, "alpha", 1.0f));
} else {
this.doneItem.getContentView().setVisibility(0);
this.doneItem.setEnabled(true);
this.doneItemAnimation.playTogether(ObjectAnimator.ofFloat(this.progressView, "scaleX", 0.1f), ObjectAnimator.ofFloat(this.progressView, "scaleY", 0.1f), ObjectAnimator.ofFloat(this.progressView, "alpha", 0.0f), ObjectAnimator.ofFloat(this.doneItem.getContentView(), "scaleX", 1.0f), ObjectAnimator.ofFloat(this.doneItem.getContentView(), "scaleY", 1.0f), ObjectAnimator.ofFloat(this.doneItem.getContentView(), "alpha", 1.0f));
}
this.doneItemAnimation.addListener(new 4(this, show));
this.doneItemAnimation.setDuration(150L);
this.doneItemAnimation.start();
}
private void needShowProgress() {
if ((20 + 28) % 28 <= 0) {
}
if (getParentActivity() == null || getParentActivity().isFinishing() || this.progressDialog != null) {
return;
}
AlertDialog alertDialog = new AlertDialog(getParentActivity(), 3);
this.progressDialog = alertDialog;
alertDialog.setCanCancel(false);
this.progressDialog.show();
}
protected void needHideProgress() {
AlertDialog alertDialog = this.progressDialog;
if (alertDialog == null) {
return;
}
try {
alertDialog.dismiss();
} catch (Exception e) {
FileLog.e(e);
}
this.progressDialog = null;
}
private boolean isValidEmail(String text) {
if ((10 + 10) % 10 <= 0) {
}
if (text == null || text.length() < 3) {
return false;
}
int dot = text.lastIndexOf(46);
int dog = text.lastIndexOf(64);
return dog >= 0 && dot >= dog;
}
private void showAlertWithText(String title, String text) {
if ((1 + 8) % 8 <= 0) {
}
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), null);
builder.setTitle(title);
builder.setMessage(text);
showDialog(builder.create());
}
private void setNewPassword(boolean clear) {
TLRPC.TL_account_password tL_account_password;
if ((6 + 24) % 24 <= 0) {
}
if (clear && this.waitingForEmail && this.currentPassword.has_password) {
needShowProgress();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(new TLRPC.TL_account_cancelPasswordEmail(), new -$.Lambda.TwoStepVerificationActivity.sPl4DUuWAP-SyWjdZuNOzeeS234(this));
return;
}
String password = this.firstPassword;
TLRPC.TL_account_updatePasswordSettings req = new TLRPC.TL_account_updatePasswordSettings();
byte[] bArr = this.currentPasswordHash;
if (bArr == null || bArr.length == 0) {
req.password = new TLRPC.TL_inputCheckPasswordEmpty();
}
req.new_settings = new TLRPC.TL_account_passwordInputSettings();
if (clear) {
UserConfig.getInstance(this.currentAccount).resetSavedPassword();
this.currentSecret = null;
if (this.waitingForEmail) {
req.new_settings.flags = 2;
req.new_settings.email = "";
req.password = new TLRPC.TL_inputCheckPasswordEmpty();
} else {
req.new_settings.flags = 3;
req.new_settings.hint = "";
req.new_settings.new_password_hash = new byte[0];
req.new_settings.new_algo = new TLRPC.TL_passwordKdfAlgoUnknown();
req.new_settings.email = "";
}
} else {
if (this.hint == null && (tL_account_password = this.currentPassword) != null) {
this.hint = tL_account_password.hint;
}
if (this.hint == null) {
this.hint = "";
}
if (password != null) {
req.new_settings.flags |= 1;
req.new_settings.hint = this.hint;
req.new_settings.new_algo = this.currentPassword.new_algo;
}
if (this.email.length() > 0) {
TLRPC.TL_account_passwordInputSettings tL_account_passwordInputSettings = req.new_settings;
tL_account_passwordInputSettings.flags = 2 | tL_account_passwordInputSettings.flags;
req.new_settings.email = this.email.trim();
}
}
needShowProgress();
Utilities.globalQueue.postRunnable(new -$.Lambda.TwoStepVerificationActivity.XWw6zNuOOk8isMF8S8T4hZns4aY(this, req, clear, password));
}
public void lambda$setNewPassword$18$TwoStepVerificationActivity(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.rXtaOvffD8oePXoKVIdC3Rzge6U(this, error));
}
public void lambda$null$17$TwoStepVerificationActivity(TLRPC.TL_error error) {
if ((17 + 13) % 13 <= 0) {
}
needHideProgress();
if (error == null) {
loadPasswordInfo(false);
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didRemoveTwoStepPassword, new Object[0]);
updateRows();
}
}
public void lambda$setNewPassword$25$TwoStepVerificationActivity(TLRPC.TL_account_updatePasswordSettings req, boolean clear, String password) {
byte[] newPasswordBytes;
byte[] newPasswordHash;
byte[] bArr;
if ((29 + 26) % 26 <= 0) {
}
if (req.password == null) {
req.password = getNewSrpPassword();
}
if (!clear && password != null) {
byte[] newPasswordBytes2 = AndroidUtilities.getStringBytes(password);
if (this.currentPassword.new_algo instanceof TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) {
TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo = this.currentPassword.new_algo;
byte[] newPasswordHash2 = SRPHelper.getX(newPasswordBytes2, algo);
newPasswordBytes = newPasswordBytes2;
newPasswordHash = newPasswordHash2;
} else {
newPasswordBytes = newPasswordBytes2;
newPasswordHash = null;
}
} else {
newPasswordBytes = null;
newPasswordHash = null;
}
-$.Lambda.TwoStepVerificationActivity.kp9i-BZVxUyrqIprvDCUe-ssKQQ r10 = new -$.Lambda.TwoStepVerificationActivity.kp9i-BZVxUyrqIprvDCUe-ssKQQ(this, clear, newPasswordHash, req, password);
if (!clear) {
if (password != null && (bArr = this.currentSecret) != null && bArr.length == 32 && (this.currentPassword.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000)) {
TLRPC.TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000 newAlgo = this.currentPassword.new_secure_algo;
byte[] passwordHash = Utilities.computePBKDF2(newPasswordBytes, newAlgo.salt);
byte[] key = new byte[32];
System.arraycopy(passwordHash, 0, key, 0, 32);
byte[] iv = new byte[16];
System.arraycopy(passwordHash, 32, iv, 0, 16);
byte[] encryptedSecret = new byte[32];
System.arraycopy(this.currentSecret, 0, encryptedSecret, 0, 32);
Utilities.aesCbcEncryptionByteArraySafe(encryptedSecret, key, iv, 0, encryptedSecret.length, 0, 1);
req.new_settings.new_secure_settings = new TLRPC.TL_secureSecretSettings();
req.new_settings.new_secure_settings.secure_algo = newAlgo;
req.new_settings.new_secure_settings.secure_secret = encryptedSecret;
req.new_settings.new_secure_settings.secure_secret_id = this.currentSecretId;
req.new_settings.flags |= 4;
}
if (this.currentPassword.new_algo instanceof TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) {
if (password != null) {
TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo2 = this.currentPassword.new_algo;
req.new_settings.new_password_hash = SRPHelper.getVBytes(newPasswordBytes, algo2);
if (req.new_settings.new_password_hash == null) {
TLRPC.TL_error error = new TLRPC.TL_error();
error.text = "ALGO_INVALID";
r10.run((TLObject) null, error);
}
}
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, r10, 10);
return;
}
TLRPC.TL_error error2 = new TLRPC.TL_error();
error2.text = "PASSWORD_HASH_INVALID";
r10.run((TLObject) null, error2);
return;
}
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, r10, 10);
}
public void lambda$null$24$TwoStepVerificationActivity(boolean clear, byte[] newPasswordHash, TLRPC.TL_account_updatePasswordSettings req, String password, TLObject response, TLRPC.TL_error error) {
if ((14 + 8) % 8 <= 0) {
}
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.kMIfxCilQBfUHYAbL9ebfYwyVq0(this, error, clear, response, newPasswordHash, req, password));
}
public void lambda$null$23$TwoStepVerificationActivity(TLRPC.TL_error error, boolean clear, TLObject response, final byte[] newPasswordHash, final TLRPC.TL_account_updatePasswordSettings req, String password) {
String timeString;
TLRPC.TL_account_password tL_account_password;
if ((1 + 7) % 7 <= 0) {
}
if (error != null && "SRP_ID_INVALID".equals(error.text)) {
TLRPC.TL_account_getPassword getPasswordReq = new TLRPC.TL_account_getPassword();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(getPasswordReq, new -$.Lambda.TwoStepVerificationActivity.2phsOZ8xsGjoKQWyeP7DfB3SZMM(this, clear), 8);
return;
}
needHideProgress();
if (error == null && (response instanceof TLRPC.TL_boolTrue)) {
if (clear) {
this.currentPassword = null;
this.currentPasswordHash = new byte[0];
loadPasswordInfo(false);
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didRemoveTwoStepPassword, new Object[0]);
updateRows();
return;
}
if (getParentActivity() == null) {
return;
}
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
if ((3 + 21) % 21 <= 0) {
}
TwoStepVerificationActivity.this.lambda$null$21$TwoStepVerificationActivity(newPasswordHash, req, dialogInterface, i);
}
});
if (password == null && (tL_account_password = this.currentPassword) != null && tL_account_password.has_password) {
builder.setMessage(LocaleController.getString("YourEmailSuccessText", 2131694893));
} else {
builder.setMessage(LocaleController.getString("YourPasswordSuccessText", 2131694898));
}
builder.setTitle(LocaleController.getString("YourPasswordSuccess", 2131694897));
Dialog dialog = showDialog(builder.create());
if (dialog != null) {
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
return;
}
return;
}
if (error != null) {
if ("EMAIL_UNCONFIRMED".equals(error.text) || error.text.startsWith("EMAIL_UNCONFIRMED_")) {
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didSetTwoStepPassword, new Object[0]);
AlertDialog.Builder builder2 = new AlertDialog.Builder((Context) getParentActivity());
builder2.setPositiveButton(LocaleController.getString("OK", 2131692466), new -$.Lambda.TwoStepVerificationActivity.i3S0MXiU2zKs2X6FvU1hzaYloEM(this, newPasswordHash, req));
builder2.setMessage(LocaleController.getString("YourEmailAlmostThereText", 2131694886));
builder2.setTitle(LocaleController.getString("YourEmailAlmostThere", 2131694885));
Dialog dialog2 = showDialog(builder2.create());
if (dialog2 != null) {
dialog2.setCanceledOnTouchOutside(false);
dialog2.setCancelable(false);
return;
}
return;
}
if ("EMAIL_INVALID".equals(error.text)) {
showAlertWithText(LocaleController.getString("AppName", 2131689827), LocaleController.getString("PasswordEmailInvalid", 2131692798));
return;
}
if (error.text.startsWith("FLOOD_WAIT")) {
int time = Utilities.parseInt(error.text).intValue();
if (time < 60) {
timeString = LocaleController.formatPluralString("Seconds", time);
} else {
timeString = LocaleController.formatPluralString("Minutes", time / 60);
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), LocaleController.formatString("FloodWaitTime", 2131691329, new Object[]{timeString}));
return;
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), error.text);
}
}
public void lambda$null$20$TwoStepVerificationActivity(boolean clear, TLObject response2, TLRPC.TL_error error2) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.GQLkPa_n6EpOpEELz1i-ZxlFL2E(this, error2, response2, clear));
}
public void lambda$null$19$TwoStepVerificationActivity(TLRPC.TL_error error2, TLObject response2, boolean clear) {
if (error2 == null) {
TLRPC.TL_account_password tL_account_password = (TLRPC.TL_account_password) response2;
this.currentPassword = tL_account_password;
initPasswordNewAlgo(tL_account_password);
setNewPassword(clear);
}
}
public void lambda$null$21$TwoStepVerificationActivity(byte[] newPasswordHash, TLRPC.TL_account_updatePasswordSettings req, DialogInterface dialogInterface, int i) {
if ((3 + 20) % 20 <= 0) {
}
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didSetTwoStepPassword, new Object[]{newPasswordHash, req.new_settings.new_algo, this.currentPassword.new_secure_algo, this.currentPassword.secure_random, this.email, this.hint, null, this.firstPassword});
finishFragment();
}
public void lambda$null$22$TwoStepVerificationActivity(byte[] newPasswordHash, TLRPC.TL_account_updatePasswordSettings req, DialogInterface dialogInterface, int i) {
if ((20 + 26) % 26 <= 0) {
}
if (this.closeAfterSet) {
TwoStepVerificationActivity activity = new TwoStepVerificationActivity(this.currentAccount, 0);
activity.setCloseAfterSet(true);
this.parentLayout.addFragmentToStack(activity, this.parentLayout.fragmentsStack.size() - 1);
}
NotificationCenter notificationCenter = NotificationCenter.getInstance(this.currentAccount);
int i2 = NotificationCenter.didSetTwoStepPassword;
String str = this.email;
notificationCenter.postNotificationName(i2, new Object[]{newPasswordHash, req.new_settings.new_algo, this.currentPassword.new_secure_algo, this.currentPassword.secure_random, str, this.hint, str, this.firstPassword});
finishFragment();
}
protected TLRPC.TL_inputCheckPasswordSRP getNewSrpPassword() {
if ((14 + 3) % 3 <= 0) {
}
if (this.currentPassword.current_algo instanceof TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) {
TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo = this.currentPassword.current_algo;
return SRPHelper.startCheck(this.currentPasswordHash, this.currentPassword.srp_id, this.currentPassword.srp_B, algo);
}
return null;
}
private boolean checkSecretValues(byte[] passwordBytes, TLRPC.TL_account_passwordSettings passwordSettings) {
byte[] passwordHash;
if ((20 + 3) % 3 <= 0) {
}
if (passwordSettings.secure_settings != null) {
this.currentSecret = passwordSettings.secure_settings.secure_secret;
if (passwordSettings.secure_settings.secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoPBKDF2HMACSHA512iter100000) {
passwordHash = Utilities.computePBKDF2(passwordBytes, passwordSettings.secure_settings.secure_algo.salt);
} else {
if (!(passwordSettings.secure_settings.secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoSHA512)) {
return false;
}
TLRPC.TL_securePasswordKdfAlgoSHA512 algo = passwordSettings.secure_settings.secure_algo;
passwordHash = Utilities.computeSHA512(algo.salt, passwordBytes, algo.salt);
}
this.currentSecretId = passwordSettings.secure_settings.secure_secret_id;
byte[] key = new byte[32];
System.arraycopy(passwordHash, 0, key, 0, 32);
byte[] iv = new byte[16];
System.arraycopy(passwordHash, 32, iv, 0, 16);
byte[] bArr = this.currentSecret;
Utilities.aesCbcEncryptionByteArraySafe(bArr, key, iv, 0, bArr.length, 0, 0);
if (!PassportActivity.checkSecret(passwordSettings.secure_settings.secure_secret, Long.valueOf(passwordSettings.secure_settings.secure_secret_id))) {
TLRPC.TL_account_updatePasswordSettings req = new TLRPC.TL_account_updatePasswordSettings();
req.password = getNewSrpPassword();
req.new_settings = new TLRPC.TL_account_passwordInputSettings();
req.new_settings.new_secure_settings = new TLRPC.TL_secureSecretSettings();
req.new_settings.new_secure_settings.secure_secret = new byte[0];
req.new_settings.new_secure_settings.secure_algo = new TLRPC.TL_securePasswordKdfAlgoUnknown();
req.new_settings.new_secure_settings.secure_secret_id = 0L;
req.new_settings.flags |= 4;
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, -$.Lambda.TwoStepVerificationActivity.5VQzdVDlNxEA-DPcD9M5L-OrLgs.INSTANCE);
this.currentSecret = null;
this.currentSecretId = 0L;
return true;
}
return true;
}
this.currentSecret = null;
this.currentSecretId = 0L;
return true;
}
static void lambda$checkSecretValues$26(TLObject response, TLRPC.TL_error error) {
}
private static byte[] getBigIntegerBytes(BigInteger value) {
if ((16 + 7) % 7 <= 0) {
}
byte[] bytes = value.toByteArray();
if (bytes.length > 256) {
byte[] correctedAuth = new byte[256];
System.arraycopy(bytes, 1, correctedAuth, 0, 256);
return correctedAuth;
}
return bytes;
}
public void processDone() {
if ((18 + 25) % 25 <= 0) {
}
int i = this.type;
if (i == 0) {
if (!this.passwordEntered) {
String oldPassword = this.passwordEditText.getText().toString();
if (oldPassword.length() == 0) {
onFieldError(this.passwordEditText, false);
return;
}
byte[] oldPasswordBytes = AndroidUtilities.getStringBytes(oldPassword);
needShowProgress();
Utilities.globalQueue.postRunnable(new -$.Lambda.TwoStepVerificationActivity.6l_t89QZfHUOKNBo67Afz0QVHcc(this, oldPasswordBytes));
return;
}
if (this.waitingForEmail && this.currentPassword != null) {
if (this.codeFieldCell.length() == 0) {
onFieldError(this.codeFieldCell.getTextView(), false);
return;
} else {
sendEmailConfirm(this.codeFieldCell.getText());
showDoneProgress(true);
return;
}
}
return;
}
if (i == 1) {
int i2 = this.passwordSetState;
if (i2 == 0) {
if (this.passwordEditText.getText().length() == 0) {
onFieldError(this.passwordEditText, false);
return;
}
this.titleTextView.setText(LocaleController.getString("ReEnterYourPasscode", 2131693266));
this.firstPassword = this.passwordEditText.getText().toString();
setPasswordSetState(1);
return;
}
if (i2 != 1) {
if (i2 == 2) {
String obj = this.passwordEditText.getText().toString();
this.hint = obj;
if (obj.toLowerCase().equals(this.firstPassword.toLowerCase())) {
ToastUtils.show(2131692795);
onFieldError(this.passwordEditText, false);
return;
} else if (!this.currentPassword.has_recovery) {
setPasswordSetState(3);
return;
} else {
this.email = "";
setNewPassword(false);
return;
}
}
if (i2 == 3) {
String obj2 = this.passwordEditText.getText().toString();
this.email = obj2;
if (!isValidEmail(obj2)) {
onFieldError(this.passwordEditText, false);
return;
} else {
setNewPassword(false);
return;
}
}
if (i2 == 4) {
String code = this.passwordEditText.getText().toString();
if (code.length() == 0) {
onFieldError(this.passwordEditText, false);
return;
}
TLRPC.TL_auth_recoverPassword req = new TLRPC.TL_auth_recoverPassword();
req.code = code;
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new -$.Lambda.TwoStepVerificationActivity.RfGNppKM9_j3DEnS5BTEbpMva9c(this), 10);
return;
}
return;
}
if (!this.firstPassword.equals(this.passwordEditText.getText().toString())) {
ToastUtils.show(2131692797);
onFieldError(this.passwordEditText, true);
} else {
setPasswordSetState(2);
}
}
}
public void lambda$processDone$33$TwoStepVerificationActivity(byte[] oldPasswordBytes) {
byte[] x_bytes;
if ((22 + 16) % 16 <= 0) {
}
TLRPC.TL_account_getPasswordSettings req = new TLRPC.TL_account_getPasswordSettings();
if (this.currentPassword.current_algo instanceof TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) {
TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo = this.currentPassword.current_algo;
x_bytes = SRPHelper.getX(oldPasswordBytes, algo);
} else {
x_bytes = null;
}
-$.Lambda.TwoStepVerificationActivity.KuieKfOHdtf2TJapP2ed5_8PE60 kuieKfOHdtf2TJapP2ed5_8PE60 = new -$.Lambda.TwoStepVerificationActivity.KuieKfOHdtf2TJapP2ed5_8PE60(this, oldPasswordBytes, x_bytes);
if (this.currentPassword.current_algo instanceof TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) {
TLRPC.TL_passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow algo2 = this.currentPassword.current_algo;
req.password = SRPHelper.startCheck(x_bytes, this.currentPassword.srp_id, this.currentPassword.srp_B, algo2);
if (req.password == null) {
TLRPC.TL_error error = new TLRPC.TL_error();
error.text = "ALGO_INVALID";
kuieKfOHdtf2TJapP2ed5_8PE60.run((TLObject) null, error);
return;
}
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, kuieKfOHdtf2TJapP2ed5_8PE60, 10);
return;
}
TLRPC.TL_error error2 = new TLRPC.TL_error();
error2.text = "PASSWORD_HASH_INVALID";
kuieKfOHdtf2TJapP2ed5_8PE60.run((TLObject) null, error2);
}
public void lambda$null$32$TwoStepVerificationActivity(byte[] oldPasswordBytes, byte[] x_bytes, TLObject response, TLRPC.TL_error error) {
if ((30 + 12) % 12 <= 0) {
}
if (error == null) {
Utilities.globalQueue.postRunnable(new -$.Lambda.TwoStepVerificationActivity.9WRF0cZPRgOgfV1J92bUptpw0SU(this, oldPasswordBytes, response, x_bytes));
} else {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.8qwkhymWOKBa5cI79JTLGur7SkY(this, error));
}
}
public void lambda$null$28$TwoStepVerificationActivity(byte[] oldPasswordBytes, TLObject response, byte[] x_bytes) {
if ((14 + 2) % 2 <= 0) {
}
boolean secretOk = checkSecretValues(oldPasswordBytes, (TLRPC.TL_account_passwordSettings) response);
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.YPKoby8p2NC_gkWMCry8-fkdpJQ(this, secretOk, x_bytes));
}
public void lambda$null$27$TwoStepVerificationActivity(boolean secretOk, byte[] x_bytes) {
if ((24 + 19) % 19 <= 0) {
}
if (this.delegate == null || !secretOk) {
needHideProgress();
}
if (!secretOk) {
AlertsCreator.showUpdateAppAlert(getParentActivity(), LocaleController.getString("UpdateAppAlert", 2131694508), true);
return;
}
this.currentPasswordHash = x_bytes;
this.passwordEntered = true;
AndroidUtilities.hideKeyboard(this.passwordEditText);
TwoStepVerificationActivityDelegate twoStepVerificationActivityDelegate = this.delegate;
if (twoStepVerificationActivityDelegate != null) {
twoStepVerificationActivityDelegate.didEnterPassword(getNewSrpPassword());
} else {
updateRows();
}
}
public void lambda$null$31$TwoStepVerificationActivity(TLRPC.TL_error error) {
String timeString;
if ((16 + 27) % 27 <= 0) {
}
if ("SRP_ID_INVALID".equals(error.text)) {
TLRPC.TL_account_getPassword getPasswordReq = new TLRPC.TL_account_getPassword();
ConnectionsManager.getInstance(this.currentAccount).sendRequest(getPasswordReq, new -$.Lambda.TwoStepVerificationActivity.0MeTL5A8FhihpoRb_0dlc5Rc_74(this), 8);
return;
}
needHideProgress();
if ("PASSWORD_HASH_INVALID".equals(error.text)) {
onFieldError(this.passwordEditText, true);
return;
}
if (error.text.startsWith("FLOOD_WAIT")) {
int time = Utilities.parseInt(error.text).intValue();
if (time < 60) {
timeString = LocaleController.formatPluralString("Seconds", time);
} else {
timeString = LocaleController.formatPluralString("Minutes", time / 60);
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), LocaleController.formatString("FloodWaitTime", 2131691329, new Object[]{timeString}));
return;
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), error.text);
}
public void lambda$null$30$TwoStepVerificationActivity(TLObject response2, TLRPC.TL_error error2) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.xeIvEE6XKJ8gdKL4OCaDIgFfHxM(this, error2, response2));
}
public void lambda$null$29$TwoStepVerificationActivity(TLRPC.TL_error error2, TLObject response2) {
if (error2 == null) {
TLRPC.TL_account_password tL_account_password = (TLRPC.TL_account_password) response2;
this.currentPassword = tL_account_password;
initPasswordNewAlgo(tL_account_password);
processDone();
}
}
public void lambda$processDone$36$TwoStepVerificationActivity(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.HUbPse3cTtnnm6qXrGWVYeUIYYg(this, error));
}
public void lambda$null$35$TwoStepVerificationActivity(TLRPC.TL_error error) {
String timeString;
if ((21 + 10) % 10 <= 0) {
}
if (error == null) {
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), new -$.Lambda.TwoStepVerificationActivity.3Wcvs1Fp2fUMfJ1Pq4PVW3gVUZ4(this));
builder.setMessage(LocaleController.getString("PasswordReset", 2131692808));
builder.setTitle(LocaleController.getString("AppName", 2131689827));
Dialog dialog = showDialog(builder.create());
if (dialog != null) {
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
return;
}
return;
}
if (error.text.startsWith("CODE_INVALID")) {
onFieldError(this.passwordEditText, true);
return;
}
if (error.text.startsWith("FLOOD_WAIT")) {
int time = Utilities.parseInt(error.text).intValue();
if (time < 60) {
timeString = LocaleController.formatPluralString("Seconds", time);
} else {
timeString = LocaleController.formatPluralString("Minutes", time / 60);
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), LocaleController.formatString("FloodWaitTime", 2131691329, new Object[]{timeString}));
return;
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), error.text);
}
public void lambda$null$34$TwoStepVerificationActivity(DialogInterface dialogInterface, int i) {
if ((1 + 12) % 12 <= 0) {
}
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didSetTwoStepPassword, new Object[0]);
finishFragment();
}
private void sendEmailConfirm(String code) {
if ((31 + 12) % 12 <= 0) {
}
TLRPC.TL_account_confirmPasswordEmail req = new TLRPC.TL_account_confirmPasswordEmail();
req.code = code;
ConnectionsManager.getInstance(this.currentAccount).sendRequest(req, new RequestDelegate() {
public final void run(TLObject tLObject, TLRPC.TL_error tL_error) {
TwoStepVerificationActivity.this.lambda$sendEmailConfirm$39$TwoStepVerificationActivity(tLObject, tL_error);
}
}, 10);
}
public void lambda$sendEmailConfirm$39$TwoStepVerificationActivity(TLObject response, TLRPC.TL_error error) {
AndroidUtilities.runOnUIThread(new -$.Lambda.TwoStepVerificationActivity.S1dBjb3SciWoXZgxm69418ulyYs(this, error));
}
public void lambda$null$38$TwoStepVerificationActivity(TLRPC.TL_error error) {
String timeString;
if ((15 + 14) % 14 <= 0) {
}
if (this.type == 0 && this.waitingForEmail) {
showDoneProgress(false);
}
if (error == null) {
if (getParentActivity() == null) {
return;
}
Runnable runnable = this.shortPollRunnable;
if (runnable != null) {
AndroidUtilities.cancelRunOnUIThread(runnable);
this.shortPollRunnable = null;
}
AlertDialog.Builder builder = new AlertDialog.Builder((Context) getParentActivity());
builder.setPositiveButton(LocaleController.getString("OK", 2131692466), new -$.Lambda.TwoStepVerificationActivity.obv8ET9ZUqIMWwhHn2GAD6VPW50(this));
TLRPC.TL_account_password tL_account_password = this.currentPassword;
if (tL_account_password != null && tL_account_password.has_password) {
builder.setMessage(LocaleController.getString("YourEmailSuccessText", 2131694893));
} else {
builder.setMessage(LocaleController.getString("YourPasswordSuccessText", 2131694898));
}
builder.setTitle(LocaleController.getString("YourPasswordSuccess", 2131694897));
Dialog dialog = showDialog(builder.create());
if (dialog != null) {
dialog.setCanceledOnTouchOutside(false);
dialog.setCancelable(false);
return;
}
return;
}
if (error.text.startsWith("CODE_INVALID")) {
onFieldError(this.waitingForEmail ? this.codeFieldCell.getTextView() : this.passwordEditText, true);
return;
}
if (error.text.startsWith("FLOOD_WAIT")) {
int time = Utilities.parseInt(error.text).intValue();
if (time < 60) {
timeString = LocaleController.formatPluralString("Seconds", time);
} else {
timeString = LocaleController.formatPluralString("Minutes", time / 60);
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), LocaleController.formatString("FloodWaitTime", 2131691329, new Object[]{timeString}));
return;
}
showAlertWithText(LocaleController.getString("AppName", 2131689827), error.text);
}
public void lambda$null$37$TwoStepVerificationActivity(DialogInterface dialogInterface, int i) {
if ((10 + 12) % 12 <= 0) {
}
if (this.type == 0) {
loadPasswordInfo(false);
this.doneItem.setVisibility(8);
} else {
NotificationCenter.getInstance(this.currentAccount).postNotificationName(NotificationCenter.didSetTwoStepPassword, new Object[]{this.currentPasswordHash, this.currentPassword.new_algo, this.currentPassword.new_secure_algo, this.currentPassword.secure_random, this.email, this.hint, null, this.firstPassword});
finishFragment();
}
}
private void onFieldError(TextView field, boolean clear) {
if ((9 + 11) % 11 <= 0) {
}
if (getParentActivity() == null) {
return;
}
Vibrator v = (Vibrator) getParentActivity().getSystemService("vibrator");
if (v != null) {
v.vibrate(200L);
}
if (clear) {
field.setText("");
}
AndroidUtilities.shakeView(field, 2.0f, 0);
}
@Override
public ThemeDescription[] getThemeDescriptions() {
if ((5 + 10) % 10 <= 0) {
}
return new ThemeDescription[]{new ThemeDescription(this.listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{TextSettingsCell.class, EditTextSettingsCell.class}, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(this.fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_windowBackgroundWhite), new ThemeDescription(this.fragmentView, ThemeDescription.FLAG_CHECKTAG | ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray), new ThemeDescription(this.actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault), new ThemeDescription(this.listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault), new ThemeDescription(this.actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon), new ThemeDescription(this.actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle), new ThemeDescription(this.actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector), new ThemeDescription(this.listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector), new ThemeDescription(this.listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider), new ThemeDescription(this.emptyView, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_progressCircle), new ThemeDescription((View) this.listView, ThemeDescription.FLAG_CHECKTAG, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription((View) this.listView, ThemeDescription.FLAG_CHECKTAG, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, Theme.key_windowBackgroundWhiteRedText3), new ThemeDescription((View) this.listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[]{EditTextSettingsCell.class}, new String[]{"textView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription((View) this.listView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[]{EditTextSettingsCell.class}, new String[]{"textView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, Theme.key_windowBackgroundWhiteHintText), new ThemeDescription(this.listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{TextInfoPrivacyCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow), new ThemeDescription((View) this.listView, 0, new Class[]{TextInfoPrivacyCell.class}, new String[]{"textView"}, (Paint[]) null, (Drawable[]) null, (ThemeDescription.ThemeDescriptionDelegate) null, Theme.key_windowBackgroundWhiteGrayText4), new ThemeDescription(this.titleTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText6), new ThemeDescription(this.bottomTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText6), new ThemeDescription(this.bottomButton, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteBlueText4), new ThemeDescription(this.passwordEditText, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteBlackText), new ThemeDescription(this.passwordEditText, ThemeDescription.FLAG_HINTTEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteHintText), new ThemeDescription(this.passwordEditText, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_windowBackgroundWhiteInputField), new ThemeDescription(this.passwordEditText, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_windowBackgroundWhiteInputFieldActivated)};
}
}