From cc4e07d1fff6a0f46104127cd1dfa4204711b8f5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 27 May 2018 15:50:21 +0200 Subject: [PATCH] update commons to 4.1.4 --- app/build.gradle | 2 +- .../com/simplemobiletools/camera/activities/MainActivity.kt | 2 +- .../main/kotlin/com/simplemobiletools/camera/views/Preview.kt | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2aa24807..8064e50b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -45,7 +45,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:4.0.18' + implementation 'com.simplemobiletools:commons:4.1.4' 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/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt index 1e54ba61..05979ad9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -563,7 +563,7 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave override fun drawFocusRect(x: Int, y: Int) = mFocusRectView.drawFocusRect(x, y) override fun mediaSaved(path: String) { - scanPath(path) { + rescanPaths(arrayListOf(path)) { setupPreviewImage(mIsInPhotoMode) Intent(BROADCAST_REFRESH_MEDIA).apply { putExtra(REFRESH_PATH, path) diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt index f399a5b4..ce810502 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt @@ -765,7 +765,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan try { toggleShutterSound(true) mRecorder!!.stop() - mActivity!!.scanPath(mCurrVideoPath) {} + mActivity!!.rescanPaths(arrayListOf(mCurrVideoPath)) } catch (e: RuntimeException) { mActivity!!.showErrorToast(e) toggleShutterSound(false) @@ -774,7 +774,6 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan mIsRecording = false releaseCamera() } - } mRecorder = null