diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b3872b33..550c907a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -15,10 +15,6 @@
-
-
- if (isAllowed) {
- pickFileToImportBlockedKeywords()
- }
- }
- }
- }
-
- private fun pickFileToImportBlockedKeywords() {
- FilePickerDialog(this) {
- importBlockedKeywords(it)
+ val mimeType = "text/plain"
+ try {
+ importActivityResultLauncher.launch(mimeType)
+ } catch (e: ActivityNotFoundException) {
+ toast(org.fossify.commons.R.string.system_service_disabled, Toast.LENGTH_LONG)
+ } catch (e: Exception) {
+ showErrorToast(e)
}
}
@@ -200,32 +179,16 @@ class ManageBlockedKeywordsActivity : SimpleActivity(), RefreshRecyclerViewListe
}
private fun tryExportBlockedNumbers() {
- if (isQPlus()) {
- ExportBlockedKeywordsDialog(this, config.lastBlockedKeywordExportPath, true) { file ->
- try {
- exportActivityResultLauncher.launch(file.name)
- } catch (e: ActivityNotFoundException) {
- toast(
- org.fossify.commons.R.string.system_service_disabled,
- Toast.LENGTH_LONG
- )
- } catch (e: Exception) {
- showErrorToast(e)
- }
- }
- } else {
- handlePermission(PERMISSION_WRITE_STORAGE) { isAllowed ->
- if (isAllowed) {
- ExportBlockedNumbersDialog(
- this,
- config.lastBlockedKeywordExportPath,
- false
- ) { file ->
- getFileOutputStream(file.toFileDirItem(this), true) { out ->
- exportBlockedKeywordsTo(out)
- }
- }
- }
+ ExportBlockedKeywordsDialog(this, config.lastBlockedKeywordExportPath, true) { file ->
+ try {
+ exportActivityResultLauncher.launch(file.name)
+ } catch (e: ActivityNotFoundException) {
+ toast(
+ org.fossify.commons.R.string.system_service_disabled,
+ Toast.LENGTH_LONG
+ )
+ } catch (e: Exception) {
+ showErrorToast(e)
}
}
}