refine the binary update

This commit is contained in:
Max Lv
2015-07-31 16:05:03 +08:00
parent c2c7cabbaf
commit fea9a6f919
4 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
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.ACCESS_NETWORK_STATE"/>
@@ -399,6 +399,11 @@ class Shadowsocks
def prepareStartService() {
showProgress(getString(R.string.connecting))
spawn {
if (!status.getBoolean(getVersionName, false)) {
status.edit.putBoolean(getVersionName, true).commit()
install()
}
if (isVpnEnabled) {
val intent = VpnService.prepare(this)
if (intent != null) {
@@ -476,13 +481,7 @@ class Shadowsocks
// Update the profile
if (!status.getBoolean(getVersionName, false)) {
val h = showProgress(getString(R.string.initializing))
status.edit.putBoolean(getVersionName, true).apply()
currentProfile = profileManager.create()
spawn {
install()
h.sendEmptyMessage(0)
}
}
// Initialize the profile
@@ -63,7 +63,7 @@ class ShadowsocksVpnService extends VpnService with BaseService {
private lazy val application = getApplication.asInstanceOf[ShadowsocksApplication]
val TAG = "ShadowsocksVpnService"
val VPN_MTU = 1500
val VPN_MTU = 1400
val PRIVATE_VLAN = "26.26.26.%s"
var conn: ParcelFileDescriptor = null
var notificationManager: NotificationManager = null