summaryrefslogtreecommitdiffstats
path: root/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
diff options
context:
space:
mode:
authorSol Boucher <solb@google.com>2014-06-24 18:45:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-24 18:00:13 +0000
commitb73b7335d8b1e880b1f49e0279ca231a06b89ba0 (patch)
tree0f438ba5a56197d5e806351630ee204364ff3af2 /camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
parent5bafa7ceeaf79da19177f7928a8682f5ccaea1ce (diff)
parentb30d2c670f1262f0d60181e40dad33f2151fee4a (diff)
downloadandroid_frameworks_ex-b73b7335d8b1e880b1f49e0279ca231a06b89ba0.tar.gz
android_frameworks_ex-b73b7335d8b1e880b1f49e0279ca231a06b89ba0.tar.bz2
android_frameworks_ex-b73b7335d8b1e880b1f49e0279ca231a06b89ba0.zip
Merge "camera2-portability: Remove Camera.CameraInfo accessor"
Diffstat (limited to 'camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java')
-rw-r--r--camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java36
1 files changed, 31 insertions, 5 deletions
diff --git a/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java b/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
index 60ad8ed..ada1f29 100644
--- a/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
+++ b/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
@@ -3,18 +3,17 @@ package com.android.ex.camera2.portability;
import android.hardware.Camera;
/**
- * The camera device info.
+ * The device info for all attached cameras.
*/
public interface CameraDeviceInfo {
static final int NO_DEVICE = -1;
/**
- * @return The camera info.
- * // TODO: Remove the dependency on API 1.
+ * @param cameraId Which device to interrogate.
+ * @return The static characteristics of the specified device, or {@code null} on error.
*/
- @Deprecated
- Camera.CameraInfo[] getCameraInfos();
+ Characteristics getCharacteristics(int cameraId);
/**
* @return The total number of the available camera devices.
@@ -32,4 +31,31 @@ public interface CameraDeviceInfo {
* if not available.
*/
int getFirstFrontCameraId();
+
+ /**
+ * Device characteristics for a single camera.
+ */
+ public interface Characteristics {
+ /**
+ * @return Whether the camera faces the back of the device.
+ */
+ boolean isFacingBack();
+
+ /**
+ * @return Whether the camera faces the device's screen.
+ */
+ boolean isFacingFront();
+
+ /**
+ * @return The camera image orientation, or the clockwise rotation angle
+ * that must be applied to display it in its natural orientation
+ * (in degrees, and always a multiple of 90).
+ */
+ int getSensorOrientation();
+
+ /**
+ * @return Whether the shutter sound can be disabled.
+ */
+ boolean canDisableShutterSound();
+ }
}