OSDN Git Service

Remove spammy notification_cancel event log.
authorChris Wren <cwren@android.com>
Wed, 4 Mar 2015 16:47:46 +0000 (08:47 -0800)
committerChris Wren <cwren@android.com>
Wed, 4 Mar 2015 16:48:42 +0000 (08:48 -0800)
We also log when notifications are actually canceled,
so this only tells us how often clients cancel non-existent
notifications.  The answer: quite often.

Bug: 19599876
Change-Id: I812866cb080d51974d4db0b6e6b3eb50c3aeb560

services/core/java/com/android/server/notification/NotificationManagerService.java

index 9b6b5fb..bedcabe 100644 (file)
@@ -2584,8 +2584,8 @@ public class NotificationManagerService extends SystemService {
             @Override
             public void run() {
                 String listenerName = listener == null ? null : listener.component.toShortString();
-                EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, id, tag, userId,
-                        mustHaveFlags, mustNotHaveFlags, reason, listenerName);
+                if (DBG) EventLogTags.writeNotificationCancel(callingUid, callingPid, pkg, id, tag,
+                        userId, mustHaveFlags, mustNotHaveFlags, reason, listenerName);
 
                 synchronized (mNotificationList) {
                     int index = indexOfNotificationLocked(pkg, tag, id, userId);