am 9a2d5742: Merge "Fixed when the notification effects are being cleared" into mnc-dev
* commit '9a2d5742bd11c2a7a583d53b1ef1ad12d75e239e': 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) {
|
protected void handleVisibleToUserChanged(boolean visibleToUser) {
|
||||||
try {
|
try {
|
||||||
if (visibleToUser) {
|
if (visibleToUser) {
|
||||||
boolean clearNotificationEffects = !isPanelFullyCollapsed() &&
|
boolean pinnedHeadsUp = mHeadsUpManager.hasPinnedHeadsUp();
|
||||||
(mShowLockscreenNotifications ||
|
boolean clearNotificationEffects =
|
||||||
(mState == StatusBarState.SHADE || mState == StatusBarState.SHADE_LOCKED));
|
((mShowLockscreenNotifications && mState == StatusBarState.KEYGUARD) ||
|
||||||
|
(!pinnedHeadsUp && (mState == StatusBarState.SHADE
|
||||||
|
|| mState == StatusBarState.SHADE_LOCKED)));
|
||||||
int notificationLoad = mNotificationData.getActiveNotifications().size();
|
int notificationLoad = mNotificationData.getActiveNotifications().size();
|
||||||
if (mHeadsUpManager.hasPinnedHeadsUp() && isPanelFullyCollapsed()) {
|
if (pinnedHeadsUp && isPanelFullyCollapsed()) {
|
||||||
notificationLoad = 1;
|
notificationLoad = 1;
|
||||||
} else {
|
} else {
|
||||||
MetricsLogger.histogram(mContext, "note_load", notificationLoad);
|
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,
|
// down on the lockscreen), clear notification LED, vibration,
|
||||||
// ringing.
|
// ringing.
|
||||||
// Other transitions are covered in handleVisibleToUserChanged().
|
// Other transitions are covered in handleVisibleToUserChanged().
|
||||||
if (state != mState && mVisible && state == StatusBarState.SHADE_LOCKED) {
|
if (state != mState && mVisible && (state == StatusBarState.SHADE_LOCKED
|
||||||
try {
|
|| (state == StatusBarState.SHADE && isGoingToNotificationShade()))) {
|
||||||
mBarService.clearNotificationEffects();
|
clearNotificationEffects();
|
||||||
} catch (RemoteException e) {
|
|
||||||
// Ignore.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mState = state;
|
mState = state;
|
||||||
mGroupManager.setStatusBarState(state);
|
mGroupManager.setStatusBarState(state);
|
||||||
|
|||||||
Reference in New Issue
Block a user