Loading services/java/com/android/server/NotificationManagerService.java +10 −1 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ class NotificationManagerService extends INotificationManager.Stub // for enabling and disabling notification pulse behavior private boolean mScreenOn = true; private boolean mNotificationScreenOn; private boolean mNotificationPulseEnabled; // for adb connected notifications Loading Loading @@ -358,6 +359,8 @@ class NotificationManagerService extends INotificationManager.Stub Settings.Secure.ADB_ENABLED), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.NOTIFICATION_LIGHT_PULSE), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.NOTIFICATION_SCREEN_ON), false, this); update(); } Loading @@ -379,6 +382,12 @@ class NotificationManagerService extends INotificationManager.Stub mNotificationPulseEnabled = pulseEnabled; updateNotificationPulse(); } boolean screenOn = Settings.System.getInt(resolver, Settings.System.NOTIFICATION_SCREEN_ON, 0) != 0; if (mNotificationScreenOn != screenOn) { mNotificationScreenOn = screenOn; updateNotificationPulse(); } } } Loading Loading @@ -1026,7 +1035,7 @@ class NotificationManagerService extends INotificationManager.Stub } // we only flash if screen is off and persistent pulsing is enabled if (mLedNotification == null || mScreenOn || !mNotificationPulseEnabled) { if (mLedNotification == null || (mScreenOn && !mNotificationScreenOn) || !mNotificationPulseEnabled) { mHardware.setLightOff_UNCHECKED(HardwareService.LIGHT_ID_NOTIFICATIONS); } else { mHardware.setLightFlashing_UNCHECKED( Loading Loading
services/java/com/android/server/NotificationManagerService.java +10 −1 Original line number Diff line number Diff line Loading @@ -98,6 +98,7 @@ class NotificationManagerService extends INotificationManager.Stub // for enabling and disabling notification pulse behavior private boolean mScreenOn = true; private boolean mNotificationScreenOn; private boolean mNotificationPulseEnabled; // for adb connected notifications Loading Loading @@ -358,6 +359,8 @@ class NotificationManagerService extends INotificationManager.Stub Settings.Secure.ADB_ENABLED), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.NOTIFICATION_LIGHT_PULSE), false, this); resolver.registerContentObserver(Settings.System.getUriFor( Settings.System.NOTIFICATION_SCREEN_ON), false, this); update(); } Loading @@ -379,6 +382,12 @@ class NotificationManagerService extends INotificationManager.Stub mNotificationPulseEnabled = pulseEnabled; updateNotificationPulse(); } boolean screenOn = Settings.System.getInt(resolver, Settings.System.NOTIFICATION_SCREEN_ON, 0) != 0; if (mNotificationScreenOn != screenOn) { mNotificationScreenOn = screenOn; updateNotificationPulse(); } } } Loading Loading @@ -1026,7 +1035,7 @@ class NotificationManagerService extends INotificationManager.Stub } // we only flash if screen is off and persistent pulsing is enabled if (mLedNotification == null || mScreenOn || !mNotificationPulseEnabled) { if (mLedNotification == null || (mScreenOn && !mNotificationScreenOn) || !mNotificationPulseEnabled) { mHardware.setLightOff_UNCHECKED(HardwareService.LIGHT_ID_NOTIFICATIONS); } else { mHardware.setLightFlashing_UNCHECKED( Loading