|
@@ -137,6 +137,8 @@ public class ActMain extends BaseActYmPermissionCheck {
|
|
|
Jump2View.getInstance().goLoginView(this, "home");
|
|
Jump2View.getInstance().goLoginView(this, "home");
|
|
|
} else if (intent.hasExtra("SWITCH_TAB")) {
|
|
} else if (intent.hasExtra("SWITCH_TAB")) {
|
|
|
switchFragment(intent.getIntExtra("SWITCH_TAB", 0));
|
|
switchFragment(intent.getIntExtra("SWITCH_TAB", 0));
|
|
|
|
|
+ } else if ("EXIT".equals(intent.getStringExtra("INTENT_ACTION"))) {
|
|
|
|
|
+ exit(false);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -338,16 +340,6 @@ public class ActMain extends BaseActYmPermissionCheck {
|
|
|
*/
|
|
*/
|
|
|
private void doBackPress() {
|
|
private void doBackPress() {
|
|
|
if (System.currentTimeMillis() - mLastBackTime < 1000) {
|
|
if (System.currentTimeMillis() - mLastBackTime < 1000) {
|
|
|
-// List<Fragment> fragmentList = getSupportFragmentManager().getFragments();
|
|
|
|
|
-// FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
|
|
|
|
-// for (Fragment fragment : fragmentList) {
|
|
|
|
|
-// try {
|
|
|
|
|
-// transaction.remove(fragment);
|
|
|
|
|
-// } catch (Exception e) {
|
|
|
|
|
-// e.printStackTrace();
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// transaction.commitAllowingStateLoss();
|
|
|
|
|
exit(true);
|
|
exit(true);
|
|
|
} else {
|
|
} else {
|
|
|
try {
|
|
try {
|
|
@@ -485,7 +477,9 @@ public class ActMain extends BaseActYmPermissionCheck {
|
|
|
DialogStorageLow.showDialog(null);
|
|
DialogStorageLow.showDialog(null);
|
|
|
break;
|
|
break;
|
|
|
case APP_EXIT:
|
|
case APP_EXIT:
|
|
|
- exit(false);
|
|
|
|
|
|
|
+ Intent intent = new Intent(this, ActMain.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
+ intent.putExtra("INTENT_ACTION", "EXIT");
|
|
|
|
|
+ startActivity(intent);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (progressView != null && event.getData() instanceof DownLoadInfo) {
|
|
if (progressView != null && event.getData() instanceof DownLoadInfo) {
|