OSDN Git Service

Disable color view animations when stable insets change
authorAdrian Roos <roosa@google.com>
Tue, 17 Feb 2015 15:37:53 +0000 (16:37 +0100)
committerThe Android Automerger <android-build@google.com>
Wed, 18 Feb 2015 00:31:59 +0000 (16:31 -0800)
Prevents color view from showing up on phones when
the orientation changes to landscape. Previously, the
animation was only prevented when the stable inset of a
bar became nonzero; now we disable animations whenever
the nonzeroness changes.

Bug: 19353466
Change-Id: I31b4103fe984d158a98cd446ac2ddbe15a408e49

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

index f5d43d8..b4811da 100644 (file)
@@ -2867,11 +2867,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                     // indicates that the window was either just added and received them for the
                     // first time, or the window size or position has changed.
                     boolean hasTopStableInset = insets.getStableInsetTop() != 0;
-                    disallowAnimate |= hasTopStableInset && !mLastHasTopStableInset;
+                    disallowAnimate |= (hasTopStableInset != mLastHasTopStableInset);
                     mLastHasTopStableInset = hasTopStableInset;
 
                     boolean hasBottomStableInset = insets.getStableInsetBottom() != 0;
-                    disallowAnimate |= hasBottomStableInset && !mLastHasBottomStableInset;
+                    disallowAnimate |= (hasBottomStableInset != mLastHasBottomStableInset);
                     mLastHasBottomStableInset = hasBottomStableInset;
                 }