summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2017-05-18 16:57:41 +0200
committerArne Schwabe <arne@rfc2549.org>2017-05-18 16:57:41 +0200
commit662f8880ae1516140b38ab5ab93f3596e429fc1e (patch)
tree17de764b602c63f30c059ac029afe656c5aac3fe /main
parent20bce1501a2b41313ce85ae99d06e7a5f3f08437 (diff)
Handle revoke and grant more gracefully
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/FileSelect.java9
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java3
2 files changed, 9 insertions, 3 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/FileSelect.java b/main/src/main/java/de/blinkt/openvpn/activities/FileSelect.java
index 573fdd62..44538cb4 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/FileSelect.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/FileSelect.java
@@ -109,8 +109,13 @@ public class FileSelect extends BaseActivity {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (grantResults[0] == PackageManager.PERMISSION_DENIED) {
- setResult(RESULT_CANCELED);
- finish();
+ if (mNoInline) {
+ setResult(RESULT_CANCELED);
+ finish();
+ } else {
+ if (fileExplorerTab!=null)
+ getActionBar().removeTab(fileExplorerTab);
+ }
} else {
mFSFragment.refresh();
}
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java
index 0a9384f9..be33072d 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/FileSelectionFragment.java
@@ -7,6 +7,7 @@ package de.blinkt.openvpn.fragments;
import android.app.ListFragment;
import android.os.Bundle;
+import android.os.Environment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
@@ -134,7 +135,7 @@ public class FileSelectionFragment extends ListFragment {
}
public void refresh() {
- getDir(currentPath);
+ getDir(Environment.getExternalStorageDirectory().getAbsolutePath());
}
@Override