summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2014-09-01 22:33:25 +0200
committerSelim Cinek <cinek@google.com>2014-09-01 23:20:40 +0200
commitd9acca5c8ee648a3b67050b28f85214dbad1aeda (patch)
tree9c23cb56e933698bb243355e5edfe6f26ac03818 /packages
parentd2319fbe6a53ac4c38ca02e4d8e32da86ed0994b (diff)
downloadframeworks_base-d9acca5c8ee648a3b67050b28f85214dbad1aeda.zip
frameworks_base-d9acca5c8ee648a3b67050b28f85214dbad1aeda.tar.gz
frameworks_base-d9acca5c8ee648a3b67050b28f85214dbad1aeda.tar.bz2
Stabilized the animation when going back from the locked shade
Now, independant of the notifications the shade correctly animates back from the shade locked when clicking on the bottom. Bug: 17345758 Change-Id: I40f6cc65d4ceb4357f648192287c08acddffdcd9
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java33
2 files changed, 34 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 1a0d2d4..8c7dad9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -3772,6 +3772,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
*/
public void goToKeyguard() {
if (mState == StatusBarState.SHADE_LOCKED) {
+ mStackScroller.onGoToKeyguard();
setBarState(StatusBarState.KEYGUARD);
updateKeyguardState(false /* goingToFullShade */, true /* fromShadeLocked*/);
}
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 302763e..82e7f5d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -166,6 +166,7 @@ public class NotificationStackScrollLayout extends ViewGroup
private boolean mDontReportNextOverScroll;
private boolean mRequestViewResizeAnimationOnLayout;
private boolean mNeedViewResizeAnimation;
+ private boolean mEverythingNeedsAnimation;
/**
* The maximum scrollPosition which we are allowed to reach when a notification was expanded.
@@ -1619,6 +1620,7 @@ public class NotificationStackScrollLayout extends ViewGroup
generateDarkEvent();
generateGoToFullShadeEvent();
generateViewResizeEvent();
+ generateAnimateEverythingEvent();
mNeedsAnimation = false;
}
@@ -1701,6 +1703,14 @@ public class NotificationStackScrollLayout extends ViewGroup
mActivateNeedsAnimation = false;
}
+ private void generateAnimateEverythingEvent() {
+ if (mEverythingNeedsAnimation) {
+ mAnimationEvents.add(
+ new AnimationEvent(null, AnimationEvent.ANIMATION_TYPE_EVERYTHING));
+ }
+ mEverythingNeedsAnimation = false;
+ }
+
private void generateDimmedEvent() {
if (mDimmedNeedsAnimation) {
mAnimationEvents.add(
@@ -2200,6 +2210,13 @@ public class NotificationStackScrollLayout extends ViewGroup
this.mPhoneStatusBar = phoneStatusBar;
}
+ public void onGoToKeyguard() {
+ if (mIsExpanded && mAnimationsEnabled) {
+ mEverythingNeedsAnimation = true;
+ requestChildrenUpdate();
+ }
+ }
+
/**
* A listener that is notified when some child locations might have changed.
*/
@@ -2327,6 +2344,18 @@ public class NotificationStackScrollLayout extends ViewGroup
.animateTopInset()
.animateY()
.animateZ(),
+
+ // ANIMATION_TYPE_EVERYTHING
+ new AnimationFilter()
+ .animateAlpha()
+ .animateDark()
+ .animateScale()
+ .animateDimmed()
+ .animateHideSensitive()
+ .animateHeight()
+ .animateTopInset()
+ .animateY()
+ .animateZ(),
};
static int[] LENGTHS = new int[] {
@@ -2369,6 +2398,9 @@ public class NotificationStackScrollLayout extends ViewGroup
// ANIMATION_TYPE_VIEW_RESIZE
StackStateAnimator.ANIMATION_DURATION_STANDARD,
+
+ // ANIMATION_TYPE_EVERYTHING
+ StackStateAnimator.ANIMATION_DURATION_STANDARD,
};
static final int ANIMATION_TYPE_ADD = 0;
@@ -2384,6 +2416,7 @@ public class NotificationStackScrollLayout extends ViewGroup
static final int ANIMATION_TYPE_GO_TO_FULL_SHADE = 10;
static final int ANIMATION_TYPE_HIDE_SENSITIVE = 11;
static final int ANIMATION_TYPE_VIEW_RESIZE = 12;
+ static final int ANIMATION_TYPE_EVERYTHING = 13;
final long eventStartTime;
final View changingView;