Skip to content

Commit

Permalink
chore(android): prefer List over ArrayList when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarsaud committed Jul 17, 2024
1 parent 003ff20 commit b1a2766
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/android/Capture.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ private JSONObject getAudioVideoData(String filePath, JSONObject obj, boolean vi
}

private boolean isMissingPermissions(Request req, List<String> permissions) {
ArrayList<String> missingPermissions = new ArrayList<>();
for (String permission: permissions) {
List<String> missingPermissions = new ArrayList<>();
for (String permission : permissions) {
if (!PermissionHelper.hasPermission(this, permission)) {
missingPermissions.add(permission);
}
Expand All @@ -256,7 +256,7 @@ private boolean isMissingPermissions(Request req) {
}

private boolean isMissingCameraPermissions(Request req) {
ArrayList<String> cameraPermissions = new ArrayList<>(Arrays.asList(storagePermissions));
List<String> cameraPermissions = Arrays.asList(storagePermissions);
if (cameraPermissionInManifest) {
cameraPermissions.add(Manifest.permission.CAMERA);
}
Expand Down

0 comments on commit b1a2766

Please sign in to comment.