Merge "Reformat NotificationMemoryMonitor.kt in main to match tm-qpr-dev"

This commit is contained in:
Julia Tuttle
2022-10-17 16:45:25 +00:00
committed by Android (Google) Code Review

View File

@@ -73,15 +73,19 @@ constructor(
fun notificationMemoryUse(
notifications: Collection<NotificationEntry>
): List<NotificationMemoryUsage> {
return notifications.asSequence().map { entry ->
val packageName = entry.sbn.packageName
val notificationObjectUsage =
computeNotificationObjectUse(entry.sbn.notification, hashSetOf())
NotificationMemoryUsage(
packageName,
NotificationUtils.logKey(entry.sbn.key),
notificationObjectUsage)
}.toList()
return notifications
.asSequence()
.map { entry ->
val packageName = entry.sbn.packageName
val notificationObjectUsage =
computeNotificationObjectUse(entry.sbn.notification, hashSetOf())
NotificationMemoryUsage(
packageName,
NotificationUtils.logKey(entry.sbn.key),
notificationObjectUsage
)
}
.toList()
}
/**