diff options
author | Selim Cinek <cinek@google.com> | 2014-12-10 17:09:17 +0100 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-12-10 16:17:57 +0000 |
commit | 2086710f58032d8ea2dfd7b6e514954d4aab498f (patch) | |
tree | ac729dee8eb41e842b3dce03ebfd0342f82f53ff | |
parent | c430a5b2e4715ff5c0768956650ee83431cc70fc (diff) | |
download | frameworks_base-2086710f58032d8ea2dfd7b6e514954d4aab498f.zip frameworks_base-2086710f58032d8ea2dfd7b6e514954d4aab498f.tar.gz frameworks_base-2086710f58032d8ea2dfd7b6e514954d4aab498f.tar.bz2 |
Fixed a bug where the empty shade and dismiss views would animate
This lead to an ugly flash when turning the screen off and on again.
Bug: 18657280
Change-Id: I5ca572239639bf3c95c106ba193a268e0256df38
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 2a393bf..6dcbed6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -2280,8 +2280,7 @@ public class NotificationStackScrollLayout extends ViewGroup updateContentHeight(); notifyHeightChangeListener(mDismissView); } else { - mEmptyShadeView.setWillBeGone(true); - mEmptyShadeView.performVisibilityAnimation(false, new Runnable() { + Runnable onFinishedRunnable = new Runnable() { @Override public void run() { mEmptyShadeView.setVisibility(GONE); @@ -2289,7 +2288,14 @@ public class NotificationStackScrollLayout extends ViewGroup updateContentHeight(); notifyHeightChangeListener(mDismissView); } - }); + }; + if (mAnimationsEnabled) { + mEmptyShadeView.setWillBeGone(true); + mEmptyShadeView.performVisibilityAnimation(false, onFinishedRunnable); + } else { + mEmptyShadeView.setInvisible(); + onFinishedRunnable.run(); + } } } } @@ -2318,7 +2324,7 @@ public class NotificationStackScrollLayout extends ViewGroup notifyHeightChangeListener(mDismissView); } }; - if (mDismissView.isButtonVisible() && mIsExpanded) { + if (mDismissView.isButtonVisible() && mIsExpanded && mAnimationsEnabled) { mDismissView.setWillBeGone(true); mDismissView.performVisibilityAnimation(false, dimissHideFinishRunnable); } else { |