正在查看: 大众借. v4.1.2 应用的 P0ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 大众借. v4.1.2 应用的 P0ACT.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.shiliuj.ui.activitys;
import android.os.Bundle;
import android.view.KeyEvent;
import android.widget.Button;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.OnClick;
import com.base.commonlibrary.base.baseapp.AppActivityManager;
import com.base.commonlibrary.utils.ACacheUtil;
import com.base.commonlibrary.utils.LogUtil;
import com.base.commonlibrary.utils.SPUtils;
import com.shiliuj.mjyp.BMAG01ACT;
import com.shiliuj.mjyp.app.base.BaseBindActivity;
import com.shiliuj.mjyp.app.utils.AppUtils;
import com.shiliuj.ui.lockView.LockPatternUtil;
import com.shiliuj.ui.lockView.LockPatternView;
import java.util.List;
public class P0ACT extends BaseBindActivity {
private static final long DELAYTIME = 600;
private ACacheUtil aCache;
private long exitTime;
@BindView(2131296530)
Button forgetGestureBtn;
private byte[] gesturePassword;
@BindView(2131296672)
LockPatternView lockPatternView;
@BindView(2131296688)
TextView messageTv;
@BindView(2131296739)
TextView nick;
int count = 1;
private LockPatternView.OnPatternListener patternListener = new LockPatternView.OnPatternListener() {
public void onPatternStart() {
P0ACT.this.lockPatternView.removePostClearPatternRunnable();
}
public void onPatternComplete(List<LockPatternView.Cell> list) {
if (list != null) {
if (LockPatternUtil.checkPattern(list, P0ACT.this.gesturePassword)) {
P0ACT.this.updateStatus(Status.CORRECT);
return;
}
P0ACT.this.updateStatus(Status.ERROR);
if (P0ACT.this.count < 5) {
P0ACT.this.count++;
} else {
P0ACT.this.forgetGesturePasswrod();
}
}
}
};
protected boolean canLoadMore() {
return false;
}
public int getLayoutId() {
return 2131492913;
}
public void initPresenter() {
}
protected void loadMore() {
}
protected void refresh() {
}
public void initView(Bundle bundle) {
ACacheUtil aCacheUtil = ACacheUtil.get(this);
this.aCache = aCacheUtil;
this.gesturePassword = aCacheUtil.getAsBinary("GESTURE_PASSWORD");
this.lockPatternView.setOnPatternListener(this.patternListener);
if (AppUtils.INSTANCE.getIsLogin()) {
String str = (String) SPUtils.getData("PHONE", "");
this.nick.setText(str.substring(0, 3) + "****" + str.substring(str.length() - 4));
}
updateStatus(Status.DEFAULT);
}
public void updateStatus(Status status) {
this.messageTv.setText(status.strId);
this.messageTv.setTextColor(getResources().getColor(status.colorId));
int i = AnonymousClass2.$SwitchMap$com$shiliuj$ui$activitys$P0ACT$Status[status.ordinal()];
if (i == 1) {
this.lockPatternView.setPattern(LockPatternView.DisplayMode.DEFAULT);
return;
}
if (i != 2) {
if (i != 3) {
return;
}
this.lockPatternView.setPattern(LockPatternView.DisplayMode.DEFAULT);
loginGestureSuccess();
return;
}
this.lockPatternView.setPattern(LockPatternView.DisplayMode.ERROR);
this.lockPatternView.postClearPatternRunnable(DELAYTIME);
int i2 = 5 - this.count;
if (i2 != 0) {
this.messageTv.setText(getResources().getString(2131689947) + i2 + getResources().getString(2131689580));
this.messageTv.setTextColor(getResources().getColor(status.colorId));
}
}
static class AnonymousClass2 {
static final int[] $SwitchMap$com$shiliuj$ui$activitys$P0ACT$Status;
static {
int[] iArr = new int[Status.values().length];
$SwitchMap$com$shiliuj$ui$activitys$P0ACT$Status = iArr;
try {
iArr[Status.DEFAULT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$shiliuj$ui$activitys$P0ACT$Status[Status.ERROR.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$shiliuj$ui$activitys$P0ACT$Status[Status.CORRECT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
private void loginGestureSuccess() {
LogUtil.d("AppActivityManager", AppActivityManager.getAppManager().isOpenActivity(BMAG01ACT.class) + "");
if (!AppActivityManager.getAppManager().isOpenActivity(BMAG01ACT.class)) {
startActivity(BMAG01ACT.class);
finish();
} else {
finish();
}
}
@OnClick({2131296530})
void forgetGesturePasswrod() {
ACacheUtil.get(this.mContext).put("GESTURE_PASSWORD", "");
SPUtils.putData("APP_TOKEN", "");
startActivity(BMAG01ACT.class);
startActivity(S0ACT.class);
finish();
}
private enum Status {
DEFAULT(2131689750, 2131099703),
ERROR(2131689751, 2131099901),
CORRECT(2131689748, 2131099703);
private int colorId;
private int strId;
Status(int i, int i2) {
this.strId = i;
this.colorId = i2;
}
}
public boolean onKeyDown(int i, KeyEvent keyEvent) {
if (i != 4) {
return super.onKeyDown(i, keyEvent);
}
if (System.currentTimeMillis() - this.exitTime > 2000) {
showShortToast(getString(2131689731));
this.exitTime = System.currentTimeMillis();
} else {
AppActivityManager.getAppManager().AppExit(this, true);
}
return true;
}
}