Fix YukiHookDataChannel not in current Activity received broadcast bug and changed "wait" method params

This commit is contained in:
2022-05-27 01:24:23 +08:00
parent 1f132ff8bd
commit 960fd67cc3
5 changed files with 114 additions and 35 deletions

View File

@@ -21,13 +21,17 @@ class YukiHookDataChannel private constructor()
### NameSpace [class]
```kotlin
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String)
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String, private val isSecure: Boolean)
```
**变更记录**
`v1.0.88` `新增`
`v1.0.90` `修改`
新增 `isSecure` 参数
**功能描述**
> `YukiHookDataChannel` 命名空间。
@@ -85,17 +89,21 @@ fun put(key: String)
#### wait [method]
```kotlin
fun <T> wait(key: String, value: T?, result: (value: T) -> Unit)
fun <T> wait(key: String, result: (value: T) -> Unit)
```
```kotlin
fun <T> wait(data: ChannelData<T>, value: T?, result: (value: T) -> Unit)
fun <T> wait(data: ChannelData<T>, result: (value: T) -> Unit)
```
**变更记录**
`v1.0.88` `新增`
`v1.0.90` `修改`
移除默认值 `value`
**功能描述**
> 获取键值数据。