summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-08-03 17:32:10 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-03 17:32:10 -0700
commit45769aed47ada21e89084f6fd624700183ed185f (patch)
tree0f25b77c076062db1618f2610cae5046b4e38788 /src
parent81110deb708bfb96b3b8be1e0549652955e05103 (diff)
downloadandroid_packages_apps_Snap-45769aed47ada21e89084f6fd624700183ed185f.zip
android_packages_apps_Snap-45769aed47ada21e89084f6fd624700183ed185f.tar.gz
android_packages_apps_Snap-45769aed47ada21e89084f6fd624700183ed185f.tar.bz2
snap: Add constrained longshot mode
* On the OP3, we can only use Longshot in a single scene mode without conflicting with other built-in postprocessing features which cannot be disabled. Add support for this. When a scene specified in the longshot-scenemodes list is active, continuous shot will be enabled. Change-Id: I79878e5ac918e907ddc5b3ca168e49f4e06656c3
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/PhotoModule.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 8db4d2e..081eb7b 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1754,6 +1754,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;
@@ -1961,7 +1980,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 (flashMode == null) {