diff options
author | jinwu <jinwu@codeaurora.org> | 2019-03-22 16:10:31 +0800 |
---|---|---|
committer | jinwu <jinwu@codeaurora.org> | 2019-03-22 16:10:31 +0800 |
commit | 57d89ef3d5e7702920a99e700ce4c7c7e92db203 (patch) | |
tree | 81ba076d201a8aadefba13c47003bfef4e108c85 | |
parent | fef611529a3685652002d63e7e760644768f4501 (diff) | |
download | android_packages_apps_Snap-57d89ef3d5e7702920a99e700ce4c7c7e92db203.tar.gz android_packages_apps_Snap-57d89ef3d5e7702920a99e700ce4c7c7e92db203.tar.bz2 android_packages_apps_Snap-57d89ef3d5e7702920a99e700ce4c7c7e92db203.zip |
Checking session is not null before call abortCapture
Change-Id: I54132e4d5da6d875874aa350fd84b89010dbeb88
-rwxr-xr-x | src/com/android/camera/CaptureModule.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index 213c44ce2..197bf9d2e 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -4664,7 +4664,7 @@ public class CaptureModule implements CameraModule, PhotoController, mUI.clearFocus(); mUI.hideUIwhileRecording(); mCameraHandler.removeMessages(CANCEL_TOUCH_FOCUS, mCameraId[cameraId]); - if (isAbortCapturesEnable()) { + if (isAbortCapturesEnable() && mCaptureSession[cameraId] != null) { mCaptureSession[cameraId].abortCaptures(); Log.d(TAG, "startRecordingVideo call abortCaptures befor close preview "); } @@ -5295,7 +5295,7 @@ public class CaptureModule implements CameraModule, PhotoController, mLiveShotInitHeifWriter.close(); } mIsRecordingVideo = false; - if (isEISDisable() && isAbortCapturesEnable()) { + if (isEISDisable() && isAbortCapturesEnable() && mCurrentSession != null) { try { mCurrentSession.abortCaptures(); Log.d(TAG, "stopRecordingVideo call abortCaptures "); |