From bfbbb90ac338bde9422dbb65edc6868783d289b0 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Fri, 8 Jan 2016 19:56:29 +0800 Subject: [PATCH] Fix #523 --- project/plugins.sbt | 2 +- .../scala/com/github/shadowsocks/ShadowsocksSettings.scala | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 73bdcbfb..c7b6fae9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ resolvers += Resolver.url("scalasbt releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-snapshots"))(Resolver.ivyStylePatterns) -addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.12") +addSbtPlugin("com.hanhuy.sbt" % "android-sdk-plugin" % "1.5.13") resolvers += "Sonatype snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/" addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.7.0-SNAPSHOT") diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala index 25a39f88..a3a2d193 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksSettings.scala @@ -144,7 +144,11 @@ class ShadowsocksSettings extends PreferenceFragment with OnSharedPreferenceChan web.loadUrl("file:///android_asset/pages/about.html") web.setWebViewClient(new WebViewClient() { override def shouldOverrideUrlLoading(view: WebView, url: String): Boolean = { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))) + try { + startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))) + } catch { + case _: android.content.ActivityNotFoundException => // Ignore + } true } })