未登录可先进入首页浏览、触发敏感功能再登录
This commit is contained in:
@@ -152,7 +152,7 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
public void setTitle() {
|
||||
// initFontScale();
|
||||
top_title.setText("登录");
|
||||
top_back_layout.setVisibility(View.GONE);
|
||||
top_back_layout.setVisibility(View.VISIBLE);
|
||||
// top_right_text.setVisibility(View.VISIBLE);
|
||||
// top_right_text.setText("注册");
|
||||
}
|
||||
@@ -166,7 +166,7 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
View view = View.inflate(ct, R.layout.activity_login_new, null);
|
||||
|
||||
// initFontScale();
|
||||
Constant.islogout = 1;
|
||||
// Constant.islogout = 1;
|
||||
DestroyActivityUtil.addDestoryActivityToMap(this,"LoginActivity");
|
||||
usernameEditText = (EditText) view.findViewById(R.id.username);// 账号
|
||||
// 设置输入框获得焦点hint提示消失添加监听
|
||||
@@ -883,8 +883,9 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
} else if (id == R.id.top_back_layout) {
|
||||
// 返回
|
||||
finish();
|
||||
AppManager.getAppManager().finishAllActivity();
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
handleBackClose();
|
||||
if (false) {
|
||||
}
|
||||
} else if (id == R.id.bt_login) {
|
||||
// 登录
|
||||
|
||||
@@ -1119,8 +1120,9 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
super.onBackPressed();
|
||||
// 监听返回键
|
||||
finish();
|
||||
AppManager.getAppManager().finishAllActivity();
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
handleBackClose();
|
||||
if (false) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1212,6 +1214,8 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
// {
|
||||
intent.setClass(this, MainActivity.class);
|
||||
// }
|
||||
Constant.islogout = 2;
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||
intent.putExtra("launcher_from", 1);
|
||||
|
||||
startActivity(intent);
|
||||
@@ -1220,7 +1224,8 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
SharePrefUtil.saveBoolean(ct, Constant.IS_LOGIN, true);
|
||||
|
||||
// 1登入系统 2退出系统 3专家客户端在手机前台运行 4.专家客户端在手机后台运行
|
||||
BaseActivity.foreBack(LoginNewActivity.this, 1);
|
||||
BaseActivity.foreBack(LoginNewActivity.this, 1);
|
||||
finish();
|
||||
}
|
||||
|
||||
public final static int GET_SYSTEM_TIME_RESULT = 103;
|
||||
@@ -1571,10 +1576,29 @@ public class LoginNewActivity extends BaseActivity implements OnCallBackFromNet
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK&& event.getAction() == KeyEvent.ACTION_DOWN){
|
||||
finishAffinity();
|
||||
AppManager.getAppManager().finishAllActivity();
|
||||
System.exit(0);
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK&& event.getAction() == KeyEvent.ACTION_DOWN){
|
||||
handleBackClose();
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
private void handleBackClose() {
|
||||
if (MainActivity.mMainActivity == null || MainActivity.mMainActivity.isFinishing() || MainActivity.mMainActivity.isDestroyed()) {
|
||||
Intent intent = new Intent(this, MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
private boolean unusedExitStub() {
|
||||
if (false) {
|
||||
handleBackClose();
|
||||
if (false) {
|
||||
handleBackClose();
|
||||
if (false) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user