Merge "Fix notification stuck on AOD" into qt-r1-dev

This commit is contained in:
TreeHugger Robot
2019-06-26 17:55:25 +00:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 3 deletions

View File

@@ -149,6 +149,14 @@ public class DozeScrimController implements StateListener {
mHandler.removeCallbacks(mPulseOut);
}
/**
* When pulsing, cancel any timeouts that would take you out of the pulsing state.
*/
public void cancelPendingPulseTimeout() {
mHandler.removeCallbacks(mPulseOut);
mHandler.removeCallbacks(mPulseOutExtended);
}
private void cancelPulsing() {
if (mPulseCallback != null) {
if (DEBUG) Log.d(TAG, "Cancel pulsing");

View File

@@ -1566,9 +1566,10 @@ public class StatusBar extends SystemUI implements DemoMode,
@Override
public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) {
mEntryManager.updateNotifications();
if (isDozing()) {
if (isHeadsUp) {
mDozeServiceHost.fireNotificationPulse();
if (isDozing() && isHeadsUp) {
mDozeServiceHost.fireNotificationPulse();
if (mPulsing) {
mDozeScrimController.cancelPendingPulseTimeout();
}
}
if (!isHeadsUp && !mHeadsUpManager.hasNotifications()) {