summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Evan Rosky <erosky@google.com> 2023-09-26 11:25:05 -0700
committer Ats Jenk <atsjenk@google.com> 2023-09-29 14:33:03 -0700
commit78132186b8760ca422edfacdf0ebbeeb3d028bc8 (patch)
tree5e59ba3830391eef0fb602a00e90139ee8588f2d
parent61ac770481b83b0d929f1a41b62983e4d971492f (diff)
Support transient-launch recents with freeform
There were some narrow checks which would reject transient launch of recents when there are freeform windows and would also cause some premature visibility changes. This resolves that by: - allowing recents shortcut even if the recents is already visible as long as it isn't already on top. - Allowing transient-launch to transient-hide freeform tasks. Bug: 302023399 Test: open app in desktop, swipe to overview. Change-Id: If2e1ef3327bef99e65f713c975eb055e8c832984
-rw-r--r--services/core/java/com/android/server/wm/ActivityStartController.java3
-rw-r--r--services/core/java/com/android/server/wm/Transition.java3
2 files changed, 3 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wm/ActivityStartController.java b/services/core/java/com/android/server/wm/ActivityStartController.java
index c39b266a7701..4a5311b14397 100644
--- a/services/core/java/com/android/server/wm/ActivityStartController.java
+++ b/services/core/java/com/android/server/wm/ActivityStartController.java
@@ -577,7 +577,8 @@ public class ActivityStartController {
.getRootTask(WINDOWING_MODE_UNDEFINED, activityType);
if (rootTask == null) return false;
final ActivityRecord r = rootTask.topRunningActivity();
- if (r == null || r.isVisibleRequested() || !r.attachedToProcess()
+ if (r == null || (r.isVisibleRequested() && rootTask.isTopRootTaskInDisplayArea())
+ || !r.attachedToProcess()
|| !r.mActivityComponent.equals(intent.getComponent())
|| !mService.isCallerRecents(r.getUid())
// Recents keeps invisible while device is locked.
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index fac98b84d976..26e96ae98001 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -372,8 +372,7 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
parent.forAllTasks(t -> {
// Skip transient-launch task
if (t == transientRootTask) return false;
- if (t.isVisibleRequested() && !t.isAlwaysOnTop()
- && !t.getWindowConfiguration().tasksAreFloating()) {
+ if (t.isVisibleRequested() && !t.isAlwaysOnTop()) {
if (t.isRootTask()) {
mTransientHideTasks.add(t);
}