diff options
author | Arne Schwabe <arne@rfc2549.org> | 2016-02-18 14:18:40 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2016-02-18 14:18:40 +0100 |
commit | bc08e9c8243fb8e6d92e297719240023721e4672 (patch) | |
tree | 61db9c0720005ee1d07f91bb86fc5c6cac217d60 | |
parent | 88fa7a63ceb27258676c0c5ab5ab4afdae00a461 (diff) |
Do not rerequest the permission if the user denies it.
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java index d89b6291..930faecd 100644 --- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java +++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java @@ -100,6 +100,10 @@ public class ConfigConverter extends BaseActivity implements FileSelectCallback, @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { + // Permission declined, do nothing + if (grantResults[0] == PackageManager.PERMISSION_DENIED) + return; + // Reset file select dialogs findViewById(R.id.files_missing_hint).setVisibility(View.GONE); findViewById(R.id.permssion_hint).setVisibility(View.GONE); |