summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-03-10 16:21:39 +0100
committerArne Schwabe <arne@rfc2549.org>2014-03-10 16:21:39 +0100
commit377c086f35d78312cb9da787f8647e989d89037f (patch)
tree979457440313d2b8f0fb68ffecba0518a179445f /main
parentb87f2eedafd9452f757a4b76100267736a4e1ead (diff)
Catch SecurityExceptions when opening streams
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/Settings_Authentication.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/Utils.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/views/FileSelectLayout.java2
3 files changed, 5 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Authentication.java b/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Authentication.java
index 834ec82b..6ce9c915 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Authentication.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/Settings_Authentication.java
@@ -195,6 +195,8 @@ public class Settings_Authentication extends OpenVpnPreferencesFragment implemen
setTlsAuthSummary(mTlsAuthFileData);
} catch (IOException e) {
VpnStatus.logException(e);
+ } catch (SecurityException se) {
+ VpnStatus.logException(se);
}
}
}
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/Utils.java b/main/src/main/java/de/blinkt/openvpn/fragments/Utils.java
index fc86243a..f7038877 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/Utils.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/Utils.java
@@ -180,7 +180,7 @@ public class Utils {
return buffer.toByteArray();
}
- public static String getFilePickerResult(FileType ft, Intent result, Context c) throws IOException {
+ public static String getFilePickerResult(FileType ft, Intent result, Context c) throws IOException, SecurityException {
Uri uri = result.getData();
if (uri == null)
diff --git a/main/src/main/java/de/blinkt/openvpn/views/FileSelectLayout.java b/main/src/main/java/de/blinkt/openvpn/views/FileSelectLayout.java
index e2affe93..665b525f 100644
--- a/main/src/main/java/de/blinkt/openvpn/views/FileSelectLayout.java
+++ b/main/src/main/java/de/blinkt/openvpn/views/FileSelectLayout.java
@@ -35,6 +35,8 @@ public class FileSelectLayout extends LinearLayout implements OnClickListener {
} catch (IOException e) {
VpnStatus.logException(e);
+ } catch (SecurityException e) {
+ VpnStatus.logException(e);
}