Merge "Use SceneTransitionLayout for weather clock" into main
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenSceneBlueprintModule.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenSceneBlueprintModule.kt
index 55f7f69a..52cbffb 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenSceneBlueprintModule.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/LockscreenSceneBlueprintModule.kt
@@ -19,8 +19,6 @@
import com.android.systemui.keyguard.ui.composable.blueprint.CommunalBlueprintModule
import com.android.systemui.keyguard.ui.composable.blueprint.DefaultBlueprintModule
import com.android.systemui.keyguard.ui.composable.blueprint.ShortcutsBesideUdfpsBlueprintModule
-import com.android.systemui.keyguard.ui.composable.blueprint.SplitShadeWeatherClockBlueprintModule
-import com.android.systemui.keyguard.ui.composable.blueprint.WeatherClockBlueprintModule
import com.android.systemui.keyguard.ui.composable.section.OptionalSectionModule
import dagger.Module
@@ -31,8 +29,6 @@
DefaultBlueprintModule::class,
OptionalSectionModule::class,
ShortcutsBesideUdfpsBlueprintModule::class,
- SplitShadeWeatherClockBlueprintModule::class,
- WeatherClockBlueprintModule::class,
],
)
interface LockscreenSceneBlueprintModule
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ClockTransition.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ClockTransition.kt
index acd9e3d..c6fe81a 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ClockTransition.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/ClockTransition.kt
@@ -25,6 +25,9 @@
import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.largeClockElementKey
import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.smallClockElementKey
import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.smartspaceElementKey
+import com.android.systemui.keyguard.ui.composable.blueprint.ClockTransition.transitioningToLargeClock
+import com.android.systemui.keyguard.ui.composable.blueprint.ClockTransition.transitioningToSmallClock
+import com.android.systemui.keyguard.ui.composable.blueprint.WeatherClockElementKeys.largeWeatherClockElementKeyList
import com.android.systemui.keyguard.ui.view.layout.sections.transitions.ClockSizeTransition.ClockFaceInTransition.Companion.CLOCK_IN_MILLIS
import com.android.systemui.keyguard.ui.view.layout.sections.transitions.ClockSizeTransition.ClockFaceInTransition.Companion.CLOCK_IN_START_DELAY_MILLIS
import com.android.systemui.keyguard.ui.view.layout.sections.transitions.ClockSizeTransition.ClockFaceOutTransition.Companion.CLOCK_OUT_MILLIS
@@ -34,30 +37,45 @@
object ClockTransition {
val defaultClockTransitions = transitions {
from(ClockScenes.smallClockScene, to = ClockScenes.largeClockScene) {
- transitioningToLargeClock()
+ transitioningToLargeClock(largeClockElements = listOf(largeClockElementKey))
}
from(ClockScenes.largeClockScene, to = ClockScenes.smallClockScene) {
- transitioningToSmallClock()
+ transitioningToSmallClock(largeClockElements = listOf(largeClockElementKey))
}
from(ClockScenes.splitShadeLargeClockScene, to = ClockScenes.largeClockScene) {
- spec = tween(1000, easing = LinearEasing)
+ spec = tween(300, easing = LinearEasing)
+ }
+
+ from(WeatherClockScenes.largeClockScene, to = ClockScenes.smallClockScene) {
+ transitioningToSmallClock(largeClockElements = largeWeatherClockElementKeyList)
+ }
+
+ from(ClockScenes.smallClockScene, to = WeatherClockScenes.largeClockScene) {
+ transitioningToLargeClock(largeClockElements = largeWeatherClockElementKeyList)
+ }
+
+ from(
+ WeatherClockScenes.largeClockScene,
+ to = WeatherClockScenes.splitShadeLargeClockScene
+ ) {
+ spec = tween(300, easing = LinearEasing)
}
}
- private fun TransitionBuilder.transitioningToLargeClock() {
+ private fun TransitionBuilder.transitioningToLargeClock(largeClockElements: List<ElementKey>) {
spec = tween(durationMillis = STATUS_AREA_MOVE_UP_MILLIS.toInt())
timestampRange(
startMillis = CLOCK_IN_START_DELAY_MILLIS.toInt(),
endMillis = (CLOCK_IN_START_DELAY_MILLIS + CLOCK_IN_MILLIS).toInt()
) {
- fade(largeClockElementKey)
+ largeClockElements.forEach { fade(it) }
}
timestampRange(endMillis = CLOCK_OUT_MILLIS.toInt()) { fade(smallClockElementKey) }
anchoredTranslate(smallClockElementKey, smartspaceElementKey)
}
- private fun TransitionBuilder.transitioningToSmallClock() {
+ private fun TransitionBuilder.transitioningToSmallClock(largeClockElements: List<ElementKey>) {
spec = tween(durationMillis = STATUS_AREA_MOVE_DOWN_MILLIS.toInt())
timestampRange(
startMillis = CLOCK_IN_START_DELAY_MILLIS.toInt(),
@@ -66,7 +84,9 @@
fade(smallClockElementKey)
}
- timestampRange(endMillis = CLOCK_OUT_MILLIS.toInt()) { fade(largeClockElementKey) }
+ timestampRange(endMillis = CLOCK_OUT_MILLIS.toInt()) {
+ largeClockElements.forEach { fade(it) }
+ }
anchoredTranslate(smallClockElementKey, smartspaceElementKey)
}
}
@@ -81,14 +101,26 @@
object ClockElementKeys {
val largeClockElementKey = ElementKey("large-clock")
val smallClockElementKey = ElementKey("small-clock")
- val weatherSmallClockElementKey = ElementKey("weather-small-clock")
val smartspaceElementKey = ElementKey("smart-space")
}
+object WeatherClockScenes {
+ val largeClockScene = SceneKey("large-weather-clock-scene")
+ val splitShadeLargeClockScene = SceneKey("split-shade-large-weather-clock-scene")
+}
+
object WeatherClockElementKeys {
val timeElementKey = ElementKey("weather-large-clock-time")
val dateElementKey = ElementKey("weather-large-clock-date")
val weatherIconElementKey = ElementKey("weather-large-clock-weather-icon")
val temperatureElementKey = ElementKey("weather-large-clock-temperature")
val dndAlarmElementKey = ElementKey("weather-large-clock-dnd-alarm")
+ val largeWeatherClockElementKeyList =
+ listOf(
+ timeElementKey,
+ dateElementKey,
+ weatherIconElementKey,
+ temperatureElementKey,
+ dndAlarmElementKey
+ )
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/WeatherClockBlueprint.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/WeatherClockBlueprint.kt
deleted file mode 100644
index cba5453..0000000
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/blueprint/WeatherClockBlueprint.kt
+++ /dev/null
@@ -1,499 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.keyguard.ui.composable.blueprint
-
-import androidx.compose.foundation.layout.Column
-import androidx.compose.foundation.layout.Row
-import androidx.compose.foundation.layout.fillMaxHeight
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.fillMaxWidth
-import androidx.compose.foundation.layout.padding
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.collectAsState
-import androidx.compose.runtime.getValue
-import androidx.compose.ui.Alignment
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.layout.Layout
-import androidx.compose.ui.platform.LocalContext
-import androidx.compose.ui.res.dimensionResource
-import androidx.compose.ui.unit.Dp
-import androidx.compose.ui.unit.IntRect
-import androidx.compose.ui.unit.dp
-import com.android.compose.animation.scene.SceneScope
-import com.android.compose.modifiers.padding
-import com.android.keyguard.KeyguardClockSwitch.LARGE
-import com.android.systemui.Flags
-import com.android.systemui.customization.R as customizationR
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.WEATHER_CLOCK_BLUEPRINT_ID
-import com.android.systemui.keyguard.domain.interactor.KeyguardClockInteractor
-import com.android.systemui.keyguard.ui.composable.LockscreenLongPress
-import com.android.systemui.keyguard.ui.composable.modifier.onTopPlacementChanged
-import com.android.systemui.keyguard.ui.composable.section.AmbientIndicationSection
-import com.android.systemui.keyguard.ui.composable.section.BottomAreaSection
-import com.android.systemui.keyguard.ui.composable.section.LockSection
-import com.android.systemui.keyguard.ui.composable.section.MediaCarouselSection
-import com.android.systemui.keyguard.ui.composable.section.NotificationSection
-import com.android.systemui.keyguard.ui.composable.section.SettingsMenuSection
-import com.android.systemui.keyguard.ui.composable.section.SmartSpaceSection
-import com.android.systemui.keyguard.ui.composable.section.StatusBarSection
-import com.android.systemui.keyguard.ui.composable.section.WeatherClockSection
-import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel
-import com.android.systemui.keyguard.ui.viewmodel.LockscreenContentViewModel
-import com.android.systemui.res.R
-import com.android.systemui.shade.LargeScreenHeaderHelper
-import dagger.Binds
-import dagger.Module
-import dagger.multibindings.IntoSet
-import java.util.Optional
-import javax.inject.Inject
-
-class WeatherClockBlueprint
-@Inject
-constructor(
- private val viewModel: LockscreenContentViewModel,
- private val statusBarSection: StatusBarSection,
- private val weatherClockSection: WeatherClockSection,
- private val smartSpaceSection: SmartSpaceSection,
- private val notificationSection: NotificationSection,
- private val lockSection: LockSection,
- private val ambientIndicationSectionOptional: Optional<AmbientIndicationSection>,
- private val bottomAreaSection: BottomAreaSection,
- private val settingsMenuSection: SettingsMenuSection,
- private val clockInteractor: KeyguardClockInteractor,
- private val mediaCarouselSection: MediaCarouselSection,
- private val clockViewModel: KeyguardClockViewModel,
-) : ComposableLockscreenSceneBlueprint {
-
- override val id: String = WEATHER_CLOCK_BLUEPRINT_ID
- @Composable
- override fun SceneScope.Content(modifier: Modifier) {
- val isUdfpsVisible = viewModel.isUdfpsVisible
- val burnIn = rememberBurnIn(clockInteractor)
- val resources = LocalContext.current.resources
- val currentClockState = clockViewModel.currentClock.collectAsState()
- val areNotificationsVisible by viewModel.areNotificationsVisible.collectAsState()
- LockscreenLongPress(
- viewModel = viewModel.longPress,
- modifier = modifier,
- ) { onSettingsMenuPlaced ->
- Layout(
- content = {
- // Constrained to above the lock icon.
- Column(
- modifier = Modifier.fillMaxWidth(),
- ) {
- with(statusBarSection) { StatusBar(modifier = Modifier.fillMaxWidth()) }
- val currentClock = currentClockState.value
- val clockSize by clockViewModel.clockSize.collectAsState()
- with(weatherClockSection) {
- if (currentClock == null) {
- return@with
- }
-
- if (clockSize == LARGE) {
- Time(
- clock = currentClock,
- modifier =
- Modifier.padding(
- start =
- dimensionResource(
- customizationR.dimen.clock_padding_start
- )
- )
- )
- } else {
- SmallClock(
- burnInParams = burnIn.parameters,
- modifier =
- Modifier.align(Alignment.Start)
- .onTopPlacementChanged(burnIn.onSmallClockTopChanged),
- clock = currentClock
- )
- }
- }
- with(smartSpaceSection) {
- SmartSpace(
- burnInParams = burnIn.parameters,
- onTopChanged = burnIn.onSmartspaceTopChanged,
- modifier =
- Modifier.fillMaxWidth()
- .padding(
- top = { viewModel.getSmartSpacePaddingTop(resources) },
- )
- .padding(
- bottom =
- dimensionResource(
- R.dimen.keyguard_status_view_bottom_margin
- ),
- ),
- )
- }
-
- with(mediaCarouselSection) { MediaCarousel() }
-
- if (areNotificationsVisible) {
- with(notificationSection) {
- Notifications(
- burnInParams = burnIn.parameters,
- modifier = Modifier.fillMaxWidth().weight(weight = 1f)
- )
- }
- }
- with(weatherClockSection) {
- if (currentClock == null || clockSize != LARGE) {
- return@with
- }
- LargeClockSectionBelowSmartspace(clock = currentClock)
- }
-
- if (!isUdfpsVisible && ambientIndicationSectionOptional.isPresent) {
- with(ambientIndicationSectionOptional.get()) {
- AmbientIndication(modifier = Modifier.fillMaxWidth())
- }
- }
- }
-
- with(lockSection) { LockIcon() }
-
- // Aligned to bottom and constrained to below the lock icon.
- Column(modifier = Modifier.fillMaxWidth()) {
- if (isUdfpsVisible && ambientIndicationSectionOptional.isPresent) {
- with(ambientIndicationSectionOptional.get()) {
- AmbientIndication(modifier = Modifier.fillMaxWidth())
- }
- }
-
- with(bottomAreaSection) {
- IndicationArea(modifier = Modifier.fillMaxWidth())
- }
- }
-
- // Aligned to bottom and NOT constrained by the lock icon.
- with(bottomAreaSection) {
- Shortcut(isStart = true, applyPadding = true)
- Shortcut(isStart = false, applyPadding = true)
- }
- with(settingsMenuSection) { SettingsMenu(onSettingsMenuPlaced) }
- },
- modifier = Modifier.fillMaxSize(),
- ) { measurables, constraints ->
- check(measurables.size == 6)
- val aboveLockIconMeasurable = measurables[0]
- val lockIconMeasurable = measurables[1]
- val belowLockIconMeasurable = measurables[2]
- val startShortcutMeasurable = measurables[3]
- val endShortcutMeasurable = measurables[4]
- val settingsMenuMeasurable = measurables[5]
-
- val noMinConstraints =
- constraints.copy(
- minWidth = 0,
- minHeight = 0,
- )
- val lockIconPlaceable = lockIconMeasurable.measure(noMinConstraints)
- val lockIconBounds =
- IntRect(
- left = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Left],
- top = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Top],
- right = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Right],
- bottom = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Bottom],
- )
-
- val aboveLockIconPlaceable =
- aboveLockIconMeasurable.measure(
- noMinConstraints.copy(maxHeight = lockIconBounds.top)
- )
- val belowLockIconPlaceable =
- belowLockIconMeasurable.measure(
- noMinConstraints.copy(
- maxHeight =
- (constraints.maxHeight - lockIconBounds.bottom).coerceAtLeast(0)
- )
- )
- val startShortcutPleaceable = startShortcutMeasurable.measure(noMinConstraints)
- val endShortcutPleaceable = endShortcutMeasurable.measure(noMinConstraints)
- val settingsMenuPlaceable = settingsMenuMeasurable.measure(noMinConstraints)
-
- layout(constraints.maxWidth, constraints.maxHeight) {
- aboveLockIconPlaceable.place(
- x = 0,
- y = 0,
- )
- lockIconPlaceable.place(
- x = lockIconBounds.left,
- y = lockIconBounds.top,
- )
- belowLockIconPlaceable.place(
- x = 0,
- y = constraints.maxHeight - belowLockIconPlaceable.height,
- )
- startShortcutPleaceable.place(
- x = 0,
- y = constraints.maxHeight - startShortcutPleaceable.height,
- )
- endShortcutPleaceable.place(
- x = constraints.maxWidth - endShortcutPleaceable.width,
- y = constraints.maxHeight - endShortcutPleaceable.height,
- )
- settingsMenuPlaceable.place(
- x = (constraints.maxWidth - settingsMenuPlaceable.width) / 2,
- y = constraints.maxHeight - settingsMenuPlaceable.height,
- )
- }
- }
- }
- }
-}
-
-class SplitShadeWeatherClockBlueprint
-@Inject
-constructor(
- private val viewModel: LockscreenContentViewModel,
- private val statusBarSection: StatusBarSection,
- private val smartSpaceSection: SmartSpaceSection,
- private val notificationSection: NotificationSection,
- private val lockSection: LockSection,
- private val ambientIndicationSectionOptional: Optional<AmbientIndicationSection>,
- private val bottomAreaSection: BottomAreaSection,
- private val settingsMenuSection: SettingsMenuSection,
- private val clockInteractor: KeyguardClockInteractor,
- private val largeScreenHeaderHelper: LargeScreenHeaderHelper,
- private val weatherClockSection: WeatherClockSection,
- private val mediaCarouselSection: MediaCarouselSection,
- private val clockViewModel: KeyguardClockViewModel,
-) : ComposableLockscreenSceneBlueprint {
- override val id: String = SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
-
- @Composable
- override fun SceneScope.Content(modifier: Modifier) {
- val isUdfpsVisible = viewModel.isUdfpsVisible
- val burnIn = rememberBurnIn(clockInteractor)
- val resources = LocalContext.current.resources
- val currentClockState = clockViewModel.currentClock.collectAsState()
- LockscreenLongPress(
- viewModel = viewModel.longPress,
- modifier = modifier,
- ) { onSettingsMenuPlaced ->
- Layout(
- content = {
- // Constrained to above the lock icon.
- Column(
- modifier = Modifier.fillMaxSize(),
- ) {
- with(statusBarSection) { StatusBar(modifier = Modifier.fillMaxWidth()) }
- Row(
- modifier = Modifier.fillMaxSize(),
- ) {
- Column(
- modifier = Modifier.fillMaxHeight().weight(weight = 1f),
- horizontalAlignment = Alignment.CenterHorizontally,
- ) {
- val currentClock = currentClockState.value
- val clockSize by clockViewModel.clockSize.collectAsState()
- with(weatherClockSection) {
- if (currentClock == null) {
- return@with
- }
-
- if (clockSize == LARGE) {
- Time(
- clock = currentClock,
- modifier =
- Modifier.align(Alignment.Start)
- .padding(
- start =
- dimensionResource(
- customizationR.dimen
- .clock_padding_start
- )
- )
- )
- } else {
- SmallClock(
- burnInParams = burnIn.parameters,
- modifier =
- Modifier.align(Alignment.Start)
- .onTopPlacementChanged(
- burnIn.onSmallClockTopChanged
- ),
- clock = currentClock,
- )
- }
- }
- with(smartSpaceSection) {
- SmartSpace(
- burnInParams = burnIn.parameters,
- onTopChanged = burnIn.onSmartspaceTopChanged,
- modifier =
- Modifier.fillMaxWidth()
- .padding(
- top = {
- viewModel.getSmartSpacePaddingTop(resources)
- },
- )
- .padding(
- bottom =
- dimensionResource(
- R.dimen
- .keyguard_status_view_bottom_margin
- )
- ),
- )
- }
-
- with(mediaCarouselSection) { MediaCarousel() }
-
- with(weatherClockSection) {
- if (currentClock == null || clockSize != LARGE) {
- return@with
- }
-
- LargeClockSectionBelowSmartspace(currentClock)
- }
- }
- with(notificationSection) {
- val splitShadeTopMargin: Dp =
- if (Flags.centralizedStatusBarHeightFix()) {
- largeScreenHeaderHelper.getLargeScreenHeaderHeight().dp
- } else {
- dimensionResource(
- id = R.dimen.large_screen_shade_header_height
- )
- }
- Notifications(
- burnInParams = burnIn.parameters,
- modifier =
- Modifier.fillMaxHeight()
- .weight(weight = 1f)
- .padding(top = splitShadeTopMargin)
- )
- }
- }
-
- if (!isUdfpsVisible && ambientIndicationSectionOptional.isPresent) {
- with(ambientIndicationSectionOptional.get()) {
- AmbientIndication(modifier = Modifier.fillMaxWidth())
- }
- }
- }
-
- with(lockSection) { LockIcon() }
-
- // Aligned to bottom and constrained to below the lock icon.
- Column(modifier = Modifier.fillMaxWidth()) {
- if (isUdfpsVisible && ambientIndicationSectionOptional.isPresent) {
- with(ambientIndicationSectionOptional.get()) {
- AmbientIndication(modifier = Modifier.fillMaxWidth())
- }
- }
-
- with(bottomAreaSection) {
- IndicationArea(modifier = Modifier.fillMaxWidth())
- }
- }
-
- // Aligned to bottom and NOT constrained by the lock icon.
- with(bottomAreaSection) {
- Shortcut(isStart = true, applyPadding = true)
- Shortcut(isStart = false, applyPadding = true)
- }
- with(settingsMenuSection) { SettingsMenu(onSettingsMenuPlaced) }
- },
- modifier = Modifier.fillMaxSize(),
- ) { measurables, constraints ->
- check(measurables.size == 6)
- val aboveLockIconMeasurable = measurables[0]
- val lockIconMeasurable = measurables[1]
- val belowLockIconMeasurable = measurables[2]
- val startShortcutMeasurable = measurables[3]
- val endShortcutMeasurable = measurables[4]
- val settingsMenuMeasurable = measurables[5]
-
- val noMinConstraints =
- constraints.copy(
- minWidth = 0,
- minHeight = 0,
- )
- val lockIconPlaceable = lockIconMeasurable.measure(noMinConstraints)
- val lockIconBounds =
- IntRect(
- left = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Left],
- top = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Top],
- right = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Right],
- bottom = lockIconPlaceable[BlueprintAlignmentLines.LockIcon.Bottom],
- )
-
- val aboveLockIconPlaceable =
- aboveLockIconMeasurable.measure(
- noMinConstraints.copy(maxHeight = lockIconBounds.top)
- )
- val belowLockIconPlaceable =
- belowLockIconMeasurable.measure(
- noMinConstraints.copy(
- maxHeight =
- (constraints.maxHeight - lockIconBounds.bottom).coerceAtLeast(0)
- )
- )
- val startShortcutPleaceable = startShortcutMeasurable.measure(noMinConstraints)
- val endShortcutPleaceable = endShortcutMeasurable.measure(noMinConstraints)
- val settingsMenuPlaceable = settingsMenuMeasurable.measure(noMinConstraints)
-
- layout(constraints.maxWidth, constraints.maxHeight) {
- aboveLockIconPlaceable.place(
- x = 0,
- y = 0,
- )
- lockIconPlaceable.place(
- x = lockIconBounds.left,
- y = lockIconBounds.top,
- )
- belowLockIconPlaceable.place(
- x = 0,
- y = constraints.maxHeight - belowLockIconPlaceable.height,
- )
- startShortcutPleaceable.place(
- x = 0,
- y = constraints.maxHeight - startShortcutPleaceable.height,
- )
- endShortcutPleaceable.place(
- x = constraints.maxWidth - endShortcutPleaceable.width,
- y = constraints.maxHeight - endShortcutPleaceable.height,
- )
- settingsMenuPlaceable.place(
- x = (constraints.maxWidth - settingsMenuPlaceable.width) / 2,
- y = constraints.maxHeight - settingsMenuPlaceable.height,
- )
- }
- }
- }
- }
-}
-
-@Module
-interface WeatherClockBlueprintModule {
- @Binds
- @IntoSet
- fun blueprint(blueprint: WeatherClockBlueprint): ComposableLockscreenSceneBlueprint
-}
-
-@Module
-interface SplitShadeWeatherClockBlueprintModule {
- @Binds
- @IntoSet
- fun blueprint(blueprint: SplitShadeWeatherClockBlueprint): ComposableLockscreenSceneBlueprint
-}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt
index f8e6341..0934b20 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/TopAreaSection.kt
@@ -16,9 +16,11 @@
package com.android.systemui.keyguard.ui.composable.section
+import android.content.Context
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.wrapContentSize
import androidx.compose.runtime.Composable
@@ -26,6 +28,10 @@
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalDensity
+import androidx.compose.ui.unit.Density
+import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.IntOffset
import com.android.compose.animation.scene.SceneScope
import com.android.compose.animation.scene.SceneTransitionLayout
@@ -36,6 +42,7 @@
import com.android.systemui.keyguard.ui.composable.blueprint.ClockScenes.splitShadeLargeClockScene
import com.android.systemui.keyguard.ui.composable.blueprint.ClockScenes.splitShadeSmallClockScene
import com.android.systemui.keyguard.ui.composable.blueprint.ClockTransition
+import com.android.systemui.keyguard.ui.composable.blueprint.WeatherClockScenes
import com.android.systemui.keyguard.ui.composable.blueprint.rememberBurnIn
import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel
import javax.inject.Inject
@@ -47,6 +54,7 @@
private val smartSpaceSection: SmartSpaceSection,
private val mediaCarouselSection: MediaCarouselSection,
private val clockSection: DefaultClockSection,
+ private val weatherClockSection: WeatherClockSection,
private val clockInteractor: KeyguardClockInteractor,
) {
@Composable
@@ -64,6 +72,10 @@
splitShadeSmallClockScene
KeyguardClockViewModel.ClockLayout.LARGE_CLOCK -> largeClockScene
KeyguardClockViewModel.ClockLayout.SMALL_CLOCK -> smallClockScene
+ KeyguardClockViewModel.ClockLayout.WEATHER_LARGE_CLOCK ->
+ WeatherClockScenes.largeClockScene
+ KeyguardClockViewModel.ClockLayout.SPLIT_SHADE_WEATHER_LARGE_CLOCK ->
+ WeatherClockScenes.splitShadeLargeClockScene
}
SceneTransitionLayout(
@@ -86,6 +98,12 @@
scene(smallClockScene) { SmallClockWithSmartSpace() }
scene(largeClockScene) { LargeClockWithSmartSpace() }
+
+ scene(WeatherClockScenes.largeClockScene) { WeatherLargeClockWithSmartSpace() }
+
+ scene(WeatherClockScenes.splitShadeLargeClockScene) {
+ WeatherLargeClockWithSmartSpace(modifier = Modifier.fillMaxWidth(0.5f))
+ }
}
}
@@ -146,4 +164,50 @@
}
}
}
+
+ @Composable
+ private fun SceneScope.WeatherLargeClockWithSmartSpace(modifier: Modifier = Modifier) {
+ val burnIn = rememberBurnIn(clockInteractor)
+ val isLargeClockVisible by clockViewModel.isLargeClockVisible.collectAsState()
+ val currentClockState = clockViewModel.currentClock.collectAsState()
+
+ LaunchedEffect(isLargeClockVisible) {
+ if (isLargeClockVisible) {
+ burnIn.onSmallClockTopChanged(null)
+ }
+ }
+
+ Column(modifier = modifier) {
+ val currentClock = currentClockState.value ?: return@Column
+ with(weatherClockSection) { Time(clock = currentClock, modifier = Modifier) }
+ val density = LocalDensity.current
+ val context = LocalContext.current
+
+ with(smartSpaceSection) {
+ SmartSpace(
+ burnInParams = burnIn.parameters,
+ onTopChanged = burnIn.onSmartspaceTopChanged,
+ modifier =
+ Modifier.heightIn(
+ min = getDimen(context, "enhanced_smartspace_height", density)
+ )
+ )
+ }
+ with(weatherClockSection) { LargeClockSectionBelowSmartspace(clock = currentClock) }
+ }
+ }
+
+ /*
+ * Use this function to access dimen which cannot be access by R.dimen directly
+ * Currently use to access dimen from BcSmartspace
+ * @param name Name of resources
+ * @param density Density required to convert dimen from Int To Dp
+ */
+ private fun getDimen(context: Context, name: String, density: Density): Dp {
+ val res = context.packageManager.getResourcesForApplication(context.packageName)
+ val id = res.getIdentifier(name, "dimen", context.packageName)
+ var dimen: Dp
+ with(density) { dimen = (if (id == 0) 0 else res.getDimensionPixelSize(id)).toDp() }
+ return dimen
+ }
}
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt
index d358453..a7bb308ad 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/keyguard/ui/composable/section/WeatherClockSection.kt
@@ -16,6 +16,7 @@
package com.android.systemui.keyguard.ui.composable.section
+import android.view.View
import android.view.ViewGroup
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.IntrinsicSize
@@ -27,18 +28,14 @@
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
-import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.viewinterop.AndroidView
import com.android.compose.animation.scene.ElementKey
import com.android.compose.animation.scene.SceneScope
import com.android.compose.modifiers.padding
-import com.android.systemui.customization.R
-import com.android.systemui.keyguard.ui.composable.blueprint.ClockElementKeys.weatherSmallClockElementKey
+import com.android.systemui.customization.R as customizationR
import com.android.systemui.keyguard.ui.composable.blueprint.WeatherClockElementKeys
-import com.android.systemui.keyguard.ui.composable.modifier.burnInAware
import com.android.systemui.keyguard.ui.viewmodel.AodBurnInViewModel
-import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters
import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel
import com.android.systemui.plugins.clocks.ClockController
import javax.inject.Inject
@@ -55,12 +52,19 @@
clock: ClockController,
modifier: Modifier = Modifier,
) {
- WeatherElement(
- weatherClockElementViewId = R.id.weather_clock_time,
- clock = clock,
- elementKey = WeatherClockElementKeys.timeElementKey,
- modifier = modifier.wrapContentSize(),
- )
+ Row(
+ modifier =
+ Modifier.padding(
+ horizontal = dimensionResource(customizationR.dimen.clock_padding_start)
+ )
+ ) {
+ WeatherElement(
+ weatherClockElementViewId = customizationR.id.weather_clock_time,
+ clock = clock,
+ elementKey = WeatherClockElementKeys.timeElementKey,
+ modifier = modifier,
+ )
+ }
}
@Composable
@@ -69,7 +73,7 @@
modifier: Modifier = Modifier,
) {
WeatherElement(
- weatherClockElementViewId = R.id.weather_clock_date,
+ weatherClockElementViewId = customizationR.id.weather_clock_date,
clock = clock,
elementKey = WeatherClockElementKeys.dateElementKey,
modifier = modifier,
@@ -82,7 +86,7 @@
modifier: Modifier = Modifier,
) {
WeatherElement(
- weatherClockElementViewId = R.id.weather_clock_weather_icon,
+ weatherClockElementViewId = customizationR.id.weather_clock_weather_icon,
clock = clock,
elementKey = WeatherClockElementKeys.weatherIconElementKey,
modifier = modifier.wrapContentSize(),
@@ -95,7 +99,7 @@
modifier: Modifier = Modifier,
) {
WeatherElement(
- weatherClockElementViewId = R.id.weather_clock_alarm_dnd,
+ weatherClockElementViewId = customizationR.id.weather_clock_alarm_dnd,
clock = clock,
elementKey = WeatherClockElementKeys.dndAlarmElementKey,
modifier = modifier.wrapContentSize(),
@@ -108,7 +112,7 @@
modifier: Modifier = Modifier,
) {
WeatherElement(
- weatherClockElementViewId = R.id.weather_clock_temperature,
+ weatherClockElementViewId = customizationR.id.weather_clock_temperature,
clock = clock,
elementKey = WeatherClockElementKeys.temperatureElementKey,
modifier = modifier.wrapContentSize(),
@@ -126,12 +130,16 @@
content {
AndroidView(
factory = {
- val view =
- clock.largeClock.layout.views.first {
- it.id == weatherClockElementViewId
- }
- (view.parent as? ViewGroup)?.removeView(view)
- view
+ try {
+ val view =
+ clock.largeClock.layout.views.first {
+ it.id == weatherClockElementViewId
+ }
+ (view.parent as? ViewGroup)?.removeView(view)
+ view
+ } catch (e: NoSuchElementException) {
+ View(it)
+ }
},
update = {},
modifier = modifier
@@ -147,46 +155,22 @@
Row(
modifier =
Modifier.height(IntrinsicSize.Max)
- .padding(horizontal = dimensionResource(R.dimen.clock_padding_start))
+ .padding(
+ horizontal = dimensionResource(customizationR.dimen.clock_padding_start)
+ )
) {
Date(clock = clock, modifier = Modifier.wrapContentSize())
- Box(modifier = Modifier.fillMaxSize()) {
+ Box(
+ modifier =
+ Modifier.fillMaxSize()
+ .padding(
+ start = dimensionResource(customizationR.dimen.clock_padding_start)
+ )
+ ) {
Weather(clock = clock, modifier = Modifier.align(Alignment.TopStart))
Temperature(clock = clock, modifier = Modifier.align(Alignment.BottomEnd))
DndAlarmStatus(clock = clock, modifier = Modifier.align(Alignment.TopEnd))
}
}
}
-
- @Composable
- fun SceneScope.SmallClock(
- burnInParams: BurnInParameters,
- modifier: Modifier = Modifier,
- clock: ClockController,
- ) {
- val localContext = LocalContext.current
- MovableElement(key = weatherSmallClockElementKey, modifier) {
- content {
- AndroidView(
- factory = {
- val view = clock.smallClock.view
- if (view.parent != null) {
- (view.parent as? ViewGroup)?.removeView(view)
- }
- view
- },
- modifier =
- modifier
- .height(dimensionResource(R.dimen.small_clock_height))
- .padding(start = dimensionResource(R.dimen.clock_padding_start))
- .padding(top = { viewModel.getSmallClockTopMargin(localContext) })
- .burnInAware(
- viewModel = aodBurnInViewModel,
- params = burnInParams,
- ),
- update = {},
- )
- }
- }
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
index d39bd3d..720baec 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractor.kt
@@ -83,19 +83,12 @@
private fun updateBlueprint() {
val useSplitShade =
splitShadeStateController.shouldUseSplitNotificationShade(context.resources)
- // TODO(b/326098079): Make ID a constant value.
- val useWeatherClockLayout =
- clockInteractor.currentClock.value?.config?.id == "DIGITAL_CLOCK_WEATHER" &&
- ComposeLockscreen.isEnabled
val blueprintId =
when {
- useWeatherClockLayout && useSplitShade -> SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
- useWeatherClockLayout -> WEATHER_CLOCK_BLUEPRINT_ID
useSplitShade && !ComposeLockscreen.isEnabled -> SplitShadeKeyguardBlueprint.ID
else -> DefaultKeyguardBlueprint.DEFAULT
}
-
transitionToBlueprint(blueprintId)
}
@@ -128,13 +121,4 @@
fun getCurrentBlueprint(): KeyguardBlueprint {
return keyguardBlueprintRepository.blueprint.value
}
-
- companion object {
- /**
- * These values live here because classes in the composable package do not exist in some
- * systems.
- */
- const val WEATHER_CLOCK_BLUEPRINT_ID = "weather-clock"
- const val SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID = "split-shade-weather-clock"
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/KeyguardBlueprintModule.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/KeyguardBlueprintModule.kt
index b4e57cc..04ac7bf 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/KeyguardBlueprintModule.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/blueprints/KeyguardBlueprintModule.kt
@@ -17,13 +17,9 @@
package com.android.systemui.keyguard.ui.view.layout.blueprints
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.WEATHER_CLOCK_BLUEPRINT_ID
import com.android.systemui.keyguard.shared.model.KeyguardBlueprint
-import com.android.systemui.keyguard.shared.model.KeyguardSection
import dagger.Binds
import dagger.Module
-import dagger.Provides
import dagger.multibindings.IntoSet
@Module
@@ -45,26 +41,4 @@
abstract fun bindShortcutsBesideUdfpsLockscreenBlueprint(
shortcutsBesideUdfpsLockscreenBlueprint: ShortcutsBesideUdfpsKeyguardBlueprint
): KeyguardBlueprint
-
- companion object {
- /** This is a place holder for weather clock in compose. */
- @Provides
- @IntoSet
- fun bindWeatherClockBlueprintPlaceHolder(): KeyguardBlueprint {
- return object : KeyguardBlueprint {
- override val id: String = WEATHER_CLOCK_BLUEPRINT_ID
- override val sections: List<KeyguardSection> = listOf()
- }
- }
-
- /** This is a place holder for weather clock in compose. */
- @Provides
- @IntoSet
- fun bindSplitShadeWeatherClockBlueprintPlaceHolder(): KeyguardBlueprint {
- return object : KeyguardBlueprint {
- override val id: String = SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
- override val sections: List<KeyguardSection> = listOf()
- }
- }
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt
index c9251c7..bbbe140 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardClockViewModel.kt
@@ -113,18 +113,38 @@
)
val currentClockLayout: StateFlow<ClockLayout> =
- combine(isLargeClockVisible, clockShouldBeCentered, shadeInteractor.shadeMode) {
+ combine(
isLargeClockVisible,
clockShouldBeCentered,
- shadeMode ->
+ shadeInteractor.shadeMode,
+ currentClock
+ ) { isLargeClockVisible, clockShouldBeCentered, shadeMode, currentClock ->
val shouldUseSplitShade = shadeMode == ShadeMode.Split
- when {
- shouldUseSplitShade && clockShouldBeCentered -> ClockLayout.LARGE_CLOCK
- shouldUseSplitShade && isLargeClockVisible ->
- ClockLayout.SPLIT_SHADE_LARGE_CLOCK
- shouldUseSplitShade -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
- isLargeClockVisible -> ClockLayout.LARGE_CLOCK
- else -> ClockLayout.SMALL_CLOCK
+ // TODO(b/326098079): make id a constant field in config
+ if (currentClock?.config?.id == "DIGITAL_CLOCK_WEATHER") {
+ val weatherClockLayout =
+ when {
+ shouldUseSplitShade && clockShouldBeCentered ->
+ ClockLayout.WEATHER_LARGE_CLOCK
+ shouldUseSplitShade && isLargeClockVisible ->
+ ClockLayout.SPLIT_SHADE_WEATHER_LARGE_CLOCK
+ shouldUseSplitShade -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
+ isLargeClockVisible -> ClockLayout.WEATHER_LARGE_CLOCK
+ else -> ClockLayout.SMALL_CLOCK
+ }
+ weatherClockLayout
+ } else {
+ val clockLayout =
+ when {
+ shouldUseSplitShade && clockShouldBeCentered -> ClockLayout.LARGE_CLOCK
+ shouldUseSplitShade && isLargeClockVisible ->
+ ClockLayout.SPLIT_SHADE_LARGE_CLOCK
+ shouldUseSplitShade -> ClockLayout.SPLIT_SHADE_SMALL_CLOCK
+ isLargeClockVisible -> ClockLayout.LARGE_CLOCK
+ else -> ClockLayout.SMALL_CLOCK
+ }
+
+ clockLayout
}
}
.stateIn(
@@ -179,5 +199,7 @@
SMALL_CLOCK,
SPLIT_SHADE_LARGE_CLOCK,
SPLIT_SHADE_SMALL_CLOCK,
+ WEATHER_LARGE_CLOCK,
+ SPLIT_SHADE_WEATHER_LARGE_CLOCK,
}
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt
index b6b4571..4270236 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardBlueprintInteractorTest.kt
@@ -27,16 +27,12 @@
import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.keyguard.data.repository.fakeKeyguardClockRepository
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.WEATHER_CLOCK_BLUEPRINT_ID
import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint
import com.android.systemui.keyguard.ui.view.layout.blueprints.SplitShadeKeyguardBlueprint
import com.android.systemui.kosmos.testScope
-import com.android.systemui.plugins.clocks.ClockConfig
import com.android.systemui.plugins.clocks.ClockController
import com.android.systemui.res.R
import com.android.systemui.testKosmos
-import com.android.systemui.util.mockito.whenever
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
@@ -103,72 +99,6 @@
}
@Test
- @DisableFlags(Flags.FLAG_COMPOSE_LOCKSCREEN)
- fun composeLockscreenOff_DoesAppliesSplitShadeWeatherClockBlueprint() {
- testScope.runTest {
- val blueprint by collectLastValue(underTest.blueprint)
- whenever(clockController.config)
- .thenReturn(
- ClockConfig(
- id = "DIGITAL_CLOCK_WEATHER",
- name = "clock",
- description = "clock",
- )
- )
- clockRepository.setCurrentClock(clockController)
- overrideResource(R.bool.config_use_split_notification_shade, true)
- configurationRepository.onConfigurationChange()
- runCurrent()
-
- assertThat(blueprint?.id).isNotEqualTo(SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID)
- }
- }
-
- @Test
- @EnableFlags(Flags.FLAG_COMPOSE_LOCKSCREEN)
- fun testDoesAppliesSplitShadeWeatherClockBlueprint() {
- testScope.runTest {
- val blueprint by collectLastValue(underTest.blueprint)
- whenever(clockController.config)
- .thenReturn(
- ClockConfig(
- id = "DIGITAL_CLOCK_WEATHER",
- name = "clock",
- description = "clock",
- )
- )
- clockRepository.setCurrentClock(clockController)
- overrideResource(R.bool.config_use_split_notification_shade, true)
- configurationRepository.onConfigurationChange()
- runCurrent()
-
- assertThat(blueprint?.id).isEqualTo(SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID)
- }
- }
-
- @Test
- @EnableFlags(Flags.FLAG_COMPOSE_LOCKSCREEN)
- fun testAppliesWeatherClockBlueprint() {
- testScope.runTest {
- val blueprint by collectLastValue(underTest.blueprint)
- whenever(clockController.config)
- .thenReturn(
- ClockConfig(
- id = "DIGITAL_CLOCK_WEATHER",
- name = "clock",
- description = "clock",
- )
- )
- clockRepository.setCurrentClock(clockController)
- overrideResource(R.bool.config_use_split_notification_shade, false)
- configurationRepository.onConfigurationChange()
- runCurrent()
-
- assertThat(blueprint?.id).isEqualTo(WEATHER_CLOCK_BLUEPRINT_ID)
- }
- }
-
- @Test
@EnableFlags(Flags.FLAG_COMPOSE_LOCKSCREEN)
fun testDoesNotApplySplitShadeBlueprint() {
testScope.runTest {
diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepositoryKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepositoryKosmos.kt
index 75489b6..8954231 100644
--- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepositoryKosmos.kt
+++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/KeyguardBlueprintRepositoryKosmos.kt
@@ -17,8 +17,6 @@
package com.android.systemui.keyguard.data.repository
import android.os.fakeExecutorHandler
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
-import com.android.systemui.keyguard.domain.interactor.KeyguardBlueprintInteractor.Companion.WEATHER_CLOCK_BLUEPRINT_ID
import com.android.systemui.keyguard.shared.model.KeyguardBlueprint
import com.android.systemui.keyguard.shared.model.KeyguardSection
import com.android.systemui.keyguard.ui.view.layout.blueprints.DefaultKeyguardBlueprint.Companion.DEFAULT
@@ -34,8 +32,6 @@
setOf(
defaultBlueprint,
splitShadeBlueprint,
- weatherClockBlueprint,
- splitShadeWeatherClockBlueprint,
),
handler = fakeExecutorHandler,
assert = mock<ThreadAssert>(),
@@ -50,22 +46,6 @@
get() = listOf()
}
-private val weatherClockBlueprint =
- object : KeyguardBlueprint {
- override val id: String
- get() = WEATHER_CLOCK_BLUEPRINT_ID
- override val sections: List<KeyguardSection>
- get() = listOf()
- }
-
-private val splitShadeWeatherClockBlueprint =
- object : KeyguardBlueprint {
- override val id: String
- get() = SPLIT_SHADE_WEATHER_CLOCK_BLUEPRINT_ID
- override val sections: List<KeyguardSection>
- get() = listOf()
- }
-
private val splitShadeBlueprint =
object : KeyguardBlueprint {
override val id: String