summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/Camera.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/hardware/Camera.java')
-rw-r--r--core/java/android/hardware/Camera.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 47c2cac..7adbbcb 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -723,6 +723,7 @@ public class Camera {
private static final String KEY_FOCAL_LENGTH = "focal-length";
private static final String KEY_HORIZONTAL_VIEW_ANGLE = "horizontal-view-angle";
private static final String KEY_VERTICAL_VIEW_ANGLE = "vertical-view-angle";
+ private static final String KEY_EXPOSURE_COMPENSATION = "exposure-compensation";
// Parameter key suffix for supported values.
private static final String SUPPORTED_VALUES_SUFFIX = "-values";
@@ -1540,6 +1541,41 @@ public class Camera {
}
/**
+ * Gets the current exposure compensation setting.
+ *
+ * @return the current exposure compensation value multiplied by 100.
+ * null if exposure compensation is not supported. Ex: -100
+ * means -1 EV. 130 means +1.3 EV.
+ * @hide
+ */
+ public int getExposureCompensation() {
+ return getInt(KEY_EXPOSURE_COMPENSATION);
+ }
+
+ /**
+ * Sets the exposure compensation.
+ *
+ * @param value exposure compensation multiplied by 100. Ex: -100 means
+ * -1 EV. 130 means +1.3 EV.
+ * @hide
+ */
+ public void setExposureCompensation(int value) {
+ set(KEY_EXPOSURE_COMPENSATION, value);
+ }
+
+ /**
+ * Gets the supported exposure compensation.
+ *
+ * @return a List of Integer constants. null if exposure compensation is
+ * not supported. The list is sorted from small to large. Ex:
+ * -100, -66, -33, 0, 33, 66, 100.
+ * @hide
+ */
+ public List<Integer> getSupportedExposureCompensation() {
+ return splitInt(get(KEY_EXPOSURE_COMPENSATION + SUPPORTED_VALUES_SUFFIX));
+ }
+
+ /**
* Gets current zoom value. This also works when smooth zoom is in
* progress.
*