diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt index 43cb4dc4..8910d2eb 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt @@ -35,6 +35,7 @@ import java.io.IOException import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream import javax.inject.Inject +import kotlin.system.exitProcess import timber.log.Timber @PerView @@ -162,6 +163,11 @@ class SettingsPresenter @Inject internal constructor( }) } + fun restartApp() { + // process gets restarted so just exit it + exitProcess(0) + } + private inner class CreateErrorReportArchiveTask : AsyncTask() { override fun doInBackground(vararg params: Void?): File? { diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt index 0a64940a..879182e3 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt @@ -105,7 +105,7 @@ class SettingsActivity : BaseActivity(), } override fun onMicrosoftDisclaimerAccepted() { - presenter.onDebugModeChanged(accepted()) + presenter.restartApp() } override fun onMicrosoftDisclaimerRejected() { diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 3a38bad2..6f55c3d5 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -411,7 +411,7 @@ Enable @string/dialog_button_cancel - Due to a bug in Microsoft apps, we need to share the file with them in a public media folder. We only use this using those file types. After resuming to Cryptomator, we delete the public available file again but we can not influence what happens to this file in the meantime. So just enable it if this isn\'t a problem for you.\n\nIf enabled, please restart Cryptomator to apply this change. + Due to a bug in Microsoft apps, we need to share the file with them in a public media folder. We only use this using those file types. After resuming to Cryptomator, we delete the public available file again but we can not influence what happens to this file in the meantime. So just enable it if this isn\'t a problem for you.\n\nIf enabled, Cryptomator gets restarted. @string/dialog_debug_mode_disclaimer_title @string/dialog_debug_mode_positive_button @string/dialog_button_cancel