summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-11-11 22:51:10 +0100
committerJorim Jaggi <jjaggi@google.com>2014-11-13 17:54:21 +0100
commit048af1f727dc81a6450e004391d072599ac449ee (patch)
tree997e7728ac4e4e84d458dd8f6d53ad4b1cf002e8 /packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
parent68b83a784a0c9f3d2483a8a38b8e1ae047c4914e (diff)
downloadframeworks_base-048af1f727dc81a6450e004391d072599ac449ee.zip
frameworks_base-048af1f727dc81a6450e004391d072599ac449ee.tar.gz
frameworks_base-048af1f727dc81a6450e004391d072599ac449ee.tar.bz2
Fix doze jank by removing a fullscreen layer of overdraw
Move all doze related stuff into DozeScrimController, and combine both alpha values from the regular ScrimController and DozeScrimController before applying it to a view. Move the black background from NotificationPanelView to DozeScrimController, which saves a fullscreen layer of overdraw during the transition. Bug: 18238168 Change-Id: Ifb133bf4a0f8255f5c2f5e205509af339cac8c8f
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java11
1 files changed, 7 insertions, 4 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 2f0ce28..d94f122 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -414,6 +414,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private ViewMediatorCallback mKeyguardViewMediatorCallback;
private ScrimController mScrimController;
+ private DozeScrimController mDozeScrimController;
private final Runnable mAutohide = new Runnable() {
@Override
@@ -741,6 +742,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mScrimController = new ScrimController(scrimBehind, scrimInFront, mScrimSrcModeEnabled);
mScrimController.setBackDropView(mBackdrop);
mStatusBarView.setScrimController(mScrimController);
+ mDozeScrimController = new DozeScrimController(mScrimController, context);
mHeader = (StatusBarHeaderView) mStatusBarWindow.findViewById(R.id.header);
mHeader.setActivityStarter(this);
@@ -3677,13 +3679,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
if (mState != StatusBarState.KEYGUARD && !mNotificationPanel.isDozing()) {
return;
}
- mNotificationPanel.setDozing(mDozing, mScrimController.isPulsing() /*animate*/);
+ mNotificationPanel.setDozing(mDozing, mDozeScrimController.isPulsing() /*animate*/);
if (mDozing) {
mStackScroller.setDark(true, false /*animate*/);
} else {
mStackScroller.setDark(false, false /*animate*/);
}
- mScrimController.setDozing(mDozing, mScrimController.isPulsing() /*animate*/);
+ mScrimController.setDozing(mDozing);
+ mDozeScrimController.setDozing(mDozing, mDozeScrimController.isPulsing() /* animate */);
}
public void updateStackScrollerState(boolean goingToFullShade) {
@@ -4060,7 +4063,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
public void wakeUpIfDozing(long time, boolean fromTouch) {
- if (mDozing && mScrimController.isPulsing()) {
+ if (mDozing && mDozeScrimController.isPulsing()) {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
pm.wakeUp(time);
if (fromTouch) {
@@ -4175,7 +4178,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
private void handlePulseWhileDozing(@NonNull PulseCallback callback) {
- mScrimController.pulse(callback);
+ mDozeScrimController.pulse(callback);
}
private void handleStopDozing() {