diff options
| -rw-r--r-- | core/java/android/service/notification/NotificationListenerService.java | 4 | ||||
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index 76c63b958046..232d4fe4e979 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -713,10 +713,10 @@ public abstract class NotificationListenerService extends Service { createLegacyIconExtras(sbn.getNotification()); maybePopulateRemoteViews(sbn.getNotification()); } catch (IllegalArgumentException e) { - // drop corrupt notification - sbn = null; + // warn and drop corrupt notification Log.w(TAG, "onNotificationPosted: can't rebuild notification from " + sbn.getPackageName()); + sbn = null; } // protect subclass from concurrent modifications of (@link mNotificationKeys}. diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 1464ea428b31..e6a48a8cd87d 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -3686,7 +3686,7 @@ public class NotificationManagerService extends SystemService { for (int i = 0; i < tokens.length; i++) { String token = tokens[i]; if (token != null) { - token.trim(); + token = token.trim(); } if (TextUtils.isEmpty(token)) { continue; |