From 782af959a071870674604c0f32e0c7ec4f72f241 Mon Sep 17 00:00:00 2001 From: Mygod Date: Mon, 29 Aug 2016 12:54:55 +0800 Subject: [PATCH 1/3] Fix #844 --- .../com/github/shadowsocks/ShadowsocksQuickSwitchActivity.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksQuickSwitchActivity.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksQuickSwitchActivity.scala index 3a632bb1..ab030ccd 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksQuickSwitchActivity.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksQuickSwitchActivity.scala @@ -68,7 +68,7 @@ class ShadowsocksQuickSwitchActivity extends AppCompatActivity { profilesList.setItemAnimator(new DefaultItemAnimator) profilesList.setAdapter(profilesAdapter) if (app.profileId >= 0) lm.scrollToPosition(profilesAdapter.profiles.zipWithIndex.collectFirst { - case (profile, i) if profile.id == app.profileId => i + 1 + case (profile, i) if profile.id == app.profileId => i }.getOrElse(0)) } } From b8c593b110d45acbb85cfe7f4fbb842c920189b7 Mon Sep 17 00:00:00 2001 From: Mygod Date: Mon, 29 Aug 2016 13:57:25 +0800 Subject: [PATCH 2/3] Fix crash in GuardedProcess --- src/main/scala/com/github/shadowsocks/GuardedProcess.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/github/shadowsocks/GuardedProcess.scala b/src/main/scala/com/github/shadowsocks/GuardedProcess.scala index 7a4c7ef1..763dd7fb 100644 --- a/src/main/scala/com/github/shadowsocks/GuardedProcess.scala +++ b/src/main/scala/com/github/shadowsocks/GuardedProcess.scala @@ -57,7 +57,9 @@ class StreamLogger(is: InputStream, tag: String) extends Thread { override def run() { withCloseable(new BufferedReader(new InputStreamReader(is))) { - br => Stream.continually(br.readLine()).takeWhile(_ != null).foreach(Log.i(tag, _)) + br => try Stream.continually(br.readLine()).takeWhile(_ != null).foreach(Log.i(tag, _)) catch { + case ignore: IOException => + } } } } From 7c0763c78ae4638b6fa440ff1296c1d843ec54ac Mon Sep 17 00:00:00 2001 From: Max Lv Date: Thu, 1 Sep 2016 14:00:23 +0800 Subject: [PATCH 3/3] Fix #848 --- kcptun/kcptun | 2 +- project/plugins.sbt | 2 +- src/main/AndroidManifest.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kcptun/kcptun b/kcptun/kcptun index c4054b07..91b2c650 160000 --- a/kcptun/kcptun +++ b/kcptun/kcptun @@ -1 +1 @@ -Subproject commit c4054b07a6b493f48d4e9c35c6c1a4a047462325 +Subproject commit 91b2c650d128285f8a5f8305696d4c5ccdbe8e5f diff --git a/project/plugins.sbt b/project/plugins.sbt index 21b0ecc8..3ee67d67 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,4 @@ -addSbtPlugin("org.scala-android" % "sbt-android" % "1.6.14") +addSbtPlugin("org.scala-android" % "sbt-android" % "1.6.15") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.1.10") diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index 6e322bf0..6923e844 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="150" + android:versionName="3.0.8">