diff options
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java | 10 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 9 |
2 files changed, 9 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index c14f215..eecac63 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1636,11 +1636,13 @@ public abstract class BaseStatusBar extends SystemUI implements protected void handleVisibleToUserChanged(boolean visibleToUser) { try { if (visibleToUser) { - boolean clearNotificationEffects = !isPanelFullyCollapsed() && - (mShowLockscreenNotifications || - (mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED)); + boolean pinnedHeadsUp = mHeadsUpManager.hasPinnedHeadsUp(); + boolean clearNotificationEffects = + ((mShowLockscreenNotifications && mState == StatusBarState.KEYGUARD) || + (!pinnedHeadsUp && (mState == StatusBarState.SHADE + || mState == StatusBarState.SHADE_LOCKED))); int notificationLoad = mNotificationData.getActiveNotifications().size(); - if (mHeadsUpManager.hasPinnedHeadsUp() && isPanelFullyCollapsed()) { + if (pinnedHeadsUp && isPanelFullyCollapsed()) { notificationLoad = 1; } else { MetricsLogger.histogram(mContext, "note_load", notificationLoad); 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 28d65c3..55b1127 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -3742,12 +3742,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, // down on the lockscreen), clear notification LED, vibration, // ringing. // Other transitions are covered in handleVisibleToUserChanged(). - if (state != mState && mVisible && state == StatusBarState.SHADE_LOCKED) { - try { - mBarService.clearNotificationEffects(); - } catch (RemoteException e) { - // Ignore. - } + if (state != mState && mVisible && (state == StatusBarState.SHADE_LOCKED + || (state == StatusBarState.SHADE && isGoingToNotificationShade()))) { + clearNotificationEffects(); } mState = state; mGroupManager.setStatusBarState(state); |