summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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