From dbfff684ab29e503a8ea156db5c63e231f729dc9 Mon Sep 17 00:00:00 2001 From: garan Date: Wed, 24 Apr 2024 23:02:19 +0100 Subject: [PATCH] Spotsless fixes --- .../wearcomplicationproviderstestsuite/Complication.kt | 2 +- .../ComplicationToggleReceiver.kt | 6 +++++- .../GoalProgressDataSourceService.kt | 4 ++-- .../WeightedElementsDataSourceService.kt | 8 ++++---- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/Complication.kt b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/Complication.kt index 4e1483bd6..b59e5c371 100644 --- a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/Complication.kt +++ b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/Complication.kt @@ -32,5 +32,5 @@ enum class Complication( RANGED_VALUE("RangedValue"), SHORT_TEXT("ShortText"), SMALL_IMAGE("SmallImage"), - WEIGHTED_ELEMENTS("WeightedElements") + WEIGHTED_ELEMENTS("WeightedElements"), } diff --git a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/ComplicationToggleReceiver.kt b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/ComplicationToggleReceiver.kt index dbf8e9642..1dc9c776f 100644 --- a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/ComplicationToggleReceiver.kt +++ b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/ComplicationToggleReceiver.kt @@ -83,7 +83,11 @@ class ComplicationToggleReceiver : BroadcastReceiver() { * Returns the [ComplicationToggleArgs] from the [Intent] sent to the [ComplicationToggleArgs]. */ private fun Intent.getArgs(): ComplicationToggleArgs = requireNotNull( - BundleCompat.getParcelable(this.extras!!, EXTRA_ARGS, ComplicationToggleArgs::class.java) + BundleCompat.getParcelable( + this.extras!!, + EXTRA_ARGS, + ComplicationToggleArgs::class.java, + ), ) } } diff --git a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/GoalProgressDataSourceService.kt b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/GoalProgressDataSourceService.kt index 1aeaa21e0..d3fe08c11 100644 --- a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/GoalProgressDataSourceService.kt +++ b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/GoalProgressDataSourceService.kt @@ -144,7 +144,7 @@ class GoalProgressDataSourceService : SuspendingComplicationDataSourceService() caseContentDescription, currentValue, percentage, - case.targetValue + case.targetValue, ), ) .build() @@ -167,6 +167,6 @@ class GoalProgressDataSourceService : SuspendingComplicationDataSourceService() TEXT_ONLY(5000f), TEXT_WITH_ICON(2500f), TEXT_WITH_TITLE(10000f), - ICON_ONLY(10000f) + ICON_ONLY(10000f), } } diff --git a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/WeightedElementsDataSourceService.kt b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/WeightedElementsDataSourceService.kt index 79f0f4965..98718074c 100644 --- a/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/WeightedElementsDataSourceService.kt +++ b/WearComplicationDataSourcesTestSuite/Wearable/src/main/java/com/example/android/wearable/wear/wearcomplicationproviderstestsuite/WeightedElementsDataSourceService.kt @@ -138,7 +138,7 @@ class WeightedElementsDataSourceService : SuspendingComplicationDataSourceServic R.string.weighted_elements_content_description, caseContentDescription, case.numElements, - resources.getQuantityString(R.plurals.number_of_elements, case.numElements) + resources.getQuantityString(R.plurals.number_of_elements, case.numElements), ), ) .build() @@ -154,7 +154,7 @@ class WeightedElementsDataSourceService : SuspendingComplicationDataSourceServic .build() } - private fun createWeightedElements(numElements: Int) : + private fun createWeightedElements(numElements: Int): List { val elements = mutableListOf() repeat(numElements) { index -> @@ -171,12 +171,12 @@ class WeightedElementsDataSourceService : SuspendingComplicationDataSourceServic TEXT_ONLY(5), TEXT_WITH_ICON(3), TEXT_WITH_TITLE(4), - ICON_ONLY(4) + ICON_ONLY(4), } private val colors = listOf( Color.argb(255, 255, 0, 0), Color.argb(255, 0, 255, 0), - Color.argb(255, 0, 0, 255) + Color.argb(255, 0, 0, 255), ) }