Merge "Add more logging to NotifCollection" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cfaca9bd3c
@@ -281,6 +281,8 @@ public class NotifCollection implements Dumpable {
|
||||
Assert.isMainThread();
|
||||
checkForReentrantCall();
|
||||
|
||||
mLogger.logDismissAll(userId);
|
||||
|
||||
try {
|
||||
mStatusBarService.onClearAllNotifications(userId);
|
||||
} catch (RemoteException e) {
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
|
||||
@@ -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(
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user