From c3f8beb43472acfc241ae612a9ce4cce9cac984e Mon Sep 17 00:00:00 2001 From: Santhosh Kumar H E Date: Tue, 12 Nov 2013 18:47:09 +0530 Subject: 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 --- src/com/android/camera/WideAnglePanoramaModule.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/com/android/camera/WideAnglePanoramaModule.java') 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; -- cgit v1.2.3