OSDN Git Service

When adding a window evaluate all tasks.
authorCraig Mautner <cmautner@google.com>
Tue, 27 Aug 2013 20:25:17 +0000 (13:25 -0700)
committerCraig Mautner <cmautner@google.com>
Tue, 27 Aug 2013 20:25:17 +0000 (13:25 -0700)
Previously the code was adding a window based only on the tasks on
the stack belonging to the window being added. But if a window from
another stack was on top the window would be added out of order.

In particular when there was a dialog over the launcher app and the
device was rotated, the launcher window was being added over the
dialog. This caused the launcher icons to obscure the dialog and for
the dialog buttons to be untouchable.

Fixes bug 9984067.

Change-Id: I9a57eb641d118f4a90e98af8ca77127ab5364e79

services/java/com/android/server/wm/WindowManagerService.java

index 8de2fb0..94012b6 100644 (file)
@@ -943,7 +943,7 @@ public class WindowManagerService extends IWindowManager.Stub
         // order of applications.
         WindowState pos = null;
 
-        final ArrayList<Task> tasks = win.getStack().getTasks();
+        final ArrayList<Task> tasks = displayContent.getTasks();
         int taskNdx;
         int tokenNdx = -1;
         for (taskNdx = tasks.size() - 1; taskNdx >= 0; --taskNdx) {
@@ -7983,11 +7983,8 @@ public class WindowManagerService extends IWindowManager.Stub
         int curLayer = 0;
         int i;
 
-        if (DEBUG_LAYERS) {
-            RuntimeException here = new RuntimeException("here");
-            here.fillInStackTrace();
-            Slog.v(TAG, "Assigning layers", here);
-        }
+        if (DEBUG_LAYERS) Slog.v(TAG, "Assigning layers based on windows=" + windows,
+                new RuntimeException("here").fillInStackTrace());
 
         boolean anyLayerChanged = false;