am 146dc265: am 9a2d5742: Merge "Fixed when the notification effects are being cleared" into mnc-dev
* commit '146dc26511a9a1b82bf62d679b9cae6e8966241f': Fixed when the notification effects are being cleared
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user