diff --git a/app/src/main/java/eu/darken/sdmse/appcontrol/ui/list/actions/AppActionDialog.kt b/app/src/main/java/eu/darken/sdmse/appcontrol/ui/list/actions/AppActionDialog.kt index 46706989a..2fa113dbc 100644 --- a/app/src/main/java/eu/darken/sdmse/appcontrol/ui/list/actions/AppActionDialog.kt +++ b/app/src/main/java/eu/darken/sdmse/appcontrol/ui/list/actions/AppActionDialog.kt @@ -1,6 +1,7 @@ package eu.darken.sdmse.appcontrol.ui.list.actions import android.app.Activity +import android.content.ActivityNotFoundException import android.content.Intent import android.os.Bundle import android.view.LayoutInflater @@ -22,6 +23,7 @@ import eu.darken.sdmse.common.coil.loadAppIcon import eu.darken.sdmse.common.debug.logging.Logging.Priority.WARN import eu.darken.sdmse.common.debug.logging.log import eu.darken.sdmse.common.debug.logging.logTag +import eu.darken.sdmse.common.error.asErrorDialogBuilder import eu.darken.sdmse.common.lists.differ.update import eu.darken.sdmse.common.lists.setupDefaults import eu.darken.sdmse.common.navigation.getQuantityString2 @@ -80,7 +82,12 @@ class AppActionDialog : BottomSheetDialogFragment2() { vm.events.observe2(ui) { event -> when (event) { is AppActionEvents.SelectExportPath -> { - exportPath.launch(event.intent) + try { + exportPath.launch(event.intent) + } catch (e: ActivityNotFoundException) { + log(TAG, WARN) { "Documents app is missing for $event" } + e.asErrorDialogBuilder(requireActivity()).show() + } } is AppActionEvents.ExportResult -> {