summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorweijiew <weijiew@codeaurora.org>2016-12-07 21:01:00 +0800
committerqimengp <qimengp@codeaurora.org>2016-12-13 19:32:30 +0800
commit51bb7109c62a93bddc13169a099f9d836ac0affe (patch)
treed55766e3af68cf5a010d34f6fbb5af4ef24e775b
parent837e9a06df019d588d3e158485c4a086d893e4e0 (diff)
downloadandroid_packages_apps_Snap-51bb7109c62a93bddc13169a099f9d836ac0affe.tar.gz
android_packages_apps_Snap-51bb7109c62a93bddc13169a099f9d836ac0affe.tar.bz2
android_packages_apps_Snap-51bb7109c62a93bddc13169a099f9d836ac0affe.zip
SnapdragonCamera: Camera2 force close when turn on/off beauty
Session was closed, but new session didn't create Change-Id: I09a03eef6386d4ebd7a988454503024af7ce1961 CRs-Fixed: 1066519
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index a21808612..e6911ad6c 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -3745,19 +3745,18 @@ public class CaptureModule implements CameraModule, PhotoController,
}
public void restartSession(boolean isSurfaceChanged) {
+ closeProcessors();
+ closeSessions();
+
if(isSurfaceChanged) {
mUI.hideSurfaceView();
+ mUI.showSurfaceView();
}
- closeProcessors();
- closeSessions();
+
initializeValues();
updatePreviewSize();
openProcessors();
- if(isSurfaceChanged) {
- mUI.showSurfaceView();
- } else {
- createSessions();
- }
+ createSessions();
if(isTrackingFocusSettingOn()) {
mUI.resetTrackingFocus();