-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[camera] Enable camera plugin to compile with earlier android apis with custom AndroidManifest settings #1598
Conversation
|
I can confirm that it works, I just get not sure where it come from :/ |
packages/camera/android/src/main/java/io/flutter/plugins/camera/CameraPlugin.java
Show resolved
Hide resolved
| } | ||
| } | ||
|
|
||
| @SuppressWarnings("ConstantConditions") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this being suppressed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The casting of Exception to RuntimeException. From my understanding of Java, CameraAccessException is the only checked exception that will come from these methods. Otherwise it should be a RuntimeException.
In general it sounds related to flutter/flutter#27254? |
mklim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…th custom AndroidManifest settings (flutter#1598)
Description
Enable camera plugin to compile with earlier android sdks with custom AndroidManifest settings.
Catching
CameraAccessExceptions in theonMethodCallprevented compilation on <21. This separates handling them into another method.Related Issues
Original PR: #1482
Fixes flutter/flutter#30854
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?