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

Commit 1ac52a91 authored by Chris Wren's avatar Chris Wren
Browse files

remove some logspam and fix an NPE

notificaiton manager is logspamming, and also dump can fail
while collecting a bugreport if an actionIntent is null.

Bug: 27338511
Bug: 27338098
Change-Id: I8648541469887d62ee64b28d96e0cb7e4fab0f7b
parent ae262a89
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2307,7 +2307,7 @@ public class NotificationManagerService extends SystemService {

            synchronized (mNotificationList) {
                final StatusBarNotification n = r.sbn;
                Slog.d(TAG, "EnqueueNotificationRunnable.run for: " + n.getKey());
                if (DBG) Slog.d(TAG, "EnqueueNotificationRunnable.run for: " + n.getKey());
                NotificationRecord old = mNotificationsByKey.get(n.getKey());
                if (old != null) {
                    // Retain ranking information from previous record
@@ -2328,7 +2328,7 @@ public class NotificationManagerService extends SystemService {
                handleGroupedNotificationLocked(r, old, callingUid, callingPid);
                boolean ignoreNotification =
                        removeUnusedGroupedNotificationLocked(r, old, callingUid, callingPid);
                Slog.d(TAG, "ignoreNotification is " + ignoreNotification);
                if (DBG) Slog.d(TAG, "ignoreNotification is " + ignoreNotification);

                // This conditional is a dirty hack to limit the logging done on
                //     behalf of the download manager without affecting other apps.
+8 −6
Original line number Diff line number Diff line
@@ -227,13 +227,15 @@ public final class NotificationRecord {
            final int N = notification.actions.length;
            for (int i=0; i<N; i++) {
                final Notification.Action action = notification.actions[i];
                if (action != null) {
                    pw.println(String.format("%s    [%d] \"%s\" -> %s",
                            prefix,
                            i,
                            action.title,
                        action.actionIntent.toString()
                            action.actionIntent == null ? "null" : action.actionIntent.toString()
                    ));
                }
            }
            pw.println(prefix + "  }");
        }
        if (notification.extras != null && notification.extras.size() > 0) {