Skip to content

Commit b93cc40

Browse files
[various] Scrubs pre-SDK-21 Android code (#9112)
- Removes any annotations or runtime checks related to Android API 20 or 21, as 21 is the minimum API version supported by the versions of Flutter these plugins support. - Removes comment/README references to limitations for <21. - Updates READMEs for app-facing packages to reflect the current support levels. Fixes flutter/flutter#157106 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent bfb42a6 commit b93cc40

File tree

80 files changed

+136
-136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+136
-136
lines changed

packages/camera/camera_android/android/src/test/java/io/flutter/plugins/camera/CameraTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ public void setDescriptionWhileRecording_errorsWhenUnsupported() {
663663
camera.mediaRecorder = mockMediaRecorder;
664664
camera.recordingVideo = true;
665665
camera.videoRenderer = mockVideoRenderer;
666-
SdkCapabilityChecker.SDK_VERSION = Build.VERSION_CODES.LOLLIPOP;
666+
SdkCapabilityChecker.SDK_VERSION = Build.VERSION_CODES.N;
667667

668668
final CameraProperties newCameraProperties = mock(CameraProperties.class);
669669
assertThrows(

packages/camera/camera_android/example/android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ tasks.register("clean", Delete) {
3030
gradle.projectsEvaluated {
3131
project(":camera_android") {
3232
tasks.withType(JavaCompile) {
33-
options.compilerArgs << "-Xlint:all" << "-Werror"
33+
// Ignore classfile due to https://issuetracker.google.com/issues/342067844
34+
options.compilerArgs << "-Xlint:all" << "-Werror" << "-Xlint:-classfile"
3435
}
3536
}
3637
}

packages/espresso/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.0+7
2+
3+
* Removes obsolete code related to supporting SDK <21.
4+
15
## 0.4.0+6
26

37
* Updates compileSdk 34 to flutter.compileSdkVersion.

packages/espresso/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Provides bindings for Espresso tests of Flutter Android apps.
44

55
| | Android |
66
|-------------|---------|
7-
| **Support** | SDK 16+ |
7+
| **Support** | SDK 21+ |
88

99
## Installation
1010

packages/espresso/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ android {
2626
compileSdk = flutter.compileSdkVersion
2727

2828
defaultConfig {
29-
minSdkVersion 19
29+
minSdkVersion 21
3030
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
3131
}
3232

packages/espresso/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Java classes for testing Flutter apps using Espresso.
33
Allows driving Flutter widgets from a native Espresso test.
44
repository: https://github.com/flutter/packages/tree/main/packages/espresso
55
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22
6-
version: 0.4.0+6
6+
version: 0.4.0+7
77

88
environment:
99
sdk: ^3.6.0

packages/file_selector/file_selector/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## NEXT
22

3+
* Updates README to indicate that Andoid SDK <21 is no longer supported.
34
* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.
45

56
## 1.0.3

packages/file_selector/file_selector/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A Flutter plugin that manages files and interactions with file dialogs.
88

99
| | Android | iOS | Linux | macOS | Web | Windows |
1010
|-------------|---------|---------|-------|--------|-----|-------------|
11-
| **Support** | SDK 19+ | iOS 12+ | Any | 10.14+ | Any | Windows 10+ |
11+
| **Support** | SDK 21+ | iOS 12+ | Any | 10.14+ | Any | Windows 10+ |
1212

1313
## Setup
1414

@@ -114,9 +114,7 @@ pass different `XTypeGroup`s based on `Platform`.
114114
| Choose a single file | Pick a file/image | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
115115
| Choose multiple files | Pick multiple files/images | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
116116
| Choose a save location | Pick a directory to save a file in ||| ✔️ | ✔️ | ✔️ ||
117-
| Choose a directory | Pick a directory and get its path | ✔️† || ✔️ | ✔️ | ✔️ ||
118-
119-
† Choosing a directory is no supported on versions of Android before SDK 21 (Lollipop).
117+
| Choose a directory | Pick a directory and get its path | ✔️ || ✔️ | ✔️ | ✔️ ||
120118

121119
[example]:./example
122120
[entitlement]: https://docs.flutter.dev/desktop#entitlements-and-the-app-sandbox

packages/file_selector/file_selector_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.1+14
2+
3+
* Removes obsolete code related to supporting SDK <21.
4+
15
## 0.5.1+13
26

37
* Updates compileSdk 34 to flutter.compileSdkVersion.

packages/file_selector/file_selector_android/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ android {
3131
}
3232

3333
defaultConfig {
34-
minSdkVersion 19
34+
minSdkVersion 21
3535
}
3636

3737
dependencies {

0 commit comments

Comments
 (0)