[Android] Ask storage permission on first app launch only

Geoffrey Métais git at videolan.org
Thu Jan 17 17:39:12 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jan 17 17:34:11 2019 +0100| [250d947c57772ade0174ed205797ce53276858b5] | committer: Geoffrey Métais

Ask storage permission on first app launch only

> https://code.videolan.org/videolan/vlc-android/commit/250d947c57772ade0174ed205797ce53276858b5
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 7738141c1..47eb30241 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -89,7 +89,7 @@ public class MainActivity extends ContentActivity implements ExtensionManagerSer
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         Util.checkCpuCompatibility(this);
-        Permissions.checkReadStoragePermission(this, false);
+        if (savedInstanceState == null) Permissions.checkReadStoragePermission(this, false);
         /*** Start initializing the UI ***/
         setContentView(R.layout.main);
         mDrawerLayout = findViewById(R.id.root_container);



More information about the Android mailing list