From e734ff3cb6c304d3c46999476bd5c52eed5ed520 Mon Sep 17 00:00:00 2001 From: Chris Garrity Date: Mon, 9 Aug 2021 17:55:23 -0400 Subject: [PATCH] Remove unnecessary request for External Storage Since we use app internal storage and then a contentProvider, I don't think we need permission for external storage. It's up to the external content provider (e.g. files, drive etc) to have access to the appropriate storage. --- android/ScratchJr/app/src/main/AndroidManifest.xml | 1 - .../java/org/scratchjr/android/ScratchJrActivity.java | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/android/ScratchJr/app/src/main/AndroidManifest.xml b/android/ScratchJr/app/src/main/AndroidManifest.xml index 3c5c33d..3d3cb6a 100644 --- a/android/ScratchJr/app/src/main/AndroidManifest.xml +++ b/android/ScratchJr/app/src/main/AndroidManifest.xml @@ -6,7 +6,6 @@ - diff --git a/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java b/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java index d4023eb..254e43d 100644 --- a/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java +++ b/android/ScratchJr/app/src/main/java/org/scratchjr/android/ScratchJrActivity.java @@ -183,11 +183,9 @@ public class ScratchJrActivity public void requestPermissions() { cameraPermissionResult = ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA); micPermissionResult = ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO); - readExtPermissionResult = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE); if (cameraPermissionResult == PackageManager.PERMISSION_GRANTED - && micPermissionResult == PackageManager.PERMISSION_GRANTED - && readExtPermissionResult == PackageManager.PERMISSION_GRANTED) { + && micPermissionResult == PackageManager.PERMISSION_GRANTED) { return; } @@ -198,9 +196,6 @@ public class ScratchJrActivity if (micPermissionResult != PackageManager.PERMISSION_GRANTED) { tmp.add(Manifest.permission.RECORD_AUDIO); } - if (readExtPermissionResult != PackageManager.PERMISSION_GRANTED) { - tmp.add(Manifest.permission.READ_EXTERNAL_STORAGE); - } Object[] tmpArray = tmp.toArray(); String[] desiredPermissions = Arrays.copyOf(tmpArray, tmpArray.length, String[].class); @@ -221,9 +216,6 @@ public class ScratchJrActivity if (permission.equals(Manifest.permission.RECORD_AUDIO)) { micPermissionResult = grantResults[permissionId]; } - if (permission.equals(Manifest.permission.READ_EXTERNAL_STORAGE)) { - readExtPermissionResult = grantResults[permissionId]; - } permissionId++; } }