diff options
author | Byunghun Jeon <bjeon@codeaurora.org> | 2016-06-10 18:16:00 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-06-21 13:39:32 -0700 |
commit | 2b4415e006a14682d28925ad1679be7c0e653841 (patch) | |
tree | 311ea78927328f9c365419b3179731c3cb0f1d3b /src/com/android/camera/SettingsManager.java | |
parent | f108f6243de9869ee43a6d2c2a7a1476abd137ab (diff) | |
download | android_packages_apps_Snap-2b4415e006a14682d28925ad1679be7c0e653841.tar.gz android_packages_apps_Snap-2b4415e006a14682d28925ad1679be7c0e653841.tar.bz2 android_packages_apps_Snap-2b4415e006a14682d28925ad1679be7c0e653841.zip |
SnapdragonCamera: Add touchAE to camera2
Add touchAE to camera by setting AE_Region.
It uses the same logic as touchAF to calculate the region.
Also fixed the region calculation of AF.
Change-Id: Id83f3bd3042d41e2a36c18eb30e476ff1a66dfae
CRs-Fixed: 1025759
Diffstat (limited to 'src/com/android/camera/SettingsManager.java')
-rw-r--r-- | src/com/android/camera/SettingsManager.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java index cc7523265..ff31e9f8b 100644 --- a/src/com/android/camera/SettingsManager.java +++ b/src/com/android/camera/SettingsManager.java @@ -646,14 +646,21 @@ public class SettingsManager implements ListMenu.SettingsListener { .SCALER_AVAILABLE_MAX_DIGITAL_ZOOM) > 1f; } - public boolean isAutoFocusSupported(List<Integer> ids) { + public boolean isAutoFocusRegionSupported(List<Integer> ids) { for (int id : ids) { - if (!isAutoFocusSupported(id)) + if (!isAutoFocusRegionSupported(id)) return false; } return true; } + public boolean isAutoExposureRegionSupported(List<Integer> ids) { + for (int id : ids) { + if (!isAutoExposureRegionSupported(id)) + return false; + } + return true; + } public boolean isZoomSupported(List<Integer> ids) { for (int id : ids) { @@ -663,7 +670,13 @@ public class SettingsManager implements ListMenu.SettingsListener { return true; } - public boolean isAutoFocusSupported(int id) { + public boolean isAutoExposureRegionSupported(int id) { + Integer maxAERegions = mCharacteristics.get(id).get( + CameraCharacteristics.CONTROL_MAX_REGIONS_AE); + return maxAERegions != null && maxAERegions > 0; + } + + public boolean isAutoFocusRegionSupported(int id) { Integer maxAfRegions = mCharacteristics.get(id).get( CameraCharacteristics.CONTROL_MAX_REGIONS_AF); return maxAfRegions != null && maxAfRegions > 0; |