diff options
| author | 2024-11-11 16:25:53 +0000 | |
|---|---|---|
| committer | 2024-11-11 16:25:53 +0000 | |
| commit | 5508c034f07fd5dda7ca85ccd7a9e7c7bf4fd4ed (patch) | |
| tree | 0bed8bba1397c37ae7a590a8c747b3f2514c5971 | |
| parent | 56e687b6245d9842c5a1385e3389d9922dc3ff1e (diff) | |
| parent | be6c6b4b50fb2f1b77a23891dc8925f64f69bf22 (diff) | |
Merge "Dump values in NotifCollectionCache, not just keys" into main
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollectionCache.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollectionCache.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollectionCache.kt index 958001625a07..1f8d365cfdad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollectionCache.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotifCollectionCache.kt @@ -102,6 +102,10 @@ class NotifCollectionCache<V>( return --lives <= 0 } } + + override fun toString(): String { + return "$key = $value" + } } /** @@ -174,7 +178,10 @@ class NotifCollectionCache<V>( pw.println("$TAG(retainCount = $retainCount, purgeTimeoutMillis = $purgeTimeoutMillis)") pw.withIncreasedIndent { - pw.printCollection("keys present in cache", cache.keys.stream().sorted().toList()) + pw.printCollection( + "entries present in cache", + cache.values.stream().map { it.toString() }.sorted().toList(), + ) val misses = misses.get() val hits = hits.get() |