diff options
author | Selim Cinek <cinek@google.com> | 2015-09-01 23:33:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-09-01 23:33:50 +0000 |
commit | 146dc26511a9a1b82bf62d679b9cae6e8966241f (patch) | |
tree | 45ebc7b370486de5f339ab9c5d45bb7c0c0f4739 /packages/SystemUI | |
parent | e45761ff901342a538607a3539997b106e867821 (diff) | |
parent | 9a2d5742bd11c2a7a583d53b1ef1ad12d75e239e (diff) | |
download | frameworks_base-146dc26511a9a1b82bf62d679b9cae6e8966241f.zip frameworks_base-146dc26511a9a1b82bf62d679b9cae6e8966241f.tar.gz frameworks_base-146dc26511a9a1b82bf62d679b9cae6e8966241f.tar.bz2 |
am 9a2d5742: Merge "Fixed when the notification effects are being cleared" into mnc-dev
* commit '9a2d5742bd11c2a7a583d53b1ef1ad12d75e239e':
Fixed when the notification effects are being cleared
Diffstat (limited to 'packages/SystemUI')
-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); |