summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcodeworkx <daniel.hillenbrand@codeworkx.de>2019-03-03 18:13:21 +0100
committerMichael Bestas <mkbestas@lineageos.org>2019-11-09 22:47:37 +0200
commitda8508e11d76b91afc4783da5b166d09845b91fb (patch)
tree307dc15b0979277584d77fe411ea053705676824
parentab90fb99ef3fb9e768d3e1118e49c803a5ccc46c (diff)
downloadandroid_packages_apps_Snap-da8508e11d76b91afc4783da5b166d09845b91fb.tar.gz
android_packages_apps_Snap-da8508e11d76b91afc4783da5b166d09845b91fb.tar.bz2
android_packages_apps_Snap-da8508e11d76b91afc4783da5b166d09845b91fb.zip
Snap: allow to disable image stabilization per device
Change-Id: I4317f84285bdf97ba321ad5ddba7453f2b5d3b0c
-rw-r--r--res/values/config.xml3
-rwxr-xr-xsrc/com/android/camera/CameraSettings.java6
2 files changed, 9 insertions, 0 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index 342105349..cb78e532c 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -74,6 +74,9 @@
<!-- Minimum picture size (in pixel) to include in selection list -->
<integer name="minimum_picture_size">900000</integer>
+ <!-- Enable support for image stabilization -->
+ <bool name="support_dis">true</bool>
+
<!-- Enable support for bokeh mode -->
<bool name="support_bokeh_mode">false</bool>
</resources>
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 88488426f..c9889b892 100755
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -301,6 +301,7 @@ public class CameraSettings {
public static String mKeyIso = null;
public static String mKeyIsoValues = null;
+ private static boolean mSupportDis = false;
private static boolean mSupportBokehMode = false;
private static final HashMap<Integer, String>
@@ -491,6 +492,9 @@ public class CameraSettings {
Log.d(TAG, "Using key for iso-values: " + mKeyIsoValues);
}
+ // Image stabilization
+ mSupportDis = mContext.getResources().getBoolean(R.bool.support_dis);
+
// Bokeh mode
mSupportBokehMode = mContext.getResources().getBoolean(R.bool.support_bokeh_mode);
}
@@ -631,6 +635,8 @@ public class CameraSettings {
}
public static List<String> getSupportedDISModes(Parameters params) {
+ if (!mSupportDis)
+ return null;
String str = params.get(KEY_QC_SUPPORTED_DIS_MODES);
if (str == null) {
return null;