Loading services/core/java/com/android/server/notification/NotificationManagerService.java +18 −7 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import static org.xmlpull.v1.XmlPullParser.END_TAG; import static org.xmlpull.v1.XmlPullParser.START_TAG; import android.Manifest; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManagerNative; import android.app.AppGlobals; Loading Loading @@ -218,7 +219,7 @@ public class NotificationManagerService extends SystemService { private IActivityManager mAm; AudioManager mAudioManager; AudioManagerInternal mAudioManagerInternal; StatusBarManagerInternal mStatusBar; @Nullable StatusBarManagerInternal mStatusBar; Vibrator mVibrator; private VrManagerInternal mVrManagerInternal; Loading Loading @@ -795,7 +796,9 @@ public class NotificationManagerService extends SystemService { } else if (action.equals(Intent.ACTION_USER_PRESENT)) { // turn off LED when user passes through lock screen mNotificationLight.turnOff(); if (mStatusBar != null) { mStatusBar.notificationLightOff(); } } else if (action.equals(Intent.ACTION_USER_SWITCHED)) { final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL); // reload per-user settings Loading Loading @@ -859,8 +862,10 @@ public class NotificationManagerService extends SystemService { private final Runnable mBuzzBeepBlinked = new Runnable() { @Override public void run() { if (mStatusBar != null) { mStatusBar.buzzBeepBlinked(); } } }; static long[] getLongArray(Resources r, int resid, int maxlen, long[] def) { Loading Loading @@ -958,7 +963,9 @@ public class NotificationManagerService extends SystemService { } mStatusBar = getLocalService(StatusBarManagerInternal.class); if (mStatusBar != null) { mStatusBar.setNotificationDelegate(mNotificationDelegate); } final LightsManager lights = getLocalService(LightsManager.class); mNotificationLight = lights.getLight(LightsManager.LIGHT_ID_NOTIFICATIONS); Loading Loading @@ -3301,7 +3308,9 @@ public class NotificationManagerService extends SystemService { // Don't flash while we are in a call or screen is on if (ledNotification == null || mInCall || mScreenOn) { mNotificationLight.turnOff(); if (mStatusBar != null) { mStatusBar.notificationLightOff(); } } else { final Notification ledno = ledNotification.sbn.getNotification(); int ledARGB = ledno.ledARGB; Loading @@ -3317,10 +3326,12 @@ public class NotificationManagerService extends SystemService { mNotificationLight.setFlashing(ledARGB, Light.LIGHT_FLASH_TIMED, ledOnMS, ledOffMS); } if (mStatusBar != null) { // let SystemUI make an independent decision mStatusBar.notificationLightPulse(ledARGB, ledOnMS, ledOffMS); } } } // lock on mNotificationList int indexOfNotificationLocked(String pkg, String tag, int id, int userId) Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +18 −7 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import static org.xmlpull.v1.XmlPullParser.END_TAG; import static org.xmlpull.v1.XmlPullParser.START_TAG; import android.Manifest; import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManagerNative; import android.app.AppGlobals; Loading Loading @@ -218,7 +219,7 @@ public class NotificationManagerService extends SystemService { private IActivityManager mAm; AudioManager mAudioManager; AudioManagerInternal mAudioManagerInternal; StatusBarManagerInternal mStatusBar; @Nullable StatusBarManagerInternal mStatusBar; Vibrator mVibrator; private VrManagerInternal mVrManagerInternal; Loading Loading @@ -795,7 +796,9 @@ public class NotificationManagerService extends SystemService { } else if (action.equals(Intent.ACTION_USER_PRESENT)) { // turn off LED when user passes through lock screen mNotificationLight.turnOff(); if (mStatusBar != null) { mStatusBar.notificationLightOff(); } } else if (action.equals(Intent.ACTION_USER_SWITCHED)) { final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL); // reload per-user settings Loading Loading @@ -859,8 +862,10 @@ public class NotificationManagerService extends SystemService { private final Runnable mBuzzBeepBlinked = new Runnable() { @Override public void run() { if (mStatusBar != null) { mStatusBar.buzzBeepBlinked(); } } }; static long[] getLongArray(Resources r, int resid, int maxlen, long[] def) { Loading Loading @@ -958,7 +963,9 @@ public class NotificationManagerService extends SystemService { } mStatusBar = getLocalService(StatusBarManagerInternal.class); if (mStatusBar != null) { mStatusBar.setNotificationDelegate(mNotificationDelegate); } final LightsManager lights = getLocalService(LightsManager.class); mNotificationLight = lights.getLight(LightsManager.LIGHT_ID_NOTIFICATIONS); Loading Loading @@ -3301,7 +3308,9 @@ public class NotificationManagerService extends SystemService { // Don't flash while we are in a call or screen is on if (ledNotification == null || mInCall || mScreenOn) { mNotificationLight.turnOff(); if (mStatusBar != null) { mStatusBar.notificationLightOff(); } } else { final Notification ledno = ledNotification.sbn.getNotification(); int ledARGB = ledno.ledARGB; Loading @@ -3317,10 +3326,12 @@ public class NotificationManagerService extends SystemService { mNotificationLight.setFlashing(ledARGB, Light.LIGHT_FLASH_TIMED, ledOnMS, ledOffMS); } if (mStatusBar != null) { // let SystemUI make an independent decision mStatusBar.notificationLightPulse(ledARGB, ledOnMS, ledOffMS); } } } // lock on mNotificationList int indexOfNotificationLocked(String pkg, String tag, int id, int userId) Loading