From 737bec0e7d25d2b41342b2074ad768c28723b77c Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 4 Dec 2019 21:54:35 +1000 Subject: [PATCH] Android: Get storage permissions before populating game list --- .../main/java/com/github/stenzek/duckstation/MainActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/app/src/main/java/com/github/stenzek/duckstation/MainActivity.java b/android/app/src/main/java/com/github/stenzek/duckstation/MainActivity.java index 38bdbecde..5135aa94a 100644 --- a/android/app/src/main/java/com/github/stenzek/duckstation/MainActivity.java +++ b/android/app/src/main/java/com/github/stenzek/duckstation/MainActivity.java @@ -51,6 +51,9 @@ public class MainActivity extends AppCompatActivity { fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { + if (!checkForExternalStoragePermissions()) + return; + Intent i = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); i.addCategory(Intent.CATEGORY_DEFAULT); i.putExtra(Intent.EXTRA_LOCAL_ONLY, true);