summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2017-03-19 10:43:33 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-27 00:41:41 +0100
commit57748cb5f97a73277ca9cb2e7b2f7722311616ad (patch)
tree3f5859d3f62d219a59fafedaa8b3dd18cb55b20e
parent9b13a1742199bf2ce392537c2224974b5dcd8b77 (diff)
downloadandroid_packages_apps_Snap-57748cb5f97a73277ca9cb2e7b2f7722311616ad.zip
android_packages_apps_Snap-57748cb5f97a73277ca9cb2e7b2f7722311616ad.tar.gz
android_packages_apps_Snap-57748cb5f97a73277ca9cb2e7b2f7722311616ad.tar.bz2
Add overlay for restarting camera preview for additional cameras
Change-Id: I95eb7237b101b73d66fe231a11d0c8d5156bfe47
-rw-r--r--res/values/config.xml3
-rw-r--r--src/com/android/camera/PhotoModule.java7
2 files changed, 9 insertions, 1 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index 422fb21..da52d90 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -43,6 +43,9 @@
<!-- Restart preview for front camera onPictureTaken -->
<bool name="front_camera_restart_preview_onPictureTaken">false</bool>
+ <!-- Restart preview for additional camera onPictureTaken -->
+ <bool name="additional_camera_restart_preview_onPictureTaken">false</bool>
+
<!-- Set's manufacturer specific parameters on startup.
Example: lge-camera=1;cam-mode=0 -->
<string name="manufacturer_key_values"></string>
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 18a315f..98f8dcf 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1482,18 +1482,23 @@ public class PhotoModule
boolean backCameraRestartPreviewOnPictureTaken = false;
boolean frontCameraRestartPreviewOnPictureTaken = false;
+ boolean additionalCameraRestartPreviewOnPictureTaken = false;
if (mApplicationContext != null) {
backCameraRestartPreviewOnPictureTaken =
mApplicationContext.getResources().getBoolean(R.bool.back_camera_restart_preview_onPictureTaken);
frontCameraRestartPreviewOnPictureTaken =
mApplicationContext.getResources().getBoolean(R.bool.front_camera_restart_preview_onPictureTaken);
+ additionalCameraRestartPreviewOnPictureTaken =
+ mApplicationContext.getResources().getBoolean(R.bool.additional_camera_restart_preview_onPictureTaken);
}
CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId];
if ((info.facing == CameraInfo.CAMERA_FACING_BACK
&& backCameraRestartPreviewOnPictureTaken && (mCameraState != LONGSHOT))
|| (info.facing == CameraInfo.CAMERA_FACING_FRONT
- && frontCameraRestartPreviewOnPictureTaken && (mCameraState != LONGSHOT))) {
+ && frontCameraRestartPreviewOnPictureTaken && (mCameraState != LONGSHOT))
+ || (info.facing > CameraInfo.CAMERA_FACING_FRONT
+ && additionalCameraRestartPreviewOnPictureTaken && (mCameraState != LONGSHOT))) {
needRestartPreview = true;
}