Loading res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,9 @@ <!-- Description for clock font editor axis revert button. [CHAR LIMIT=NONE] --> <string name="clock_font_editor_revert">Undo clock font changes</string> <!-- Description for a clock style setting that toggles the clock font between one with rounded corners and one without. [CHAR LIMIT=NONE] --> <string name="clock_style_round_clock">Round clock</string> <!-- Toast message to notify that the clock style is updated when they tap on the clock face. They can tap again to undo. [CHAR LIMIT=NONE] --> <string name="clock_style_update_toast">Style changed to <xliff:g name="font_name">%1$s</xliff:g>. Tap again to undo.</string> Loading src/com/android/wallpaper/customization/ui/binder/ThemePickerCustomizationOptionBinder.kt +13 −4 Original line number Diff line number Diff line Loading @@ -645,11 +645,20 @@ constructor(private val defaultCustomizationOptionsBinder: DefaultCustomizationO ::Pair, ) .collect { (selectedOption, onClockFaceClicked) -> clockFaceClickDelegateView.isVisible = selectedOption == ThemePickerLockCustomizationOption.CLOCK if ( selectedOption == ThemePickerLockCustomizationOption.CLOCK && onClockFaceClicked != null ) { clockFaceClickDelegateView.isVisible = true clockFaceClickDelegateView.setOnClickListener { onClockFaceClicked.invoke() } } else { clockFaceClickDelegateView.isVisible = false clockFaceClickDelegateView.setOnClickListener(null) } clockFaceClickDelegateView.contentDescription = context.getString(R.string.clock_style_round_clock) } } Loading src/com/android/wallpaper/customization/ui/viewmodel/ClockPickerViewModel.kt +3 −3 Original line number Diff line number Diff line Loading @@ -270,14 +270,14 @@ constructor( // and the clock style preset group index changes. The integer is the updated group index. val showClockFacePresetGroupIndexUpdateToast: Flow<Int> = _showClockFacePresetGroupIndexUpdateToast.asStateFlow().filterNotNull() val onClockFaceClicked: Flow<() -> Unit> = val onClockFaceClicked: Flow<(() -> Unit)?> = combine(groups, previewingClockPresetIndexedStyle) { groups, previewingIndexedStyle -> if (groups.isNullOrEmpty()) { {} null } else { val groupCount = groups.size if (groupCount == 1) { {} null } else { val currentGroupIndex = previewingIndexedStyle?.groupIndex ?: 0 val nextGroupIndex = (currentGroupIndex + 1) % groupCount Loading Loading
res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,9 @@ <!-- Description for clock font editor axis revert button. [CHAR LIMIT=NONE] --> <string name="clock_font_editor_revert">Undo clock font changes</string> <!-- Description for a clock style setting that toggles the clock font between one with rounded corners and one without. [CHAR LIMIT=NONE] --> <string name="clock_style_round_clock">Round clock</string> <!-- Toast message to notify that the clock style is updated when they tap on the clock face. They can tap again to undo. [CHAR LIMIT=NONE] --> <string name="clock_style_update_toast">Style changed to <xliff:g name="font_name">%1$s</xliff:g>. Tap again to undo.</string> Loading
src/com/android/wallpaper/customization/ui/binder/ThemePickerCustomizationOptionBinder.kt +13 −4 Original line number Diff line number Diff line Loading @@ -645,11 +645,20 @@ constructor(private val defaultCustomizationOptionsBinder: DefaultCustomizationO ::Pair, ) .collect { (selectedOption, onClockFaceClicked) -> clockFaceClickDelegateView.isVisible = selectedOption == ThemePickerLockCustomizationOption.CLOCK if ( selectedOption == ThemePickerLockCustomizationOption.CLOCK && onClockFaceClicked != null ) { clockFaceClickDelegateView.isVisible = true clockFaceClickDelegateView.setOnClickListener { onClockFaceClicked.invoke() } } else { clockFaceClickDelegateView.isVisible = false clockFaceClickDelegateView.setOnClickListener(null) } clockFaceClickDelegateView.contentDescription = context.getString(R.string.clock_style_round_clock) } } Loading
src/com/android/wallpaper/customization/ui/viewmodel/ClockPickerViewModel.kt +3 −3 Original line number Diff line number Diff line Loading @@ -270,14 +270,14 @@ constructor( // and the clock style preset group index changes. The integer is the updated group index. val showClockFacePresetGroupIndexUpdateToast: Flow<Int> = _showClockFacePresetGroupIndexUpdateToast.asStateFlow().filterNotNull() val onClockFaceClicked: Flow<() -> Unit> = val onClockFaceClicked: Flow<(() -> Unit)?> = combine(groups, previewingClockPresetIndexedStyle) { groups, previewingIndexedStyle -> if (groups.isNullOrEmpty()) { {} null } else { val groupCount = groups.size if (groupCount == 1) { {} null } else { val currentGroupIndex = previewingIndexedStyle?.groupIndex ?: 0 val nextGroupIndex = (currentGroupIndex + 1) % groupCount Loading