summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/config.xml6
-rw-r--r--src/com/android/camera/PhotoModule.java21
2 files changed, 26 insertions, 1 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index 8e33f9f..a66b857 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -59,4 +59,10 @@
<!-- Set this to true to use device manufacturer and model for exif -->
<bool name="override_maker_and_model_tag">false</bool>
+
+ <!-- A list of scenemodes where Longshot should be enabled.
+ An empty list will use the default restrictions. If defined, longshot
+ will be enabled ONLY for these scenemodes and disabled for others. -->
+ <string-array name="longshot_scenemodes"></string-array>
+
</resources>
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index d4af13c..6ba9d45 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1986,6 +1986,25 @@ public class PhotoModule
}
}
+ private void updateLongshotScene() {
+ String[] longshotScenes = mActivity.getResources().getStringArray(
+ R.array.longshot_scenemodes);
+ if (longshotScenes.length == 0) {
+ mUI.overrideSettings(CameraSettings.KEY_LONGSHOT, null);
+ return;
+ }
+ boolean useLongshot = false;
+ for (String scene : longshotScenes) {
+ if (scene.equals(mSceneMode)) {
+ useLongshot = true;
+ break;
+ }
+ }
+ mUI.overrideSettings(CameraSettings.KEY_LONGSHOT,
+ useLongshot ? mActivity.getString(R.string.setting_on_value) :
+ mActivity.getString(R.string.setting_off_value));
+ }
+
private void updateCommonManual3ASettings() {
mSceneMode = Parameters.SCENE_MODE_AUTO;
String flashMode = Parameters.FLASH_MODE_OFF;
@@ -2190,7 +2209,7 @@ public class PhotoModule
mUI.overrideSettings(CameraSettings.KEY_LONGSHOT,
mActivity.getString(R.string.setting_off_value));
} else {
- mUI.overrideSettings(CameraSettings.KEY_LONGSHOT, null);
+ updateLongshotScene();
}
if(TsMakeupManager.HAS_TS_MAKEUP) {