Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
parveshneedhoo committed Apr 26, 2024
1 parent 716451e commit a8b8d2b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/android/CameraPreviewFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public void deviceHasUltraWideCamera(HasUltraWideCameraCallback hasUltraWideCame
} catch (ExecutionException | InterruptedException e) {
Log.e(TAG, "Error occurred while trying to obtain the camera provider: " + e.getMessage());
e.printStackTrace();
hasUltraWideCameraCallback.onResult(false);
return;
}
List<CameraInfo> cameraInfos = cameraProvider.getAvailableCameraInfos();
Expand All @@ -179,11 +180,7 @@ public void deviceHasUltraWideCamera(HasUltraWideCameraCallback hasUltraWideCame
}
}

if (defaultCamera == true && ultraWideCamera == true) {
hasUltraWideCameraCallback.onResult(true);
} else {
hasUltraWideCameraCallback.onResult(false);
}
hasUltraWideCameraCallback.onResult(defaultCamera == true && ultraWideCamera == true);
}

public static Size calculateResolution(Context context, int targetSize) {
Expand Down

0 comments on commit a8b8d2b

Please sign in to comment.