mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Merge pull request #283 from mertemin/patch-1
Removing unnecessary code from CameraManager
This commit is contained in:
commit
ccdaf97e1b
|
@ -77,12 +77,7 @@ public final class CameraManager {
|
|||
Camera theCamera = camera;
|
||||
if (theCamera == null) {
|
||||
|
||||
if (requestedCameraId >= 0) {
|
||||
theCamera = OpenCameraInterface.open(requestedCameraId);
|
||||
} else {
|
||||
theCamera = OpenCameraInterface.open();
|
||||
}
|
||||
|
||||
theCamera = OpenCameraInterface.open(requestedCameraId);
|
||||
if (theCamera == null) {
|
||||
throw new IOException();
|
||||
}
|
||||
|
|
|
@ -75,14 +75,4 @@ public final class OpenCameraInterface {
|
|||
return camera;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Opens a rear-facing camera with {@link Camera#open(int)}, if one exists, or opens camera 0.
|
||||
*
|
||||
* @return handle to {@link Camera} that was opened
|
||||
*/
|
||||
public static Camera open() {
|
||||
return open(-1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue