Loading services/core/java/com/android/server/EventLogTags.logtags +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ option java_package com.android.server 27530 notification_canceled (key|3),(reason|1),(lifespan|1),(freshness|1),(exposure|1) # replaces 27510 with a row per notification 27531 notification_visibility (key|3),(visibile|1),(lifespan|1),(freshness|1) # a notification emited noise, vibration, or light 27532 notification_alert (key|3),(buzz|1),(beep|1),(blink|1) # --------------------------- # Watchdog.java Loading services/core/java/com/android/server/notification/NotificationManagerService.java +11 −6 Original line number Diff line number Diff line Loading @@ -2261,7 +2261,10 @@ public class NotificationManagerService extends SystemService { } private void buzzBeepBlinkLocked(NotificationRecord record) { boolean buzzBeepBlinked = false; boolean buzz = false; boolean beep = false; boolean blink = false; final Notification notification = record.sbn.getNotification(); // Should this notification make noise, vibe, or use the LED? Loading Loading @@ -2343,7 +2346,7 @@ public class NotificationManagerService extends SystemService { + " with attributes " + audioAttributes); player.playAsync(soundUri, record.sbn.getUser(), looping, audioAttributes); buzzBeepBlinked = true; beep = true; } } catch (RemoteException e) { } finally { Loading Loading @@ -2383,7 +2386,7 @@ public class NotificationManagerService extends SystemService { : mFallbackVibrationPattern, ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1, audioAttributesForNotification(notification)); buzzBeepBlinked = true; buzz = true; } finally { Binder.restoreCallingIdentity(identity); } Loading @@ -2394,7 +2397,7 @@ public class NotificationManagerService extends SystemService { notification.vibrate, ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1, audioAttributesForNotification(notification)); buzzBeepBlinked = true; buzz = true; } } } Loading @@ -2408,11 +2411,13 @@ public class NotificationManagerService extends SystemService { if (mUseAttentionLight) { mAttentionLight.pulse(); } buzzBeepBlinked = true; blink = true; } else if (wasShowLights) { updateLightsLocked(); } if (buzzBeepBlinked) { if (buzz || beep || blink) { EventLogTags.writeNotificationAlert(record.getKey(), buzz ? 1 : 0, beep ? 1 : 0, blink ? 1 : 0); mHandler.post(mBuzzBeepBlinked); } } Loading Loading
services/core/java/com/android/server/EventLogTags.logtags +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,8 @@ option java_package com.android.server 27530 notification_canceled (key|3),(reason|1),(lifespan|1),(freshness|1),(exposure|1) # replaces 27510 with a row per notification 27531 notification_visibility (key|3),(visibile|1),(lifespan|1),(freshness|1) # a notification emited noise, vibration, or light 27532 notification_alert (key|3),(buzz|1),(beep|1),(blink|1) # --------------------------- # Watchdog.java Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +11 −6 Original line number Diff line number Diff line Loading @@ -2261,7 +2261,10 @@ public class NotificationManagerService extends SystemService { } private void buzzBeepBlinkLocked(NotificationRecord record) { boolean buzzBeepBlinked = false; boolean buzz = false; boolean beep = false; boolean blink = false; final Notification notification = record.sbn.getNotification(); // Should this notification make noise, vibe, or use the LED? Loading Loading @@ -2343,7 +2346,7 @@ public class NotificationManagerService extends SystemService { + " with attributes " + audioAttributes); player.playAsync(soundUri, record.sbn.getUser(), looping, audioAttributes); buzzBeepBlinked = true; beep = true; } } catch (RemoteException e) { } finally { Loading Loading @@ -2383,7 +2386,7 @@ public class NotificationManagerService extends SystemService { : mFallbackVibrationPattern, ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1, audioAttributesForNotification(notification)); buzzBeepBlinked = true; buzz = true; } finally { Binder.restoreCallingIdentity(identity); } Loading @@ -2394,7 +2397,7 @@ public class NotificationManagerService extends SystemService { notification.vibrate, ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1, audioAttributesForNotification(notification)); buzzBeepBlinked = true; buzz = true; } } } Loading @@ -2408,11 +2411,13 @@ public class NotificationManagerService extends SystemService { if (mUseAttentionLight) { mAttentionLight.pulse(); } buzzBeepBlinked = true; blink = true; } else if (wasShowLights) { updateLightsLocked(); } if (buzzBeepBlinked) { if (buzz || beep || blink) { EventLogTags.writeNotificationAlert(record.getKey(), buzz ? 1 : 0, beep ? 1 : 0, blink ? 1 : 0); mHandler.post(mBuzzBeepBlinked); } } Loading