commit | b4174a25c301ca99b175a61c9858a11b30ad10f5 | [log] [tgz] |
---|---|---|
author | Jeff DeCew <jeffdq@google.com> | Tue Feb 27 22:02:31 2024 +0000 |
committer | Jeff DeCew <jeffdq@google.com> | Tue Feb 27 22:02:34 2024 +0000 |
tree | a81c4295de53fb7b38f24f7cc52f87b058daaaae | |
parent | ee92426eb07dcd1393bb4caec40d67dfd6c958e2 [diff] |
Fix crash in RowAlertTimeCoordinator when a group has no children Change-Id: I05cabc284aa6112801be688f2c024ae6d6558ec9 Fixes: 327243612 Test: manual Flag: NONE
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RowAlertTimeCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RowAlertTimeCoordinator.kt index 12de339..4a7b7ca 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RowAlertTimeCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RowAlertTimeCoordinator.kt
@@ -54,7 +54,7 @@ } private fun GroupEntry.calculateLatestAlertTime(): Long { - val lastChildAlertedTime = children.maxOf { it.lastAudiblyAlertedMs } + val lastChildAlertedTime = children.maxOfOrNull { it.lastAudiblyAlertedMs } ?: 0 val summaryAlertedTime = checkNotNull(summary).lastAudiblyAlertedMs return max(lastChildAlertedTime, summaryAlertedTime) }