在A64 android 5.1 平台发现清除最近任务后将launcher强制关闭,再按返回键黑屏,不会自动启动launcher问题。
添加以下处理解决黑屏问题:
frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/serve
index 78a8e2a..3440c9b 100755
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -836,6 +836,13 @@ public final class ActivityStackSupervisor implements DisplayListener {
moveHomeStackTaskToTop(HOME_ACTIVITY_TYPE, reason);
startActivityLocked(null, intent, null, aInfo, null, null, null, null, 0, 0, 0, null,
0, 0, 0, null, false, null, null, null);
+
+ if (inResumeTopActivity) {
+ // If we are in resume section already, home activity will be initialized, but not
+ // resumed (to avoid recursive resume) and will stay that way until something pokes it
+ // again. We need to schedule another resume.
+ scheduleResumeTopActivities();
+ }
}
final int startActivityMayWait(IApplicationThread caller, int callingUid,