Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +8 −3 Original line number Diff line number Diff line Loading @@ -76,6 +76,11 @@ constructor( viewModel .areNotificationsVisible(contentKey) .collectAsStateWithLifecycle(initialValue = false) val isBypassEnabled by viewModel.isBypassEnabled.collectAsStateWithLifecycle() if (isBypassEnabled) { with(notificationSection) { HeadsUpNotifications() } } LockscreenLongPress( viewModel = viewModel.touchHandling, Loading Loading @@ -110,7 +115,7 @@ constructor( } ) } if (isShadeLayoutWide) { if (isShadeLayoutWide && !isBypassEnabled) { with(notificationSection) { Notifications( areNotificationsVisible = areNotificationsVisible, Loading @@ -124,7 +129,7 @@ constructor( } } } if (!isShadeLayoutWide) { if (!isShadeLayoutWide && !isBypassEnabled) { with(notificationSection) { Notifications( areNotificationsVisible = areNotificationsVisible, Loading Loading @@ -175,7 +180,7 @@ constructor( }, modifier = Modifier.fillMaxSize(), ) { measurables, constraints -> check(measurables.size == 6) check(measurables.size == 6) { "Expected 6 measurables, got: ${measurables.size}" } val aboveLockIconMeasurable = measurables[0] val lockIconMeasurable = measurables[1] val belowLockIconMeasurable = measurables[2] Loading packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt +9 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.view.ViewGroup import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.Dp Loading @@ -34,6 +33,7 @@ import com.android.systemui.keyguard.ui.viewmodel.AodBurnInViewModel import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters import com.android.systemui.lifecycle.rememberViewModel import com.android.systemui.notifications.ui.composable.ConstrainedNotificationStack import com.android.systemui.notifications.ui.composable.SnoozeableHeadsUpNotificationSpace import com.android.systemui.shade.LargeScreenHeaderHelper import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.notification.stack.ui.view.NotificationScrollView Loading Loading @@ -79,6 +79,14 @@ constructor( ) } @Composable fun SceneScope.HeadsUpNotifications() { SnoozeableHeadsUpNotificationSpace( stackScrollView = stackScrollView.get(), viewModel = rememberViewModel { viewModelFactory.create() }, ) } /** * @param burnInParams params to make this view adaptive to burn-in, `null` to disable burn-in * adjustment Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.res.Resources import com.android.compose.animation.scene.ContentKey import com.android.internal.annotations.VisibleForTesting import com.android.systemui.biometrics.AuthController import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor import com.android.systemui.keyguard.shared.model.ClockSize Loading Loading @@ -57,6 +58,7 @@ constructor( private val shadeInteractor: ShadeInteractor, private val unfoldTransitionInteractor: UnfoldTransitionInteractor, private val occlusionInteractor: SceneContainerOcclusionInteractor, private val deviceEntryInteractor: DeviceEntryInteractor, ) : SysUiViewModel() { @VisibleForTesting val clockSize = clockInteractor.clockSize Loading @@ -73,6 +75,10 @@ constructor( /** Whether the content of the scene UI should be shown. */ val isContentVisible: StateFlow<Boolean> = _isContentVisible.asStateFlow() /** @see DeviceEntryInteractor.isBypassEnabled */ val isBypassEnabled: StateFlow<Boolean> get() = deviceEntryInteractor.isBypassEnabled override suspend fun onActivated(): Nothing { coroutineScope { launch { Loading packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.keyguard.ui.viewmodel import com.android.systemui.biometrics.authController import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor import com.android.systemui.keyguard.domain.interactor.keyguardBlueprintInteractor import com.android.systemui.keyguard.domain.interactor.keyguardClockInteractor import com.android.systemui.kosmos.Kosmos Loading @@ -34,5 +35,6 @@ val Kosmos.lockscreenContentViewModel by shadeInteractor = shadeInteractor, unfoldTransitionInteractor = unfoldTransitionInteractor, occlusionInteractor = sceneContainerOcclusionInteractor, deviceEntryInteractor = deviceEntryInteractor, ) } Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/DefaultBlueprint.kt +8 −3 Original line number Diff line number Diff line Loading @@ -76,6 +76,11 @@ constructor( viewModel .areNotificationsVisible(contentKey) .collectAsStateWithLifecycle(initialValue = false) val isBypassEnabled by viewModel.isBypassEnabled.collectAsStateWithLifecycle() if (isBypassEnabled) { with(notificationSection) { HeadsUpNotifications() } } LockscreenLongPress( viewModel = viewModel.touchHandling, Loading Loading @@ -110,7 +115,7 @@ constructor( } ) } if (isShadeLayoutWide) { if (isShadeLayoutWide && !isBypassEnabled) { with(notificationSection) { Notifications( areNotificationsVisible = areNotificationsVisible, Loading @@ -124,7 +129,7 @@ constructor( } } } if (!isShadeLayoutWide) { if (!isShadeLayoutWide && !isBypassEnabled) { with(notificationSection) { Notifications( areNotificationsVisible = areNotificationsVisible, Loading Loading @@ -175,7 +180,7 @@ constructor( }, modifier = Modifier.fillMaxSize(), ) { measurables, constraints -> check(measurables.size == 6) check(measurables.size == 6) { "Expected 6 measurables, got: ${measurables.size}" } val aboveLockIconMeasurable = measurables[0] val lockIconMeasurable = measurables[1] val belowLockIconMeasurable = measurables[2] Loading
packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/NotificationSection.kt +9 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.view.ViewGroup import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.Dp Loading @@ -34,6 +33,7 @@ import com.android.systemui.keyguard.ui.viewmodel.AodBurnInViewModel import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters import com.android.systemui.lifecycle.rememberViewModel import com.android.systemui.notifications.ui.composable.ConstrainedNotificationStack import com.android.systemui.notifications.ui.composable.SnoozeableHeadsUpNotificationSpace import com.android.systemui.shade.LargeScreenHeaderHelper import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.notification.stack.ui.view.NotificationScrollView Loading Loading @@ -79,6 +79,14 @@ constructor( ) } @Composable fun SceneScope.HeadsUpNotifications() { SnoozeableHeadsUpNotificationSpace( stackScrollView = stackScrollView.get(), viewModel = rememberViewModel { viewModelFactory.create() }, ) } /** * @param burnInParams params to make this view adaptive to burn-in, `null` to disable burn-in * adjustment Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModel.kt +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.res.Resources import com.android.compose.animation.scene.ContentKey import com.android.internal.annotations.VisibleForTesting import com.android.systemui.biometrics.AuthController import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor import com.android.systemui.keyguard.shared.model.ClockSize Loading Loading @@ -57,6 +58,7 @@ constructor( private val shadeInteractor: ShadeInteractor, private val unfoldTransitionInteractor: UnfoldTransitionInteractor, private val occlusionInteractor: SceneContainerOcclusionInteractor, private val deviceEntryInteractor: DeviceEntryInteractor, ) : SysUiViewModel() { @VisibleForTesting val clockSize = clockInteractor.clockSize Loading @@ -73,6 +75,10 @@ constructor( /** Whether the content of the scene UI should be shown. */ val isContentVisible: StateFlow<Boolean> = _isContentVisible.asStateFlow() /** @see DeviceEntryInteractor.isBypassEnabled */ val isBypassEnabled: StateFlow<Boolean> get() = deviceEntryInteractor.isBypassEnabled override suspend fun onActivated(): Nothing { coroutineScope { launch { Loading
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenContentViewModelKosmos.kt +2 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.keyguard.ui.viewmodel import com.android.systemui.biometrics.authController import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor import com.android.systemui.keyguard.domain.interactor.keyguardBlueprintInteractor import com.android.systemui.keyguard.domain.interactor.keyguardClockInteractor import com.android.systemui.kosmos.Kosmos Loading @@ -34,5 +35,6 @@ val Kosmos.lockscreenContentViewModel by shadeInteractor = shadeInteractor, unfoldTransitionInteractor = unfoldTransitionInteractor, occlusionInteractor = sceneContainerOcclusionInteractor, deviceEntryInteractor = deviceEntryInteractor, ) }