diff --git a/app/src/main/kotlin/com/simplemobiletools/camera/dialogs/ChangeResolutionDialog.kt b/app/src/main/kotlin/com/simplemobiletools/camera/dialogs/ChangeResolutionDialog.kt index 68551465..82a2ac8e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/camera/dialogs/ChangeResolutionDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/camera/dialogs/ChangeResolutionDialog.kt @@ -41,10 +41,11 @@ class ChangeResolutionDialog(val activity: SimpleActivity, val config: Config, v RadioGroupDialog(activity, items, selectionIndex) { selectionIndex = it as Int view.change_resolution_photo.text = items[selectionIndex].title - if (isBackCamera) + if (isBackCamera) { config.backPhotoResIndex = it - else + } else { config.frontPhotoResIndex = it + } dialog.dismiss() } } 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 55af5f24..839e971c 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!!.scanPath(mCurrVideoPath) {} + mActivity!!.applicationContext.scanPath(mCurrVideoPath) {} } catch (e: RuntimeException) { mActivity!!.showErrorToast(e) toggleShutterSound(false)