Temporarily restore some support for icon==0 notifications.
This is WRONG WRONG WRONG but certain apps rely on it to
poke the LED and so forth. In a future release this will
stop working.
Bug: 8623399
Change-Id: I49bb8ccc6891b1398ceec94c64d6c3a510ad1c38
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 5dc8e0c..29aaeaf 100644
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -1753,7 +1753,7 @@
notifyPostedLocked(r);
} else {
- Slog.e(TAG, "Ignoring notification with icon==0: " + notification);
+ Slog.e(TAG, "Not posting notification with icon==0: " + notification);
if (old != null && old.statusBarKey != null) {
long identity = Binder.clearCallingIdentity();
try {
@@ -1765,7 +1765,9 @@
notifyRemovedLocked(r);
}
- return; // do not play sounds, show lights, etc. for invalid notifications
+ // ATTENTION: in a future release we will bail out here
+ // so that we do not play sounds, show lights, etc. for invalid notifications
+ Slog.e(TAG, "WARNING: In a future release this will crash the app: " + n.getPackageName());
}
// If we're not supposed to beep, vibrate, etc. then don't.