diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 71077054969a..b4043fdee507 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -39,7 +39,8 @@ android:launchMode="singleInstance" android:configChanges="orientation|screenSize|screenLayout" android:screenOrientation="fullUser" - android:windowSoftInputMode="adjustResize"> + android:windowSoftInputMode="adjustResize" + tools:ignore="DiscouragedApi"> diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt index c38eafa24ed1..3bb092b0de35 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/FilterChip.kt @@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material3.ButtonDefaults -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.FilterChip import androidx.compose.material3.FilterChipDefaults import androidx.compose.material3.MaterialTheme @@ -33,7 +32,6 @@ private fun PreviewMullvadFilterChip() { } } -@OptIn(ExperimentalMaterial3Api::class) @Composable fun MullvadFilterChip(text: String, onRemoveClick: () -> Unit) { FilterChip( @@ -44,7 +42,9 @@ fun MullvadFilterChip(text: String, onRemoveClick: () -> Unit) { border = FilterChipDefaults.filterChipBorder( borderColor = Color.Transparent, - disabledBorderColor = Color.Transparent + disabledBorderColor = Color.Transparent, + enabled = true, + selected = false ), selected = false, onClick = {}, diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt index 319cd9e9542d..d7b454111693 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/component/TopBar.kt @@ -230,6 +230,7 @@ fun MullvadMediumTopBar( colors = TopAppBarDefaults.mediumTopAppBarColors( containerColor = MaterialTheme.colorScheme.background, + scrolledContainerColor = MaterialTheme.colorScheme.background, actionIconContentColor = MaterialTheme.colorScheme.onPrimary.copy(AlphaTopBar), ), actions = actions diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt index 33414dcbaabc..cf5d4f02c7f5 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SelectLocationScreen.kt @@ -181,8 +181,10 @@ fun SelectLocationScreen( uiState.relayListState.selectedRelay.location.location.country } - lazyListState.scrollToItem(index) - lazyListState.animateScrollAndCentralizeItem(index) + if (index >= 0) { + lazyListState.scrollToItem(index) + lazyListState.animateScrollAndCentralizeItem(index) + } } } LazyColumn( diff --git a/android/buildSrc/src/main/kotlin/Versions.kt b/android/buildSrc/src/main/kotlin/Versions.kt index 3c2470b2d031..bbf99515d0e7 100644 --- a/android/buildSrc/src/main/kotlin/Versions.kt +++ b/android/buildSrc/src/main/kotlin/Versions.kt @@ -35,11 +35,11 @@ object Versions { } object Compose { - const val destinations = "1.9.55" - const val base = "1.5.4" + const val destinations = "1.10.0" + const val base = "1.6.0" const val constrainLayout = "1.0.1" const val foundation = base - const val material3 = "1.1.1" + const val material3 = "1.2.0-rc01" } object Plugin { diff --git a/android/gradle.properties b/android/gradle.properties index 4233d36b8265..6ee1f9ff67a3 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -4,3 +4,4 @@ android.nonTransitiveRClass=false android.useAndroidX=true kotlin.code.style=official org.gradle.jvmargs=-Xmx8192M -Dkotlin.daemon.jvm.options\="-Xmx8192M" +android.experimental.lint.version=8.3.0-beta02 diff --git a/android/gradle/verification-metadata.xml b/android/gradle/verification-metadata.xml index bd2f25605964..a85d2f0f5902 100644 --- a/android/gradle/verification-metadata.xml +++ b/android/gradle/verification-metadata.xml @@ -82,11 +82,6 @@ - - - - - @@ -108,11 +103,6 @@ - - - - - @@ -129,17 +119,17 @@ - - - - - - - + + + + + + + @@ -158,14 +148,27 @@ - - - + + + + + + + + + + + + + + + + @@ -223,72 +226,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - - + + + + + + - - - + + + - - + + - - - + + + - + - - - + + + - - + + + + + + + - - - + + + + + + - - - + + + - - + + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + @@ -299,28 +371,44 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - + + + + + + + + + + + + + + + + + @@ -328,28 +416,44 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - + + + + + + + + + + + + + + + + + @@ -357,99 +461,189 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + + + + + + + + + + + + - - + + + + + + + + + + + + - - - + + + - + - - - + + + - - - - + + - - - + + + - - + + - - - + + + - + + + + + + + + + - - - + + + - - + + - - - + + + - + + + + + + + + + @@ -457,144 +651,197 @@ - - - + + + - - + + - - - + + + - + - - - + + + + + + - - - + + + - - + + - - - + + + + + + + + - + + + + + + + + + - - - + + + - - - + + + - + - - - + + + - - - + + + - + - - - + + + - - + + - - - + + + - - - + + + - - + + + + + + + - - - + + + - + + + + + + + + + - - - + + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + - + - - - + + + - - + + - - - + + + + + + + + + + + + + + + + + + + - + + + + + + + + + @@ -602,51 +849,57 @@ - - - + + + + + + - - - + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - - + + + - - + + @@ -678,14 +931,6 @@ - - - - - - - - @@ -694,11 +939,6 @@ - - - - - @@ -715,14 +955,6 @@ - - - - - - - - @@ -798,14 +1030,6 @@ - - - - - - - - @@ -822,14 +1046,6 @@ - - - - - - - - @@ -1280,44 +1496,44 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + @@ -1548,19 +1764,34 @@ + + + + + + + + + + - - - + + + + + + + + @@ -1568,16 +1799,31 @@ + + + + + + + + + + + + + + + @@ -1588,16 +1834,31 @@ + + + + + + + + + + + + + + + @@ -1617,6 +1878,14 @@ + + + + + + + + @@ -1651,6 +1920,14 @@ + + + + + + + + @@ -1696,6 +1973,14 @@ + + + + + + + + @@ -1722,24 +2007,29 @@ + + + + + - - - + + + - - - + + + - - - + + + @@ -1747,24 +2037,29 @@ - - - + + + - - - + + + - - - + + + - - - + + + + + + + + @@ -1772,11 +2067,21 @@ + + + + + + + + + + @@ -2101,6 +2406,11 @@ + + + + + @@ -2124,6 +2434,14 @@ + + + + + + + + @@ -2250,6 +2568,11 @@ + + + + + @@ -2700,28 +3023,28 @@ - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + @@ -3777,11 +4100,6 @@ - - - - - @@ -3875,11 +4193,6 @@ - - - - - @@ -3917,16 +4230,22 @@ + + + + + + + + + + + - - - - - @@ -3952,16 +4271,16 @@ + + + + + - - - - - @@ -3992,6 +4311,11 @@ + + + + + @@ -4002,11 +4326,6 @@ - - - - - @@ -4032,6 +4351,11 @@ + + + + + @@ -4143,12 +4467,12 @@ - - - + + + - - + + @@ -4183,6 +4507,14 @@ + + + + + + + + @@ -4209,12 +4541,12 @@ - - - + + + - - + + @@ -4249,12 +4581,12 @@ - - - + + + - - + + @@ -4265,9 +4597,22 @@ - - - + + + + + + + + + + + + + + + + @@ -4320,6 +4665,19 @@ + + + + + + + + + + + + + @@ -4498,11 +4856,21 @@ + + + + + + + + + + @@ -4513,6 +4881,11 @@ + + + + + diff --git a/android/test/mockapi/build.gradle.kts b/android/test/mockapi/build.gradle.kts index 5c88d90d8234..10fd4ca99d98 100644 --- a/android/test/mockapi/build.gradle.kts +++ b/android/test/mockapi/build.gradle.kts @@ -70,7 +70,6 @@ configure { dependencies { implementation(project(Projects.testCommon)) - implementation(project(Dependencies.Mullvad.commonLib)) implementation(project(Dependencies.Mullvad.endpointLib)) implementation(Dependencies.AndroidX.testCore) diff --git a/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/AccountHistoryMockApiTest.kt b/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/AccountHistoryMockApiTest.kt index f43eadf5c03e..9d1727cad7d7 100644 --- a/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/AccountHistoryMockApiTest.kt +++ b/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/AccountHistoryMockApiTest.kt @@ -2,7 +2,6 @@ package net.mullvad.mullvadvpn.test.mockapi import androidx.test.uiautomator.By import net.mullvad.mullvadvpn.compose.test.LOGIN_INPUT_TEST_TAG -import net.mullvad.mullvadvpn.lib.common.util.groupWithSpaces import net.mullvad.mullvadvpn.test.common.extension.clickAgreeOnPrivacyDisclaimer import net.mullvad.mullvadvpn.test.common.extension.clickAllowOnNotificationPermissionPromptIfApiLevel33AndAbove import net.mullvad.mullvadvpn.test.common.extension.dismissChangelogDialogIfShown @@ -40,10 +39,11 @@ class AccountHistoryMockApiTest : MockApiTest() { device.findObjectWithTimeout(By.res(LOGIN_INPUT_TEST_TAG)).click() // Assert - assertNotNull(device.findObjectWithTimeout(By.text(validAccountToken.groupWithSpaces()))) + val expectedResult = "1234 1234 1234 1234" + assertNotNull(device.findObjectWithTimeout(By.text(expectedResult))) // Try to login with the same account again - device.findObjectWithTimeout(By.text(validAccountToken.groupWithSpaces())).click() + device.findObjectWithTimeout(By.text(expectedResult)).click() app.ensureLoggedIn() } } diff --git a/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/CreateAccountMockApiTest.kt b/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/CreateAccountMockApiTest.kt index b0ad767e311b..538a1110960a 100644 --- a/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/CreateAccountMockApiTest.kt +++ b/android/test/mockapi/src/main/kotlin/net/mullvad/mullvadvpn/test/mockapi/CreateAccountMockApiTest.kt @@ -1,6 +1,5 @@ package net.mullvad.mullvadvpn.test.mockapi -import net.mullvad.mullvadvpn.lib.common.util.groupWithSpaces import net.mullvad.mullvadvpn.test.common.extension.clickAgreeOnPrivacyDisclaimer import net.mullvad.mullvadvpn.test.common.extension.clickAllowOnNotificationPermissionPromptIfApiLevel33AndAbove import net.mullvad.mullvadvpn.test.common.extension.dismissChangelogDialogIfShown @@ -27,7 +26,8 @@ class CreateAccountMockApiTest : MockApiTest() { app.attemptCreateAccount() // Assert - app.ensureAccountCreated(createdAccountToken.groupWithSpaces()) + val expectedResult = "1234 1234 1234 1234" + app.ensureAccountCreated(expectedResult) } @Test