OSDN Git Service

More on #7296510 Transition from lock screen to dreaming is really bad
authorDianne Hackborn <hackbod@google.com>
Sun, 7 Oct 2012 22:14:45 +0000 (15:14 -0700)
committerDianne Hackborn <hackbod@google.com>
Sun, 7 Oct 2012 22:14:45 +0000 (15:14 -0700)
The final iteration of that change was a little too aggresive in
deciding when it turns off the dream's enter animation, so it was
doing this always instead of just when it needed to (when it is
being displayed to hide the lock screen).

This change fixes a dumb typo that was causing the dream to always
turn off its own animation (duh!) and tweaks the logic for deciding
when the dream should be able to cause the lock screen to hide to
better ensure that it is shown before the lock screen gets hidden.

Change-Id: Ie73a5be9ee597713644fb2a0202f36c32b4f1fca

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

index e4ca8d8..3351e61 100755 (executable)
@@ -2925,14 +2925,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                 mNoDreamEnterAnim = true;
             }
             if (((attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW)
-                        || attrs.type == TYPE_DREAM)
+                        || (attrs.type == TYPE_DREAM && win.isVisibleLw()))
                     && attrs.x == 0 && attrs.y == 0
                     && attrs.width == WindowManager.LayoutParams.MATCH_PARENT
                     && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
                 if (DEBUG_LAYOUT) Log.v(TAG, "Fullscreen window: " + win);
                 mTopFullscreenOpaqueWindowState = win;
                 if (attrs.type == TYPE_DREAM) {
-                    mNoDreamEnterAnim = true;
+                    mForceStatusBarFromKeyguard = true;
                 }
                 if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
                     if (DEBUG_LAYOUT) Log.v(TAG, "Setting mHideLockScreen to true by win " + win);