From 7ab1ae411a476f994568f332589b52bf22d6ca14 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Jan 2018 18:53:11 +0100 Subject: [PATCH] update commons to 3.8.2 --- app/build.gradle | 2 +- .../com/simplemobiletools/camera/activities/MainActivity.kt | 2 +- .../main/kotlin/com/simplemobiletools/camera/views/Preview.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 958ffed4..b14dc096 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ ext { } dependencies { - implementation 'com.simplemobiletools:commons:3.8.1' + implementation 'com.simplemobiletools:commons:3.8.2' 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 f0e682c9..d1257cd9 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) { - applicationContext.scanPath(path) { + scanPath(path) { setupPreviewImage(mIsInPhotoMode) Intent(BROADCAST_REFRESH_MEDIA).apply { `package` = "com.simplemobiletools.gallery" 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 839e971c..55af5f24 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/views/Preview.kt @@ -737,7 +737,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan try { toggleShutterSound(true) mRecorder!!.stop() - mActivity!!.applicationContext.scanPath(mCurrVideoPath) {} + mActivity!!.scanPath(mCurrVideoPath) {} } catch (e: RuntimeException) { mActivity!!.showErrorToast(e) toggleShutterSound(false)