Merge pull request #283 from mertemin/patch-1

Removing unnecessary code from CameraManager
This commit is contained in:
Sean Owen 2015-01-08 09:49:51 +00:00
commit ccdaf97e1b
2 changed files with 1 additions and 16 deletions

View file

@ -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();
}

View file

@ -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);
}
}