Skip to content

Commit ae17d21

Browse files
committed
Upgrade min SDK version to 24
1 parent cb430a5 commit ae17d21

File tree

5 files changed

+5
-23
lines changed

5 files changed

+5
-23
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## XX.XX.XX - 20XX-XX-XX
44

5+
* [CHANGED][12036](https://github.com/stripe/stripe-android/pull/12095) Upgrade minimum SDK version from 21 to 24
6+
57
### PaymentSheet
68
* [CHANGED][12036](https://github.com/stripe/stripe-android/pull/12036) Updates the google places SDK from 3.5.0 to 5.0.0.
79

build-configuration/android-application.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ android {
2020
compileSdkVersion rootProject.ext.compileSdkVersion
2121

2222
defaultConfig {
23-
minSdkVersion 21
23+
minSdkVersion 24
2424
targetSdkVersion rootProject.ext.compileSdkVersion
2525
versionName VERSION_NAME
2626
}

build-configuration/android-library.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
compileSdkVersion rootProject.ext.compileSdkVersion
3535

3636
defaultConfig {
37-
minSdkVersion 21
37+
minSdkVersion 24
3838
targetSdkVersion rootProject.ext.compileSdkVersion
3939
consumerProguardFiles "consumer-rules.txt"
4040

payments-ui-core/src/main/java/com/stripe/android/ui/core/elements/autocomplete/PlacesClientProxy.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package com.stripe.android.ui.core.elements.autocomplete
22

33
import android.content.Context
44
import android.graphics.Typeface
5-
import android.os.Build
65
import android.text.style.StyleSpan
76
import androidx.annotation.RestrictTo
87
import androidx.annotation.VisibleForTesting
@@ -51,7 +50,7 @@ interface PlacesClientProxy {
5150
initializer: () -> Unit = { Places.initialize(context, googlePlacesApiKey) },
5251
errorReporter: ErrorReporter
5352
): PlacesClientProxy {
54-
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && isPlacesAvailable()) {
53+
return if (isPlacesAvailable()) {
5554
override ?: run {
5655
initializer()
5756
DefaultPlacesClientProxy(

payments-ui-core/src/test/java/com/stripe/android/ui/core/elements/autocomplete/PlacesClientProxyTest.kt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,6 @@ class PlacesClientProxyTest {
6363
assertThat(client).isInstanceOf<DefaultPlacesClientProxy>()
6464
}
6565

66-
@Test
67-
@Config(sdk = [Build.VERSION_CODES.M])
68-
fun `create returns unsupported client when run on old devices`() {
69-
val client = PlacesClientProxy.create(
70-
context = mock(),
71-
googlePlacesApiKey = "abc123",
72-
isPlacesAvailable = object : IsPlacesAvailable {
73-
override fun invoke(): Boolean {
74-
throw IllegalStateException("Shouldn't be called.")
75-
}
76-
},
77-
clientFactory = { mock() },
78-
initializer = { /* no-op */ },
79-
errorReporter = FakeErrorReporter(),
80-
)
81-
82-
assertThat(client).isInstanceOf<UnsupportedPlacesClientProxy>()
83-
}
84-
8566
@Test
8667
fun `create returns unsupported client when google places not available`() {
8768
val client = PlacesClientProxy.create(

0 commit comments

Comments
 (0)