summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2018-05-17 16:03:25 -0700
committer Winson Chung <winsonc@google.com> 2018-05-17 16:11:08 -0700
commit547afd2dba285d57d8db1e3a4f038dba6d0fddcf (patch)
tree71887d0e47f6acfe899ca1b237bdc29da39721f0
parent5a36c134b736cc587fcd05b6d5cf94f3bbb62377 (diff)
Fix issue with home activity started with standard activity type
- Specifically in the case where we have a merged Launcher+Recents activity and there is no default home activity set, allow the recents button handler to launch the merged home activity (in Overview mode) without showing a disambig dialog (by having the component set in the home intent) Bug: 79878243 Test: Disable swipe up (enable 3 button nav), launch an app, reinstall launcher in the background to remove the home stack, tap the recents button and ensure we launch home with ACTIVITY_TYPE_HOME. Change-Id: I4d114b7f474390dd6fe9bdadc58a399a2daf1b81
-rw-r--r--services/core/java/com/android/server/am/ActivityRecord.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index e73f42fa4264..ad96e4447655 100644
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -1077,6 +1077,11 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
// System process can launch home activity.
return true;
}
+ // Allow the recents component to launch the home activity.
+ final RecentTasks recentTasks = mStackSupervisor.mService.getRecentTasks();
+ if (recentTasks != null && recentTasks.isCallerRecents(uid)) {
+ return true;
+ }
// Resolver activity can launch home activity.
return sourceRecord != null && sourceRecord.isResolverActivity();
}