Commit 362ec7eb authored by Max Lv's avatar Max Lv

bump version

parent a27336ae
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
android:versionCode="123"
android:versionName="2.9.1">
android:versionCode="124"
android:versionName="2.9.2">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
......
Subproject commit d462e4cd8d44d7275957afab9255b98e54bb2630
Subproject commit c5155e4a59c1965203b2f894c4f3c06358fa3a65
......@@ -49,7 +49,7 @@ import com.github.shadowsocks.utils.{State, TrafficMonitor, TrafficMonitorThread
trait BaseService extends Service {
@volatile private var state = State.INIT
@volatile private var state = State.STOPPED
@volatile private var callbackCount = 0
var timer: Timer = null
......@@ -76,7 +76,7 @@ trait BaseService extends Service {
timer.cancel()
timer = null
}
if (callbackCount == 0 && state != State.CONNECTING && state != State.CONNECTED) {
if (callbackCount == 0 && state == State.STOPPED) {
stopBackgroundService()
}
}
......@@ -101,13 +101,13 @@ trait BaseService extends Service {
}
override def stop() {
if (state != State.CONNECTING && state != State.STOPPING) {
if (state == State.CONNECTED) {
stopRunner()
}
}
override def start(config: Config) {
if (state != State.CONNECTING && state != State.STOPPING) {
if (state == State.STOPPED) {
startRunner(config)
}
}
......
......@@ -150,7 +150,7 @@ class Shadowsocks
var fabProgressCircle: FABProgressCircle = _
var progressDialog: ProgressDialog = _
var progressTag = -1
var state = State.INIT
var state = State.STOPPED
var prepared = false
var currentProfile = new Profile
var vpnEnabled = -1
......@@ -165,8 +165,6 @@ class Shadowsocks
if (!ShadowsocksApplication.settings.getBoolean(ShadowsocksApplication.getVersionName, false)) {
ShadowsocksApplication.settings.edit.putBoolean(ShadowsocksApplication.getVersionName, true).apply()
recovery()
try {
// Workaround that convert port(String) to port(Int)
val oldLocalPort = ShadowsocksApplication.settings.getString("port", "-1")
......@@ -181,6 +179,8 @@ class Shadowsocks
} catch {
case ex: Exception => // Ignore
}
recovery()
}
}
......
......@@ -98,7 +98,6 @@ object Mode {
}
object State {
val INIT = 0
val CONNECTING = 1
val CONNECTED = 2
val STOPPING = 3
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment