Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt +8 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.stack.ui.viewmodel import android.annotation.SuppressLint import android.graphics.RectF import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dump.DumpManager Loading @@ -41,6 +42,7 @@ import com.android.systemui.util.ui.AnimatedValue import com.android.systemui.util.ui.toAnimatedValueFlow import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged Loading @@ -54,6 +56,7 @@ import kotlinx.coroutines.flow.onStart * ViewModel for the list of notifications, including child elements like the Clear all/Manage * button at the bottom (the footer) and the "No notifications" text (the empty shade). */ @SuppressLint("FlowExposedFromViewModel") // because all flows from this class are bound to a View class NotificationListViewModel @Inject constructor( Loading Loading @@ -98,7 +101,10 @@ constructor( shadeInteractor.qsExpansion .map { it >= QS_EXPANSION_THRESHOLD } .distinctUntilChanged(), shadeModeInteractor.shadeMode.map { it == ShadeMode.Split }, shadeModeInteractor.shadeMode.map { @Suppress("DEPRECATION") // to handle split shade it == ShadeMode.Split }, notificationStackInteractor.isShowingOnLockscreen, ) { hasNotifications, qsExpandedEnough, splitShade, isShowingOnLockscreen -> when { Loading Loading @@ -367,6 +373,7 @@ constructor( * Note that this list can contain both notification keys, as well as keys for other types of * chips like screen recording. */ @OptIn(ExperimentalCoroutinesApi::class) val visibleStatusBarChips: Flow<Map<String, RectF>> = shadeStatusBarComponentsInteractor.ongoingActivityChipsViewModel.flatMapLatest { it.visibleChipsWithBounds Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt +4 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.stack.ui.viewmodel import android.annotation.SuppressLint import com.android.compose.animation.scene.ContentKey import com.android.compose.animation.scene.ObservableTransitionState import com.android.compose.animation.scene.ObservableTransitionState.Idle Loading Loading @@ -66,6 +67,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.mapNotNull /** ViewModel which represents the state of the NSSL/Controller in the world of flexiglass */ @SuppressLint("FlowExposedFromViewModel") // because all flows from this class are bound to a View class NotificationScrollViewModel @AssistedInject constructor( Loading @@ -76,7 +78,7 @@ constructor( shadeModeInteractor: ShadeModeInteractor, bouncerInteractor: BouncerInteractor, private val remoteInputInteractor: RemoteInputInteractor, private val sceneInteractor: SceneInteractor, sceneInteractor: SceneInteractor, // TODO(b/336364825) Remove Lazy when SceneContainerFlag is released - // while the flag is off, creating this object too early results in a crash keyguardInteractor: Lazy<KeyguardInteractor>, Loading Loading @@ -282,6 +284,7 @@ constructor( shadeInteractor.qsExpansion, sceneInteractor.transitionState, ) { shadeMode, qsExpansion, transition -> @Suppress("DEPRECATION") // to handle split shade when (shadeMode) { is ShadeMode.Dual -> // Don't clip notifications while we are opening the DualShade panel to Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationListViewModel.kt +8 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.notification.stack.ui.viewmodel import android.annotation.SuppressLint import android.graphics.RectF import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.dump.DumpManager Loading @@ -41,6 +42,7 @@ import com.android.systemui.util.ui.AnimatedValue import com.android.systemui.util.ui.toAnimatedValueFlow import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged Loading @@ -54,6 +56,7 @@ import kotlinx.coroutines.flow.onStart * ViewModel for the list of notifications, including child elements like the Clear all/Manage * button at the bottom (the footer) and the "No notifications" text (the empty shade). */ @SuppressLint("FlowExposedFromViewModel") // because all flows from this class are bound to a View class NotificationListViewModel @Inject constructor( Loading Loading @@ -98,7 +101,10 @@ constructor( shadeInteractor.qsExpansion .map { it >= QS_EXPANSION_THRESHOLD } .distinctUntilChanged(), shadeModeInteractor.shadeMode.map { it == ShadeMode.Split }, shadeModeInteractor.shadeMode.map { @Suppress("DEPRECATION") // to handle split shade it == ShadeMode.Split }, notificationStackInteractor.isShowingOnLockscreen, ) { hasNotifications, qsExpandedEnough, splitShade, isShowingOnLockscreen -> when { Loading Loading @@ -367,6 +373,7 @@ constructor( * Note that this list can contain both notification keys, as well as keys for other types of * chips like screen recording. */ @OptIn(ExperimentalCoroutinesApi::class) val visibleStatusBarChips: Flow<Map<String, RectF>> = shadeStatusBarComponentsInteractor.ongoingActivityChipsViewModel.flatMapLatest { it.visibleChipsWithBounds Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt +4 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.stack.ui.viewmodel import android.annotation.SuppressLint import com.android.compose.animation.scene.ContentKey import com.android.compose.animation.scene.ObservableTransitionState import com.android.compose.animation.scene.ObservableTransitionState.Idle Loading Loading @@ -66,6 +67,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.mapNotNull /** ViewModel which represents the state of the NSSL/Controller in the world of flexiglass */ @SuppressLint("FlowExposedFromViewModel") // because all flows from this class are bound to a View class NotificationScrollViewModel @AssistedInject constructor( Loading @@ -76,7 +78,7 @@ constructor( shadeModeInteractor: ShadeModeInteractor, bouncerInteractor: BouncerInteractor, private val remoteInputInteractor: RemoteInputInteractor, private val sceneInteractor: SceneInteractor, sceneInteractor: SceneInteractor, // TODO(b/336364825) Remove Lazy when SceneContainerFlag is released - // while the flag is off, creating this object too early results in a crash keyguardInteractor: Lazy<KeyguardInteractor>, Loading Loading @@ -282,6 +284,7 @@ constructor( shadeInteractor.qsExpansion, sceneInteractor.transitionState, ) { shadeMode, qsExpansion, transition -> @Suppress("DEPRECATION") // to handle split shade when (shadeMode) { is ShadeMode.Dual -> // Don't clip notifications while we are opening the DualShade panel to Loading