Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c08967fb authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[SB][Screen chips] Move `ongoingCallNotification` flow to background." into main

parents 653e101e 380e8a8a
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -81,11 +81,15 @@ constructor(
     * [CallType.Ongoing].
     */
    val ongoingCallNotification: Flow<ActiveNotificationModel?> =
        allRepresentativeNotifications.map { notifMap ->
            // Once a call has started, its `whenTime` should stay the same, so we can use it as a
            // stable sort value.
            notifMap.values.filter { it.callType == CallType.Ongoing }.minByOrNull { it.whenTime }
        allRepresentativeNotifications
            .map { notifMap ->
                // Once a call has started, its `whenTime` should stay the same, so we can use it as
                // a stable sort value.
                notifMap.values
                    .filter { it.callType == CallType.Ongoing }
                    .minByOrNull { it.whenTime }
            }
            .flowOn(backgroundDispatcher)

    /** Are any notifications being actively presented in the notification stack? */
    val areAnyNotificationsPresent: Flow<Boolean> =