Commit fea9a6f9 authored by Max Lv's avatar Max Lv

refine the binary update

parent c2c7cabb
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks" package="com.github.shadowsocks"
android:versionCode="112" android:versionCode="112"
android:versionName="2.7.4"> android:versionName="2.7.5">
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
......
Subproject commit 23ff3bf96aec807a2e3e31d4a80fcab6e56c11f2 Subproject commit b3911fc84fe9dd269fd53b1c9767433f84050415
...@@ -399,6 +399,11 @@ class Shadowsocks ...@@ -399,6 +399,11 @@ class Shadowsocks
def prepareStartService() { def prepareStartService() {
showProgress(getString(R.string.connecting)) showProgress(getString(R.string.connecting))
spawn { spawn {
if (!status.getBoolean(getVersionName, false)) {
status.edit.putBoolean(getVersionName, true).commit()
install()
}
if (isVpnEnabled) { if (isVpnEnabled) {
val intent = VpnService.prepare(this) val intent = VpnService.prepare(this)
if (intent != null) { if (intent != null) {
...@@ -476,13 +481,7 @@ class Shadowsocks ...@@ -476,13 +481,7 @@ class Shadowsocks
// Update the profile // Update the profile
if (!status.getBoolean(getVersionName, false)) { if (!status.getBoolean(getVersionName, false)) {
val h = showProgress(getString(R.string.initializing))
status.edit.putBoolean(getVersionName, true).apply()
currentProfile = profileManager.create() currentProfile = profileManager.create()
spawn {
install()
h.sendEmptyMessage(0)
}
} }
// Initialize the profile // Initialize the profile
......
...@@ -63,7 +63,7 @@ class ShadowsocksVpnService extends VpnService with BaseService { ...@@ -63,7 +63,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
private lazy val application = getApplication.asInstanceOf[ShadowsocksApplication] private lazy val application = getApplication.asInstanceOf[ShadowsocksApplication]
val TAG = "ShadowsocksVpnService" val TAG = "ShadowsocksVpnService"
val VPN_MTU = 1500 val VPN_MTU = 1400
val PRIVATE_VLAN = "26.26.26.%s" val PRIVATE_VLAN = "26.26.26.%s"
var conn: ParcelFileDescriptor = null var conn: ParcelFileDescriptor = null
var notificationManager: NotificationManager = null var notificationManager: NotificationManager = null
......
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