diff options
author | Daniel Sandler <dsandler@android.com> | 2014-08-05 15:57:38 -0400 |
---|---|---|
committer | Dan Sandler <dsandler@android.com> | 2014-08-06 13:26:04 +0000 |
commit | 41da5ff98f68a575fc46085e8714c8a3e5e5c17a (patch) | |
tree | 81a7c1bd703fdbbc8911103add96e529cefcbf2d | |
parent | 256a22663dbeb31cf4f4a6e295e0c74d80e4fecb (diff) | |
download | frameworks_base-41da5ff98f68a575fc46085e8714c8a3e5e5c17a.zip frameworks_base-41da5ff98f68a575fc46085e8714c8a3e5e5c17a.tar.gz frameworks_base-41da5ff98f68a575fc46085e8714c8a3e5e5c17a.tar.bz2 |
Debugging bad notification sorts.
Bug: 16626175
Change-Id: I6cc7ee5f853c846e3aed6f9750e8fb6bc5aed699
-rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index f575b9a..743abc8 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1642,7 +1642,23 @@ public class NotificationManagerService extends SystemService { applyZenModeLocked(r); - mRankingHelper.sort(mNotificationList); + try { + mRankingHelper.sort(mNotificationList); + } catch (RuntimeException ex) { + // Don't crash the system server if something bad happened. + Log.e(TAG, "Extreme badness during notification sort", ex); + Log.e(TAG, "Current notification list: "); + for (int ii=0; ii < mNotificationList.size(); ii++) { + NotificationRecord nr = mNotificationList.get(ii); + Log.e(TAG, String.format( + " [%d] %s (group %s, rank %d, sortkey %s, proxy %s)", + ii, nr, nr.getGroupKey(), nr.getAuthoritativeRank(), + nr.getNotification().getSortKey(), + nr.getRankingProxy())); + } + // STOPSHIP: remove once b/16626175 is found + throw ex; + } if (notification.icon != 0) { StatusBarNotification oldSbn = (old != null) ? old.sbn : null; |