summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanthosh Kumar H E <skhara@codeaurora.org>2013-11-12 18:47:09 +0530
committerSanthosh Kumar H E <skhara@codeaurora.org>2013-11-12 20:16:33 +0530
commitc3f8beb43472acfc241ae612a9ce4cce9cac984e (patch)
treeec556757256597e2c25ffe14fbf301940fbbafd4
parentd3c1bbb509400203e0752f0231a08c9175f8b5b8 (diff)
downloadandroid_packages_apps_Snap-c3f8beb43472acfc241ae612a9ce4cce9cac984e.tar.gz
android_packages_apps_Snap-c3f8beb43472acfc241ae612a9ce4cce9cac984e.tar.bz2
android_packages_apps_Snap-c3f8beb43472acfc241ae612a9ce4cce9cac984e.zip
Reset scene mode to Auto in camcoder and panorama modes.
Camcoder and panorama does not support scene modes. In the error case user has set scene mode to a value other than Auto in image camera mode. During initialization of video module camera parameters are obtained from AndroidCameraManagerImpl. Which maintains the local camera parameters object to avoid calling framework each time. The local parameter variable was set with a scene mode in image camera and hence it gets reflected in video module as well. This change will reset the scene mode to auto each time video or panorama modules are initialized. Change-Id: I3d620a9d163d4042cf8c09ed3c6ae8ee8ef2dc93 CRs-Fixed: 573573
-rw-r--r--src/com/android/camera/VideoModule.java7
-rw-r--r--src/com/android/camera/WideAnglePanoramaModule.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 36e5862a2..0b03f14b6 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -223,6 +223,13 @@ public class VideoModule implements CameraModule,
return;
}
mParameters = mCameraDevice.getParameters();
+ String sceneMode = mParameters.getSceneMode();
+ if ((null != sceneMode) && (!sceneMode.equals(Parameters.SCENE_MODE_AUTO))){
+ if (CameraUtil.isSupported(Parameters.SCENE_MODE_AUTO,
+ mParameters.getSupportedSceneModes())){
+ mParameters.setSceneMode(Parameters.SCENE_MODE_AUTO);
+ }
+ }
}
//QCOM data Members Starts here
diff --git a/src/com/android/camera/WideAnglePanoramaModule.java b/src/com/android/camera/WideAnglePanoramaModule.java
index 6f872ea07..2bd63e36b 100644
--- a/src/com/android/camera/WideAnglePanoramaModule.java
+++ b/src/com/android/camera/WideAnglePanoramaModule.java
@@ -329,6 +329,13 @@ public class WideAnglePanoramaModule
return false;
}
Parameters parameters = mCameraDevice.getParameters();
+ String sceneMode = parameters.getSceneMode();
+ if ((null != sceneMode) && (!sceneMode.equals(Parameters.SCENE_MODE_AUTO))){
+ if (CameraUtil.isSupported(Parameters.SCENE_MODE_AUTO,
+ parameters.getSupportedSceneModes())){
+ parameters.setSceneMode(Parameters.SCENE_MODE_AUTO);
+ }
+ }
setupCaptureParams(parameters);
configureCamera(parameters);
return true;