Merge "Fix crash in RowAlertTimeCoordinator when a group has no children" into main
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)
     }