mirror of https://github.com/NekoX-Dev/NekoX.git
[RELEASE] 6.1.1.1-rc4
This commit is contained in:
parent
82ef2e191e
commit
90abfe4061
|
@ -1,6 +1,5 @@
|
|||
import cn.hutool.core.io.FileUtil
|
||||
import cn.hutool.json.JSONObject
|
||||
import cn.hutool.system.SystemUtil
|
||||
|
||||
import java.security.MessageDigest
|
||||
|
||||
|
@ -76,8 +75,8 @@ dependencies {
|
|||
|
||||
}
|
||||
|
||||
def verName = "6.1.1.1-rc01"
|
||||
def verCode = 33
|
||||
def verName = "6.1.1.1-rc04"
|
||||
def verCode = 37
|
||||
|
||||
task writeUpdateInfo {
|
||||
|
||||
|
@ -296,12 +295,14 @@ android {
|
|||
mini {
|
||||
versionNameSuffix '-mini'
|
||||
}
|
||||
full {
|
||||
dependencies {
|
||||
implementation files('libs/libv2ray.aar')
|
||||
implementation files('libs/ss-rust-release.aar')
|
||||
implementation files('libs/ssr-libev-release.aar')
|
||||
}
|
||||
full {}
|
||||
}
|
||||
|
||||
sourceSets.full {
|
||||
dependencies {
|
||||
implementation files('libs/libv2ray.aar')
|
||||
implementation files('libs/ss-rust-release.aar')
|
||||
implementation files('libs/ssr-libev-release.aar')
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package tw.nekomimi.nekogram.database
|
||||
|
||||
import android.content.SharedPreferences
|
||||
|
||||
class WarppedPref(val origin: SharedPreferences) : SharedPreferences by origin {
|
||||
|
||||
override fun getBoolean(key: String, defValue: Boolean): Boolean {
|
||||
return try {
|
||||
origin.getBoolean(key, defValue)
|
||||
} catch (e: ClassCastException) {
|
||||
edit().remove(key).apply()
|
||||
defValue
|
||||
}
|
||||
}
|
||||
|
||||
override fun getInt(key: String, defValue: Int): Int {
|
||||
return try {
|
||||
origin.getInt(key, defValue)
|
||||
} catch (e: ClassCastException) {
|
||||
edit().remove(key).apply()
|
||||
defValue
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLong(key: String, defValue: Long): Long {
|
||||
return try {
|
||||
origin.getLong(key, defValue)
|
||||
} catch (e: ClassCastException) {
|
||||
edit().remove(key).apply()
|
||||
defValue
|
||||
}
|
||||
}
|
||||
|
||||
override fun getFloat(key: String, defValue: Float): Float {
|
||||
return try {
|
||||
origin.getFloat(key, defValue)
|
||||
} catch (e: java.lang.ClassCastException) {
|
||||
edit().remove(key).apply()
|
||||
defValue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun getString(key: String, defValue: String?): String? {
|
||||
return try {
|
||||
origin.getString(key, defValue)
|
||||
} catch (e: java.lang.ClassCastException) {
|
||||
edit().remove(key).apply()
|
||||
defValue
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue