OSDN Git Service

Skip task overlay in calcuating task description
authorWinson Chung <winsonc@google.com>
Thu, 31 May 2018 04:13:25 +0000 (21:13 -0700)
committerWinson Chung <winsonc@google.com>
Thu, 31 May 2018 16:10:17 +0000 (16:10 +0000)
- 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

services/core/java/com/android/server/am/TaskRecord.java

index 9a5b1a6..d3ac7cb 100644 (file)
@@ -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();