Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +5 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,8 @@ public class NotifCollection implements Dumpable { Assert.isMainThread(); checkForReentrantCall(); mLogger.logDismissAll(userId); try { mStatusBarService.onClearAllNotifications(userId); } catch (RemoteException e) { Loading Loading @@ -327,6 +329,7 @@ public class NotifCollection implements Dumpable { for (NotificationEntry otherEntry : mNotificationSet.values()) { if (shouldAutoDismissChildren(otherEntry, entry.getSbn().getGroupKey())) { otherEntry.setDismissState(PARENT_DISMISSED); mLogger.logChildDismissed(otherEntry); if (isCanceled(otherEntry)) { canceledEntries.add(otherEntry); } Loading @@ -339,6 +342,7 @@ public class NotifCollection implements Dumpable { // Immediately remove any dismissed notifs that have already been canceled by system server // (probably due to being lifetime-extended up until this point). for (NotificationEntry canceledEntry : canceledEntries) { mLogger.logDismissOnAlreadyCanceledEntry(canceledEntry); tryRemoveNotification(canceledEntry); } } Loading Loading @@ -453,6 +457,7 @@ public class NotifCollection implements Dumpable { } if (!isLifetimeExtended(entry)) { mLogger.logNotifReleased(entry.getKey()); mNotificationSet.remove(entry.getKey()); cancelDismissInterception(entry); mEventQueue.add(new EntryRemovedEvent(entry, entry.mCancellationReason)); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionLogger.kt +33 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import com.android.systemui.log.LogLevel.INFO import com.android.systemui.log.LogLevel.WARNING import com.android.systemui.log.LogLevel.WTF import com.android.systemui.log.dagger.NotificationLog import com.android.systemui.statusbar.notification.collection.NotificationEntry import javax.inject.Inject class NotifCollectionLogger @Inject constructor( Loading Loading @@ -63,6 +64,14 @@ class NotifCollectionLogger @Inject constructor( }) } fun logNotifReleased(key: String) { buffer.log(TAG, INFO, { str1 = key }, { "RELEASED $str1" }) } fun logNotifDismissed(key: String) { buffer.log(TAG, INFO, { str1 = key Loading @@ -71,6 +80,30 @@ class NotifCollectionLogger @Inject constructor( }) } fun logChildDismissed(entry: NotificationEntry) { buffer.log(TAG, DEBUG, { str1 = entry.key }, { "CHILD DISMISSED (inferred): $str1" }) } fun logDismissAll(userId: Int) { buffer.log(TAG, INFO, { int1 = userId }, { "DISMISS ALL notifications for user $int1" }) } fun logDismissOnAlreadyCanceledEntry(entry: NotificationEntry) { buffer.log(TAG, DEBUG, { str1 = entry.key }, { "Dismiss on $str1, which was already canceled. Trying to remove..." }) } fun logNotifDismissedIntercepted(key: String) { buffer.log(TAG, INFO, { str1 = key Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollection.java +5 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,8 @@ public class NotifCollection implements Dumpable { Assert.isMainThread(); checkForReentrantCall(); mLogger.logDismissAll(userId); try { mStatusBarService.onClearAllNotifications(userId); } catch (RemoteException e) { Loading Loading @@ -327,6 +329,7 @@ public class NotifCollection implements Dumpable { for (NotificationEntry otherEntry : mNotificationSet.values()) { if (shouldAutoDismissChildren(otherEntry, entry.getSbn().getGroupKey())) { otherEntry.setDismissState(PARENT_DISMISSED); mLogger.logChildDismissed(otherEntry); if (isCanceled(otherEntry)) { canceledEntries.add(otherEntry); } Loading @@ -339,6 +342,7 @@ public class NotifCollection implements Dumpable { // Immediately remove any dismissed notifs that have already been canceled by system server // (probably due to being lifetime-extended up until this point). for (NotificationEntry canceledEntry : canceledEntries) { mLogger.logDismissOnAlreadyCanceledEntry(canceledEntry); tryRemoveNotification(canceledEntry); } } Loading Loading @@ -453,6 +457,7 @@ public class NotifCollection implements Dumpable { } if (!isLifetimeExtended(entry)) { mLogger.logNotifReleased(entry.getKey()); mNotificationSet.remove(entry.getKey()); cancelDismissInterception(entry); mEventQueue.add(new EntryRemovedEvent(entry, entry.mCancellationReason)); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/notifcollection/NotifCollectionLogger.kt +33 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import com.android.systemui.log.LogLevel.INFO import com.android.systemui.log.LogLevel.WARNING import com.android.systemui.log.LogLevel.WTF import com.android.systemui.log.dagger.NotificationLog import com.android.systemui.statusbar.notification.collection.NotificationEntry import javax.inject.Inject class NotifCollectionLogger @Inject constructor( Loading Loading @@ -63,6 +64,14 @@ class NotifCollectionLogger @Inject constructor( }) } fun logNotifReleased(key: String) { buffer.log(TAG, INFO, { str1 = key }, { "RELEASED $str1" }) } fun logNotifDismissed(key: String) { buffer.log(TAG, INFO, { str1 = key Loading @@ -71,6 +80,30 @@ class NotifCollectionLogger @Inject constructor( }) } fun logChildDismissed(entry: NotificationEntry) { buffer.log(TAG, DEBUG, { str1 = entry.key }, { "CHILD DISMISSED (inferred): $str1" }) } fun logDismissAll(userId: Int) { buffer.log(TAG, INFO, { int1 = userId }, { "DISMISS ALL notifications for user $int1" }) } fun logDismissOnAlreadyCanceledEntry(entry: NotificationEntry) { buffer.log(TAG, DEBUG, { str1 = entry.key }, { "Dismiss on $str1, which was already canceled. Trying to remove..." }) } fun logNotifDismissedIntercepted(key: String) { buffer.log(TAG, INFO, { str1 = key Loading