diff --git a/features/location/api/build.gradle.kts b/features/location/api/build.gradle.kts index 998529088a..909a3c978a 100644 --- a/features/location/api/build.gradle.kts +++ b/features/location/api/build.gradle.kts @@ -5,6 +5,7 @@ * Please see LICENSE files in the repository root for full details. */ +import config.BuildTimeConfig import extension.readLocalProperty plugins { @@ -19,24 +20,36 @@ android { resValue( type = "string", name = "maptiler_api_key", - value = System.getenv("ELEMENT_ANDROID_MAPTILER_API_KEY") - ?: readLocalProperty("services.maptiler.apikey") + value = if (isEnterpriseBuild) { + BuildTimeConfig.SERVICES_MAPTILER_APIKEY + } else { + System.getenv("ELEMENT_ANDROID_MAPTILER_API_KEY") + ?: readLocalProperty("services.maptiler.apikey") + } ?: "" ) resValue( type = "string", name = "maptiler_light_map_id", - value = System.getenv("ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID") - ?: readLocalProperty("services.maptiler.lightMapId") - // fall back to maptiler's default light map. + value = if (isEnterpriseBuild) { + BuildTimeConfig.SERVICES_MAPTILER_LIGHT_MAPID + } else { + System.getenv("ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID") + ?: readLocalProperty("services.maptiler.lightMapId") + } + // fall back to maptiler's default light map. ?: "basic-v2" ) resValue( type = "string", name = "maptiler_dark_map_id", - value = System.getenv("ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID") - ?: readLocalProperty("services.maptiler.darkMapId") - // fall back to maptiler's default dark map. + value = if (isEnterpriseBuild) { + BuildTimeConfig.SERVICES_MAPTILER_DARK_MAPID + } else { + System.getenv("ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID") + ?: readLocalProperty("services.maptiler.darkMapId") + } + // fall back to maptiler's default dark map. ?: "basic-v2-dark" ) } diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/LocationService.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/LocationService.kt new file mode 100644 index 0000000000..847bdf3921 --- /dev/null +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/LocationService.kt @@ -0,0 +1,12 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.features.location.api + +interface LocationService { + fun isServiceAvailable(): Boolean +} diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/StaticMapView.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/StaticMapView.kt index 8065164ad7..e80386a9c5 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/StaticMapView.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/StaticMapView.kt @@ -103,6 +103,7 @@ fun StaticMapView( } else { StaticMapPlaceholder( showProgress = collectedState.value.isLoading(), + canReload = builder.isServiceAvailable(), contentDescription = contentDescription, width = maxWidth, height = maxHeight, diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt index 9b621cbc8b..20c0466e13 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt @@ -57,6 +57,8 @@ internal class MapTilerStaticMapUrlBuilder( // to keep the perceived content size constant at the expense of sharpness. return "$MAPTILER_BASE_URL/$mapId/static/$lon,$lat,$finalZoom/${finalWidth}x${finalHeight}$scale.webp?key=$apiKey&attribution=bottomleft" } + + override fun isServiceAvailable() = apiKey.isNotEmpty() } private fun coerceWidthAndHeight(width: Int, height: Int, is2x: Boolean): Pair { diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapPlaceholder.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapPlaceholder.kt index 7d62ff8682..6ea4e9f9de 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapPlaceholder.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapPlaceholder.kt @@ -9,8 +9,10 @@ package io.element.android.features.location.api.internal import androidx.compose.foundation.Image import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment @@ -18,7 +20,6 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import io.element.android.compound.tokens.generated.CompoundIcons @@ -28,12 +29,12 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.libraries.designsystem.utils.BooleanProvider import io.element.android.libraries.ui.strings.CommonStrings @Composable internal fun StaticMapPlaceholder( showProgress: Boolean, + canReload: Boolean, contentDescription: String?, width: Dp, height: Dp, @@ -54,7 +55,7 @@ internal fun StaticMapPlaceholder( ) if (showProgress) { CircularProgressIndicator() - } else { + } else if (canReload) { Column( horizontalAlignment = Alignment.CenterHorizontally, ) { @@ -70,14 +71,24 @@ internal fun StaticMapPlaceholder( @PreviewsDayNight @Composable -internal fun StaticMapPlaceholderPreview( - @PreviewParameter(BooleanProvider::class) values: Boolean -) = ElementPreview { - StaticMapPlaceholder( - showProgress = values, - contentDescription = null, - width = 400.dp, - height = 400.dp, - onLoadMapClick = {}, - ) +internal fun StaticMapPlaceholderPreview() = ElementPreview { + Column( + modifier = Modifier.padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + listOf( + true to false, + false to true, + false to false, + ).forEach { (showProgress, canReload) -> + StaticMapPlaceholder( + showProgress = showProgress, + canReload = canReload, + contentDescription = null, + width = 400.dp, + height = 200.dp, + onLoadMapClick = {}, + ) + } + } } diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapUrlBuilder.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapUrlBuilder.kt index 3911e996c4..e52205c2f3 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapUrlBuilder.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/StaticMapUrlBuilder.kt @@ -22,6 +22,8 @@ interface StaticMapUrlBuilder { height: Int, density: Float, ): String + + fun isServiceAvailable(): Boolean } fun StaticMapUrlBuilder(context: Context): StaticMapUrlBuilder = MapTilerStaticMapUrlBuilder(context = context) diff --git a/features/location/api/src/test/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilderTest.kt b/features/location/api/src/test/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilderTest.kt index 30c65c3b1f..b74cebf1e7 100644 --- a/features/location/api/src/test/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilderTest.kt +++ b/features/location/api/src/test/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilderTest.kt @@ -17,6 +17,21 @@ class MapTilerStaticMapUrlBuilderTest { darkMapId = "aDarkMapId", ) + @Test + fun `isServiceAvailable returns true if api key is not empty`() { + assertThat(builder.isServiceAvailable()).isTrue() + } + + @Test + fun `isServiceAvailable returns false if api key is empty`() { + val builderWithoutKey = MapTilerStaticMapUrlBuilder( + apiKey = "", + lightMapId = "aLightMapId", + darkMapId = "aDarkMapId", + ) + assertThat(builderWithoutKey.isServiceAvailable()).isFalse() + } + @Test fun `static map 1x density`() { assertThat( diff --git a/features/location/impl/build.gradle.kts b/features/location/impl/build.gradle.kts index 4c62bdff1a..8a47e77b1a 100644 --- a/features/location/impl/build.gradle.kts +++ b/features/location/impl/build.gradle.kts @@ -49,6 +49,7 @@ dependencies { testImplementation(projects.libraries.testtags) testImplementation(projects.services.analytics.test) testImplementation(projects.features.messages.test) + testImplementation(projects.services.toolbox.test) testImplementation(projects.tests.testutils) testImplementation(libs.androidx.compose.ui.test.junit) testReleaseImplementation(libs.androidx.compose.ui.test.manifest) diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/DefaultLocationService.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/DefaultLocationService.kt new file mode 100644 index 0000000000..1a9359b301 --- /dev/null +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/DefaultLocationService.kt @@ -0,0 +1,24 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.features.location.impl + +import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.location.api.LocationService +import io.element.android.features.location.api.R +import io.element.android.libraries.di.AppScope +import io.element.android.services.toolbox.api.strings.StringProvider +import javax.inject.Inject + +@ContributesBinding(AppScope::class) +class DefaultLocationService @Inject constructor( + private val stringProvider: StringProvider, +) : LocationService { + override fun isServiceAvailable(): Boolean { + return stringProvider.getString(R.string.maptiler_api_key).isNotEmpty() + } +} diff --git a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/DefaultLocationServiceTest.kt b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/DefaultLocationServiceTest.kt new file mode 100644 index 0000000000..213ce52ac5 --- /dev/null +++ b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/DefaultLocationServiceTest.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.features.location.impl + +import com.google.common.truth.Truth.assertThat +import io.element.android.features.location.api.R +import io.element.android.services.toolbox.test.strings.FakeStringProvider +import org.junit.Test + +class DefaultLocationServiceTest { + @Test + fun `if apiKey is empty, isServiceAvailable should return false`() { + val fakeStringProvider = FakeStringProvider( + defaultResult = "" + ) + val locationService = DefaultLocationService( + stringProvider = fakeStringProvider, + ) + assertThat(locationService.isServiceAvailable()).isFalse() + assertThat(fakeStringProvider.lastResIdParam).isEqualTo(R.string.maptiler_api_key) + } + + @Test + fun `if apiKey is not empty, isServiceAvailable should return true`() { + val locationService = DefaultLocationService( + stringProvider = FakeStringProvider( + defaultResult = "aKey" + ) + ) + assertThat(locationService.isServiceAvailable()).isTrue() + } +} diff --git a/features/location/test/build.gradle.kts b/features/location/test/build.gradle.kts new file mode 100644 index 0000000000..024ae2c303 --- /dev/null +++ b/features/location/test/build.gradle.kts @@ -0,0 +1,18 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +plugins { + id("io.element.android-library") +} + +android { + namespace = "io.element.android.features.location.test" +} + +dependencies { + implementation(projects.features.location.api) +} diff --git a/features/location/test/src/main/kotlin/io/element/android/features/location/test/FakeLocationService.kt b/features/location/test/src/main/kotlin/io/element/android/features/location/test/FakeLocationService.kt new file mode 100644 index 0000000000..8ba29a65aa --- /dev/null +++ b/features/location/test/src/main/kotlin/io/element/android/features/location/test/FakeLocationService.kt @@ -0,0 +1,16 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +package io.element.android.features.location.test + +import io.element.android.features.location.api.LocationService + +class FakeLocationService( + private val isServiceAvailable: Boolean, +) : LocationService { + override fun isServiceAvailable() = isServiceAvailable +} diff --git a/features/messages/impl/build.gradle.kts b/features/messages/impl/build.gradle.kts index 94edaf5c9f..cf8f73f47a 100644 --- a/features/messages/impl/build.gradle.kts +++ b/features/messages/impl/build.gradle.kts @@ -75,6 +75,7 @@ dependencies { testImplementation(libs.test.turbine) testImplementation(projects.libraries.matrix.test) testImplementation(projects.libraries.dateformatter.test) + testImplementation(projects.features.location.test) testImplementation(projects.features.networkmonitor.test) testImplementation(projects.features.messages.test) testImplementation(projects.services.analytics.test) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt index f2befcb7c6..09bc3a287f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt @@ -28,6 +28,7 @@ import io.element.android.features.call.api.CallType import io.element.android.features.call.api.ElementCallEntryPoint import io.element.android.features.knockrequests.api.list.KnockRequestsListEntryPoint import io.element.android.features.location.api.Location +import io.element.android.features.location.api.LocationService import io.element.android.features.location.api.SendLocationEntryPoint import io.element.android.features.location.api.ShowLocationEntryPoint import io.element.android.features.messages.api.MessagesEntryPoint @@ -96,6 +97,7 @@ class MessagesFlowNode @AssistedInject constructor( private val elementCallEntryPoint: ElementCallEntryPoint, private val mediaViewerEntryPoint: MediaViewerEntryPoint, private val analyticsService: AnalyticsService, + private val locationService: LocationService, private val room: MatrixRoom, private val roomMemberProfilesCache: RoomMemberProfilesCache, private val mentionSpanTheme: MentionSpanTheme, @@ -409,7 +411,7 @@ class MessagesFlowNode @AssistedInject constructor( NavTarget.LocationViewer( location = event.content.location, description = event.content.description, - ) + ).takeIf { locationService.isServiceAvailable() } } else -> null } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index fce8e732e4..de5d2436e7 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -30,6 +30,7 @@ import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject import im.vector.app.features.analytics.plan.Composer import im.vector.app.features.analytics.plan.Interaction +import io.element.android.features.location.api.LocationService import io.element.android.features.messages.impl.MessagesNavigator import io.element.android.features.messages.impl.attachments.Attachment import io.element.android.features.messages.impl.attachments.preview.error.sendAttachmentError @@ -104,6 +105,7 @@ class MessageComposerPresenter @AssistedInject constructor( private val mediaSender: MediaSender, private val snackbarDispatcher: SnackbarDispatcher, private val analyticsService: AnalyticsService, + private val locationService: LocationService, private val messageComposerContext: DefaultMessageComposerContext, private val richTextEditorStateFactory: RichTextEditorStateFactory, private val roomAliasSuggestionsDataSource: RoomAliasSuggestionsDataSource, @@ -155,7 +157,8 @@ class MessageComposerPresenter @AssistedInject constructor( val canShareLocation = remember { mutableStateOf(false) } LaunchedEffect(Unit) { - canShareLocation.value = featureFlagService.isFeatureEnabled(FeatureFlags.LocationSharing) + canShareLocation.value = featureFlagService.isFeatureEnabled(FeatureFlags.LocationSharing) && + locationService.isServiceAvailable() } val canCreatePoll = remember { mutableStateOf(false) } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenterTest.kt index 07205590c8..79f8221b46 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenterTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenterTest.kt @@ -18,6 +18,8 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import im.vector.app.features.analytics.plan.Composer import im.vector.app.features.analytics.plan.Interaction +import io.element.android.features.location.api.LocationService +import io.element.android.features.location.test.FakeLocationService import io.element.android.features.messages.impl.FakeMessagesNavigator import io.element.android.features.messages.impl.MessagesNavigator import io.element.android.features.messages.impl.attachments.Attachment @@ -1536,6 +1538,7 @@ class MessageComposerPresenterTest { navigator: MessagesNavigator = FakeMessagesNavigator(), pickerProvider: PickerProvider = this.pickerProvider, featureFlagService: FeatureFlagService = this.featureFlagService, + locationService: LocationService = FakeLocationService(true), sessionPreferencesStore: SessionPreferencesStore = InMemorySessionPreferencesStore(), mediaPreProcessor: MediaPreProcessor = this.mediaPreProcessor, snackbarDispatcher: SnackbarDispatcher = this.snackbarDispatcher, @@ -1558,6 +1561,7 @@ class MessageComposerPresenterTest { mediaSender = MediaSender(mediaPreProcessor, room, InMemorySessionPreferencesStore()), snackbarDispatcher = snackbarDispatcher, analyticsService = analyticsService, + locationService = locationService, messageComposerContext = DefaultMessageComposerContext(), richTextEditorStateFactory = TestRichTextEditorStateFactory(), roomAliasSuggestionsDataSource = FakeRoomAliasSuggestionsDataSource(), diff --git a/libraries/pushstore/impl/build.gradle.kts b/libraries/pushstore/impl/build.gradle.kts index 2afd3cb87a..ec81643cfd 100644 --- a/libraries/pushstore/impl/build.gradle.kts +++ b/libraries/pushstore/impl/build.gradle.kts @@ -46,5 +46,4 @@ dependencies { androidTestImplementation(libs.test.junit) androidTestImplementation(libs.test.truth) androidTestImplementation(libs.test.runner) - androidTestImplementation(projects.libraries.sessionStorage.test) } diff --git a/libraries/pushstore/impl/src/androidTest/kotlin/io/element/android/libraries/pushstore/impl/DefaultUserPushStoreFactoryTest.kt b/libraries/pushstore/impl/src/androidTest/kotlin/io/element/android/libraries/pushstore/impl/DefaultUserPushStoreFactoryTest.kt index 549ba59db9..dbc212efe1 100644 --- a/libraries/pushstore/impl/src/androidTest/kotlin/io/element/android/libraries/pushstore/impl/DefaultUserPushStoreFactoryTest.kt +++ b/libraries/pushstore/impl/src/androidTest/kotlin/io/element/android/libraries/pushstore/impl/DefaultUserPushStoreFactoryTest.kt @@ -10,7 +10,6 @@ package io.element.android.libraries.pushstore.impl import androidx.test.platform.app.InstrumentationRegistry import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.pushstore.api.UserPushStore -import io.element.android.libraries.sessionstorage.test.observer.NoOpSessionObserver import kotlinx.coroutines.flow.first import kotlinx.coroutines.runBlocking import org.junit.Test @@ -28,7 +27,7 @@ class DefaultUserPushStoreFactoryTest { fun testParallelCreation() { val context = InstrumentationRegistry.getInstrumentation().targetContext.applicationContext val sessionId = SessionId("@alice:server.org") - val userPushStoreFactory = DefaultUserPushStoreFactory(context, NoOpSessionObserver()) + val userPushStoreFactory = DefaultUserPushStoreFactory(context) var userPushStore1: UserPushStore? = null val thread1 = thread { userPushStore1 = userPushStoreFactory.getOrCreate(sessionId) diff --git a/plugins/src/main/kotlin/config/BuildTimeConfig.kt b/plugins/src/main/kotlin/config/BuildTimeConfig.kt index f8512ab956..bac0c94d0b 100644 --- a/plugins/src/main/kotlin/config/BuildTimeConfig.kt +++ b/plugins/src/main/kotlin/config/BuildTimeConfig.kt @@ -13,4 +13,8 @@ object BuildTimeConfig { const val GOOGLE_APP_ID_RELEASE = "1:912726360885:android:d097de99a4c23d2700427c" const val GOOGLE_APP_ID_DEBUG = "1:912726360885:android:def0a4e454042e9b00427c" const val GOOGLE_APP_ID_NIGHTLY = "1:912726360885:android:e17435e0beb0303000427c" + + val SERVICES_MAPTILER_APIKEY: String? = null + val SERVICES_MAPTILER_LIGHT_MAPID: String? = null + val SERVICES_MAPTILER_DARK_MAPID: String? = null } diff --git a/services/toolbox/test/src/main/kotlin/io/element/android/services/toolbox/test/strings/FakeStringProvider.kt b/services/toolbox/test/src/main/kotlin/io/element/android/services/toolbox/test/strings/FakeStringProvider.kt index a9f0d3358a..e6b33d3785 100644 --- a/services/toolbox/test/src/main/kotlin/io/element/android/services/toolbox/test/strings/FakeStringProvider.kt +++ b/services/toolbox/test/src/main/kotlin/io/element/android/services/toolbox/test/strings/FakeStringProvider.kt @@ -12,15 +12,19 @@ import io.element.android.services.toolbox.api.strings.StringProvider class FakeStringProvider( private val defaultResult: String = "A string" ) : StringProvider { + var lastResIdParam: Int? = null override fun getString(resId: Int): String { + lastResIdParam = resId return defaultResult } override fun getString(resId: Int, vararg formatArgs: Any?): String { + lastResIdParam = resId return defaultResult + formatArgs.joinToString() } override fun getQuantityString(resId: Int, quantity: Int, vararg formatArgs: Any?): String { + lastResIdParam = resId return defaultResult + " ($quantity) " + formatArgs.joinToString() } } diff --git a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_0_en.png b/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_0_en.png index 91297a8544..5affd0ac12 100644 --- a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aad48b326c07ed1eda341817b9a30cc74ef6cc83dd80406dd26aed858112eda8 -size 252914 +oid sha256:7275edb15579beb09be957ca2fb42ac95fc3131a9349446920db9797d79efca5 +size 439078 diff --git a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_1_en.png b/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_1_en.png deleted file mode 100644 index e366c3f1cb..0000000000 --- a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Day_1_en.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a1dab0d4f896e496af650cab32f2b1fd8572ab698b6cbfd84166334216117149 -size 255494 diff --git a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_0_en.png b/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_0_en.png index 7e5ffb533d..3eec5f639e 100644 --- a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_0_en.png +++ b/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_0_en.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e63a6eaedca373d7154c66d7f9fc5f52e4999dbfaafe00bb06cf94a86e2fb762 -size 105538 +oid sha256:50de6c03736fc71fc3029dadf353c212bfc504a643d6216594f5417357daf16c +size 173445 diff --git a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_1_en.png b/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_1_en.png deleted file mode 100644 index 999e631747..0000000000 --- a/tests/uitests/src/test/snapshots/images/features.location.api.internal_StaticMapPlaceholder_Night_1_en.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ace6730f6dc2fe45aa2cb095b59453cf449de62a98508587439d277ff3fd23db -size 107041