diff options
author | Steve Kondik <shade@chemlab.org> | 2010-11-29 22:34:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.cyanogenmod.com> | 2010-11-29 22:34:51 +0000 |
commit | 5d1bbc0204f95c809e5580a589d728ef42271aba (patch) | |
tree | 9fb7a1721102d927318e5aa4497b5036a543e3e4 /core | |
parent | a814ad7ab5d915224f54e5cd2c89b755414547a8 (diff) | |
parent | e3b1fb6da3f98b4eea1412c049193974b122e16b (diff) | |
download | frameworks_base-5d1bbc0204f95c809e5580a589d728ef42271aba.zip frameworks_base-5d1bbc0204f95c809e5580a589d728ef42271aba.tar.gz frameworks_base-5d1bbc0204f95c809e5580a589d728ef42271aba.tar.bz2 |
Merge "CAF Continuous Autofocus" into froyo
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/hardware/Camera.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 04d86a0..9fafe59 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -942,6 +942,7 @@ public class Camera { private static final String KEY_MAX_BRIGHTNESS = "brightness-max"; private static final String KEY_DEFAULT_BRIGHTNESS = "brightness-def"; private static final String KEY_SMART_CONTRAST = "smart-contrast"; + private static final String KEY_CAF = "continuous-af"; // Parameter key suffix for supported values. private static final String SUPPORTED_VALUES_SUFFIX = "-values"; @@ -1085,6 +1086,11 @@ public class Camera { private static final String PIXEL_FORMAT_RGB565 = "rgb565"; private static final String PIXEL_FORMAT_JPEG = "jpeg"; + //Values for Continuous AF + + public static final String CAF_OFF = "caf-off"; + public static final String CAF_ON = "caf-on"; + private HashMap<String, String> mMap; private Parameters() { @@ -2270,6 +2276,38 @@ public class Camera { } /** + * Gets the current Continuous AF setting. + * + * @return one of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public String getContinuousAf() { + return get(KEY_CAF); + } + + /** + * Sets the current Continuous AF mode. + * @param value CONTINUOUS_AF_XXX string constants. + * + */ + public void setContinuousAf(String value) { + set(KEY_CAF, value); + } + + /** + * Gets the supported Continuous AF modes. + * + * @return a List of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public List<String> getSupportedContinuousAfModes() { + String str = get(KEY_CAF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** * Sets the smart-contrast feature * @param boolean */ |