[Android] Ask for the MANAGE_EXTERNAL_STORAGE permission to existing users

Nicolas Pomepuy git at videolan.org
Wed Nov 24 06:07:06 UTC 2021


vlc-android | branch: 3.4.x | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Nov 23 15:41:17 2021 +0100| [103482e71f3b0091aeb1c8c97ba90f92a23741fc] | committer: Nicolas Pomepuy

Ask for the MANAGE_EXTERNAL_STORAGE permission to existing users

When the old READ_EXTERNAL_STORAGE permission has already been granted
by the user on a previous version of the app, some media may be missing
while they haven't granted the new MANAGE_EXTERNAL_STORAGE permission.
If we detect that the user is in that state, we show a snackbar and let
them grant the new permission.

(cherry picked from commit 207b8435d632e98a6445b1a7e24c37b2af7b9edc)

> https://code.videolan.org/videolan/vlc-android/commit/103482e71f3b0091aeb1c8c97ba90f92a23741fc
---

 .../resources/src/main/res/values/strings.xml      |  3 +
 .../src/main/java/org/videolan/tools/Settings.kt   |  1 +
 .../vlc-android/res/layout/dialog_all_access.xml   | 79 ++++++++++++++++++++
 .../src/org/videolan/vlc/gui/MainActivity.kt       |  7 ++
 .../vlc/gui/dialogs/AllAccessPermissionDialog.kt   | 84 ++++++++++++++++++++++
 .../gui/helpers/hf/StoragePermissionsDelegate.kt   |  2 +-
 .../src/org/videolan/vlc/util/Permissions.kt       | 11 +++
 7 files changed, 186 insertions(+), 1 deletion(-)

Diff:   https://code.videolan.org/videolan/vlc-android/commit/103482e71f3b0091aeb1c8c97ba90f92a23741fc


More information about the Android mailing list