From 13805851b755381ee63e215c779be067782e5114 Mon Sep 17 00:00:00 2001 From: Byunghun Jeon Date: Tue, 10 May 2016 11:38:21 -0700 Subject: SnapdragonCamera: Add SettingsManager, scene, and filter Add SettingsManager to work as a database for settings. It will handle all dependencies and populate the values. Add scene mode and filter. Restructure UI and menu by combining them and leave the handling of settings to SettingsManager Change-Id: I185163fdddbffd29434e6a9c41b33be6d3388f88 CRs-Fixed: 1018118 --- src/com/android/camera/util/CameraUtil.java | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/com/android/camera/util/CameraUtil.java') diff --git a/src/com/android/camera/util/CameraUtil.java b/src/com/android/camera/util/CameraUtil.java index a83714f6a..9b728b642 100644 --- a/src/com/android/camera/util/CameraUtil.java +++ b/src/com/android/camera/util/CameraUtil.java @@ -35,7 +35,6 @@ import android.hardware.Camera; import android.hardware.Camera.CameraInfo; import android.hardware.Camera.Parameters; import android.hardware.Camera.Size; -import android.hardware.camera2.CameraCharacteristics; import android.location.Location; import android.net.Uri; import android.os.Handler; @@ -1224,32 +1223,4 @@ public class CameraUtil { return retRatio; } - public static boolean isZoomSupported(CameraCharacteristics[] characteristics, List - characteristicsIndex) { - for (int i = 0; i < characteristicsIndex.size(); i++) { - if (!isZoomSupported(characteristics[characteristicsIndex.get(i)])) - return false; - } - return true; - } - - public static boolean isZoomSupported(CameraCharacteristics characteristic) { - return characteristic.get(CameraCharacteristics - .SCALER_AVAILABLE_MAX_DIGITAL_ZOOM) > 1f; - } - - public static boolean isAutoFocusSupported(CameraCharacteristics[] characteristics, List - characteristicsIndex) { - for (int i = 0; i < characteristicsIndex.size(); i++) { - if (!isAutoFocusSupported(characteristics[characteristicsIndex.get(i)])) - return false; - } - return true; - } - - public static boolean isAutoFocusSupported(CameraCharacteristics characteristic) { - Integer maxAfRegions = characteristic.get( - CameraCharacteristics.CONTROL_MAX_REGIONS_AF); - return maxAfRegions != null && maxAfRegions > 0; - } } -- cgit v1.2.3