Skip to content

Commit

Permalink
removed unused getPermissions API
Browse files Browse the repository at this point in the history
  • Loading branch information
breautek committed Oct 28, 2024
1 parent 41941f1 commit a10da73
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,22 +217,6 @@ else if ((this.srcType == PHOTOLIBRARY) || (this.srcType == SAVEDPHOTOALBUM)) {
// LOCAL METHODS
//--------------------------------------------------------------------------

private String[] getPermissions(boolean storageOnly, int mediaType) {
ArrayList<String> permissions = new ArrayList<>();

if (android.os.Build.VERSION.SDK_INT <= Build.VERSION_CODES.R) {
// Android API 30 or lower
permissions.add(Manifest.permission.READ_EXTERNAL_STORAGE);
permissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
if (!storageOnly) {
// Add camera permission when not storage.
permissions.add(Manifest.permission.CAMERA);
}

return permissions.toArray(new String[0]);
}

private String getTempDirectoryPath() {
File cache = cordova.getActivity().getCacheDir();
// Create the cache directory if it doesn't exist
Expand Down

0 comments on commit a10da73

Please sign in to comment.