From 049245e43d71be4108604dc14330906814d68d52 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 12 Jun 2018 10:18:25 +0200 Subject: [PATCH] make capture session nullable --- app/build.gradle | 2 +- .../com/simplemobiletools/camera/views/PreviewCameraTwo.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3c34de4d..62c5ebe3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.1.6' + implementation 'com.simplemobiletools:commons:4.1.7' debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion" releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion" diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt index 75875e44..8a6f6a92 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/PreviewCameraTwo.kt @@ -575,7 +575,7 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie } } - mCaptureSession!!.apply { + mCaptureSession?.apply { stopRepeating() abortCaptures() capture(captureBuilder.build(), captureCallback, null)