summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/config.xml3
-rwxr-xr-xsrc/com/android/camera/CameraSettings.java23
2 files changed, 23 insertions, 3 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index 9b506b072..342105349 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -73,4 +73,7 @@
<!-- Minimum picture size (in pixel) to include in selection list -->
<integer name="minimum_picture_size">900000</integer>
+
+ <!-- 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 d06fb5c85..ab4b1a6a4 100755
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -301,6 +301,8 @@ public class CameraSettings {
public static String mKeyIso = null;
public static String mKeyIsoValues = null;
+ private static boolean mSupportBokehMode = false;
+
private static final HashMap<Integer, String>
VIDEO_ENCODER_TABLE = new HashMap<Integer, String>();
public static final HashMap<String, Integer>
@@ -470,6 +472,9 @@ public class CameraSettings {
} else {
Log.d(TAG, "Using key for iso-values: " + mKeyIsoValues);
}
+
+ // Bokeh mode
+ mSupportBokehMode = mContext.getResources().getBoolean(R.bool.support_bokeh_mode);
}
public PreferenceGroup getPreferenceGroup(int preferenceRes) {
@@ -1307,9 +1312,11 @@ public class CameraSettings {
return;
}
-// if (numOfCameras > 2 ) {
-// numOfCameras = 2;
-// }
+ if (!mSupportBokehMode) {
+ if (numOfCameras > 2) {
+ numOfCameras = 2;
+ }
+ }
CharSequence[] entryValues = new CharSequence[numOfCameras];
for (int i = 0; i < numOfCameras; ++i) {
@@ -1654,6 +1661,11 @@ public class CameraSettings {
public static boolean isBokehModeSupported(Parameters params) {
boolean ret = false;
+
+ if (!mSupportBokehMode) {
+ return ret;
+ }
+
if (null != params) {
String val = params.get(KEY_QC_IS_BOKEH_MODE_SUPPORTED);
if ("1".equals(val)) {
@@ -1665,6 +1677,11 @@ public class CameraSettings {
public static boolean isBokehMPOSupported(Parameters params) {
boolean ret = false;
+
+ if (!mSupportBokehMode) {
+ return ret;
+ }
+
if (null != params) {
String val = params.get(KEY_QC_IS_BOKEH_MPO_SUPPORTED);
if ("1".equals(val)) {