[Android] Onboarding: Fix crash on activity restoration
Geoffrey Métais
git at videolan.org
Mon Dec 9 17:21:49 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec 9 17:21:29 2019 +0100| [9a9687a015c4339111517919b3c0507eb55e8ea7] | committer: Geoffrey Métais
Onboarding: Fix crash on activity restoration
> https://code.videolan.org/videolan/vlc-android/commit/9a9687a015c4339111517919b3c0507eb55e8ea7
---
.../src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt b/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt
index 5bae31865..20bb286cc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/hf/StoragePermissionsDelegate.kt
@@ -97,7 +97,7 @@ class StoragePermissionsDelegate : BaseHeadlessFragment() {
return
}
storageAccessGranted.value = false
- model.deferredGrant.complete(false)
+ if (model.permissionPending) model.deferredGrant.complete(false)
exit()
}
Permissions.PERMISSION_WRITE_STORAGE_TAG -> {
More information about the Android
mailing list