summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Winson Chung <winsonc@google.com> 2018-05-30 21:13:25 -0700
committer Winson Chung <winsonc@google.com> 2018-05-31 16:10:17 +0000
commit80f80dbbdd394a2a1103d89a6b081261c0907274 (patch)
tree992aedcdf948eb1a7a93c06e249dca466d494dfa
parentf04b6c8d777691343fa883f60245962be777a7fb (diff)
Skip task overlay in calcuating task description
- When a PiP task is dismissed with the PiP menu activity showing, we use the wrong task description (belonging to the menu activity) to draw the app theme snapshot. The task overlay is only used from SysUI to overlay an activity on top of the task, and should not be considered in the calculation for the task description for the task. Bug: 77964409 Test: Manual, launch Maps in PiP, dismiss and then open overview Change-Id: I2d537b9fdd19eb69a8dc20f15ac5b263584d2fad
-rw-r--r--services/core/java/com/android/server/am/TaskRecord.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 9a5b1a60219e..d3ac7cb15824 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -1606,6 +1606,9 @@ class TaskRecord extends ConfigurationContainer implements TaskWindowContainerLi
boolean topActivity = true;
for (--activityNdx; activityNdx >= 0; --activityNdx) {
final ActivityRecord r = mActivities.get(activityNdx);
+ if (r.mTaskOverlay) {
+ continue;
+ }
if (r.taskDescription != null) {
if (label == null) {
label = r.taskDescription.getLabel();