refine the binary update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user