summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorHarsh Shandilya <harsh@prjkt.io>2018-06-30 20:45:42 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2018-06-30 21:10:22 +0200
commit18707ec9a25e1e24c33fc32fc9e3058bd9b5fab9 (patch)
treeee9e3dc07249d94077d8c46d7838c6dc9c8c3fe4 /app/src
parentd647c8234beb66f70089ddbdadbc8e20f6062ae5 (diff)
android: VersionPreference: Handle no-browser-installed case
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/preference/VersionPreference.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/com/wireguard/android/preference/VersionPreference.java b/app/src/main/java/com/wireguard/android/preference/VersionPreference.java
index 2ed12d63..19c1b719 100644
--- a/app/src/main/java/com/wireguard/android/preference/VersionPreference.java
+++ b/app/src/main/java/com/wireguard/android/preference/VersionPreference.java
@@ -5,6 +5,7 @@
package com.wireguard.android.preference;
+import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
@@ -46,7 +47,9 @@ public class VersionPreference extends Preference {
protected void onClick() {
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://www.wireguard.com/"));
- getContext().startActivity(intent);
+ try {
+ getContext().startActivity(intent);
+ } catch (final ActivityNotFoundException ignored) { }
}
}