diff options
author | weijiew <weijiew@codeaurora.org> | 2016-12-07 21:01:00 +0800 |
---|---|---|
committer | qimengp <qimengp@codeaurora.org> | 2016-12-13 19:32:30 +0800 |
commit | 51bb7109c62a93bddc13169a099f9d836ac0affe (patch) | |
tree | d55766e3af68cf5a010d34f6fbb5af4ef24e775b | |
parent | 837e9a06df019d588d3e158485c4a086d893e4e0 (diff) | |
download | android_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-x | src/com/android/camera/CaptureModule.java | 13 |
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(); |