Move battery icon back to bottom of the screen
This partially reverts ag/5073038
Fixes: 129324135
Test: visual
Change-Id: Ie0f9b19e7f6bac9596356e87913a6cc19fb3dafe
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index 9ab2a7d..fca07dc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -635,6 +635,7 @@
}
mNotificationStackScroller.setIntrinsicPadding(stackScrollerPadding);
mNotificationStackScroller.setAntiBurnInOffsetX(mClockPositionResult.clockX);
+ mKeyguardBottomArea.setAntiBurnInOffsetX(mClockPositionResult.clockX);
mStackScrollerMeasuringPass++;
requestScrollerTopPaddingUpdate(animate);
@@ -1886,7 +1887,7 @@
float newAlpha = Math.min(getKeyguardContentsAlpha(), alphaQsExpansion)
* mKeyguardStatusBarAnimateAlpha;
mKeyguardStatusBar.setAlpha(newAlpha);
- mKeyguardStatusBar.setVisibility(newAlpha != 0f ? VISIBLE : INVISIBLE);
+ mKeyguardStatusBar.setVisibility(newAlpha != 0f && !mDozing ? VISIBLE : INVISIBLE);
}
private void updateKeyguardBottomAreaAlpha() {
@@ -2373,12 +2374,11 @@
positionClockAndNotifications();
}
- private static float interpolate(float t, float start, float end) {
- return (1 - t) * start + t * end;
- }
-
private void updateDozingVisibilities(boolean animate) {
mKeyguardBottomArea.setDozing(mDozing, animate);
+ if (!mDozing && animate) {
+ animateKeyguardStatusBarIn(StackStateAnimator.ANIMATION_DURATION_STANDARD);
+ }
}
@Override
@@ -2814,7 +2814,7 @@
if (mDozing) {
mNotificationStackScroller.setShowDarkShelf(!hasCustomClock());
}
- mKeyguardStatusBar.setDozing(mDozing);
+ mKeyguardBottomArea.setDozing(mDozing, animate);
if (mBarState == StatusBarState.KEYGUARD
|| mBarState == StatusBarState.SHADE_LOCKED) {
@@ -2829,7 +2829,6 @@
public void onDozeAmountChanged(float linearAmount, float amount) {
mInterpolatedDarkAmount = amount;
mLinearDarkAmount = linearAmount;
- mKeyguardStatusBar.setDarkAmount(mInterpolatedDarkAmount);
mKeyguardStatusView.setDarkAmount(mInterpolatedDarkAmount);
mKeyguardBottomArea.setDarkAmount(mInterpolatedDarkAmount);
positionClockAndNotifications();
@@ -2861,7 +2860,7 @@
}
public void dozeTimeTick() {
- mKeyguardStatusBar.dozeTimeTick();
+ mKeyguardBottomArea.dozeTimeTick();
mKeyguardStatusView.dozeTimeTick();
if (mInterpolatedDarkAmount > 0) {
positionClockAndNotifications();