Skip to content

[camera] Fix Android lint issues #3993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/camera/camera_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 0.10.8+1

* Fixes lint errors.
* Updates minimum supported SDK version to Flutter 3.3/Dart 2.18.

## 0.10.8
Expand Down
5 changes: 0 additions & 5 deletions packages/camera/camera_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ android {
compileSdkVersion 33

defaultConfig {
targetSdkVersion 31
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think you want to delete this but instead set it to 33

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No other plugin in the entire repository has this, and in some initial investigation I was not able to determine exactly how this interacts with app targetSdkVersion. If we want the plugins to have this, I think we should have a policy for what we set it to and how we test it, and tooling that enforces that (since if it does affect apps, we need to ensure that we are actually testing, in some cases manually, before we roll it forward).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(For instance, does setting this change the compat behavior of every app that is a client of the plugin? If so, updating it to 33 is potentially a big deal for clients.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed flutter/flutter#126828 for us to track and discuss this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didnt catch that this was a plugin and not an example app.

minSdkVersion 21
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -48,10 +47,6 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}

lint {
baseline = file("lint-baseline.xml")
}

testOptions {
unitTests.includeAndroidResources = true
unitTests.returnDefaultValues = true
Expand Down
26 changes: 0 additions & 26 deletions packages/camera/camera_android/android/lint-baseline.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ interface CameraDeviceWrapper {
@TargetApi(Build.VERSION_CODES.P)
void createCaptureSession(SessionConfiguration config) throws CameraAccessException;

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
void createCaptureSession(
@NonNull List<Surface> outputs,
@NonNull CameraCaptureSession.StateCallback callback,
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Android implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.8
version: 0.10.8+1

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down