Fix lint issues in Android samples#16350
Conversation
|
@hannesa2 I think that's bad idea to move permissions to library project. I understand that most popular case is application with camera as input, but OpenCV can be used for apps without camera, e.g. Gallery analysis or for apps for alternative camera configuration. I propose to presume current layout. |
|
@asmorkalov In my point of view it's not that bad. If you run Anyway, I add this is an own commit to easy remove it again, because I expect such doubt. |
|
@alalek what do you think? |
|
I believe permissions should be defined by application, not by used library. BTW, "camera" is not single required permission to run apps, there is also "storage" access permissions in some samples. |
d794adb to
4057e81
Compare
But "camera" is the only permission which causes a lint issue here. |
|
👍 |
Is it possible to have separate manifest for lint tool? or configure lint tool to skip manifest issues? |
|
This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly). So, please:
Note: no needs to re-open PR, apply changes "inplace". |
I can/will ignore them. But step by step. What I want to do, is a error free lint and targetSdk 29
but I'm not sure if it works for non Gradle 3.4 as well |
4057e81 to
c9884d6
Compare
|
@alalek |
|
OpenCV 3.4 requires Java 6 on Android, so some changes don't fit well. Please revert "rebase" back: |
c9884d6 to
4057e81
Compare
It fixes lint errors and warnings in Android samples.
Because library uses functions which requires camera permission, it makes more sense to move permissions to library instead of apply it to each sample separat