Merge branch 'master' of github.com:shadowsocks/shadowsocks-android

This commit is contained in:
Max Lv
2016-09-04 10:19:15 +08:00
5 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -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")
+2 -2
View File
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.github.shadowsocks"
android:versionCode="149"
android:versionName="3.0.7">
android:versionCode="150"
android:versionName="3.0.8">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
@@ -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 =>
}
}
}
}
@@ -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))
}
}