Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19c4910794 | ||
|
|
8b0b39cba7 | ||
|
|
be8bc523ad | ||
|
|
050007b49b |
@@ -1,7 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.github.shadowsocks"
|
||||
android:versionCode="122"
|
||||
android:versionName="2.9.0">
|
||||
android:versionCode="123"
|
||||
android:versionName="2.9.1">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
@@ -25,13 +25,13 @@
|
||||
<com.github.shadowsocks.preferences.NumberPickerPreference
|
||||
app:min="1"
|
||||
app:max="65535"
|
||||
android:key="remotePort"
|
||||
android:key="remotePortNum"
|
||||
app:summary="@string/remote_port_summary"
|
||||
android:title="@string/remote_port"/>
|
||||
<com.github.shadowsocks.preferences.NumberPickerPreference
|
||||
app:min="1025"
|
||||
app:max="65535"
|
||||
android:key="port"
|
||||
android:key="localPortNum"
|
||||
app:summary="@string/port_summary"
|
||||
android:title="@string/port"/>
|
||||
<com.github.shadowsocks.preferences.PasswordEditTextPreference
|
||||
|
||||
@@ -166,6 +166,21 @@ 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")
|
||||
val oldRemotePort = ShadowsocksApplication.settings.getString("remotePort", "-1")
|
||||
|
||||
if (oldLocalPort != "-1") {
|
||||
ShadowsocksApplication.settings.edit.putInt(Key.localPort, oldLocalPort.toInt).commit()
|
||||
}
|
||||
if (oldRemotePort != "-1") {
|
||||
ShadowsocksApplication.settings.edit.putInt(Key.remotePort, oldRemotePort.toInt).commit()
|
||||
}
|
||||
} catch {
|
||||
case ex: Exception => // Ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,20 +81,22 @@ class DBHelper(val context: Context)
|
||||
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN ipv6 SMALLINT;")
|
||||
}
|
||||
if (oldVersion < 12) {
|
||||
profileDao.executeRawNoArgs("BEGIN TRANSACTION;")
|
||||
profileDao.executeRawNoArgs("ALTER TABLE `profile` RENAME TO `tmp`;")
|
||||
onCreate(database, connectionSource)
|
||||
TableUtils.createTable(connectionSource, classOf[Profile])
|
||||
profileDao.executeRawNoArgs(
|
||||
"INSERT INTO `profile`(id, name, host, localPort, remotePort, password, method, route, proxyApps, bypass," +
|
||||
" udpdns, auth, ipv6, individual) " +
|
||||
"SELECT id, name, host, localPort, remotePort, password, method, route, 1 - global, bypass, udpdns, auth," +
|
||||
" ipv6, individual FROM `tmp`;")
|
||||
profileDao.executeRawNoArgs("DROP TABLE `tmp`;")
|
||||
profileDao.executeRawNoArgs("COMMIT;")
|
||||
return
|
||||
}
|
||||
if (oldVersion < 13) {
|
||||
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN tx LONG;")
|
||||
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN rx LONG;")
|
||||
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN date DATE;")
|
||||
profileDao.executeRawNoArgs("ALTER TABLE `profile` ADD COLUMN date VARCHAR;")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ object Key {
|
||||
val proxy = "proxy"
|
||||
val sitekey = "sitekey"
|
||||
val encMethod = "encMethod"
|
||||
val remotePort = "remotePort"
|
||||
val localPort = "port"
|
||||
val remotePort = "remotePortNum"
|
||||
val localPort = "localPortNum"
|
||||
}
|
||||
|
||||
object Scheme {
|
||||
|
||||
Reference in New Issue
Block a user