mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-06 02:35:40 +08:00
Fix contains, all functions not support isUsingNativeStorage function in YukiHookPrefsBridge
This commit is contained in:
@@ -460,7 +460,7 @@ class YukiHookPrefsBridge private constructor(private var context: Context? = nu
|
|||||||
* @return [Boolean] 是否包含
|
* @return [Boolean] 是否包含
|
||||||
*/
|
*/
|
||||||
fun contains(key: String) =
|
fun contains(key: String) =
|
||||||
if (isXposedEnvironment)
|
if (isXposedEnvironment && isUsingNativeStorage.not())
|
||||||
currentXsp.contains(key)
|
currentXsp.contains(key)
|
||||||
else currentSp.contains(key)
|
else currentSp.contains(key)
|
||||||
|
|
||||||
@@ -473,7 +473,7 @@ class YukiHookPrefsBridge private constructor(private var context: Context? = nu
|
|||||||
* @return [HashMap] 全部类型的键值数组
|
* @return [HashMap] 全部类型的键值数组
|
||||||
*/
|
*/
|
||||||
fun all() = hashMapOf<String, Any?>().apply {
|
fun all() = hashMapOf<String, Any?>().apply {
|
||||||
if (isXposedEnvironment)
|
if (isXposedEnvironment && isUsingNativeStorage.not())
|
||||||
currentXsp.all.forEach { (k, v) -> this[k] = v }
|
currentXsp.all.forEach { (k, v) -> this[k] = v }
|
||||||
else currentSp.all.forEach { (k, v) -> this[k] = v }
|
else currentSp.all.forEach { (k, v) -> this[k] = v }
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user