[shuttle_p]
[eb5 双屏 主Activity 会pause]
This commit is contained in:
yangyakun
2024-01-22 15:27:04 +08:00
parent daa0318fc0
commit e033fe412f
3 changed files with 90 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
protected void onResume() {
super.onResume();
//ActivityUtils.setDefaultL(this);
CallerLogger.i(M_HMI + TAG, "onResume");
}
@Override
@@ -78,12 +79,14 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
@Override
protected void onPause() {
super.onPause();
CallerLogger.i(M_HMI + TAG, "onPause");
mIsHomeKeyDown = false;
}
@Override
protected void onStop() {
super.onStop();
CallerLogger.i(M_HMI + TAG, "onStop");
IntentManager.getInstance().unregisterIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this);
//ActivityLifecycleManager.getInstance().setAppActive(false);
}
@@ -161,6 +164,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
@Override
protected void onDestroy() {
super.onDestroy();
CallerLogger.i(M_HMI + TAG, "onDestroy");
stopCountDown();
try {
// acc off 之后会出现进程还在,但是页面被杀的情况,这个直接杀掉进程,然后让整个进程重启
@@ -182,6 +186,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
CallerLogger.i(M_HMI + TAG, "onKeyDown");
long currentTimeMillis = System.currentTimeMillis();
if (keyCode == KeyEvent.KEYCODE_BACK) {
if (currentTimeMillis - lastKeyDownTimeMillis < 2000) {