summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraHolder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/CameraHolder.java')
-rw-r--r--src/com/android/camera/CameraHolder.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/com/android/camera/CameraHolder.java b/src/com/android/camera/CameraHolder.java
index fc6e687..ec1a61e 100644
--- a/src/com/android/camera/CameraHolder.java
+++ b/src/com/android/camera/CameraHolder.java
@@ -18,6 +18,7 @@ package com.android.camera;
import static com.android.camera.Util.Assert;
+import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.Parameters;
import android.os.Build;
import android.os.Handler;
@@ -48,6 +49,7 @@ public class CameraHolder {
private final Handler mHandler;
private int mUsers = 0; // number of open() - number of release()
private int mNumberOfCameras;
+ private CameraInfo[] mInfo;
// We store the camera parameters when we actually open the device,
// so we can restore them in the subsequent open() requests by the user.
@@ -92,15 +94,10 @@ public class CameraHolder {
ht.start();
mHandler = new MyHandler(ht.getLooper());
mNumberOfCameras = android.hardware.Camera.getNumberOfCameras();
-
- android.hardware.Camera.CameraInfo info =
- new android.hardware.Camera.CameraInfo();
- Log.v(TAG, "# of cameras:" + mNumberOfCameras);
+ mInfo = new CameraInfo[mNumberOfCameras];
for (int i = 0; i < mNumberOfCameras; i++) {
- Log.v(TAG, "camera info #" + i);
- android.hardware.Camera.getCameraInfo(i, info);
- Log.v(TAG, "facing: " + info.mFacing);
- Log.v(TAG, "orientation: " + info.mOrientation);
+ mInfo[i] = new CameraInfo();
+ android.hardware.Camera.getCameraInfo(i, mInfo[i]);
}
}
@@ -108,6 +105,10 @@ public class CameraHolder {
return mNumberOfCameras;
}
+ public CameraInfo[] getCameraInfo() {
+ return mInfo;
+ }
+
public synchronized android.hardware.Camera open(int cameraId)
throws CameraHardwareException {
Assert(mUsers == 0);