mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2025-04-24 10:08:52 +00:00
fix: request storage permission without the need of closing the app, if it is the first time installing the app it will crash since it can't find any iwad to start the game.
This commit is contained in:
parent
03c18de737
commit
70c131378d
1 changed files with 7 additions and 2 deletions
|
@ -151,8 +151,13 @@ import java.io.OutputStream;
|
|||
@Override
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] results) {
|
||||
if (requestCode == WRITE_EXTERNAL_STORAGE_PERMISSION_ID) {
|
||||
finish();
|
||||
System.exit(0);
|
||||
if (results.length > 0 && results[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
create();
|
||||
}
|
||||
else {
|
||||
finish();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue