summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2016-02-18 14:18:40 +0100
committerArne Schwabe <arne@rfc2549.org>2016-02-18 14:18:40 +0100
commitbc08e9c8243fb8e6d92e297719240023721e4672 (patch)
tree61db9c0720005ee1d07f91bb86fc5c6cac217d60 /main
parent88fa7a63ceb27258676c0c5ab5ab4afdae00a461 (diff)
Do not rerequest the permission if the user denies it.
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java4
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);