Snap for 9673171 from 866ad50a4f1d7f90511ff651638fa107872d8754 to tm-qpr3-release
Change-Id: I45654630f66abcf5abec7d66ea2cf3cc2ca7c368
diff --git a/ktfmt_includes.txt b/ktfmt_includes.txt
index 112b4a1..0708ab2 100644
--- a/ktfmt_includes.txt
+++ b/ktfmt_includes.txt
@@ -1,3 +1,4 @@
+src/
+src_override/
+tests/
+-src/com/android/customization/module/SysUiStatsLogger.kt
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index e57ad9f..ef1a102 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -28,8 +28,7 @@
<string name="clock_size_dynamic" msgid="1023930312455061642">"ديناميكي"</string>
<string name="clock_size_dynamic_description" msgid="2776620745774561662">"يتغير حجم الساعة وفقًا للمحتوى على شاشة القفل."</string>
<string name="clock_size_large" msgid="3143248715744138979">"كبير"</string>
- <!-- no translation found for clock_size_small (2280449912094164133) -->
- <skip />
+ <string name="clock_size_small" msgid="2280449912094164133">"صغير"</string>
<string name="grid_title" msgid="1688173478777254123">"شبكة التطبيقات"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"تطبيق"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"انقُر للتعديل."</string>
diff --git a/res/values-be/strings.xml b/res/values-be/strings.xml
index 684dce7..c5d82ec 100644
--- a/res/values-be/strings.xml
+++ b/res/values-be/strings.xml
@@ -28,8 +28,7 @@
<string name="clock_size_dynamic" msgid="1023930312455061642">"Дынамічны"</string>
<string name="clock_size_dynamic_description" msgid="2776620745774561662">"Памер гадзінніка змяняецца ў залежнасці ад змесціва на экране блакіроўкі"</string>
<string name="clock_size_large" msgid="3143248715744138979">"Вялікі"</string>
- <!-- no translation found for clock_size_small (2280449912094164133) -->
- <skip />
+ <string name="clock_size_small" msgid="2280449912094164133">"Дробны"</string>
<string name="grid_title" msgid="1688173478777254123">"Сетка праграм"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Ужыць"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Дакраніцеся, каб рэдагаваць"</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index d2b3c47..7a358a9 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -28,8 +28,7 @@
<string name="clock_size_dynamic" msgid="1023930312455061642">"Динамичный"</string>
<string name="clock_size_dynamic_description" msgid="2776620745774561662">"Размер часов меняется в зависимости от контента на заблокированном экране"</string>
<string name="clock_size_large" msgid="3143248715744138979">"Большой"</string>
- <!-- no translation found for clock_size_small (2280449912094164133) -->
- <skip />
+ <string name="clock_size_small" msgid="2280449912094164133">"Маленький"</string>
<string name="grid_title" msgid="1688173478777254123">"Сетка приложений"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Применить"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Нажмите, чтобы изменить"</string>
diff --git a/res/values-ta/strings.xml b/res/values-ta/strings.xml
index 1d89ca5..ffe7463 100644
--- a/res/values-ta/strings.xml
+++ b/res/values-ta/strings.xml
@@ -28,8 +28,7 @@
<string name="clock_size_dynamic" msgid="1023930312455061642">"டைனமிக்"</string>
<string name="clock_size_dynamic_description" msgid="2776620745774561662">"பூட்டுத் திரையில் உள்ள உள்ளடக்கத்தைப் பொறுத்து கடிகாரத்தின் அளவு மாறுபடும்"</string>
<string name="clock_size_large" msgid="3143248715744138979">"பெரியது"</string>
- <!-- no translation found for clock_size_small (2280449912094164133) -->
- <skip />
+ <string name="clock_size_small" msgid="2280449912094164133">"சிறியது"</string>
<string name="grid_title" msgid="1688173478777254123">"ஆப்ஸ் கட்டம்"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"பயன்படுத்து"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"\'தீமைத்\' திருத்த தட்டவும்"</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index d77c0e6..7a070cd 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -28,8 +28,7 @@
<string name="clock_size_dynamic" msgid="1023930312455061642">"Динамічний"</string>
<string name="clock_size_dynamic_description" msgid="2776620745774561662">"Розмір годинника змінюється відповідно до вмісту заблокованого екрана"</string>
<string name="clock_size_large" msgid="3143248715744138979">"Великий"</string>
- <!-- no translation found for clock_size_small (2280449912094164133) -->
- <skip />
+ <string name="clock_size_small" msgid="2280449912094164133">"Малий"</string>
<string name="grid_title" msgid="1688173478777254123">"Сітка додатків"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Застосувати"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Торкніться, щоб змінити"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 0790cad..7f11575 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -28,8 +28,7 @@
<string name="clock_size_dynamic" msgid="1023930312455061642">"Okuguqukayo"</string>
<string name="clock_size_dynamic_description" msgid="2776620745774561662">"Usayizi wewashi uyashintsha ngokuya ngokuqukethwe kokukhiya isikrini"</string>
<string name="clock_size_large" msgid="3143248715744138979">"Obukhulu"</string>
- <!-- no translation found for clock_size_small (2280449912094164133) -->
- <skip />
+ <string name="clock_size_small" msgid="2280449912094164133">"Esincane"</string>
<string name="grid_title" msgid="1688173478777254123">"Igridi ye-app"</string>
<string name="apply_theme_btn" msgid="6293081192321303991">"Faka"</string>
<string name="edit_custom_theme_lbl" msgid="5211377705710775224">"Thepha ukuze uhlele"</string>
diff --git a/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt b/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
index 307507b..5ab9e1f 100644
--- a/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
+++ b/src/com/android/customization/model/grid/domain/interactor/GridInteractor.kt
@@ -34,8 +34,8 @@
private val snapshotRestorer: Provider<GridSnapshotRestorer>,
) {
val options: Flow<GridOptionItemsModel> =
- // this upstream flow tells us each time the options are changed.
- repository.optionChanges
+ // this upstream flow tells us each time the options are changed.
+ repository.optionChanges
// when we start, we pretend the options _just_ changed. This way, we load something as
// soon as possible into the flow so it's ready by the time the first observer starts to
// observe.
diff --git a/src/com/android/customization/model/grid/domain/interactor/GridSnapshotRestorer.kt b/src/com/android/customization/model/grid/domain/interactor/GridSnapshotRestorer.kt
index 583cbc7..5e0fe7a 100644
--- a/src/com/android/customization/model/grid/domain/interactor/GridSnapshotRestorer.kt
+++ b/src/com/android/customization/model/grid/domain/interactor/GridSnapshotRestorer.kt
@@ -45,7 +45,8 @@
TAG,
"""Original snapshot name was ${optionToRestore.name} but we're being told to
| restore to $optionNameFromSnapshot. The current implementation doesn't
- | support undo, only a reset back to the original grid option.""".trimMargin(),
+ | support undo, only a reset back to the original grid option."""
+ .trimMargin(),
)
}
diff --git a/src/com/android/customization/module/ThemePickerInjector.kt b/src/com/android/customization/module/ThemePickerInjector.kt
index e166f2c..e06a1b5 100644
--- a/src/com/android/customization/module/ThemePickerInjector.kt
+++ b/src/com/android/customization/module/ThemePickerInjector.kt
@@ -249,7 +249,9 @@
return KeyguardQuickAffordancePickerInteractor(
KeyguardQuickAffordancePickerRepository(client, Dispatchers.IO),
client
- ) { getKeyguardQuickAffordanceSnapshotRestorer(context) }
+ ) {
+ getKeyguardQuickAffordanceSnapshotRestorer(context)
+ }
}
protected fun getKeyguardQuickAffordancePickerProviderClient(
diff --git a/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt b/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt
index 48b37ba..6c72a5b 100644
--- a/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt
+++ b/src/com/android/customization/picker/clock/ui/binder/ClockCarouselViewBinder.kt
@@ -40,7 +40,7 @@
@JvmStatic
fun bind(
- view: ClockCarouselView,
+ carouselView: ClockCarouselView,
singleClockView: ViewGroup,
viewModel: ClockCarouselViewModel,
clockViewFactory: (clockId: String) -> View,
@@ -50,11 +50,11 @@
singleClockView.requireViewById<FrameLayout>(R.id.single_clock_host_view)
lifecycleOwner.lifecycleScope.launch {
lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
- launch { viewModel.isCarouselVisible.collect { view.isVisible = it } }
+ launch { viewModel.isCarouselVisible.collect { carouselView.isVisible = it } }
launch {
viewModel.allClockIds.collect { allClockIds ->
- view.setUpClockCarouselView(
+ carouselView.setUpClockCarouselView(
clockIds = allClockIds,
onGetClockPreview = clockViewFactory,
onClockSelected = { clockId -> viewModel.setSelectedClock(clockId) },
@@ -64,11 +64,13 @@
launch {
viewModel.selectedIndex.collect { selectedIndex ->
- view.setSelectedClockIndex(selectedIndex)
+ carouselView.setSelectedClockIndex(selectedIndex)
}
}
- launch { viewModel.isSingleClockViewVisible.collect { view.isVisible = it } }
+ launch {
+ viewModel.isSingleClockViewVisible.collect { singleClockView.isVisible = it }
+ }
launch {
viewModel.clockId.collect { clockId ->
diff --git a/src/com/android/customization/picker/clock/ui/section/ClockSectionController.kt b/src/com/android/customization/picker/clock/ui/section/ClockSectionController.kt
index c50fe98..b47c243 100644
--- a/src/com/android/customization/picker/clock/ui/section/ClockSectionController.kt
+++ b/src/com/android/customization/picker/clock/ui/section/ClockSectionController.kt
@@ -53,7 +53,9 @@
view = view,
viewModel = viewModel,
lifecycleOwner = lifecycleOwner
- ) { navigationController.navigateTo(ClockSettingsFragment()) }
+ ) {
+ navigationController.navigateTo(ClockSettingsFragment())
+ }
}
return view
}
diff --git a/src/com/android/customization/picker/color/data/repository/ColorPickerRepositoryImpl.kt b/src/com/android/customization/picker/color/data/repository/ColorPickerRepositoryImpl.kt
index db19196..4c43d78 100644
--- a/src/com/android/customization/picker/color/data/repository/ColorPickerRepositoryImpl.kt
+++ b/src/com/android/customization/picker/color/data/repository/ColorPickerRepositoryImpl.kt
@@ -118,9 +118,9 @@
val styleOrNull = colorManager.currentStyle
val style = styleOrNull?.let { Style.valueOf(it) } ?: Style.TONAL_SPOT
val colorOptionBuilder =
- // Does not matter whether ColorSeedOption or ColorBundle builder is used here
- // because to apply the color, one just needs a generic ColorOption
- ColorSeedOption.Builder().setSource(colorManager.currentColorSource).setStyle(style)
+ // Does not matter whether ColorSeedOption or ColorBundle builder is used here
+ // because to apply the color, one just needs a generic ColorOption
+ ColorSeedOption.Builder().setSource(colorManager.currentColorSource).setStyle(style)
for (overlay in overlays) {
colorOptionBuilder.addOverlayPackage(overlay.key, overlay.value)
}
diff --git a/src/com/android/customization/picker/color/domain/interactor/ColorPickerSnapshotRestorer.kt b/src/com/android/customization/picker/color/domain/interactor/ColorPickerSnapshotRestorer.kt
index 1635e01..d952b4c 100644
--- a/src/com/android/customization/picker/color/domain/interactor/ColorPickerSnapshotRestorer.kt
+++ b/src/com/android/customization/picker/color/domain/interactor/ColorPickerSnapshotRestorer.kt
@@ -55,7 +55,8 @@
TAG,
""" Original packages does not match snapshot packages to restore to. The
| current implementation doesn't support undo, only a reset back to the
- | original color option.""".trimMargin(),
+ | original color option."""
+ .trimMargin(),
)
}
diff --git a/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt b/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
index 2ca1f3b..0b197b4 100644
--- a/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
+++ b/src/com/android/customization/picker/preview/ui/section/PreviewWithClockCarouselSectionController.kt
@@ -76,7 +76,7 @@
lifecycleOwner.lifecycleScope.launch {
clockCarouselBinding =
ClockCarouselViewBinder.bind(
- view = carouselView,
+ carouselView = carouselView,
singleClockView = singleClockView,
viewModel = clockCarouselViewModel,
clockViewFactory = { clockId -> clockViewFactory.getView(clockId) },
diff --git a/tests/src/com/android/customization/model/picker/color/ui/viewmodel/ColorPickerViewModelTest.kt b/tests/src/com/android/customization/model/picker/color/ui/viewmodel/ColorPickerViewModelTest.kt
index b7567ed..7d87a55 100644
--- a/tests/src/com/android/customization/model/picker/color/ui/viewmodel/ColorPickerViewModelTest.kt
+++ b/tests/src/com/android/customization/model/picker/color/ui/viewmodel/ColorPickerViewModelTest.kt
@@ -163,7 +163,7 @@
* @param colorOptions The observed color options
* @param selectedColorTypeText The text of the color type that's expected to be selected
* @param selectedColorOptionIndex The index of the color option that's expected to be selected,
- * -1 stands for no color option should be selected
+ * -1 stands for no color option should be selected
*/
private fun assertPickerUiState(
colorTypes: Map<ColorType, ColorTypeViewModel>?,
@@ -189,7 +189,7 @@
*
* @param colorOptions The observed color options
* @param selectedColorOptionIndex The index of the color option that's expected to be selected,
- * -1 stands for no color option should be selected
+ * -1 stands for no color option should be selected
*/
private fun assertColorOptionUiState(
colorOptions: List<ColorOptionViewModel>?,
diff --git a/tests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt b/tests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt
index 6044724..5c99585 100644
--- a/tests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt
+++ b/tests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt
@@ -462,7 +462,8 @@
*
* @param slots The observed slot view-models, keyed by slot ID
* @param expectedAffordanceNameBySlotId The expected name of the selected affordance for each
- * slot ID or `null` if it's expected for there to be no affordance for that slot in the preview
+ * slot ID or `null` if it's expected for there to be no affordance for that slot in the
+ * preview
*/
private fun assertPreviewUiState(
slots: Map<String, KeyguardQuickAffordanceSlotViewModel>?,
diff --git a/tests/src/com/android/customization/testing/TestCustomizationInjector.kt b/tests/src/com/android/customization/testing/TestCustomizationInjector.kt
index af0be95..5b0ecae 100644
--- a/tests/src/com/android/customization/testing/TestCustomizationInjector.kt
+++ b/tests/src/com/android/customization/testing/TestCustomizationInjector.kt
@@ -109,7 +109,9 @@
return KeyguardQuickAffordancePickerInteractor(
KeyguardQuickAffordancePickerRepository(client, Dispatchers.IO),
client
- ) { getKeyguardQuickAffordanceSnapshotRestorer(context) }
+ ) {
+ getKeyguardQuickAffordanceSnapshotRestorer(context)
+ }
}
override fun getFlags(): BaseFlags {