This is part of the Denali refactor work. Now PhotoSphere and Refocus both uses
the new camera start up process so the camera is not released between modules.
See http://ag/392043/
Change-Id: I6ae9b111ba1fda33912159e0967f3a12d02937ba
int firstFront = -1;
int firstBack = -1;
// Get the first (smallest) back and first front camera id.
- for (int i = 0; i < mNumberOfCameras; i++) {
+ for (int i = mNumberOfCameras - 1; i >= 0; i--) {
if (mCameraInfos[i].facing == Camera.CameraInfo.CAMERA_FACING_BACK) {
firstBack = i;
} else {
public int getNumberOfCameras();
/**
- * Returns the lowest ID of the back camera.
+ * @returns The lowest ID of the back camera or -1 if not available.
*/
public int getFirstBackCameraId();
/**
- * Returns the lowest ID of the front camera.
+ * @return The lowest ID of the front camera or -1 if not available.
*/
public int getFirstFrontCameraId();
}
@Override
public boolean requestAppForCamera() {
- return false;
+ return true;
}
@Override
@Override
public boolean requestAppForCamera() {
- return false;
+ return true;
}
@Override