Merge pull request #2387 from sonnayasomnambula/patch-1

request permissions in api > 23 (Android N etc.)
This commit is contained in:
Martin Fietz 2017-08-08 10:57:18 +02:00 committed by GitHub
commit 143fa2e96f
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ public class StorageErrorActivity extends AppCompatActivity {
openDirectoryChooser();
}
});
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
int readPermission = ActivityCompat.checkSelfPermission(this,
Manifest.permission.READ_EXTERNAL_STORAGE);
int writePermission = ActivityCompat.checkSelfPermission(this,