summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CameraSettings.java
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-03-08 17:04:25 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-03-18 02:54:22 -0700
commit7efc8de478a79c6596da3789cdd94aee27bfb2fd (patch)
tree4b58ad2c888466e3837eb002d636b26ad0cc72c5 /src/com/android/camera/CameraSettings.java
parent0ebae444312e45870bd4dffa6628f9c8387e4541 (diff)
downloadandroid_packages_apps_Snap-7efc8de478a79c6596da3789cdd94aee27bfb2fd.tar.gz
android_packages_apps_Snap-7efc8de478a79c6596da3789cdd94aee27bfb2fd.tar.bz2
android_packages_apps_Snap-7efc8de478a79c6596da3789cdd94aee27bfb2fd.zip
SnapdragonCamera: Add the developer option for instant capture
A developer option is added to support instant capture feature in the camera HAL. Once option is enabled, Snapdragon camera application will take a snapshot as soon as it is resumed from the lock screen by pressing power button twice. For this to work, user also needs to enable "Press power button twice for camera" under display setting. Change-Id: I84794759ee1edc9424c37b71bd0c2b761a77bee1 CRs-Fixed: 970691
Diffstat (limited to 'src/com/android/camera/CameraSettings.java')
-rw-r--r--src/com/android/camera/CameraSettings.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 180a46097..5ad62b413 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -123,6 +123,7 @@ public class CameraSettings {
public static final String KEY_DIS = "pref_camera_dis_key";
public static final String KEY_LONGSHOT = "pref_camera_longshot_key";
+ public static final String KEY_INSTANT_CAPTURE = "pref_camera_instant_capture_key";
private static final String KEY_QC_SUPPORTED_AE_BRACKETING_MODES = "ae-bracket-hdr-values";
private static final String KEY_QC_SUPPORTED_AF_BRACKETING_MODES = "af-bracket-values";
@@ -165,6 +166,7 @@ public class CameraSettings {
public static final String KEY_VIDEO_HSR = "video-hsr";
public static final String KEY_QC_SEE_MORE_MODE = "see-more";
public static final String KEY_QC_NOISE_REDUCTION_MODE = "noise-reduction-mode";
+ public static final String KEY_QC_INSTANT_CAPTURE = "instant-capture";
public static final String KEY_INTERNAL_PREVIEW_RESTART = "internal-restart";
public static final String KEY_QC_ZSL_HDR_SUPPORTED = "zsl-hdr-supported";
@@ -662,6 +664,13 @@ public class CameraSettings {
ListPreference manualFocus = group.findPreference(KEY_MANUAL_FOCUS);
ListPreference manualExposure = group.findPreference(KEY_MANUAL_EXPOSURE);
ListPreference manualWB = group.findPreference(KEY_MANUAL_WB);
+ ListPreference instantCapture = group.findPreference(KEY_INSTANT_CAPTURE);
+
+ if (instantCapture != null) {
+ if (!isInstantCaptureSupported(mParameters)) {
+ removePreference(group, instantCapture.getKey());
+ }
+ }
if (hdr_need_1x != null) {
filterUnsupportedOptions(group,
@@ -1385,4 +1394,17 @@ public class CameraSettings {
return split(str);
}
+ public static boolean isInstantCaptureSupported(Parameters params) {
+ boolean ret = false;
+ if (null != params) {
+ // TODO: need to uncomment this code once get parameter
+ // is supported
+ //String val = params.get(KEY_QC_INSTANT_CAPTURE);
+ //if (null != val) {
+ ret = true;
+ //}
+ }
+ return ret;
+ }
+
}