From 88e03340cf0f684989d1c7ad222cb187b1790632 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Mon, 23 Sep 2024 17:54:43 +0200 Subject: [PATCH] Fix file manager access on Android 10 --- sbapp/kivymd/uix/filemanager/filemanager.py | 3 ++- sbapp/main.py | 2 -- sbapp/patches/AndroidManifest.tmpl.xml | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sbapp/kivymd/uix/filemanager/filemanager.py b/sbapp/kivymd/uix/filemanager/filemanager.py index 4073764..728c796 100755 --- a/sbapp/kivymd/uix/filemanager/filemanager.py +++ b/sbapp/kivymd/uix/filemanager/filemanager.py @@ -649,7 +649,8 @@ class MDFileManager(MDRelativeLayout): return dirs, files - except OSError: + except OSError as e: + print("Filemanager OSError: "+str(e)) return None, None def close(self) -> None: diff --git a/sbapp/main.py b/sbapp/main.py index 6b8ea1a..9e3de99 100644 --- a/sbapp/main.py +++ b/sbapp/main.py @@ -1677,8 +1677,6 @@ class SidebandApp(MDApp): ate_dialog.open() else: - self.sideband.config["map_storage_path"] = None - self.sideband.save_configuration() if RNS.vendor.platformutils.get_platform() == "android": toast("No file access, check permissions!") else: diff --git a/sbapp/patches/AndroidManifest.tmpl.xml b/sbapp/patches/AndroidManifest.tmpl.xml index e7a005f..c6cdd64 100644 --- a/sbapp/patches/AndroidManifest.tmpl.xml +++ b/sbapp/patches/AndroidManifest.tmpl.xml @@ -54,6 +54,7 @@ {{ args.extra_manifest_application_arguments }} android:theme="{{args.android_apptheme}}{% if not args.window %}.Fullscreen{% endif %}" android:hardwareAccelerated="true" + android:requestLegacyExternalStorage="true" > {% for l in args.android_used_libs %}