Skip to content

Commit fa7b52b

Browse files
Drop support for Android API levels 21-22 (#12676)
Google Play Services needs min Android API level of 23 (Android 6.0 Marshmallow). Fixes [#11474](#11474).
1 parent 1fbf0eb commit fa7b52b

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ gRPC-Java - An RPC library and framework
2020
Supported Platforms
2121
-------------------
2222

23-
gRPC-Java supports Java 8 and later. Android minSdkVersion 21 (Lollipop) and
23+
gRPC-Java supports Java 8 and later. Android minSdkVersion 23 (Marshmallow) and
2424
later are supported with [Java 8 language desugaring][android-java-8].
2525

2626
TLS usage on Android typically requires Play Services Dynamic Security Provider.

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ android {
1414
}
1515
compileSdkVersion 34
1616
defaultConfig {
17-
minSdkVersion 22
17+
minSdkVersion 23
1818
targetSdkVersion 33
1919
versionCode 1
2020
versionName "1.0"

binder/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
targetCompatibility 1.8
1414
}
1515
defaultConfig {
16-
minSdkVersion 22
16+
minSdkVersion 23
1717
targetSdkVersion 33
1818
versionCode 1
1919
versionName "1.0"

cronet/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ android {
1414
namespace = 'io.grpc.cronet'
1515
compileSdkVersion 33
1616
defaultConfig {
17-
minSdkVersion 22
17+
minSdkVersion 23
1818
targetSdkVersion 33
1919
versionCode 1
2020
versionName "1.0"

cronet/src/main/java/io/grpc/cronet/CronetChannelBuilder.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import static io.grpc.internal.GrpcUtil.DEFAULT_MAX_MESSAGE_SIZE;
2222

2323
import android.net.Network;
24-
import android.os.Build;
2524
import com.google.common.annotations.VisibleForTesting;
2625
import com.google.common.base.Preconditions;
2726
import com.google.common.util.concurrent.MoreExecutors;
@@ -340,9 +339,7 @@ public BidirectionalStream.Builder newBidirectionalStreamBuilder(
340339
builder.setTrafficStatsUid(trafficStatsUid);
341340
}
342341
if (network != null) {
343-
if (Build.VERSION.SDK_INT >= 23) {
344-
builder.bindToNetwork(network.getNetworkHandle());
345-
}
342+
builder.bindToNetwork(network.getNetworkHandle());
346343
}
347344
return builder;
348345
}

examples/android/helloworld/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010

1111
defaultConfig {
1212
applicationId "io.grpc.helloworldexample"
13-
minSdkVersion 21
13+
minSdkVersion 23
1414
targetSdkVersion 33
1515
versionCode 1
1616
versionName "1.0"

examples/android/routeguide/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ android {
1010

1111
defaultConfig {
1212
applicationId "io.grpc.routeguideexample"
13-
minSdkVersion 21
13+
minSdkVersion 23
1414
targetSdkVersion 33
1515
versionCode 1
1616
versionName "1.0"

0 commit comments

Comments
 (0)