diff --git a/app/build.gradle b/app/build.gradle index 9b169eb5..d1ece935 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.16.1' + compile 'com.simplemobiletools:commons:2.17.2' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/PhotoProcessor.kt b/app/src/main/kotlin/com/simplemobiletools/camera/PhotoProcessor.kt index b548f853..c815360f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/PhotoProcessor.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/PhotoProcessor.kt @@ -56,7 +56,7 @@ class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId config.savePhotosFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString() return "" } - var document = activity.getFileDocument(path, config.treeUri) + var document = activity.getFileDocument(path) document = document?.createFile("", path.substring(path.lastIndexOf('/') + 1)) fos = activity.contentResolver.openOutputStream(document?.uri) } else { diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt b/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt index 34148740..a443d403 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/Preview.kt @@ -556,7 +556,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan } try { - var document = mActivity.getFileDocument(mCurrVideoPath, config.treeUri) + var document = mActivity.getFileDocument(mCurrVideoPath) if (document == null) { mActivity.toast(R.string.unknown_error_occurred) return false 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 b711ff2b..15fb32b1 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/activities/MainActivity.kt @@ -566,7 +566,6 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave override fun onDestroy() { super.onDestroy() - config.isFirstRun = false mPreview?.releaseCamera() }