Merge "Fix issue where notifications should not animate" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-23 04:45:31 +00:00
committed by Android (Google) Code Review

View File

@@ -3639,6 +3639,7 @@ public class StatusBar extends SystemUI implements DemoMode,
@Override @Override
public void onStartedGoingToSleep() { public void onStartedGoingToSleep() {
updateNotificationPanelTouchState();
notifyHeadsUpGoingToSleep(); notifyHeadsUpGoingToSleep();
dismissVolumeDialog(); dismissVolumeDialog();
} }
@@ -3671,7 +3672,10 @@ public class StatusBar extends SystemUI implements DemoMode,
* Keyguard. * Keyguard.
*/ */
private void updateNotificationPanelTouchState() { private void updateNotificationPanelTouchState() {
mNotificationPanel.setTouchAndAnimationDisabled(!mDeviceInteractive && !mPulsing); boolean goingToSleepWithoutAnimation = isGoingToSleep()
&& !DozeParameters.getInstance(mContext).shouldControlScreenOff();
mNotificationPanel.setTouchAndAnimationDisabled((!mDeviceInteractive && !mPulsing)
|| goingToSleepWithoutAnimation);
} }
final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() { final ScreenLifecycle.Observer mScreenObserver = new ScreenLifecycle.Observer() {