Status Update
Comments
wu...@google.com <wu...@google.com>
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #2
Hi Alan, When I fix the issue, I found that removing the @RequiresApi(21) annotations from the inner classes will cause the gradlew checkApi error. I needed to call gradlew updateApi to update the api txt files. Please refer to aosp/1879298.
I have a question and want to confirm with you. In the api txt files, each class/interface will be listed as a standalone item no matter it is an inner or outer class. Whether the gradlew ***Api tools should automatically add the @RequiresApi(21) annotation to the inner classes/interfaces in the generated txt files if the annotations added in the outer classes/interfaces will also be applied to the inner classes/interfaces? Otherwise, when anyone checking the api txt files, it might cause misunderstand that those inner classes/interfaces do not have the @RequiresApi(21) restriction. Or, it is correct that the annotations should only be kept in the outer classes/interfaces in the txt files?
al...@google.com <al...@google.com> #3
That looks like a Metalava issue -- I went ahead and filed a bug and marked it as blocking. Also, it looks like these are all covered by a TODO for a package-level annotation.
I think it would be reasonable to block on Metalava (added as blocking) or dupe this against the TODO.
al...@google.com <al...@google.com> #4
Upon further inspection, it looks like this issue was filed accidentally due to an issue with our baseline bug filing script.
You may still want to fix the baselined lint issues -- they are still technically incorrect -- but feel free to mark this as WAI.
ch...@google.com <ch...@google.com> #5
Thanks Alan,
I will handle this issue according to which of
wu...@google.com <wu...@google.com>
ap...@google.com <ap...@google.com> #6
Branch: androidx-main
commit 0a26ad41b1852f94276f15922706896324fed61c
Author: Charcoal Chen <charcoalchen@google.com>
Date: Wed Nov 03 14:17:55 2021
Fix SupportAnnotationUsage lint errors in CameraX proejcts
- Removed "@RequiresApi(21) // ..." annotations if it has been annotated in the outer class.
- Update api txt of the camera-core and camera-video projects
Relnote: "Removed unnecessary @RequiresApi(21) annotations from the inner classes/interfaces."
Bug: 204917951
Test: ./gradlew bOS
Change-Id: I8e28678667e2f8a5e982d64674abe4c19b5e9155
M camera/camera-testlib-extensions/src/main/java/androidx/camera/extensions/impl/HdrPreviewExtenderImpl.java
M camera/camera-video/api/public_plus_experimental_current.txt
M camera/camera-testing/src/main/java/androidx/camera/testing/CoreAppTestUtil.java
M camera/camera-testing/src/main/java/androidx/camera/testing/fakes/FakeAppConfig.java
M camera/camera-camera2-pipe-integration/src/main/java/androidx/camera/camera2/pipe/integration/impl/FocusMeteringControl.kt
M camera/camera-core/src/main/java/androidx/camera/core/impl/StateObservable.java
M camera/camera-core/src/main/java/androidx/camera/core/CameraState.java
M camera/camera-core/src/main/java/androidx/camera/core/Preview.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageAnalysis.java
M camera/camera-core/src/main/java/androidx/camera/core/FocusMeteringAction.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageProxy.java
M camera/camera-video/src/main/java/androidx/camera/video/MediaStoreOutputOptions.java
M camera/camera-core/src/main/java/androidx/camera/core/AndroidImageProxy.java
M camera/camera-core/src/main/java/androidx/camera/core/ViewPort.java
M camera/camera-video/src/main/java/androidx/camera/video/QualitySelector.java
M camera/camera-core/src/main/java/androidx/camera/core/VideoCapture.java
M camera/camera-core/src/main/java/androidx/camera/core/UseCaseGroup.java
M camera/camera-core/src/main/java/androidx/camera/core/CameraSelector.java
M camera/camera-video/api/current.txt
M camera/camera-core/api/current.txt
M camera/camera-core/src/main/java/androidx/camera/core/CameraXConfig.java
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/CameraDeviceStateCallbacks.java
M camera/camera-core/src/main/java/androidx/camera/core/CameraControl.java
M camera/camera-core/api/public_plus_experimental_current.txt
M camera/camera-core/src/main/java/androidx/camera/core/SurfaceRequest.java
M camera/camera-core/src/main/java/androidx/camera/core/ImageCapture.java
M camera/camera-core/api/restricted_current.txt
M camera/camera-extensions/src/main/java/androidx/camera/extensions/internal/sessionprocessor/SessionProcessorBase.java
M camera/camera-video/api/restricted_current.txt
Description
The following lint check is baseline suppressed in your project. Please remove all instances of this suppression from
camera/camera-core/lint-baseline.xml
and address the associated issues before your next stable release.30 instance(s) of
SupportAnnotationUsage
The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/AndroidImageProxy.java
at line 101:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraControl.java
at line 192:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraSelector.java
at line 194:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraState.java
at line 261:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraState.java
at line 283:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraState.java
at line 445:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraXConfig.java
at line 74:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/CameraXConfig.java
at line 208:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/FocusMeteringAction.java
at line 159:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageAnalysis.java
at line 677:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageAnalysis.java
at line 725:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageAnalysis.java
at line 752:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 1793:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 1810:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 1892:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 1963:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 2054:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 2077:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 2319:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageCapture.java
at line 2508:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ImageProxy.java
at line 89:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/Preview.java
at line 564:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/Preview.java
at line 654:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/impl/StateObservable.java
at line 185:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/SurfaceRequest.java
at line 479:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/SurfaceRequest.java
at line 504:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/SurfaceRequest.java
at line 658:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/UseCaseGroup.java
at line 69:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/VideoCapture.java
at line 1315:The API level is already known to be at least 21 here from outer annotations
Found in
src/main/java/androidx/camera/core/ViewPort.java
at line 204: