Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSmartspaceViewBinder.kt +3 −6 Original line number Diff line number Diff line Loading @@ -175,8 +175,7 @@ object KeyguardSmartspaceViewBinder { clockViewModel: KeyguardClockViewModel, ) { // Visibility is controlled by updateTargetVisibility in CardPagerAdapter val burnInLayer = keyguardRootView.requireViewById<Layer>(R.id.burn_in_layer) burnInLayer.apply { keyguardRootView.findViewById<Layer>(R.id.burn_in_layer)?.apply { val smartspaceView = keyguardRootView.requireViewById<View>(sharedR.id.bc_smartspace_view) if (smartspaceView.visibility == View.VISIBLE) { Loading Loading @@ -205,8 +204,7 @@ object KeyguardSmartspaceViewBinder { constraintLayout: ConstraintLayout, smartspaceViewModel: KeyguardSmartspaceViewModel, ) { val burnInLayer = constraintLayout.requireViewById<Layer>(R.id.burn_in_layer) burnInLayer.apply { constraintLayout.findViewById<Layer>(R.id.burn_in_layer)?.apply { if ( smartspaceViewModel.isSmartspaceEnabled && smartspaceViewModel.isDateWeatherDecoupled Loading @@ -222,8 +220,7 @@ object KeyguardSmartspaceViewBinder { constraintLayout: ConstraintLayout, smartspaceViewModel: KeyguardSmartspaceViewModel, ) { val burnInLayer = constraintLayout.requireViewById<Layer>(R.id.burn_in_layer) burnInLayer.apply { constraintLayout.findViewById<Layer>(R.id.burn_in_layer)?.apply { if ( smartspaceViewModel.isSmartspaceEnabled && smartspaceViewModel.isDateWeatherDecoupled Loading packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt +3 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,9 @@ constructor( configurationInteractor.configurationValues, ) { hasCustomWeatherDataDisplay, isShadeLayoutWide, configurationValues -> var fallBelow = false if (hasCustomWeatherDataDisplay) return@combine true if (hasCustomWeatherDataDisplay) { return@combine true } val screenWidthDp = configurationValues.screenWidthDp Loading packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardClockRepository.kt +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow class FakeKeyguardClockRepository() : KeyguardClockRepository { private val _clockSize = MutableStateFlow(ClockSize.LARGE) override val clockSize: StateFlow<ClockSize> = _clockSize Loading @@ -42,8 +43,7 @@ class FakeKeyguardClockRepository() : KeyguardClockRepository { private val _currentClock: MutableStateFlow<ClockController?> = MutableStateFlow(null) override val currentClock = _currentClock override val clockEventController: ClockEventController get() = mock() override val clockEventController: ClockEventController = mock() override val shouldForceSmallClock: Boolean get() = _shouldForceSmallClock Loading packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepositoryKosmos.kt +15 −1 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ package com.android.systemui.keyguard.data.repository import android.content.applicationContext import android.os.fakeExecutorHandler import com.android.keyguard.keyguardUnlockAnimationController import com.android.systemui.keyguard.domain.interactor.keyguardBlueprintInteractor import com.android.systemui.keyguard.domain.interactor.keyguardClockInteractor import com.android.systemui.keyguard.domain.interactor.keyguardSmartspaceInteractor import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint import com.android.systemui.keyguard.ui.view.layout.blueprints.SplitShadeKeyguardBlueprint import com.android.systemui.keyguard.ui.view.layout.sections.ClockSection Loading @@ -31,6 +33,7 @@ import com.android.systemui.keyguard.ui.viewmodel.keyguardSmartspaceViewModel import com.android.systemui.kosmos.Kosmos import com.android.systemui.log.logcatLogBuffer import com.android.systemui.shade.LargeScreenHeaderHelper import com.android.systemui.statusbar.lockscreen.lockscreenSmartspaceController import java.util.Optional import org.mockito.Mockito.spy import org.mockito.kotlin.mock Loading @@ -50,7 +53,18 @@ val Kosmos.keyguardClockSection: ClockSection by } val Kosmos.keyguardSmartspaceSection: SmartspaceSection by Kosmos.Fixture { mock<SmartspaceSection>() } Kosmos.Fixture { SmartspaceSection( context = applicationContext, keyguardClockViewModel = keyguardClockViewModel, keyguardSmartspaceViewModel = keyguardSmartspaceViewModel, keyguardSmartspaceInteractor = keyguardSmartspaceInteractor, smartspaceController = lockscreenSmartspaceController, keyguardUnlockAnimationController = keyguardUnlockAnimationController, blueprintInteractor = { keyguardBlueprintInteractor }, keyguardRootViewModel = keyguardRootViewModel, ) } val Kosmos.defaultKeyguardBlueprint by Kosmos.Fixture { Loading packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepositoryKosmos.kt +2 −0 Original line number Diff line number Diff line Loading @@ -21,3 +21,5 @@ import com.android.systemui.kosmos.Kosmos val Kosmos.keyguardClockRepository: KeyguardClockRepository by Kosmos.Fixture { fakeKeyguardClockRepository } val Kosmos.fakeKeyguardClockRepository by Kosmos.Fixture { FakeKeyguardClockRepository() } val Kosmos.clockEventController by Kosmos.Fixture { fakeKeyguardClockRepository.clockEventController } Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardSmartspaceViewBinder.kt +3 −6 Original line number Diff line number Diff line Loading @@ -175,8 +175,7 @@ object KeyguardSmartspaceViewBinder { clockViewModel: KeyguardClockViewModel, ) { // Visibility is controlled by updateTargetVisibility in CardPagerAdapter val burnInLayer = keyguardRootView.requireViewById<Layer>(R.id.burn_in_layer) burnInLayer.apply { keyguardRootView.findViewById<Layer>(R.id.burn_in_layer)?.apply { val smartspaceView = keyguardRootView.requireViewById<View>(sharedR.id.bc_smartspace_view) if (smartspaceView.visibility == View.VISIBLE) { Loading Loading @@ -205,8 +204,7 @@ object KeyguardSmartspaceViewBinder { constraintLayout: ConstraintLayout, smartspaceViewModel: KeyguardSmartspaceViewModel, ) { val burnInLayer = constraintLayout.requireViewById<Layer>(R.id.burn_in_layer) burnInLayer.apply { constraintLayout.findViewById<Layer>(R.id.burn_in_layer)?.apply { if ( smartspaceViewModel.isSmartspaceEnabled && smartspaceViewModel.isDateWeatherDecoupled Loading @@ -222,8 +220,7 @@ object KeyguardSmartspaceViewBinder { constraintLayout: ConstraintLayout, smartspaceViewModel: KeyguardSmartspaceViewModel, ) { val burnInLayer = constraintLayout.requireViewById<Layer>(R.id.burn_in_layer) burnInLayer.apply { constraintLayout.findViewById<Layer>(R.id.burn_in_layer)?.apply { if ( smartspaceViewModel.isSmartspaceEnabled && smartspaceViewModel.isDateWeatherDecoupled Loading
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt +3 −1 Original line number Diff line number Diff line Loading @@ -207,7 +207,9 @@ constructor( configurationInteractor.configurationValues, ) { hasCustomWeatherDataDisplay, isShadeLayoutWide, configurationValues -> var fallBelow = false if (hasCustomWeatherDataDisplay) return@combine true if (hasCustomWeatherDataDisplay) { return@combine true } val screenWidthDp = configurationValues.screenWidthDp Loading
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/FakeKeyguardClockRepository.kt +2 −2 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow class FakeKeyguardClockRepository() : KeyguardClockRepository { private val _clockSize = MutableStateFlow(ClockSize.LARGE) override val clockSize: StateFlow<ClockSize> = _clockSize Loading @@ -42,8 +43,7 @@ class FakeKeyguardClockRepository() : KeyguardClockRepository { private val _currentClock: MutableStateFlow<ClockController?> = MutableStateFlow(null) override val currentClock = _currentClock override val clockEventController: ClockEventController get() = mock() override val clockEventController: ClockEventController = mock() override val shouldForceSmallClock: Boolean get() = _shouldForceSmallClock Loading
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepositoryKosmos.kt +15 −1 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ package com.android.systemui.keyguard.data.repository import android.content.applicationContext import android.os.fakeExecutorHandler import com.android.keyguard.keyguardUnlockAnimationController import com.android.systemui.keyguard.domain.interactor.keyguardBlueprintInteractor import com.android.systemui.keyguard.domain.interactor.keyguardClockInteractor import com.android.systemui.keyguard.domain.interactor.keyguardSmartspaceInteractor import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint import com.android.systemui.keyguard.ui.view.layout.blueprints.SplitShadeKeyguardBlueprint import com.android.systemui.keyguard.ui.view.layout.sections.ClockSection Loading @@ -31,6 +33,7 @@ import com.android.systemui.keyguard.ui.viewmodel.keyguardSmartspaceViewModel import com.android.systemui.kosmos.Kosmos import com.android.systemui.log.logcatLogBuffer import com.android.systemui.shade.LargeScreenHeaderHelper import com.android.systemui.statusbar.lockscreen.lockscreenSmartspaceController import java.util.Optional import org.mockito.Mockito.spy import org.mockito.kotlin.mock Loading @@ -50,7 +53,18 @@ val Kosmos.keyguardClockSection: ClockSection by } val Kosmos.keyguardSmartspaceSection: SmartspaceSection by Kosmos.Fixture { mock<SmartspaceSection>() } Kosmos.Fixture { SmartspaceSection( context = applicationContext, keyguardClockViewModel = keyguardClockViewModel, keyguardSmartspaceViewModel = keyguardSmartspaceViewModel, keyguardSmartspaceInteractor = keyguardSmartspaceInteractor, smartspaceController = lockscreenSmartspaceController, keyguardUnlockAnimationController = keyguardUnlockAnimationController, blueprintInteractor = { keyguardBlueprintInteractor }, keyguardRootViewModel = keyguardRootViewModel, ) } val Kosmos.defaultKeyguardBlueprint by Kosmos.Fixture { Loading
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardClockRepositoryKosmos.kt +2 −0 Original line number Diff line number Diff line Loading @@ -21,3 +21,5 @@ import com.android.systemui.kosmos.Kosmos val Kosmos.keyguardClockRepository: KeyguardClockRepository by Kosmos.Fixture { fakeKeyguardClockRepository } val Kosmos.fakeKeyguardClockRepository by Kosmos.Fixture { FakeKeyguardClockRepository() } val Kosmos.clockEventController by Kosmos.Fixture { fakeKeyguardClockRepository.clockEventController }