Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41da5ff9 authored by Daniel Sandler's avatar Daniel Sandler Committed by Dan Sandler
Browse files

Debugging bad notification sorts.

Bug: 16626175
Change-Id: I6cc7ee5f853c846e3aed6f9750e8fb6bc5aed699
parent 256a2266
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -1642,7 +1642,23 @@ public class NotificationManagerService extends SystemService {

                    applyZenModeLocked(r);

                    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;