Kohagan91 commented on code in PR #814:
URL: 
https://github.com/apache/cordova-plugin-camera/pull/814#discussion_r1224291554


##########
src/android/CameraLauncher.java:
##########
@@ -223,6 +223,37 @@ else if ((this.srcType == PHOTOLIBRARY) || (this.srcType 
== SAVEDPHOTOALBUM)) {
     // LOCAL METHODS
     
//--------------------------------------------------------------------------
 
+    private String[] getPermissions(boolean storageOnly, int mediaType) {
+        if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+            if (storageOnly) {
+                switch (mediaType) {
+                    case PICTURE:
+                        return new String[]{ 
Manifest.permission.READ_MEDIA_IMAGES };
+                    case VIDEO:
+                        return new String[]{ 
Manifest.permission.READ_MEDIA_VIDEO };
+                    default:
+                        return new String[]{ 
Manifest.permission.READ_MEDIA_IMAGES, Manifest.permission.READ_MEDIA_VIDEO };
+                }
+            }
+            else {
+                switch (mediaType) {
+                    case PICTURE:
+                        return new String[]{ Manifest.permission.CAMERA, 
Manifest.permission.CAMERA, Manifest.permission.READ_MEDIA_IMAGES };

Review Comment:
   ```suggestion
                           return new String[]{ Manifest.permission.CAMERA, 
Manifest.permission.READ_MEDIA_IMAGES };
   ```
   Duplicate permission ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to