Loading services/core/java/com/android/server/notification/NotificationManagerService.java +50 −45 Original line number Diff line number Diff line Loading @@ -5387,8 +5387,8 @@ public class NotificationManagerService extends SystemService { try { fixNotification(notification, pkg, tag, id, userId); } catch (NameNotFoundException e) { Slog.e(TAG, "Cannot create a context for sending app", e); } catch (Exception e) { Slog.e(TAG, "Cannot fix notification", e); return; } Loading Loading @@ -9012,6 +9012,7 @@ public class NotificationManagerService extends SystemService { @GuardedBy("mNotificationLock") private void notifyPostedLocked(NotificationRecord r, NotificationRecord old, boolean notifyAllListeners) { try { // Lazily initialized snapshots of the notification. StatusBarNotification sbn = r.getSbn(); StatusBarNotification oldSbn = (old != null) ? old.getSbn() : null; Loading @@ -9019,7 +9020,8 @@ public class NotificationManagerService extends SystemService { for (final ManagedServiceInfo info : getServices()) { boolean sbnVisible = isVisibleToListener(sbn, info); boolean oldSbnVisible = oldSbn != null ? isVisibleToListener(oldSbn, info) : false; boolean oldSbnVisible = oldSbn != null ? isVisibleToListener(oldSbn, info) : false; // This notification hasn't been and still isn't visible -> ignore. if (!oldSbnVisible && !sbnVisible) { continue; Loading Loading @@ -9066,6 +9068,9 @@ public class NotificationManagerService extends SystemService { } }); } } catch (Exception e) { Slog.e(TAG, "Could not notify listeners for " + r.getKey(), e); } } /** Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +50 −45 Original line number Diff line number Diff line Loading @@ -5387,8 +5387,8 @@ public class NotificationManagerService extends SystemService { try { fixNotification(notification, pkg, tag, id, userId); } catch (NameNotFoundException e) { Slog.e(TAG, "Cannot create a context for sending app", e); } catch (Exception e) { Slog.e(TAG, "Cannot fix notification", e); return; } Loading Loading @@ -9012,6 +9012,7 @@ public class NotificationManagerService extends SystemService { @GuardedBy("mNotificationLock") private void notifyPostedLocked(NotificationRecord r, NotificationRecord old, boolean notifyAllListeners) { try { // Lazily initialized snapshots of the notification. StatusBarNotification sbn = r.getSbn(); StatusBarNotification oldSbn = (old != null) ? old.getSbn() : null; Loading @@ -9019,7 +9020,8 @@ public class NotificationManagerService extends SystemService { for (final ManagedServiceInfo info : getServices()) { boolean sbnVisible = isVisibleToListener(sbn, info); boolean oldSbnVisible = oldSbn != null ? isVisibleToListener(oldSbn, info) : false; boolean oldSbnVisible = oldSbn != null ? isVisibleToListener(oldSbn, info) : false; // This notification hasn't been and still isn't visible -> ignore. if (!oldSbnVisible && !sbnVisible) { continue; Loading Loading @@ -9066,6 +9068,9 @@ public class NotificationManagerService extends SystemService { } }); } } catch (Exception e) { Slog.e(TAG, "Could not notify listeners for " + r.getKey(), e); } } /** Loading