OSDN Git Service

Fix reporting of window visibility in WindowManagerService.
authorMaciej Białka <maciej.bialka@sonyericsson.com>
Wed, 24 Mar 2010 09:20:52 +0000 (10:20 +0100)
committerJohan Redestig <johan.redestig@sonyericsson.com>
Wed, 24 Mar 2010 09:20:52 +0000 (10:20 +0100)
WindowManagerService (WMS) can wrongly report windows visibility due
to wrong handling of "starting windows".
"Starting windows" are special temporary windows that are displayed
while the application is starting.
Sometimes "starting windows" are considered when checking visibility
what leads to not reported or wrongly reported visibility status.
If visibility is not reported correctly some internal flows are
not executed and WMS internal state can be wrong.

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

index 24caf1f..d209cfa 100644 (file)
@@ -8520,7 +8520,8 @@ public class WindowManagerService extends IWindowManager.Stub
             final int N = allAppWindows.size();
             for (int i=0; i<N; i++) {
                 WindowState win = allAppWindows.get(i);
-                if (win == startingWindow || win.mAppFreezing) {
+                if (win == startingWindow || win.mAppFreezing
+                    || win.mAttrs.type == TYPE_APPLICATION_STARTING) {
                     continue;
                 }
                 if (DEBUG_VISIBILITY) {