mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-06 10:45:47 +08:00
Compare commits
82 Commits
Author | SHA1 | Date | |
---|---|---|---|
495aa08eb6
|
|||
48ed26366a
|
|||
60f8937d55
|
|||
388147f089
|
|||
cc321df3b8
|
|||
ea609fb1c3
|
|||
ddacf818c8
|
|||
03320b40fa
|
|||
635e8b5e40
|
|||
6b4804cfb8
|
|||
51a9f42bd5
|
|||
f9cdcc508f
|
|||
b41897fd58
|
|||
9e1a6f2b07
|
|||
7f7b8e94f5
|
|||
390ee9e509
|
|||
e298f19e33
|
|||
b61bd33a67
|
|||
9ba7497b7a
|
|||
1215ccf220
|
|||
f8eefd58fd
|
|||
404bbfa4eb
|
|||
3b8eba21b0
|
|||
c743dad733
|
|||
68b7e3738f
|
|||
7244d0b9b3
|
|||
3ddd4b3c0d
|
|||
eeacd4f7d0
|
|||
98d46a3d9e
|
|||
a8121d8735
|
|||
914b059d9c
|
|||
a0714eb996
|
|||
8120206f4d
|
|||
05a7059eeb
|
|||
7c8086fde3
|
|||
dc079e7dc8
|
|||
099ece1e97
|
|||
f489313054
|
|||
e17ce34d77
|
|||
df5a24cf3f
|
|||
1020203278
|
|||
9be3e2a49a
|
|||
ecfd6e42bf
|
|||
370f954c1a
|
|||
2999d1965b
|
|||
8955daceee
|
|||
9215275c56
|
|||
aa352d3734
|
|||
4d665d76c7
|
|||
caa412953d
|
|||
008962a1fc
|
|||
0e554ce0e0
|
|||
b7f537e511
|
|||
476ce48d1f
|
|||
2b1acf896e
|
|||
249a39dc05
|
|||
244903553c
|
|||
6e67298225
|
|||
ac12e0e87c
|
|||
5bd1b3b79e
|
|||
cf2473b92c
|
|||
8079b89615
|
|||
a04018e28f
|
|||
686bcdb674
|
|||
c0855e089c
|
|||
72ba52ad22
|
|||
0b1e078829
|
|||
48ca18fe39
|
|||
1dfcb75c9c
|
|||
a7f9144c3d
|
|||
f4b835f65c
|
|||
c7ed38927c
|
|||
4230e4f8be
|
|||
ba163c9367
|
|||
1831257784
|
|||
3b56218fd2
|
|||
3e55d6178d
|
|||
c4acd31c8d
|
|||
ce35291435
|
|||
3e9f90e14b
|
|||
9d512a0d7d
|
|||
2b7ee6cf78
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
*.iml
|
||||
.gradle
|
||||
.maven
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Yuki Hook API
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://t.me/YukiHookAPI)
|
||||
<br/><br/>
|
||||
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>
|
||||
@@ -61,9 +61,11 @@
|
||||
| [Auto NFC](https://github.com/GSWXXN/AutoNFC) | [GSWXXN](https://github.com/GSWXXN) |
|
||||
| [不要竖屏](https://github.com/WankkoRee/Portrait2Landscape) | [WankkoRee](https://github.com/WankkoRee) |
|
||||
| [QDReadHook](https://github.com/xihan123/QDReadHook) | [xihan123](https://github.com/xihan123) |
|
||||
| [HXReadHook](https://github.com/xihan123/HXReadHook) | [xihan123](https://github.com/xihan123) |
|
||||
| [WxRecordRead](https://github.com/pwh-pwh/wxrecordread) | [Coderpwh](https://github.com/pwh-pwh) |
|
||||
| [MIUI更新进化](https://miup.utssg.xyz) | [ZQDesigned](https://github.com/ZQDesigned) |
|
||||
| [MIUI录屏进化](https://www.coolapk.com/apk/UTSSG.ZQDesigned.miuirecordercracker) | [ZQDesigned](https://github.com/ZQDesigned) |
|
||||
| [Fuck AD](https://github.com/hujiayucc/Fuck-AD) | [hujiayucc](https://github.com/hujiayucc) |
|
||||
|
||||
你也在使用 `YukiHookAPI` 吗?快来 **PR** 将你的存储仓库添加到上方的列表(私有仓库可以不需要注明网页链接)。
|
||||
|
||||
@@ -72,6 +74,10 @@
|
||||
- 工作不易,无意外情况此项目将继续维护下去,提供更多可能,欢迎打赏。<br/><br/>
|
||||
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/wechat_code.jpg?raw=true" width = "200" height = "200"/>
|
||||
|
||||
## Star History
|
||||
|
||||

|
||||
|
||||
## 第三方开源使用声明
|
||||
|
||||
- [Kotlin Symbol Processing API](https://github.com/google/ksp)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Yuki Hook API
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://t.me/YukiHookAPI)
|
||||
<br/><br/>
|
||||
<img src="https://github.com/fankes/YuKiHookAPI/blob/master/img-src/icon.png?raw=true" width = "100" height = "100"/>
|
||||
@@ -62,13 +62,19 @@ The following are projects that have collaborated and are using `YukiHookAPI`.
|
||||
| [Auto NFC](https://github.com/GSWXXN/AutoNFC) | [GSWXXN](https://github.com/GSWXXN) |
|
||||
| [不要竖屏](https://github.com/WankkoRee/Portrait2Landscape) | [WankkoRee](https://github.com/WankkoRee) |
|
||||
| [QDReadHook](https://github.com/xihan123/QDReadHook) | [xihan123](https://github.com/xihan123) |
|
||||
| [HXReadHook](https://github.com/xihan123/HXReadHook) | [xihan123](https://github.com/xihan123) |
|
||||
| [WxRecordRead](https://github.com/pwh-pwh/wxrecordread) | [Coderpwh](https://github.com/pwh-pwh) |
|
||||
| [MIUI更新进化](https://miup.utssg.xyz) | [ZQDesigned](https://github.com/ZQDesigned) |
|
||||
| [MIUI录屏进化](https://www.coolapk.com/apk/UTSSG.ZQDesigned.miuirecordercracker) | [ZQDesigned](https://github.com/ZQDesigned) |
|
||||
| [Fuck AD](https://github.com/hujiayucc/Fuck-AD) | [hujiayucc](https://github.com/hujiayucc) |
|
||||
|
||||
Are you also using `YukiHookAPI`? Come and **PR** to add your repository to the list above (private repositories do not need to indicate web
|
||||
links).
|
||||
|
||||
## Star History
|
||||
|
||||

|
||||
|
||||
## Third-Party Open Source Usage Statement
|
||||
|
||||
- [Kotlin Symbol Processing API](https://github.com/google/ksp)
|
||||
|
83
build.gradle
83
build.gradle
@@ -1,46 +1,65 @@
|
||||
//file:noinspection unused
|
||||
import groovy.json.JsonSlurper
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '7.3.1' apply false
|
||||
id 'com.android.library' version '7.3.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.22' apply false
|
||||
id 'com.android.application' version '7.4.1' apply false
|
||||
id 'com.android.library' version '7.4.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
|
||||
id 'com.google.devtools.ksp' version '1.8.20-1.0.10' apply false
|
||||
}
|
||||
|
||||
ext {
|
||||
devId = "0"
|
||||
devUser = "fankesyooni"
|
||||
userEmail = "qzmmcn@163.com"
|
||||
groupId = "com.highcapable.yukihookapi"
|
||||
apiVersion = "1.1.5"
|
||||
repoName = "YukiHookAPI"
|
||||
repoDescription = "An efficient Hook API and Xposed Module solution built in Kotlin."
|
||||
licenceName = "MIT License"
|
||||
licenceUrl = "https://github.com/fankes/YukiHookAPI/blob/master/LICENSE"
|
||||
website = "https://github.com/fankes/YukiHookAPI"
|
||||
githubConnection = "scm:git:git://github.com/path/to/repo.git"
|
||||
githubDeveloperConnection = "scm:git:ssh://github.com/path/to/repo.git"
|
||||
githubUrl = "https://github.com/path/to/repo"
|
||||
ossName = "OSSRH"
|
||||
ossUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
|
||||
android = [
|
||||
compileSdk: 33,
|
||||
minSdk : 21,
|
||||
targetSdk : 33
|
||||
]
|
||||
app = [
|
||||
versionName: 'universal',
|
||||
versionCode: 1
|
||||
]
|
||||
maven = [
|
||||
developer : [
|
||||
id : '0',
|
||||
user : 'fankesyooni',
|
||||
email: 'qzmmcn@163.com'
|
||||
],
|
||||
repository : [
|
||||
groupId : 'com.highcapable.yukihookapi',
|
||||
apiVersion : [
|
||||
name: '1.1.10',
|
||||
code: 43
|
||||
],
|
||||
name : 'YukiHookAPI',
|
||||
description: 'An efficient Hook API and Xposed Module solution built in Kotlin.',
|
||||
website : 'https://github.com/fankes/YukiHookAPI',
|
||||
licence : [
|
||||
name: 'MIT License',
|
||||
url : 'https://github.com/fankes/YukiHookAPI/blob/master/LICENSE'
|
||||
]
|
||||
],
|
||||
configurations: [
|
||||
githubConnection : 'scm:git:git://github.com/path/to/repo.git',
|
||||
githubDeveloperConnection: 'scm:git:ssh://github.com/path/to/repo.git',
|
||||
githubUrl : 'https://github.com/path/to/repo',
|
||||
ossName : 'OSSRH',
|
||||
ossUrl : 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2'
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取授权文件内容 - 用于 Maven 的提交
|
||||
*
|
||||
* 若编译失败请将路径替换为自己的或置空
|
||||
* @param name
|
||||
* @return [String]
|
||||
* 获取 Maven 授权信息 - 用于 Maven 的提交
|
||||
* @param childProjectDir 子项目的目录
|
||||
* @return [Object]
|
||||
*/
|
||||
static String getFileContent(String name) {
|
||||
String result = ""
|
||||
@SuppressWarnings('unused')
|
||||
static Object getMavenCredentials(File childProjectDir) {
|
||||
def slurper = new JsonSlurper()
|
||||
try {
|
||||
FileReader reader = new FileReader("/Users/fankes/Project/Android/Xposed/YukiHookAPI/.gradle/" + name)
|
||||
BufferedReader buff = new BufferedReader(reader)
|
||||
result = buff.readLine()
|
||||
buff.close()
|
||||
reader.close()
|
||||
return slurper.parse(new File("${childProjectDir.getParent()}/.maven/credentials.json"))
|
||||
} catch (Throwable ignored) {
|
||||
return slurper.parseText('{"username":"-NEEDED-","password":"-NEEDED-"}')
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
@@ -4,33 +4,24 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('../keystore/public')
|
||||
storePassword '123456'
|
||||
keyAlias 'public'
|
||||
keyPassword '123456'
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
compileSdk 33
|
||||
namespace 'com.highcapable.yukihookapi.demo_app'
|
||||
compileSdk rootProject.ext.android.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.highcapable.yukihookapi.demo_app"
|
||||
minSdk 21
|
||||
targetSdk 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
applicationId 'com.highcapable.yukihookapi.demo_app'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
minSdk rootProject.ext.android.minSdk
|
||||
targetSdk rootProject.ext.android.targetSdk
|
||||
|
||||
versionCode rootProject.ext.app.versionCode
|
||||
versionName rootProject.ext.app.versionName
|
||||
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.debug
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
@@ -40,6 +31,14 @@ android {
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
freeCompilerArgs = [
|
||||
'-Xno-param-assertions',
|
||||
'-Xno-call-assertions',
|
||||
'-Xno-receiver-assertions'
|
||||
]
|
||||
}
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
@@ -47,10 +46,10 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.9.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
||||
implementation 'com.google.android.material:material:1.7.0'
|
||||
implementation 'androidx.core:core-ktx:1.10.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
|
4
demo-module/.gitignore
vendored
4
demo-module/.gitignore
vendored
@@ -1 +1,3 @@
|
||||
/build
|
||||
/build
|
||||
/src/main/assets/xposed_init
|
||||
/src/main/resources/META-INF/yukihookapi_init
|
@@ -1,37 +1,28 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'com.google.devtools.ksp' version '1.7.22-1.0.8'
|
||||
id 'com.google.devtools.ksp'
|
||||
}
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
debug {
|
||||
storeFile file('../keystore/public')
|
||||
storePassword '123456'
|
||||
keyAlias 'public'
|
||||
keyPassword '123456'
|
||||
v1SigningEnabled true
|
||||
v2SigningEnabled true
|
||||
}
|
||||
}
|
||||
|
||||
compileSdk 33
|
||||
namespace 'com.highcapable.yukihookapi.demo_module'
|
||||
compileSdk rootProject.ext.android.compileSdk
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.highcapable.yukihookapi.demo_module"
|
||||
minSdk 21
|
||||
targetSdk 33
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
applicationId 'com.highcapable.yukihookapi.demo_module'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
minSdk rootProject.ext.android.minSdk
|
||||
targetSdk rootProject.ext.android.targetSdk
|
||||
|
||||
versionCode rootProject.ext.app.versionCode
|
||||
versionName rootProject.ext.app.versionName
|
||||
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
signingConfig signingConfigs.debug
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
@@ -47,6 +38,9 @@ android {
|
||||
'-Xno-receiver-assertions'
|
||||
]
|
||||
}
|
||||
lintOptions {
|
||||
checkReleaseBuilds false
|
||||
}
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
@@ -61,10 +55,10 @@ dependencies {
|
||||
// Implementation Processor
|
||||
ksp project(':yukihookapi-ksp-xposed')
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
implementation 'androidx.core:core-ktx:1.9.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.5.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
|
||||
implementation 'com.google.android.material:material:1.7.0'
|
||||
implementation 'androidx.core:core-ktx:1.10.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
|
||||
implementation 'com.google.android.material:material:1.8.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||
|
@@ -1 +0,0 @@
|
||||
com.highcapable.yukihookapi.demo_module.hook.HookEntry_YukiHookXposedInit
|
@@ -1 +0,0 @@
|
||||
com.highcapable.yukihookapi.demo_module.hook.HookEntry
|
@@ -103,13 +103,13 @@ object HookEntry : IYukiHookXposedInit {
|
||||
// 是否开启调试模式
|
||||
// 请注意 - 若作为发布版本请务必关闭调试功能防止对用户设备造成大量日志填充
|
||||
isDebug = true
|
||||
// Whether to enable the key-value cache function of [YukiHookModulePrefs]
|
||||
// Whether to enable the key-value cache function of [YukiHookPrefsBridge]
|
||||
// If there is no frequent interaction data with the Module App, it is recommended to enable it before the Host App restarts
|
||||
// If you need real-time interactive data, it is recommended to close or configure dynamically from [YukiHookModulePrefs]
|
||||
// 是否启用 [YukiHookModulePrefs] 的键值缓存功能
|
||||
// If you need real-time interactive data, it is recommended to close or configure dynamically from [YukiHookPrefsBridge]
|
||||
// 是否启用 [YukiHookPrefsBridge] 的键值缓存功能
|
||||
// 若无和模块频繁交互数据在宿主重新启动之前建议开启
|
||||
// 若需要实时交互数据建议关闭或从 [YukiHookModulePrefs] 中进行动态配置
|
||||
isEnableModulePrefsCache = true
|
||||
// 若需要实时交互数据建议关闭或从 [YukiHookPrefsBridge] 中进行动态配置
|
||||
isEnablePrefsBridgeCache = true
|
||||
// Whether to enable the current Xposed Module's own [Resources] cache function
|
||||
// Under normal circumstances, the resources of the Module App will not change
|
||||
// But in the case of locale changes, screen size changes. Etc. you need to refresh the cache
|
||||
@@ -133,11 +133,11 @@ object HookEntry : IYukiHookXposedInit {
|
||||
// Enable will force [SharedPreferences] file permissions to be adjusted to [Context.MODE_WORLD_READABLE] (0664) at Module App startup
|
||||
// This is an optional experimental feature, this feature is not enabled by default
|
||||
// Only used to fix some systems that may still have file permission errors after enabling New XSharedPreferences
|
||||
// If you can use [YukiHookModulePrefs] normally, it is not recommended to enable this feature
|
||||
// If you can use [YukiHookPrefsBridge] normally, it is not recommended to enable this feature
|
||||
// 是否启用 Hook [SharedPreferences]
|
||||
// 启用后将在模块启动时强制将 [SharedPreferences] 文件权限调整为 [Context.MODE_WORLD_READABLE] (0664)
|
||||
// 这是一个可选的实验性功能 - 此功能默认不启用
|
||||
// 仅用于修复某些系统可能会出现在启用了 New XSharedPreferences 后依然出现文件权限错误问题 - 若你能正常使用 [YukiHookModulePrefs] 就不建议启用此功能
|
||||
// 仅用于修复某些系统可能会出现在启用了 New XSharedPreferences 后依然出现文件权限错误问题 - 若你能正常使用 [YukiHookPrefsBridge] 就不建议启用此功能
|
||||
isEnableHookSharedPreferences = false
|
||||
// Whether to enable the [YukiHookDataChannel] function of the current Xposed Module interacting with the Host App
|
||||
// Please make sure the Xposed Module's [Application] extends [ModuleApplication] to be valid
|
||||
|
@@ -73,9 +73,9 @@ public class HookEntry implements IYukiHookXposedInit {
|
||||
@Override
|
||||
public void onHook() {
|
||||
// Here is the Java writing method that is more similar to the Kotlin writing method, just for reference
|
||||
// Calling Kotlin's lambda in Java also needs to return null in the Unit case
|
||||
// Calling Kotlin's lambda in Java also needs to return Unit.INSTANCE in the Unit case
|
||||
// 这里介绍了比较近似于 Kotlin 写法的 Java 写法 - 仅供参考
|
||||
// 在 Java 中调用 Kotlin 的 lambda 在 Unit 情况下也需要 return null
|
||||
// 在 Java 中调用 Kotlin 的 lambda 在 Unit 情况下也需要 return Unit.INSTANCE
|
||||
YukiHookAPI.INSTANCE.encase(e -> {
|
||||
e.loadZygote(l -> {
|
||||
l.hook(Activity.class, false, h -> {
|
||||
|
@@ -37,7 +37,7 @@ import com.highcapable.yukihookapi.demo_module.R
|
||||
import com.highcapable.yukihookapi.demo_module.data.DataConst
|
||||
import com.highcapable.yukihookapi.demo_module.databinding.ActivityMainBinding
|
||||
import com.highcapable.yukihookapi.hook.factory.dataChannel
|
||||
import com.highcapable.yukihookapi.hook.factory.modulePrefs
|
||||
import com.highcapable.yukihookapi.hook.factory.prefs
|
||||
import com.highcapable.yukihookapi.hook.xposed.parasitic.activity.base.ModuleAppCompatActivity
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
@@ -66,7 +66,7 @@ class MainActivity : ModuleAppCompatActivity() {
|
||||
moduleDemoYukiHookApiVersionText.text = "YukiHookAPI Version:${YukiHookAPI.API_VERSION_NAME}(${YukiHookAPI.API_VERSION_CODE})"
|
||||
moduleDemoYukiHookApiVersionZhText.text = "YukiHookAPI 版本"
|
||||
moduleDemoNewXshareText.text =
|
||||
"${if (YukiHookAPI.Status.isXposedEnvironment) "XSharedPreferences Readable" else "New XSharedPreferences"}:${modulePrefs.isPreferencesAvailable}"
|
||||
"${if (YukiHookAPI.Status.isXposedEnvironment) "XSharedPreferences Readable" else "New XSharedPreferences"}:${prefs().isPreferencesAvailable}"
|
||||
moduleDemoNewXshareZhText.text =
|
||||
if (YukiHookAPI.Status.isXposedEnvironment) "XSharedPreferences 是否可用" else "New XSharedPreferences 支持状态"
|
||||
moduleDemoResHookText.text = "Support Resources Hook:${YukiHookAPI.Status.isSupportResourcesHook}"
|
||||
@@ -78,11 +78,11 @@ class MainActivity : ModuleAppCompatActivity() {
|
||||
it.isEnabled = false
|
||||
moduleDemoButton.isEnabled = false
|
||||
}
|
||||
it.setText(modulePrefs.get(DataConst.TEST_KV_DATA))
|
||||
it.setText(prefs().get(DataConst.TEST_KV_DATA))
|
||||
moduleDemoButton.setOnClickListener { _ ->
|
||||
moduleEnvironment {
|
||||
if (it.text.toString().isNotEmpty()) {
|
||||
modulePrefs.put(DataConst.TEST_KV_DATA, it.text.toString())
|
||||
prefs().edit { put(DataConst.TEST_KV_DATA, it.text.toString()) }
|
||||
Toast.makeText(applicationContext, "Saved", Toast.LENGTH_SHORT).show()
|
||||
} else Toast.makeText(applicationContext, "Please enter the text", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ const navigationLinks = {
|
||||
baseApiPath + 'hook/param/HookParam',
|
||||
baseApiPath + 'annotation/xposed/InjectYukiHookWithXposed',
|
||||
baseApiPath + 'hook/xposed/proxy/IYukiHookXposedInit',
|
||||
baseApiPath + 'hook/xposed/prefs/YukiHookModulePrefs',
|
||||
baseApiPath + 'hook/xposed/prefs/YukiHookPrefsBridge',
|
||||
baseApiPath + 'hook/xposed/prefs/ui/ModulePreferenceFragment',
|
||||
baseApiPath + 'hook/xposed/prefs/data/PrefsData',
|
||||
baseApiPath + 'hook/xposed/channel/YukiHookDataChannel',
|
||||
@@ -40,9 +40,9 @@ const navigationLinks = {
|
||||
baseApiPath + 'hook/xposed/parasitic/activity/base/ModuleAppCompatActivity',
|
||||
baseApiPath + 'hook/xposed/parasitic/context/wrapper/ModuleContextThemeWrapper',
|
||||
baseApiPath + 'hook/xposed/parasitic/reference/ModuleClassLoader',
|
||||
baseApiPath + 'hook/xposed/bridge/dummy/YukiModuleResources',
|
||||
baseApiPath + 'hook/xposed/bridge/dummy/YukiResources',
|
||||
baseApiPath + 'hook/xposed/bridge/dummy/YukiResForwarder',
|
||||
baseApiPath + 'hook/xposed/bridge/resources/YukiModuleResources',
|
||||
baseApiPath + 'hook/xposed/bridge/resources/YukiResources',
|
||||
baseApiPath + 'hook/xposed/bridge/resources/YukiResForwarder',
|
||||
baseApiPath + 'hook/xposed/bridge/event/YukiXposedEvent',
|
||||
baseApiPath + 'hook/type/android/ComponentTypeFactory',
|
||||
baseApiPath + 'hook/type/android/GraphicsTypeFactory',
|
||||
@@ -53,6 +53,7 @@ const navigationLinks = {
|
||||
baseApiPath + 'hook/factory/ReflectionFactory',
|
||||
baseApiPath + 'hook/factory/YukiHookFactory',
|
||||
baseApiPath + 'hook/entity/YukiBaseHooker',
|
||||
baseApiPath + 'hook/core/api/compat/type/ExecutorType',
|
||||
baseApiPath + 'hook/core/YukiMemberHookCreator',
|
||||
baseApiPath + 'hook/core/YukiResourcesHookCreator',
|
||||
baseApiPath + 'hook/core/finder/members/MethodFinder',
|
||||
|
@@ -16,7 +16,58 @@ Time zone of version release date: **UTC+8**
|
||||
|
||||
:::
|
||||
|
||||
### 1.1.5 | 2023.01.13  <Badge type="tip" text="latest" vertical="middle" />
|
||||
### 1.1.10 | 2023.04.21  <Badge type="tip" text="latest" vertical="middle" />
|
||||
|
||||
- The `Activity` proxy function adds the function of specifying a separate proxy `Activity` for each proxied `Activity`
|
||||
- Fixed problem that the `contains` and `all` methods in `YukiHookPrefsBridge` did not judge the `native` function
|
||||
- Integrate the cache function in `YukiHookPrefsBridge` into `PreferencesCacheManager` and use `LruCache` as a key-value pair cache
|
||||
- Modify `YukiHookPrefsBridge` key-value pair caching function to take effect in all environments (Module Apps, Host Apps)
|
||||
- Modify part of `HashMap` used for caching to `ArrayMap` to reduce memory consumption
|
||||
- Fix some other possible problems
|
||||
|
||||
### 1.1.9 | 2023.04.17  <Badge type="warning" text="stale" vertical="middle" />
|
||||
|
||||
- Change the type of dependent library from **Java Library** (jar) to **Android Library** (aar)
|
||||
- Remove the inspection function of internal methods and parameters through Hook or reflection API
|
||||
- Fixed the problem that `YukiHookDataChannel` automatically segmented data sending function could not work normally (exception would still be thrown)
|
||||
- Added the ability to manually modify the maximum data byte size allowed by `YukiHookDataChannel` to be sent at one time according to the limitations of the target device
|
||||
- Remove the restriction that `YukiHookDataChannel` can only be used in module `Activity`, now you can use it anywhere
|
||||
- Modify and standardize the broadcast Action name used by `YukiHookDataChannel`
|
||||
- Fix the problem that `BadParcelableException` occurs when `YukiHookDataChannel` has different modules with the same host
|
||||
- Added `ExecutorType`, you can get the type of known Hook Framework through `YukiHookAPI.Status.Executor.type`
|
||||
- ~~`YukiHookModulePrefs`~~ renamed to `YukiHookPrefsBridge`
|
||||
- Modify `YukiHookPrefsBridge` to be implemented as a non-singleton, as a singleton may cause data confusion
|
||||
- Deprecated ~~`Context.modulePrefs(...)`~~ method, please move to `Context.prefs(...)`
|
||||
- `YukiHookPrefsBridge` adds `native` method, which supports storing private data in modules and hosts directly as native storage
|
||||
- Integrate the storage method in `YukiHookPrefsBridge` to `YukiHookPrefsBridge.Editor`, please use `edit` method to store data
|
||||
- `YukiHookPrefsBridge` adds `contains` method
|
||||
- Cache dynamically created proxy objects in `YukiHookPrefsBridge`, try to fix problems that may cause OOM in the host and modules
|
||||
- Modify the proxy class of the `Activity` proxy function to be dynamically generated to prevent conflicts caused by injecting different modules into the host
|
||||
- Fixed some other possible problems
|
||||
|
||||
### 1.1.8 | 2023.02.01  <Badge type="warning" text="stale" vertical="middle" />
|
||||
|
||||
- Fixed the problem that the underlying Hook method cannot update the modified state synchronously when modifying parameters such as `result` during callback, thanks to the [Issue](https://github.com/fankes/YukiHookAPI/issues/23) of [Yongzheng Lai](https://github.com/elvizlai)
|
||||
- Move the entry class name file automatically generated by `YukiHookAPI` from `assets/yukihookapi_init` to `resources/META-INF/yukihookapi_init`
|
||||
- When only printing the exception stack, the `msg` parameter is allowed to be empty and the `msg` parameter can not be set, and the log with the `msg` parameter left blank will not be logged unless the exception stack is not empty
|
||||
- Fixed the bug that the log printed by the exception that occurs in the body of the Hook callback method has no specific method information
|
||||
- `HookParam` adds `instanceOrNull` variable and method, which can be used on the premise that the Hook instance is not sure whether it is empty to prevent the Hook instance from being empty and throw an exception
|
||||
- Decoupled all hookers in `Member` lookup functionality to `MemberBaseFinder.MemberHookerManager`
|
||||
- Modified the usage of `by` condition in `YukiMemberHookCreator`, now you can reuse `by` method to set multiple conditions
|
||||
- Removed wrong `Class` object declaration in Android `type`
|
||||
- The `registerReceiver` method in `PackageParam.AppLifecycle` adds the function of directly using `IntentFilter` to create a system broadcast listener
|
||||
- Fixed the problem that there may be multiple registration lifecycles in `PackageParam.AppLifecycle`
|
||||
- Revert: The 1.1.7 version has been withdrawn due to a serious problem, please update to this version directly (the update log is the same as version 1.1.7)
|
||||
|
||||
### 1.1.6 | 2023.01.21  <Badge type="warning" text="stale" vertical="middle" />
|
||||
|
||||
- Fixed the serious problem that `ClassLoader` does not match after `PackageParam` keeps a single instance when there may be multiple package names in the same process when Xposed Module is loaded
|
||||
- When the package name is not distinguished when there are multiple package names in the same process, stop loading the singleton child Hooker and print a warning message
|
||||
- Fixed the problem that the number of parameters is incorrect when methods such as `HookParam.callOriginal`, `HookParam.invokeOriginal` call the original method
|
||||
- Modify the method parameter name `param` of reflection calls in `MethodFinder`, `ConstructorFinder`, `ReflectionFactory` to `args`
|
||||
- Added the function of judging the parameters of the entry class constructor in the automatic processing program of the Xposed Module, the entry class needs to ensure that it does not have any constructor parameters
|
||||
|
||||
### 1.1.5 | 2023.01.13  <Badge type="warning" text="stale" vertical="middle" />
|
||||
|
||||
- Standardize and optimize the overall code style
|
||||
- Privatized some APIs called internally
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
> Here are the unresolved issues with `YukiHookAPI`.
|
||||
|
||||
### YukiHookModulePrefs
|
||||
### YukiHookPrefsBridge
|
||||
|
||||
Currently only supports LSPosed perfectly, other Xposed Framework need to downgrade the module target api.
|
||||
|
||||
@@ -22,11 +22,17 @@ In the later period, the permissions of the Android system will become more and
|
||||
|
||||
### Lite Version Supported for Standalone Use
|
||||
|
||||
If you like the Reflection API of `YukiHookAPI`, but your project may not need related Hook functions.
|
||||
|
||||
Well here is some good news for you:
|
||||
|
||||
The core Reflection API of `YukiHookAPI` has been decoupled into [YukiReflection](https://github.com/fankes/YukiReflection) project, which can now be used in any Android project.
|
||||
|
||||
::: tip To be Discussed
|
||||
|
||||
At present, the API only supports binding to **xposed_init** through the automatic handler.
|
||||
At present, the API only supports binding to **xposed_init** through the automatic builder.
|
||||
|
||||
If you don't like the automatic handler, you must implement the module loading entry yourself.
|
||||
If you don't like the automatic builder, you must implement the module loading entry yourself.
|
||||
|
||||
In the future, the Lite version with only API functions will be launched according to the number of people required.
|
||||
|
||||
|
@@ -260,6 +260,26 @@ val name: String
|
||||
|
||||
:::
|
||||
|
||||
#### type <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val type: ExecutorType
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获取当前 Hook Framework 类型。
|
||||
|
||||
::: warning
|
||||
|
||||
在模块环境中需要启用 **Configs.isEnableHookModuleStatus**。
|
||||
|
||||
:::
|
||||
|
||||
#### apiLevel <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -370,9 +390,9 @@ var isDebug: Boolean
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 是否启用 DEBUG 模式。
|
||||
> 是否启用 Debug 模式。
|
||||
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 `XposedBridge.log` 打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 (Xposed) 宿主环境中的日志功能打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
|
||||
<h3 class="deprecated">isAllowPrintingLogs - field</h3>
|
||||
|
||||
@@ -384,23 +404,33 @@ var isDebug: Boolean
|
||||
|
||||
请转移到 `YukiHookLogger.Configs.isEnable`
|
||||
|
||||
### isEnableModulePrefsCache <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var isEnableModulePrefsCache: Boolean
|
||||
```
|
||||
<h3 class="deprecated">isEnableModulePrefsCache - field</h3>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.5` `added`
|
||||
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
请转移到 `isEnablePrefsBridgeCache`
|
||||
|
||||
### isEnablePrefsBridgeCache <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var isEnablePrefsBridgeCache: Boolean
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 是否启用 `YukiHookModulePrefs` 的键值缓存功能。
|
||||
> 是否启用 `YukiHookPrefsBridge` 的键值缓存功能。
|
||||
|
||||
为防止内存复用过高问题,此功能默认启用。
|
||||
|
||||
你可以手动在 `YukiHookModulePrefs` 中自由开启和关闭缓存功能以及清除缓存。
|
||||
你可以手动在 `YukiHookPrefsBridge` 中自由开启和关闭缓存功能以及清除缓存。
|
||||
|
||||
### isEnableModuleAppResourcesCache <span class="symbol">- field</span>
|
||||
|
||||
@@ -468,7 +498,7 @@ var isEnableHookSharedPreferences: Boolean
|
||||
|
||||
这是一个可选的实验性功能,此功能默认不启用。
|
||||
|
||||
仅用于修复某些系统可能会出现在启用了 **New XSharedPreferences** 后依然出现文件权限错误问题,若你能正常使用 **YukiHookModulePrefs** 就不建议启用此功能。
|
||||
仅用于修复某些系统可能会出现在启用了 **New XSharedPreferences** 后依然出现文件权限错误问题,若你能正常使用 **YukiHookPrefsBridge** 就不建议启用此功能。
|
||||
|
||||
:::
|
||||
|
||||
@@ -500,10 +530,6 @@ var isEnableMemberCache: Boolean
|
||||
|
||||
`v1.0.68` `added`
|
||||
|
||||
`v1.0.80` `modified`
|
||||
|
||||
将方法体进行 inline
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 是否启用 `Member` 缓存功能。
|
||||
@@ -512,7 +538,7 @@ var isEnableMemberCache: Boolean
|
||||
|
||||
启用后会缓存已经找到的 `Method`、`Constructor`、`Field`。
|
||||
|
||||
缓存的 `Member` 都将处于 `MemberCacheStore` 的全局静态实例中。
|
||||
缓存的 `Member` 都将处于 `ReflectsCacheStore` 的全局静态实例中。
|
||||
|
||||
推荐使用 `MethodFinder`、`ConstructorFinder`、`FieldFinder` 来获取 `Member`。
|
||||
|
||||
@@ -528,20 +554,24 @@ inline fun configs(initiate: Configs.() -> Unit)
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
`v1.0.80` `modified`
|
||||
|
||||
将方法体进行 inline
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 对 `Configs` 类实现了一个 `lambda` 方法体。
|
||||
|
||||
你可以轻松的调用它进行配置。
|
||||
你可以轻松地调用它进行配置。
|
||||
|
||||
**Function Example**
|
||||
|
||||
你可以在 `HookEntryClass` 的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
你可以在 Hook 入口类的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookAPI.configs {
|
||||
@@ -552,7 +582,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
elements(TAG, PRIORITY, PACKAGE_NAME, USER_ID)
|
||||
}
|
||||
isDebug = BuildConfig.DEBUG
|
||||
isEnableModulePrefsCache = true
|
||||
isEnablePrefsBridgeCache = true
|
||||
isEnableModuleAppResourcesCache = true
|
||||
isEnableHookModuleStatus = true
|
||||
isEnableHookSharedPreferences = false
|
||||
@@ -572,7 +602,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() = configs {
|
||||
debugLog {
|
||||
@@ -582,7 +612,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
elements(TAG, PRIORITY, PACKAGE_NAME, USER_ID)
|
||||
}
|
||||
isDebug = BuildConfig.DEBUG
|
||||
isEnableModulePrefsCache = true
|
||||
isEnablePrefsBridgeCache = true
|
||||
isEnableModuleAppResourcesCache = true
|
||||
isEnableHookModuleStatus = true
|
||||
isEnableHookSharedPreferences = false
|
||||
@@ -601,7 +631,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookLogger.Configs.tag = "YukiHookAPI"
|
||||
@@ -614,7 +644,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
YukiHookLogger.Configs.USER_ID
|
||||
)
|
||||
YukiHookAPI.Configs.isDebug = BuildConfig.DEBUG
|
||||
YukiHookAPI.Configs.isEnableModulePrefsCache = true
|
||||
YukiHookAPI.Configs.isEnablePrefsBridgeCache = true
|
||||
YukiHookAPI.Configs.isEnableModuleAppResourcesCache = true
|
||||
YukiHookAPI.Configs.isEnableHookModuleStatus = true
|
||||
YukiHookAPI.Configs.isEnableHookSharedPreferences = false
|
||||
|
@@ -0,0 +1,115 @@
|
||||
---
|
||||
pageClass: code-page
|
||||
---
|
||||
|
||||
::: warning
|
||||
|
||||
The English translation of this page has not been completed, you are welcome to contribute translations to us.
|
||||
|
||||
You can use the **Chrome Translation Plugin** to translate entire pages for reference.
|
||||
|
||||
:::
|
||||
|
||||
# ExecutorType <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
enum class ExecutorType
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> Hook Framework 类型定义。
|
||||
|
||||
定义了目前已知使用频率较高的 Hook Framework。
|
||||
|
||||
后期根据 Hook Framework 特征和使用情况将会继续添加新的类型。
|
||||
|
||||
无法识别的 Hook Framework 将被定义为 `UNKNOWN`。
|
||||
|
||||
## UNKNOWN <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
UNKNOWN
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 未知类型。
|
||||
|
||||
## XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
XPOSED
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 原版、第三方 Xposed。
|
||||
|
||||
## LSPOSED_LSPATCH <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
LSPOSED_LSPATCH
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> LSPosed、LSPatch。
|
||||
|
||||
## ED_XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
ED_XPOSED
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> EdXposed。
|
||||
|
||||
## TAICHI_XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
TAICHI_XPOSED
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> TaiChi (太极)。
|
||||
|
||||
## BUG_XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
BUG_XPOSED
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> BugXposed (应用转生)。
|
@@ -22,7 +22,7 @@ class NameRules private constructor()
|
||||
|
||||
`v1.1.0` `modified`
|
||||
|
||||
`NameConditions` 更名为 `NameRules`
|
||||
~~`NameConditions`~~ 更名为 `NameRules`
|
||||
|
||||
作为 lambda 整体判断条件使用
|
||||
|
||||
|
@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
# ConstructorFinder <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class ConstructorFinder internal constructor(override val hookInstance: YukiMemberHookCreator.MemberHookCreator?, override val classSet: Class<*>) : MemberBaseFinder
|
||||
class ConstructorFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -28,6 +28,10 @@ class ConstructorFinder internal constructor(override val hookInstance: YukiMemb
|
||||
|
||||
合并到 `MemberBaseFinder`
|
||||
|
||||
`v1.1.8` `modified`
|
||||
|
||||
移动 `hookInstance` 参数到 `MemberBaseFinder.MemberHookerManager`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `Constructor` 查找类。
|
||||
@@ -328,7 +332,7 @@ inner class Process internal constructor(internal val isNoSuch: Boolean, interna
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `Constructor` 查找结果处理类,为 `hookInstance` 提供。
|
||||
> `Constructor` 查找结果处理类,为 `hookManager` 提供。
|
||||
|
||||
### result <span class="symbol">- method</span>
|
||||
|
||||
@@ -372,7 +376,7 @@ fun all(): Process
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 设置全部查找条件匹配的多个 `Constructor` 实例结果到 `hookInstance`。
|
||||
> 设置全部查找条件匹配的多个 `Constructor` 实例结果到 `hookManager`。
|
||||
|
||||
### remedys <span class="symbol">- method</span>
|
||||
|
||||
@@ -723,7 +727,7 @@ fun ignored(): Result
|
||||
|
||||
> 忽略异常并停止打印任何错误日志。
|
||||
|
||||
若 `isNotIgnoredHookingFailure` 为 `false` 则自动忽略。
|
||||
若 `MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure` 为 `false` 则自动忽略。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -762,13 +766,17 @@ inner class Instance internal constructor(private val constructor: Constructor<*
|
||||
#### call <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun call(vararg param: Any?): Any?
|
||||
fun call(vararg args: Any?): Any?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.2` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Constructor` 创建目标实例,不指定目标实例类型。
|
||||
@@ -776,13 +784,17 @@ fun call(vararg param: Any?): Any?
|
||||
#### newInstance <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun <T> newInstance(vararg param: Any?): T?
|
||||
fun <T> newInstance(vararg args: Any?): T?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.2` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Constructor` 创建目标实例 ,指定 `T` 目标实例类型。
|
@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
# FieldFinder <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class FieldFinder internal constructor(override val hookInstance: YukiMemberHookCreator.MemberHookCreator?, override val classSet: Class<*>?) : MemberBaseFinder
|
||||
class FieldFinder internal constructor(override val classSet: Class<*>?) : MemberBaseFinder
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -28,6 +28,10 @@ class FieldFinder internal constructor(override val hookInstance: YukiMemberHook
|
||||
|
||||
合并到 `MemberBaseFinder`
|
||||
|
||||
`v1.1.8` `modified`
|
||||
|
||||
移动 `hookInstance` 参数到 `MemberBaseFinder.MemberHookerManager`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `Field` 查找类。
|
||||
@@ -582,7 +586,7 @@ fun ignored(): Result
|
||||
|
||||
> 忽略异常并停止打印任何错误日志。
|
||||
|
||||
若 `isNotIgnoredHookingFailure` 为 `false` 则自动忽略。
|
||||
若 `MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure` 为 `false` 则自动忽略。
|
||||
|
||||
::: warning
|
||||
|
||||
|
@@ -13,7 +13,7 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
# MethodFinder <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class MethodFinder internal constructor(override val hookInstance: YukiMemberHookCreator.MemberHookCreator?, override val classSet: Class<*>) : MemberBaseFinder
|
||||
class MethodFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -28,6 +28,10 @@ class MethodFinder internal constructor(override val hookInstance: YukiMemberHoo
|
||||
|
||||
合并到 `MemberBaseFinder`
|
||||
|
||||
`v1.1.8` `modified`
|
||||
|
||||
移动 `hookInstance` 参数到 `MemberBaseFinder.MemberHookerManager`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `Method` 查找类。
|
||||
@@ -472,7 +476,7 @@ inner class Process internal constructor(internal val isNoSuch: Boolean, interna
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `Method` 查找结果处理类,为 `hookInstance` 提供。
|
||||
> `Method` 查找结果处理类,为 `hookManager` 提供。
|
||||
|
||||
### result <span class="symbol">- method</span>
|
||||
|
||||
@@ -516,7 +520,7 @@ fun all(): Process
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 设置全部查找条件匹配的多个 `Method` 实例结果到 `hookInstance`。
|
||||
> 设置全部查找条件匹配的多个 `Method` 实例结果到 `hookManager`。
|
||||
|
||||
### remedys <span class="symbol">- method</span>
|
||||
|
||||
@@ -853,7 +857,7 @@ fun ignored(): Result
|
||||
|
||||
> 忽略异常并停止打印任何错误日志。
|
||||
|
||||
若 `isNotIgnoredHookingFailure` 为 `false` 则自动忽略。
|
||||
若 `MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure` 为 `false` 则自动忽略。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -914,13 +918,17 @@ fun original(): Instance
|
||||
#### call <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun call(vararg param: Any?): Any?
|
||||
fun call(vararg args: Any?): Any?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.2` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,不指定返回值类型。
|
||||
@@ -928,13 +936,17 @@ fun call(vararg param: Any?): Any?
|
||||
#### invoke <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun <T> invoke(vararg param: Any?): T?
|
||||
fun <T> invoke(vararg args: Any?): T?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.2` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 `T` 返回值类型。
|
||||
@@ -942,13 +954,17 @@ fun <T> invoke(vararg param: Any?): T?
|
||||
#### byte <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun byte(vararg param: Any?): Byte?
|
||||
fun byte(vararg args: Any?): Byte?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.68` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Byte 返回值类型。
|
||||
@@ -956,7 +972,7 @@ fun byte(vararg param: Any?): Byte?
|
||||
#### int <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun int(vararg param: Any?): Int
|
||||
fun int(vararg args: Any?): Int
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -967,6 +983,10 @@ fun int(vararg param: Any?): Int
|
||||
|
||||
修改 ~~`callInt`~~ 为 `int`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Int 返回值类型。
|
||||
@@ -974,7 +994,7 @@ fun int(vararg param: Any?): Int
|
||||
#### long <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun long(vararg param: Any?): Long
|
||||
fun long(vararg args: Any?): Long
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -985,6 +1005,10 @@ fun long(vararg param: Any?): Long
|
||||
|
||||
修改 ~~`callLong`~~ 为 `long`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Long 返回值类型。
|
||||
@@ -992,7 +1016,7 @@ fun long(vararg param: Any?): Long
|
||||
#### short <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun short(vararg param: Any?): Short
|
||||
fun short(vararg args: Any?): Short
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -1003,6 +1027,10 @@ fun short(vararg param: Any?): Short
|
||||
|
||||
修改 ~~`callShort`~~ 为 `short`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Short 返回值类型。
|
||||
@@ -1010,7 +1038,7 @@ fun short(vararg param: Any?): Short
|
||||
#### double <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun double(vararg param: Any?): Double
|
||||
fun double(vararg args: Any?): Double
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -1021,6 +1049,10 @@ fun double(vararg param: Any?): Double
|
||||
|
||||
修改 ~~`callDouble`~~ 为 `double`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Double 返回值类型。
|
||||
@@ -1028,7 +1060,7 @@ fun double(vararg param: Any?): Double
|
||||
#### float <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun float(vararg param: Any?): Float
|
||||
fun float(vararg args: Any?): Float
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -1039,6 +1071,10 @@ fun float(vararg param: Any?): Float
|
||||
|
||||
修改 ~~`callFloat`~~ 为 `float`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Float 返回值类型。
|
||||
@@ -1046,7 +1082,7 @@ fun float(vararg param: Any?): Float
|
||||
#### string <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun string(vararg param: Any?): String
|
||||
fun string(vararg args: Any?): String
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -1057,6 +1093,10 @@ fun string(vararg param: Any?): String
|
||||
|
||||
修改 ~~`callString`~~ 为 `string`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 String 返回值类型。
|
||||
@@ -1064,13 +1104,17 @@ fun string(vararg param: Any?): String
|
||||
#### char <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun char(vararg param: Any?): Char
|
||||
fun char(vararg args: Any?): Char
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.68` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Char 返回值类型。
|
||||
@@ -1078,7 +1122,7 @@ fun char(vararg param: Any?): Char
|
||||
#### boolean <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun boolean(vararg param: Any?): Boolean
|
||||
fun boolean(vararg args: Any?): Boolean
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -1089,6 +1133,10 @@ fun boolean(vararg param: Any?): Boolean
|
||||
|
||||
修改 ~~`callBoolean`~~ 为 `boolean`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Boolean 返回值类型。
|
||||
@@ -1096,13 +1144,17 @@ fun boolean(vararg param: Any?): Boolean
|
||||
### array <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> array(vararg param: Any?): Array<T>
|
||||
inline fun <reified T> array(vararg args: Any?): Array<T>
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.68` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 Array 返回值类型。
|
||||
@@ -1110,13 +1162,17 @@ inline fun <reified T> array(vararg param: Any?): Array<T>
|
||||
### list <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> list(vararg param: Any?): List<T>
|
||||
inline fun <reified T> list(vararg args: Any?): List<T>
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.68` `added`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 执行 `Method`,指定 List 返回值类型。
|
@@ -539,7 +539,7 @@ inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class
|
||||
我们要获取一个 `Class` 在 `Kotlin` 下不通过反射时应该这样做。
|
||||
|
||||
> The following example
|
||||
>
|
||||
|
||||
```kotlin
|
||||
DemoClass::class.java
|
||||
```
|
||||
@@ -909,11 +909,11 @@ inline fun <reified T : Any> T.current(ignored: Boolean, initiate: CurrentClass.
|
||||
## Class.buildOf <span class="symbol">- ext-method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditions): Any?
|
||||
inline fun Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): Any?
|
||||
```
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditions): T?
|
||||
inline fun <T> Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): T?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -928,6 +928,10 @@ inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditi
|
||||
|
||||
加入无泛型方法 `buildOf`
|
||||
|
||||
`v1.1.6` `modified`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 通过构造方法创建新实例,指定类型 `T` 或任意类型 `Any`。
|
||||
|
@@ -64,33 +64,45 @@ fun IYukiHookXposedInit.encase(vararg hooker: YukiBaseHooker)
|
||||
|
||||
> 在 `IYukiHookXposedInit` 中调用 `YukiHookAPI`。
|
||||
|
||||
## Context.modulePrefs <span class="symbol">- ext-field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val Context.modulePrefs: YukiHookModulePrefs
|
||||
```
|
||||
<h2 class="deprecated">Context.modulePrefs - ext-field</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 获取模块的存取对象。
|
||||
请转移到 `prefs` 方法
|
||||
|
||||
## Context.modulePrefs <span class="symbol">- ext-method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun Context.modulePrefs(name: String): YukiHookModulePrefs
|
||||
```
|
||||
<h2 class="deprecated">Context.modulePrefs - ext-method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
请转移到 `prefs` 方法
|
||||
|
||||
## Context.prefs <span class="symbol">- ext-method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun Context.prefs(name: String): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获取模块的存取对象,可设置 `name` 为自定义 Sp 存储名称。
|
||||
> 创建 `YukiHookPrefsBridge` 对象。
|
||||
|
||||
可以同时在模块与 (Xposed) 宿主环境中使用。
|
||||
|
||||
如果你想在 (Xposed) 宿主环境将数据存入当前宿主的私有空间,请使用 `YukiHookPrefsBridge.native` 方法。
|
||||
|
||||
在未声明任何条件的情况下 (Xposed) 宿主环境默认读取模块中的数据。
|
||||
|
||||
## Context.dataChannel <span class="symbol">- ext-method</span>
|
||||
|
||||
@@ -104,7 +116,7 @@ fun Context.dataChannel(packageName: String): YukiHookDataChannel.NameSpace
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获取模块的数据通讯桥命名空间对象。
|
||||
> 获取 `YukiHookDataChannel` 对象。
|
||||
|
||||
::: danger
|
||||
|
||||
|
@@ -94,6 +94,28 @@ val instance: Any
|
||||
|
||||
:::
|
||||
|
||||
如果你不确定当前实例的对象是否为 `null`,你可以使用 `instanceOrNull`。
|
||||
|
||||
## instanceOrNull <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val instanceOrNull: Any?
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.8` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获取当前 Hook 实例的对象。
|
||||
|
||||
::: danger
|
||||
|
||||
如果你当前 Hook 的对象是一个静态,那么它将不存在实例的对象。
|
||||
|
||||
:::
|
||||
|
||||
## instanceClass <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -313,6 +335,24 @@ inline fun <reified T> instance(): T
|
||||
instance<Activity>().finish()
|
||||
```
|
||||
|
||||
## instanceOrNull <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> instanceOrNull(): T?
|
||||
```
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
`v1.1.8` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获取当前 Hook 实例的对象 `T`。
|
||||
|
||||
**Function Example**
|
||||
|
||||
用法请参考 [instance](#instance-method) 方法。
|
||||
|
||||
## args <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
|
@@ -243,7 +243,7 @@ val moduleAppResources: YukiModuleResources
|
||||
## prefs <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val prefs: YukiHookModulePrefs
|
||||
val prefs: YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -252,7 +252,7 @@ val prefs: YukiHookModulePrefs
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获得当前使用的存取数据对象缓存实例。
|
||||
> 创建 `YukiHookPrefsBridge` 对象。
|
||||
|
||||
::: danger
|
||||
|
||||
@@ -263,7 +263,7 @@ val prefs: YukiHookModulePrefs
|
||||
## prefs <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun prefs(name: String): YukiHookModulePrefs
|
||||
fun prefs(name: String): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -276,7 +276,7 @@ fun prefs(name: String): YukiHookModulePrefs
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获得当前使用的存取数据对象缓存实例。
|
||||
> 创建 `YukiHookPrefsBridge` 对象。
|
||||
|
||||
你可以通过 `name` 来自定义 Sp 存储的名称。
|
||||
|
||||
@@ -298,7 +298,7 @@ val dataChannel: YukiHookDataChannel.NameSpace
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获得当前使用的数据通讯桥命名空间对象。
|
||||
> 获取 `YukiHookDataChannel` 对象。
|
||||
|
||||
::: danger
|
||||
|
||||
@@ -1151,10 +1151,18 @@ fun onConfigurationChanged(result: (self: Application, config: Configuration) ->
|
||||
fun registerReceiver(vararg action: String, result: (context: Context, intent: Intent) -> Unit)
|
||||
```
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun registerReceiver(filter: IntentFilter, result: (context: Context, intent: Intent) -> Unit)
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.88` `added`
|
||||
|
||||
`v1.1.8` `modified`
|
||||
|
||||
新增直接使用 `IntentFilter` 注册系统广播监听
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 注册系统广播监听。
|
@@ -18,6 +18,6 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Android` 相关组件的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Android` 相关组件的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.kt) 进行查看。
|
@@ -18,6 +18,6 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Android` 相关 `Graphics` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Graphics` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/GraphicsTypeFactory.kt) 进行查看。
|
@@ -18,6 +18,6 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Android` 相关 `Widget` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Widget` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ViewTypeFactory.kt) 进行查看。
|
@@ -18,6 +18,6 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Java` 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Java` 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/java/VariableTypeFactory.kt) 进行查看。
|
@@ -37,7 +37,7 @@ class YukiHookDataChannel private constructor()
|
||||
## NameSpace <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String, private val isSecure: Boolean)
|
||||
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String)
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -48,6 +48,10 @@ inner class NameSpace internal constructor(private val context: Context?, privat
|
||||
|
||||
新增 `isSecure` 参数
|
||||
|
||||
`v1.1.9` `modified`
|
||||
|
||||
移除 `isSecure` 参数
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `YukiHookDataChannel` 命名空间。
|
||||
@@ -66,17 +70,73 @@ inline fun with(initiate: NameSpace.() -> Unit): NameSpace
|
||||
|
||||
> 创建一个调用空间。
|
||||
|
||||
### dataMaxByteSize <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var dataMaxByteSize: Int
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `YukiHookDataChannel` 允许发送的最大数据字节大小。
|
||||
|
||||
默认为 `500 KB (500 * 1024)`,详情请参考 `receiverDataMaxByteSize` 的注释。
|
||||
|
||||
最小不能低于 `100 KB (100 * 1024)`,否则会被重新设置为 `100 KB (100 * 1024)`。
|
||||
|
||||
设置后将在全局生效,直到当前进程结束。
|
||||
|
||||
超出最大数据字节大小后的数据将被自动分段发送。
|
||||
|
||||
::: danger
|
||||
|
||||
请谨慎调整此参数,如果超出了系统能够允许的大小会引发 **TransactionTooLargeException** 异常。
|
||||
|
||||
:::
|
||||
|
||||
### dataMaxByteCompressionFactor <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var dataMaxByteCompressionFactor: Int
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `YukiHookDataChannel` 允许发送的最大数据字节大小倍数 (分段数据)。
|
||||
|
||||
默认为 `3`,详情请参考 `receiverDataMaxByteCompressionFactor` 的注释。
|
||||
|
||||
最小不能低于 `2`,否则会被重新设置为 `2`。
|
||||
|
||||
设置后将在全局生效,直到当前进程结束。
|
||||
|
||||
超出最大数据字节大小后的数据将按照此倍数自动划分 `receiverDataMaxByteSize` 的大小。
|
||||
|
||||
::: danger
|
||||
|
||||
请谨慎调整此参数,如果超出了系统能够允许的大小会引发 **TransactionTooLargeException** 异常。
|
||||
|
||||
:::
|
||||
|
||||
### allowSendTooLargeData <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun allowSendTooLargeData(): NameSpace
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
**Change Records**
|
||||
|
||||
`v1.1.5` `added`
|
||||
|
||||
**功能描述**
|
||||
**Function Illustrate**
|
||||
|
||||
> 解除发送数据的大小限制并禁止开启分段发送功能。
|
||||
|
||||
@@ -220,6 +280,6 @@ fun obtainLoggerInMemoryData(priority: ChannelPriority?, result: (ArrayList<Yuki
|
||||
|
||||
模块与宿主必须启用 [YukiHookLogger.Configs.isRecord](../../log/LoggerFactory#isrecord-field) 才能获取到调试日志数据。
|
||||
|
||||
由于 Android 限制了数据传输大小的最大值,如果调试日志过多可能会造成 **TransactionTooLargeException** 异常。
|
||||
由于 Android 限制了数据传输大小的最大值,如果调试日志过多将会自动进行分段发送,数据越大速度越慢。
|
||||
|
||||
:::
|
@@ -26,4 +26,26 @@ open class ModuleAppActivity : Activity()
|
||||
|
||||
继承于此类的 `Activity` 可以同时在宿主与模块中启动。
|
||||
|
||||
在 (Xposed) 宿主环境需要在宿主启动时调用 `Context.registerModuleAppActivities` 进行注册。
|
||||
在 (Xposed) 宿主环境需要在宿主启动时调用 `Context.registerModuleAppActivities` 进行注册。
|
||||
|
||||
## proxyClassName <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
open val proxyClassName: String
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.10` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 设置当前代理的 `Activity` 类名。
|
||||
|
||||
留空则使用 `Context.registerModuleAppActivities` 时设置的类名
|
||||
|
||||
::: danger
|
||||
|
||||
代理的 **Activity** 类名必须存在于宿主的 AndroidMainifest 清单中。
|
||||
|
||||
:::
|
@@ -42,4 +42,26 @@ open val moduleTheme: Int
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 设置当前代理的 `Activity` 主题。
|
||||
> 设置当前代理的 `Activity` 主题。
|
||||
|
||||
## proxyClassName <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
open val proxyClassName: String
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.10` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 设置当前代理的 `Activity` 类名。
|
||||
|
||||
留空则使用 `Context.registerModuleAppActivities` 时设置的类名
|
||||
|
||||
::: danger
|
||||
|
||||
代理的 **Activity** 类名必须存在于宿主的 AndroidMainifest 清单中。
|
||||
|
||||
:::
|
@@ -10,25 +10,29 @@ You can use the **Chrome Translation Plugin** to translate entire pages for refe
|
||||
|
||||
:::
|
||||
|
||||
# YukiHookModulePrefs <span class="symbol">- class</span>
|
||||
# YukiHookPrefsBridge <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class YukiHookModulePrefs private constructor(private var context: Context?)
|
||||
class YukiHookPrefsBridge private constructor(private var context: Context?)
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
`v1.1.9` `modified`
|
||||
|
||||
~~`YukiHookModulePrefs`~~ 更名为 `YukiHookPrefsBridge`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 实现 Xposed 模块的数据存取,对接 `SharedPreferences` 和 `XSharedPreferences`。
|
||||
> `YukiHookAPI` 对 `SharedPreferences`、`XSharedPreferences` 的扩展存储桥实现。
|
||||
|
||||
在不同环境智能选择存取使用的对象。
|
||||
|
||||
::: danger
|
||||
|
||||
此功能为实验性功能,仅在 LSPosed 环境测试通过,EdXposed 理论也可以使用但不再推荐。
|
||||
模块与宿主之前共享数据存储为实验性功能,仅在 LSPosed 环境测试通过,EdXposed 理论也可以使用但不再推荐。
|
||||
|
||||
:::
|
||||
|
||||
@@ -42,13 +46,7 @@ class YukiHookModulePrefs private constructor(private var context: Context?)
|
||||
|
||||
太极请参阅 [文件权限/配置/XSharedPreference](https://taichi.cool/zh/doc/for-xposed-dev.html#文件权限-配置-xsharedpreference)。
|
||||
|
||||
::: danger
|
||||
|
||||
当你在 Xposed 模块中存取数据的时候 **context** 必须不能是空的。
|
||||
|
||||
:::
|
||||
|
||||
若你正在使用 `PreferenceFragmentCompat`,请迁移到 `ModulePreferenceFragment` 以适配上述功能特性。
|
||||
对于在模块环境中使用 `PreferenceFragmentCompat`,`YukiHookAPI` 提供了 `ModulePreferenceFragment` 来实现同样的功能。
|
||||
|
||||
**Optional Configuration**
|
||||
|
||||
@@ -96,7 +94,7 @@ val isPreferencesAvailable: Boolean
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 获取当前 `YukiHookModulePrefs` 的可用状态。
|
||||
> 获取当前 `YukiHookPrefsBridge` 的可用状态。
|
||||
|
||||
在 (Xposed) 宿主环境中返回 `XSharedPreferences` 可用状态 (可读)。
|
||||
|
||||
@@ -105,7 +103,7 @@ val isPreferencesAvailable: Boolean
|
||||
## name <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun name(name: String): YukiHookModulePrefs
|
||||
fun name(name: String): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -123,7 +121,7 @@ fun name(name: String): YukiHookModulePrefs
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
modulePrefs("custom_name").getString("custom_key")
|
||||
prefs("custom_name").getString("custom_key")
|
||||
```
|
||||
|
||||
在 (Xposed) 宿主环境 `PackageParam` 中的使用方法。
|
||||
@@ -137,7 +135,7 @@ prefs("custom_name").getString("custom_key")
|
||||
## direct <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun direct(): YukiHookModulePrefs
|
||||
fun direct(): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
@@ -148,10 +146,24 @@ fun direct(): YukiHookModulePrefs
|
||||
|
||||
> 忽略缓存直接读取键值。
|
||||
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnableModulePrefsCache`。
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnablePrefsBridgeCache`。
|
||||
|
||||
仅在 `XSharedPreferences` 下生效。
|
||||
|
||||
## native <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun native(): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 忽略当前环境直接使用 `Context.getSharedPreferences` 存取数据。
|
||||
|
||||
## getString <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -236,6 +248,22 @@ fun getFloat(key: String, value: Float): Float
|
||||
|
||||
> 获取 `Float` 键值。
|
||||
|
||||
## contains <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun contains(key: String): Boolean
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 判断当前是否包含 `key` 键值的数据。
|
||||
|
||||
智能识别对应环境读取键值数据。
|
||||
|
||||
## all <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -258,185 +286,85 @@ fun all(): HashMap<String, Any?>
|
||||
|
||||
:::
|
||||
|
||||
## remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun remove(key: String)
|
||||
```
|
||||
<h2 class="deprecated">remove - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 移除全部包含 `key` 的存储数据。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> remove(prefs: PrefsData<T>)
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.67` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 移除 `PrefsData.key` 的存储数据。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## clear <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun clear()
|
||||
```
|
||||
<h2 class="deprecated">clear - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.77` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 移除全部存储数据。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putString <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putString(key: String, value: String)
|
||||
```
|
||||
<h2 class="deprecated">putString - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 存储 `String` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putStringSet <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putStringSet(key: String, value: Set<String>)
|
||||
```
|
||||
<h2 class="deprecated">putStringSet - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.77` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 存储 `Set<String>` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putBoolean <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putBoolean(key: String, value: Boolean)
|
||||
```
|
||||
<h2 class="deprecated">putBoolean - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 存储 `Boolean` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putInt <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putInt(key: String, value: Int)
|
||||
```
|
||||
<h2 class="deprecated">putInt - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 存储 `Int` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putLong <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putLong(key: String, value: Long)
|
||||
```
|
||||
<h2 class="deprecated">putLong - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 存储 `Long` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putFloat <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putFloat(key: String, value: Float)
|
||||
```
|
||||
<h2 class="deprecated">putFloat - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0` `first`
|
||||
|
||||
**Function Illustrate**
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
> 存储 `Float` 键值。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
请转移到 `edit` 方法
|
||||
|
||||
## get <span class="symbol">- method</span>
|
||||
|
||||
@@ -452,19 +380,55 @@ inline fun <reified T> get(prefs: PrefsData<T>, value: T): T
|
||||
|
||||
> 智能获取指定类型的键值。
|
||||
|
||||
## put <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> put(prefs: PrefsData<T>, value: T)
|
||||
```
|
||||
<h2 class="deprecated">put - method</h2>
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.0.67` `added`
|
||||
|
||||
`v1.1.9` `deprecated`
|
||||
|
||||
请转移到 `edit` 方法
|
||||
|
||||
## edit <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun edit(): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 智能存储指定类型的键值。
|
||||
> 创建新的 `Editor`。
|
||||
|
||||
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## edit <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun edit(initiate: Editor.() -> Unit)
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 创建新的 `Editor`。
|
||||
|
||||
自动调用 `Editor.apply` 方法。
|
||||
|
||||
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -484,12 +448,200 @@ fun clearCache()
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 清除 `XSharedPreferences` 中缓存的键值数据。
|
||||
> 清除 `YukiHookPrefsBridge` 中缓存的键值数据。
|
||||
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnableModulePrefsCache`。
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnablePrefsBridgeCache`。
|
||||
|
||||
调用此方法将清除当前存储的全部键值缓存。
|
||||
|
||||
下次将从 `XSharedPreferences` 重新读取。
|
||||
## Editor <span class="symbol">- class</span>
|
||||
|
||||
在 (Xposed) 宿主环境中使用。
|
||||
```kotlin:no-line-numbers
|
||||
inner class Editor internal constructor()
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> `YukiHookPrefsBridge` 的存储代理类。
|
||||
|
||||
请使用 `edit` 方法来获取 `Editor`。
|
||||
|
||||
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
### remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun remove(key: String): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 移除全部包含 `key` 的存储数据。
|
||||
|
||||
### remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> remove(prefs: PrefsData<T>): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 移除 `PrefsData.key` 的存储数据。
|
||||
|
||||
### clear <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun clear(): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 移除全部存储数据。
|
||||
|
||||
### putString <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putString(key: String, value: String): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 存储 `String` 键值。
|
||||
|
||||
### putStringSet <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putStringSet(key: String, value: Set<String>): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 存储 `Set<String>` 键值。
|
||||
|
||||
### putBoolean <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putBoolean(key: String, value: Boolean): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 存储 `Boolean` 键值。
|
||||
|
||||
### putInt <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putInt(key: String, value: Int): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 存储 `Int` 键值。
|
||||
|
||||
### putLong <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putLong(key: String, value: Long): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 存储 `Long` 键值。
|
||||
|
||||
### putFloat <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putFloat(key: String, value: Float): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 存储 `Float` 键值。
|
||||
|
||||
### put <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> put(prefs: PrefsData<T>, value: T): Editor
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 智能存储指定类型的键值。
|
||||
|
||||
### commit <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun commit(): Boolean
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 提交更改 (同步)。
|
||||
|
||||
### apply <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun apply()
|
||||
```
|
||||
|
||||
**Change Records**
|
||||
|
||||
`v1.1.9` `added`
|
||||
|
||||
**Function Illustrate**
|
||||
|
||||
> 提交更改 (异步)。
|
@@ -28,7 +28,7 @@ data class PrefsData<T>(var key: String, var value: T) : Serializable
|
||||
|
||||
> 键值对存储构造类。
|
||||
|
||||
这个类是对 `YukiHookModulePrefs` 的一个扩展用法。
|
||||
这个类是对 `YukiHookPrefsBridge` 的一个扩展用法。
|
||||
|
||||
**Function Example**
|
||||
|
||||
@@ -51,9 +51,9 @@ object DataConst {
|
||||
|
||||
```kotlin
|
||||
// 读取
|
||||
val data = modulePrefs.get(DataConst.TEST_KV_DATA_1)
|
||||
val data = prefs().get(DataConst.TEST_KV_DATA_1)
|
||||
// 写入
|
||||
modulePrefs.put(DataConst.TEST_KV_DATA_1, "written value")
|
||||
prefs().edit { put(DataConst.TEST_KV_DATA_1, "written value") }
|
||||
```
|
||||
|
||||
> 宿主示例如下
|
||||
|
@@ -193,6 +193,28 @@ val context: Context = ... // Assume this is your Context
|
||||
context.startActivity(context, HostTestActivity::class.java)
|
||||
```
|
||||
|
||||
The `proxy` parameter we set in the `registerModuleAppActivities` method above is the default global proxy `Activity`.
|
||||
|
||||
If you need to specify a delegated `Activity` to use another Host App's `Activity` as a proxy, you can refer to the following method.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HostTestActivity : ModuleAppActivity() {
|
||||
|
||||
// Specify an additional proxy Activity class name
|
||||
// Which must also exist in the Host App's AndroidManifest
|
||||
override val proxyClassName get() = "com.demo.test.activity.OtherActivity"
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
// Module App's Resources have been injected automatically
|
||||
// You can directly use xml to load the layout
|
||||
setContentView(R. layout. activity_main)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
For more functions, please refer to the [Context.registerModuleAppActivities](../public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory#context-registermoduleappactivities-ext-method) method.
|
||||
|
@@ -48,7 +48,7 @@ For example we only use `android.util.Log` to print logs.
|
||||
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.LOGD)
|
||||
```
|
||||
|
||||
Or just use `XposedBridge.log` to print the log, this method can only be used in the (Xposed) Host environment.
|
||||
Or just use the log function that in the (Xposed) Host environment to print the log, this method can only be used in the (Xposed) Host environment.
|
||||
|
||||
> The following example
|
||||
|
||||
|
@@ -2,6 +2,12 @@
|
||||
|
||||
> `YukiHookAPI` encapsulates a set of reflection API with near-zero reflection writing for developers, which can almost completely replace the usage of reflection API in Java.
|
||||
|
||||
The core part of this functionality has been decoupled into the [YukiReflection](https://github.com/fankes/YukiReflection) project, which can be used independently in any Android project.
|
||||
|
||||
Now `YukiReflection` is integrated into `YukiHookAPI` as a core dependency.
|
||||
|
||||
`YukiHookAPI` adds related extensions for Hook functions on the basis of `YukiReflection`, and there is no need to introduce this dependency to use `YukiHookAPI`.
|
||||
|
||||
## Class Extensions
|
||||
|
||||
> Here are the extension functions related to the **Class** object itself.
|
||||
@@ -892,7 +898,7 @@ By observing that there are two methods named `b` in `Class`, you can use the fo
|
||||
```kotlin
|
||||
// Assume this is an instance of this Class
|
||||
val instance = Test()
|
||||
// Call and execute using YukiHook API
|
||||
// Call and execute using YukiHookAPI
|
||||
Test::class.java.method {
|
||||
name = "b"
|
||||
}.all(instance).forEach { instance ->
|
||||
|
@@ -192,7 +192,7 @@ A callback event with the same **key** will only call back the callback event re
|
||||
|
||||
The same **key** registers **dataChannel** in the same **Activity** but different **Fragment**, they will still be called back in the current **Activity** at the same time.
|
||||
|
||||
In a Module App, you can only use **Context** of **Activity** to register **dataChannel**, you cannot use **dataChannel** in **Application** and **Service**.
|
||||
In a Module App, you can use **dataChannel** in **Activity**, **Application** and **Service**, when used in places other than **Activity**, each callback event will instant callback, at which point you can use **ChannelPriority** to manage.
|
||||
|
||||
If you want to use **dataChannel** in **Fragment**, use **activity?.dataChannel(...)**.
|
||||
|
||||
@@ -259,7 +259,7 @@ class FragmentB : BaseFragment() {
|
||||
|
||||
## Security Instructions
|
||||
|
||||
In the Module environment, you can only receive the communication data sent by <u>**the Host App of the specified package name**</u> and can only send to <u>**the Host App of the specified package name**</u>, except for System Framework.
|
||||
In the module environment, you can only receive the communication data sent by <u>**the Host App of the specified package name**</u> and can only send to <u>**the Host App of the specified package name**</u>, except for System Framework.
|
||||
|
||||
::: danger
|
||||
|
||||
|
@@ -10,7 +10,7 @@ The native `Xposed` provides us with a `XSharedPreferences` for reading the `Sp`
|
||||
|
||||
## Use in Activity
|
||||
|
||||
> Loading `YukiHookModulePrefs` in `Activity` is described here.
|
||||
> Loading `YukiHookPrefsBridge` in `Activity` is described here.
|
||||
|
||||
Usually we can initialize it in Host App like this.
|
||||
|
||||
@@ -29,7 +29,7 @@ When you store data in a Module App, you can use the following methods if you ar
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
modulePrefs.putString("test_name", "saved_value")
|
||||
prefs().edit { putString("test_name", "saved_value") }
|
||||
```
|
||||
|
||||
When you read data in a Host App, you can use the following methods.
|
||||
@@ -40,7 +40,7 @@ When you read data in a Host App, you can use the following methods.
|
||||
val testName = prefs.getString("test_name", "default_value")
|
||||
```
|
||||
|
||||
You don't need to consider the module package name and a series of complicated permission configurations, everything is handled by `YukiHookModulePrefs`.
|
||||
You don't need to consider the module package name and a series of complicated permission configurations, everything is handled by `YukiHookPrefsBridge`.
|
||||
|
||||
To achieve localization of storage, you can specify the name of each `prefs` file.
|
||||
|
||||
@@ -50,9 +50,9 @@ This is used in the `Activity` of the Module App.
|
||||
|
||||
```kotlin
|
||||
// Recommended usage
|
||||
modulePrefs("specify_file_name").putString("test_name", "saved_value")
|
||||
prefs("specify_file_name").edit { putString("test_name", "saved_value") }
|
||||
// Can also be used like this
|
||||
modulePrefs.name("specify_file_name").putString("test_name", "saved_value")
|
||||
prefs().name("specify_file_name").edit { putString("test_name", "saved_value") }
|
||||
```
|
||||
|
||||
Read like this in Host App.
|
||||
@@ -68,21 +68,40 @@ val testName = prefs.name("specify_file_name").getString("test_name", "default_v
|
||||
|
||||
If your project has a lot of fixed data that needs to be stored and read, it is recommended to use `PrefsData` to create templates.
|
||||
|
||||
Through the above example, you can call the `edit` method to store data in batches in the following two ways.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
// <Scenario 1>
|
||||
prefs().edit {
|
||||
putString("test_name_1", "saved_value_1")
|
||||
putString("test_name_2", "saved_value_2")
|
||||
putString("test_name_3", "saved_value_3")
|
||||
}
|
||||
// <Scenario 2>
|
||||
prefs(). edit()
|
||||
.putString("test_name_1", "saved_value_1")
|
||||
.putString("test_name_2", "saved_value_2")
|
||||
.putString("test_name_3", "saved_value_3")
|
||||
.apply()
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
For more functions, please refer to [YukiHookModulePrefs](../public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookModulePrefs), [PrefsData](../public/com/highcapable/yukihookapi/hook/xposed/prefs/data/PrefsData).
|
||||
For more functions, please refer to [YukiHookPrefsBridge](../public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge), [PrefsData](../public/com/highcapable/yukihookapi/hook/xposed/prefs/data/PrefsData).
|
||||
|
||||
:::
|
||||
|
||||
## Use in PreferenceFragment
|
||||
|
||||
> Loading `YukiHookModulePrefs` in `PreferenceFragment` is described here.
|
||||
> Loading `YukiHookPrefsBridge` in `PreferenceFragment` is described here.
|
||||
|
||||
If your Module App uses `PreferenceFragmentCompat`, you can now start migrating its extends `ModulePreferenceFragment`.
|
||||
|
||||
::: danger
|
||||
|
||||
You must extends **ModulePreferenceFragment** to implement the module storage function of **YukiHookModulePrefs**.
|
||||
You must extends **ModulePreferenceFragment** to implement the module storage function of **YukiHookPrefsBridge**.
|
||||
|
||||
:::
|
||||
|
||||
@@ -90,4 +109,50 @@ You must extends **ModulePreferenceFragment** to implement the module storage fu
|
||||
|
||||
For more functions, please refer to [ModulePreferenceFragment](../public/com/highcapable/yukihookapi/hook/xposed/prefs/ui/ModulePreferenceFragment).
|
||||
|
||||
:::
|
||||
|
||||
## Use Native Storage
|
||||
|
||||
In the Module environment, `YukiHookPrefsBridge` will store data in the Module App's own private directory (or the shared directory provided by Hook Framework) by default.
|
||||
|
||||
Using `YukiHookPrefsBridge` in the Host environment will read the data in the Module App's own private directory (or the shared directory provided by Hook Framework) by default.
|
||||
|
||||
If you want to store data directly into a Module App or Host App's own private directory, you can use the `native` method.
|
||||
|
||||
For example, the directory of the Module App is `.../com.demo.test.module/shared_prefs`, and the directory of the Host App is `.../com.demo.test.host/shared_prefs`.
|
||||
|
||||
The following is the usage in `Activity`.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
// Store private data
|
||||
prefs().native().edit { putBoolean("isolation_data", true) }
|
||||
// Read private data
|
||||
val privateData = prefs().native().getBoolean("isolation_data")
|
||||
// Store shared data
|
||||
prefs().edit { putBoolean("public_data", true) }
|
||||
// Read shared data
|
||||
val publicData = prefs().getBoolean("public_data")
|
||||
```
|
||||
|
||||
The following is the usage in `PackageParam`.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
// Store private data
|
||||
prefs.native().edit { putBoolean("isolation_data", true) }
|
||||
// Read private data
|
||||
val privateData = prefs.native().getBoolean("isolation_data")
|
||||
// Read shared data
|
||||
val publicData = prefs.getBoolean("public_data")
|
||||
```
|
||||
|
||||
After using the `native` method, no matter in `Activity` or `PackageParam`, the data <u>**will be stored and read in the private directory of the corresponding environment**</u>, and the data will be isolated from each other.
|
||||
|
||||
::: tip
|
||||
|
||||
For more functions, please refer to [YukiHookPrefsBridge](../public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge).
|
||||
|
||||
:::
|
@@ -105,7 +105,7 @@ object CustomHooker : YukiBaseHooker() {
|
||||
}
|
||||
```
|
||||
|
||||
Child Hooker **recommended** singleton `object` creation, you can also use `class` but not recommended.
|
||||
Child Hooker **recommended** to use singleton `object` to create, you can also use `class` but it is generally not recommended.
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -138,7 +138,7 @@ As a child hooker, you can also call the `loadApp` method externally, and then d
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadApp(name = "com.example.demo", ChildCustomHooker)
|
||||
@@ -172,12 +172,12 @@ object FirstHooker : YukiBaseHooker() {
|
||||
}
|
||||
```
|
||||
|
||||
Once all Hookers are set up, you can load your Hooker in the `onHook` method of your `HookEntryClass`.
|
||||
Once all Hookers are set up, you can load your Hooker in the `onHook` method of your Hook entry class.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() =
|
||||
YukiHookAPI.encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
@@ -189,12 +189,39 @@ Of course, we can also abbreviate it.
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
}
|
||||
```
|
||||
|
||||
#### Special Case
|
||||
|
||||
As we mentioned above, it is generally not recommended to use `class` to create child Hookers, but there is a special case where it may still be necessary to keep your Hooker supporting multiple instantiations.
|
||||
|
||||
There is a rare possibility that there are multiple package names in a process.
|
||||
|
||||
In this case, when `YukiHookAPI` finds that the child Hooker is a singleton, it will ignore it and print a warning message.
|
||||
|
||||
```: no-line-numbers
|
||||
This Hooker "HOOKER" is singleton or reused, but the current process has multiple package name "NAME", the original is "NAME"
|
||||
Make sure your Hooker supports multiple instances for this situation
|
||||
The process with package name "NAME" will be ignored
|
||||
```
|
||||
|
||||
In this case, we only need to modify `object` to `class` or determine the package name during loading and then load the child Hooker.
|
||||
|
||||
For example, in the above cases, the following forms can be used to load.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
encase {
|
||||
// Assume this is the app package name and child Hooker you need to load
|
||||
loadApp("com.example.demo", YourCustomHooker)
|
||||
}
|
||||
```
|
||||
|
||||
### Expansion Features
|
||||
|
||||
If your current Hook Framework supports and enables the Resources Hook feature, you can now create Resources Hooks directly in `encase`.
|
||||
@@ -285,7 +312,7 @@ encase {
|
||||
> Sample Code 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
// <Scenario 1>
|
||||
@@ -344,7 +371,7 @@ encase {
|
||||
> Sample Code 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
encase(CustomHooker)
|
||||
|
@@ -43,7 +43,7 @@ You try to load the `encase` method in the `onInit` or `onXposedEvent` method of
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// ❗ Wrong usage
|
||||
@@ -72,7 +72,7 @@ Please load the `encase` method in the `onHook` method.
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// Only the configs method can be loaded here
|
||||
@@ -130,7 +130,7 @@ Usually, this kind of error does not happen easily. If this error occurs, you ca
|
||||
|
||||
::: danger loggerE
|
||||
|
||||
YukiHookAPI try to load HookEntryClass failed
|
||||
YukiHookAPI try to load hook entry class failed
|
||||
|
||||
:::
|
||||
|
||||
@@ -1075,55 +1075,6 @@ Please make sure you have loaded the `encase` method of `YukiHookAPI` in the cor
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger RuntimeException
|
||||
|
||||
!!!DO NOT ALLOWED!!! You cannot hook or reflection to call the internal class of the YukiHookAPI itself, The called class is \[**CLASS**\]
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
You have invoked the `Class` object of the API itself using `YukiHookAPI` related reflection or Hook function.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
// <Scenario 1>
|
||||
YukiHookAPI.current()
|
||||
// <Scenario 2>
|
||||
PackageParam::class.java.hook {
|
||||
// ...
|
||||
}
|
||||
// <Scenario 3>
|
||||
MethodFinder::class.java.method {
|
||||
name = "name"
|
||||
param(StringClass)
|
||||
}.get().call("name")
|
||||
// ...
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
Please check the code section for errors, such as the case below.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
YourClass.method {
|
||||
// ...
|
||||
// ❗ The method execution is not called
|
||||
// The actual method is called here is the MethodFinder.Result object
|
||||
}.get(instance).current()
|
||||
YourClass.method {
|
||||
// ...
|
||||
// ✅ The correct way to use it, assuming this method has no parameters
|
||||
}.get(instance).call().current()
|
||||
```
|
||||
|
||||
Inlining, reflection, Hook `YukiHookAPI`'s own `Class` and internal functions are not allowed to prevent errors.
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger UnsupportedOperationException
|
||||
|
||||
!!!DANGEROUS!!! Hook \[**CLASS**\] Class is a dangerous behavior! \[**CONTENT**\] \[**SOLVE**\]
|
||||
@@ -1275,13 +1226,13 @@ This situation basically does not exist, because `appContext` is assigned in `on
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
YukiHookModulePrefs not allowed in Custom Hook API
|
||||
YukiHookPrefsBridge not allowed in Custom Hook API
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
`YukiHookModulePrefs` is used in Hook's own app (not Xposed Module).
|
||||
`YukiHookPrefsBridge` is used in Hook's own app (not Xposed Module).
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -1300,7 +1251,7 @@ class MyApplication : Application() {
|
||||
|
||||
**Solution**
|
||||
|
||||
You can only use `YukiHookModulePrefs` when [Use as Xposed Module Configs](../config/xposed-using), please use the native `Sp` storage in the Hook's own app.
|
||||
You can only use `YukiHookPrefsBridge` when [Use as Xposed Module Configs](../config/xposed-using), please use the native `Sp` storage in the Hook's own app.
|
||||
|
||||
###### exception
|
||||
|
||||
@@ -1312,7 +1263,7 @@ Cannot load the XSharedPreferences, maybe is your Hook Framework not support it
|
||||
|
||||
**Abnormal**
|
||||
|
||||
Using `YukiHookModulePrefs` in (Xposed) Host environment but unable to get `XSharedPreferences` object.
|
||||
Using `YukiHookPrefsBridge` in (Xposed) Host environment but unable to get `XSharedPreferences` object.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -1366,29 +1317,13 @@ You can only use `YukiHookDataChannel` when [Use as Xposed Module Configs](../co
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
YukiHookDataChannel only support used on an Activity, but this current context is "**CLASSNAME**"
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
`YukiHookDataChannel` is used in a non-`Activity` context of a Module App.
|
||||
|
||||
**Solution**
|
||||
|
||||
You can only use `YukiHookDataChannel` in `Activity` or `Fragment`.
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
Xposed modulePackageName load failed, please reset and rebuild it
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
When using `YukiHookModulePrefs` or `YukiHookDataChannel` in the Hook process, the `modulePackageName` at load time cannot be read, resulting in the package name of the own Module App cannot be determined.
|
||||
When using `YYukiHookPrefsBridge` or `YukiHookDataChannel` in the Hook process, the `modulePackageName` at load time cannot be read, resulting in the package name of the own Module App cannot be determined.
|
||||
|
||||
**Solution**
|
||||
|
||||
@@ -1398,13 +1333,13 @@ Please read the help document [here](../config/xposed-using#modulepackagename-pa
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
YukiHookModulePrefs missing Context instance
|
||||
YukiHookPrefsBridge missing Context instance
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
`YukiHookModulePrefs` is used in the Module App to store data but no `Context` instance is passed in.
|
||||
`YukiHookPrefsBridge` is used in the Module App to store data but no `Context` instance is passed in.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -1415,14 +1350,14 @@ class MainActivity : AppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
// ❗ Wrong usage
|
||||
// Constructor has been set to private in API 1.0.88 and later
|
||||
YukiHookModulePrefs().getBoolean("test_data")
|
||||
YukiHookPrefsBridge().getBoolean("test_data")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
It is recommended to use the `modulePrefs` method to load `YukiHookModulePrefs` in `Activity`.
|
||||
It is recommended to use the `prefs(...)` method to load `YukiHookPrefsBridge` in `Activity`.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -1432,7 +1367,7 @@ class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
// ✅ Correct usage
|
||||
modulePrefs.getBoolean("test_data")
|
||||
prefs().getBoolean("test_data")
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1441,17 +1376,42 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
The Host App's Context has not yet initialized successfully, the native function cannot be used at this time
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
In the (Xposed) Host environment `PackageParam`, `YukiHookPrefsBridge` is used and the `native` method is called, but the lifecycle of the Host App is not initialized at this time.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
encase {
|
||||
// This method was called
|
||||
prefs.native()
|
||||
}
|
||||
```
|
||||
|
||||
**Solution**
|
||||
|
||||
The `native` method requires an existing `Context` object to store data in, and you can use this method in listening to the Host App lifecycle state.
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
Key-Value type **TYPE** is not allowed
|
||||
|
||||
:::
|
||||
|
||||
**Abnormal**
|
||||
|
||||
An unsupported storage type was passed in when using the `get` or `put` methods of `YukiHookModulePrefs` or the `wait` or `put` methods of `YukiHookDataChannel`.
|
||||
An unsupported storage type was passed in when using the `get` or `put` methods of `YukiHookPrefsBridge` or the `wait` or `put` methods of `YukiHookDataChannel`.
|
||||
|
||||
**Solution**
|
||||
|
||||
The supported types of `YukiHookModulePrefs` are only `String`, `Set<String>`, `Int`, `Float`, `Long`, `Boolean`, please pass in the supported types.
|
||||
The supported types of `YukiHookPrefsBridge` are only `String`, `Set<String>`, `Int`, `Float`, `Long`, `Boolean`, please pass in the supported types.
|
||||
|
||||
The supported types of `YukiHookDataChannel` are the types restricted by `Intent.putExtra`, please pass in the supported types.
|
||||
|
||||
|
@@ -236,9 +236,21 @@ class _YukiHookXposedInit : IXposedHookZygoteInit, IXposedHookLoadPackage {
|
||||
}
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
Since the Xposed entry class is dynamically generated by **YukiHookAPI**, it will generate the following two files at the same time.
|
||||
|
||||
- **assets/xposed_init**
|
||||
|
||||
- **resources/META-INF/yukihookapi_init**
|
||||
|
||||
If you are using **Git** code control system, you can add these two files to **.gitignore** file.
|
||||
|
||||
:::
|
||||
|
||||
### IYukiHookXposedInit Interface
|
||||
|
||||
The `IYukiHookXposedInit` interface that your `HookEntryClass` must implements it, which is the entry point for your Module App to start hooking.
|
||||
The `IYukiHookXposedInit` interface that your Hook entry class must implements it, which is the entry point for your Module App to start hooking.
|
||||
|
||||
::: tip
|
||||
|
||||
|
@@ -618,13 +618,19 @@ override fun onHook() = encase {
|
||||
}
|
||||
```
|
||||
|
||||
## Xposed Module own Active State
|
||||
## Xposed Module Status
|
||||
|
||||
Usually, we choose to write a method that return `false`, and then Hook this method to return `true` to prove that the Hook has taken effect.
|
||||
Usually, the developer of the Xposed Module will choose to read the activation information of the current Xposed Module to better show the user the effective status of the current function.
|
||||
|
||||
In `YukiHookAPI`, you don't need to do this at all. `YukiHookAPI` has already encapsulated this operation for you, and you can use it directly.
|
||||
In addition to the basic Hook functions, `YukiHookAPI` also designed a set of Xposed Module status judgment functions for developers, such as activation status and Hook Framework information.
|
||||
|
||||
Now, you can use `YukiHookAPI.Status.isXposedModuleActive` directly in the Module App to determine whether it is active.
|
||||
### Determine Self-activation Status
|
||||
|
||||
Usually, we will choose to write a method to make it return `false`, and then hook this method to make it return `true` to prove that the Hook has taken effect.
|
||||
|
||||
In `YukiHookAPI`, you don’t need to do this at all, `YukiHookAPI` has already encapsulated this operation for you, and you can use it directly.
|
||||
|
||||
Now, you can directly use `YukiHookAPI.Status.isXposedModuleActive` to determine whether it is activated in the Module App.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -634,9 +640,9 @@ if(YukiHookAPI.Status.isXposedModuleActive) {
|
||||
}
|
||||
```
|
||||
|
||||
Due to some special reasons, Module Apps in TaiChi and Wuji cannot use standard methods to detect the activation state.
|
||||
Due to some special reasons, the Xposed Modules in TaiChi and Wuji cannot use the standard method to detect the activation state.
|
||||
|
||||
At this point, you can use `YukiHookAPI.Status.isTaiChiModuleActive` to determine whether it is activated.
|
||||
At this point you can use `YukiHookAPI.Status.isTaiChiModuleActive` to determine whether it is activated.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -648,7 +654,7 @@ if(YukiHookAPI.Status.isTaiChiModuleActive) {
|
||||
|
||||
If you want to use both judgment schemes, `YukiHookAPI` also encapsulates a convenient way for you.
|
||||
|
||||
At this point, you can use `YukiHookAPI.Status.isModuleActive` to determine whether you are activated in Xposed or TaiChi and Promise.
|
||||
At this point, you can use `YukiHookAPI.Status.isModuleActive` to determine whether you are activated in Xposed or TaiChi and Wuji.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -666,7 +672,7 @@ For more functions, please refer to [YukiHookAPI.Status](../api/public/com/highc
|
||||
|
||||
::: warning
|
||||
|
||||
If your Module App's API version is higher than 29 and is running on a system whose target API is 29 or higher, you need to add the following permission statement in **AndroidManifest.xml** to judge the activation status of the Module App in TaiChi and Wuji.
|
||||
If your Module App's API version is higher than 29 and is running on a system whose target API is 29 or higher, you need to add the following permission statement in **AndroidManifest.xml** to judge the activation status of the module in TaiChi and Wuji.
|
||||
|
||||
> The following example
|
||||
|
||||
@@ -686,12 +692,44 @@ There is another solution, you can directly declare the **android.permission.QUE
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
```
|
||||
|
||||
If the activation state of TaiChi and Wuji is included in the Module App activation judgment, the **Application** of the Module App must be extends **ModuleApplication** or **ModuleApplication** must be used directly;
|
||||
If the activation status of TaiChi and Wuji is included in the Module App activation judgment, the **Application** of the Module App must be extends from **ModuleApplication** or directly use **ModuleApplication**.
|
||||
|
||||
The API after **1.0.91** has modified the activation logic judgment method, now you can use this API in the Module App and Host App at the same time;
|
||||
:::
|
||||
|
||||
### Get Hook Framework Information
|
||||
|
||||
In addition to judging your own activation status, you can also get information about the current Hook Framework through the `Executor` in `YukiHookAPI.Status`.
|
||||
|
||||
For example, we can use `YukiHookAPI.Status.Executor.name` to get the name of the current Hook Framework.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
val frameworkName = YukiHookAPI.Status.Executor.name
|
||||
```
|
||||
|
||||
We can also use `YukiHookAPI.Status.Executor.apiLevel` to get the API Level of the current Hook Framework.
|
||||
|
||||
> The following example
|
||||
|
||||
```kotlin
|
||||
val frameworkApiLevel = YukiHookAPI.Status.Executor.apiLevel
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
For more functions, please refer to [YukiHookAPI.Status.Executor](../api/public/com/highcapable/yukihookapi/YukiHookAPI#executor-object).
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
**YukiHookAPI** after **1.0.91** version modifies the logical judgment method of obtaining the status of the Xposed Module, and now you can use this API in the Module App and Host App at the same time;
|
||||
|
||||
Need to make sure **YukiHookAPI.Configs.isEnableHookModuleStatus** is enabled;
|
||||
|
||||
Except for Hook Frameworks that provide standard APIs, Module Apps may not be able to determine whether they are activated in other cases.
|
||||
**YukiHookAPI** only connects to the known acquisition methods.
|
||||
|
||||
Except for the Hook Framework that provides standard APIs, in other cases, the Xposed Module may not be able to determine whether it is activated or obtain information about the Hook Framework.
|
||||
|
||||
:::
|
@@ -47,7 +47,7 @@ With `Kotlin`'s elegant `lambda` writing and `YukiHookAPI`, you can make your Ho
|
||||
|
||||
```kotlin
|
||||
@InjectYukiHookWithXposed
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadZygote {
|
||||
|
@@ -68,7 +68,7 @@ Add dependencies to your app `build.gradle`.
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
// base dependencies
|
||||
// Base dependencies
|
||||
implementation 'com.highcapable.yukihookapi:api:<yuki-version>'
|
||||
// ❗Be sure to add it as an Xposed Module, optional in other cases
|
||||
compileOnly 'de.robv.android.xposed:api:82'
|
||||
@@ -121,7 +121,7 @@ Add the base code to your `AndroidManifest.xml`.
|
||||
android:name="xposedmodule"
|
||||
android:value="true" />
|
||||
|
||||
<!-- Set your module description -->
|
||||
<!-- Set your Xposed Module description -->
|
||||
<meta-data
|
||||
android:name="xposeddescription"
|
||||
android:value="Fill in your Xposed Module description" />
|
||||
@@ -218,6 +218,6 @@ For configuration details related to use as a Hook API, you can [click here](../
|
||||
|
||||
::: warning
|
||||
|
||||
**YukiHookModuleStatus**, **YukiHookModulePrefs**, **YukiHookDataChannel** and Resources Hook functionality will not work when using a custom Hook Framework instead of the full Xposed Module.
|
||||
**YukiHookPrefsBridge**, **YukiHookDataChannel** and Resources Hook functionality will not work when using a custom Hook Framework instead of the full Xposed Module.
|
||||
|
||||
:::
|
@@ -16,7 +16,7 @@ features:
|
||||
details: A powerful, elegant, beautiful API built with Kotlin lambda can help you quickly implement members search and methods hooks.
|
||||
- title: Debugging Efficient
|
||||
details: A rich debug log function, detailing the name of each hooked method, time-consuming to find the class can quickly debug and find errors.
|
||||
- title: Easy to transplant
|
||||
- title: Easy to Transplant
|
||||
details: Native support for Xposed API usage, in any case, the supported Hook Framework with Xposed API can be quickly spliced with it.
|
||||
- title: Obfuscate Support
|
||||
details: The built Xposed Module simply supports R8, obfuscate will not destroy the hook entry point, and no other configuration is required under R8.
|
||||
|
@@ -8,7 +8,58 @@
|
||||
|
||||
:::
|
||||
|
||||
### 1.1.5 | 2023.01.13  <Badge type="tip" text="最新" vertical="middle" />
|
||||
### 1.1.10 | 2023.04.21  <Badge type="tip" text="最新" vertical="middle" />
|
||||
|
||||
- `Activity` 代理功能新增每个被代理的 `Activity` 指定单独的代理 `Activity` 功能
|
||||
- 修复 `YukiHookPrefsBridge` 中的 `contains`、`all` 方法未判断 `native` 功能的问题
|
||||
- 整合 `YukiHookPrefsBridge` 中的缓存功能到 `PreferencesCacheManager` 并使用 `LruCache` 作为键值对前置缓存
|
||||
- 修改 `YukiHookPrefsBridge` 键值对缓存功能在所有环境中生效 (模块、宿主)
|
||||
- 修改部分用于缓存的 `HashMap` 到 `ArrayMap` 以减少内存消耗
|
||||
- 修复一些其它可能出现的问题
|
||||
|
||||
### 1.1.9 | 2023.04.17  <Badge type="warning" text="过旧" vertical="middle" />
|
||||
|
||||
- 将依赖库的类型由 **Java Library** (jar) 修改为 **Android Library** (aar)
|
||||
- 移除通过 Hook 或反射 API 内部方法、参数的检查功能
|
||||
- 修复 `YukiHookDataChannel` 自动分段发送数据功能不能正常生效 (依然会抛出异常) 的问题
|
||||
- 新增可以手动根据目标设备的限制修改 `YukiHookDataChannel` 允许一次发送的最大数据字节大小
|
||||
- 移除 `YukiHookDataChannel` 只能在模块 `Activity` 中使用的限制,现在你可以在任何地方使用它
|
||||
- 修改并规范 `YukiHookDataChannel` 使用的广播 Action 名称
|
||||
- 修复 `YukiHookDataChannel` 在不同模块同一宿主的情况下出现 `BadParcelableException` 异常的问题
|
||||
- 新增 `ExecutorType`,可以通过 `YukiHookAPI.Status.Executor.type` 来获取已知 Hook Framework 的类型
|
||||
- ~~`YukiHookModulePrefs`~~ 更名为 `YukiHookPrefsBridge`
|
||||
- 修改 `YukiHookPrefsBridge` 为非单例实现,作为单例可能发生数据混淆的问题
|
||||
- 作废了 ~~`Context.modulePrefs(...)`~~ 方法,请转移到 `Context.prefs(...)`
|
||||
- `YukiHookPrefsBridge` 新增 `native` 方法,支持直接作为原生存储在模块和宿主中存储私有数据
|
||||
- 整合 `YukiHookPrefsBridge` 中的存储方法到 `YukiHookPrefsBridge.Editor`,请使用 `edit` 方法来存储数据
|
||||
- `YukiHookPrefsBridge` 新增 `contains` 方法
|
||||
- 缓存 `YukiHookPrefsBridge` 中动态创建的代理对象,尝试修复可能会导致宿主、模块出现 OOM 的问题
|
||||
- 修改 `Activity` 代理功能的代理类为动态生成,防止不同模块注入宿主后造成冲突
|
||||
- 修复一些其它可能出现的问题
|
||||
|
||||
### 1.1.8 | 2023.02.01  <Badge type="warning" text="过旧" vertical="middle" />
|
||||
|
||||
- 修复底层 Hook 方法在回调时修改 `result` 等参数时时不能同步更新修改后的状态问题,感谢 [Yongzheng Lai](https://github.com/elvizlai) 的 [Issue](https://github.com/fankes/YukiHookAPI/issues/23)
|
||||
- 移动 `YukiHookAPI` 自动生成的入口类名称文件 `assets/yukihookapi_init` 到 `resources/META-INF/yukihookapi_init`
|
||||
- 允许在仅打印异常堆栈时 `msg` 参数为空并可以不设置 `msg` 参数,留空 `msg` 参数的日志除非异常堆栈不为空否则将不会被记录
|
||||
- 修复 Hook 回调方法体内发生的异常打印的日志无具体方法信息的 BUG
|
||||
- `HookParam` 新增 `instanceOrNull` 变量与方法,可以在不确定 Hook 实例是否为空的前提下使用以防止 Hook 实例为空抛出异常
|
||||
- 解耦合所有 `Member` 查找功能中的 Hooker 到 `MemberBaseFinder.MemberHookerManager`
|
||||
- 修改了 `YukiMemberHookCreator` 中的 `by` 条件用法,现在可以重复使用 `by` 方法设置多个条件
|
||||
- 移除了 Android `type` 中的错误 `Class` 对象声明
|
||||
- `PackageParam.AppLifecycle` 中的 `registerReceiver` 方法新增直接使用 `IntentFilter` 创建系统广播监听的功能
|
||||
- 修复在 `PackageParam.AppLifecycle` 中可能存在多次注册生命周期的问题
|
||||
- Revert: 1.1.7 版本由于有一个严重问题已经撤回,请直接更新到此版本即可 (更新日志同 1.1.7 版本)
|
||||
|
||||
### 1.1.6 | 2023.01.21  <Badge type="warning" text="过旧" vertical="middle" />
|
||||
|
||||
- 修复 Xposed 模块装载时可能存在同一个进程多个包名的情况导致 `PackageParam` 保持单例后 `ClassLoader` 不符的严重问题
|
||||
- 新增同一个进程多个包名的情况下未区分包名时,停止装载单例化的子 Hooker 并打印警告信息
|
||||
- 修复 `HookParam.callOriginal`、`HookParam.invokeOriginal` 等方法调用原始方法时参数个数不正确的问题
|
||||
- 修改 `MethodFinder`、`ConstructorFinder`、`ReflectionFactory` 中反射调用的方法参数名 `param` 为 `args`
|
||||
- 新增 Xposed 模块自动处理程序中判断入口类构造方法参数功能,入口类需要保证其不存在任何构造方法参数
|
||||
|
||||
### 1.1.5 | 2023.01.13  <Badge type="warning" text="过旧" vertical="middle" />
|
||||
|
||||
- 规范并优化整体代码风格
|
||||
- 对部分内部调用的 API 进行了私有化处理
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
> 这里收录了 `YukiHookAPI` 尚未解决的问题。
|
||||
|
||||
### YukiHookModulePrefs
|
||||
### YukiHookPrefsBridge
|
||||
|
||||
目前仅限完美支持 LSPosed,其它 Xposed 框架需要降级模块 API。
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
|
||||
### 支持独立使用的 Lite 版本
|
||||
|
||||
如果你喜欢 `YukiHookAPI` 的反射 API,但你的项目可能并不需要相关 Hook 功能。
|
||||
|
||||
那么这里有一个好消息要告诉你:
|
||||
|
||||
`YukiHookAPI` 的核心反射 API 已被解耦合为 [YukiReflection](https://github.com/fankes/YukiReflection) 项目,它现在能在任何 Android 项目中使用。
|
||||
|
||||
::: tip 待讨论
|
||||
|
||||
目前 API 只支持通过自动处理程序绑定到 **xposed_init**,若您不喜欢自动处理程序,一定要自己实现模块装载入口,未来会按照需求人数推出仅有 API 功能的 Lite 版本,你可向我们提出 **issues**。
|
||||
|
@@ -252,6 +252,26 @@ val name: String
|
||||
|
||||
:::
|
||||
|
||||
#### type <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val type: ExecutorType
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获取当前 Hook Framework 类型。
|
||||
|
||||
::: warning
|
||||
|
||||
在模块环境中需要启用 **Configs.isEnableHookModuleStatus**。
|
||||
|
||||
:::
|
||||
|
||||
#### apiLevel <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -362,9 +382,9 @@ var isDebug: Boolean
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 是否启用 DEBUG 模式。
|
||||
> 是否启用 Debug 模式。
|
||||
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 `XposedBridge.log` 打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
默认为开启状态,开启后模块将会向 `Logcat` 和 (Xposed) 宿主环境中的日志功能打印详细的 Hook 日志,关闭后仅会打印 `E` 级别的日志。
|
||||
|
||||
<h3 class="deprecated">isAllowPrintingLogs - field</h3>
|
||||
|
||||
@@ -376,23 +396,33 @@ var isDebug: Boolean
|
||||
|
||||
请转移到 `YukiHookLogger.Configs.isEnable`
|
||||
|
||||
### isEnableModulePrefsCache <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var isEnableModulePrefsCache: Boolean
|
||||
```
|
||||
<h3 class="deprecated">isEnableModulePrefsCache - field</h3>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.5` `新增`
|
||||
|
||||
`v1.1.9` `作废`
|
||||
|
||||
请转移到 `isEnablePrefsBridgeCache`
|
||||
|
||||
### isEnablePrefsBridgeCache <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var isEnablePrefsBridgeCache: Boolean
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 是否启用 `YukiHookModulePrefs` 的键值缓存功能。
|
||||
> 是否启用 `YukiHookPrefsBridge` 的键值缓存功能。
|
||||
|
||||
为防止内存复用过高问题,此功能默认启用。
|
||||
|
||||
你可以手动在 `YukiHookModulePrefs` 中自由开启和关闭缓存功能以及清除缓存。
|
||||
你可以手动在 `YukiHookPrefsBridge` 中自由开启和关闭缓存功能以及清除缓存。
|
||||
|
||||
### isEnableModuleAppResourcesCache <span class="symbol">- field</span>
|
||||
|
||||
@@ -460,7 +490,7 @@ var isEnableHookSharedPreferences: Boolean
|
||||
|
||||
这是一个可选的实验性功能,此功能默认不启用。
|
||||
|
||||
仅用于修复某些系统可能会出现在启用了 **New XSharedPreferences** 后依然出现文件权限错误问题,若你能正常使用 **YukiHookModulePrefs** 就不建议启用此功能。
|
||||
仅用于修复某些系统可能会出现在启用了 **New XSharedPreferences** 后依然出现文件权限错误问题,若你能正常使用 **YYukiHookPrefsBridge** 就不建议启用此功能。
|
||||
|
||||
:::
|
||||
|
||||
@@ -492,10 +522,6 @@ var isEnableMemberCache: Boolean
|
||||
|
||||
`v1.0.68` `新增`
|
||||
|
||||
`v1.0.80` `修改`
|
||||
|
||||
将方法体进行 inline
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 是否启用 `Member` 缓存功能。
|
||||
@@ -504,7 +530,7 @@ var isEnableMemberCache: Boolean
|
||||
|
||||
启用后会缓存已经找到的 `Method`、`Constructor`、`Field`。
|
||||
|
||||
缓存的 `Member` 都将处于 `MemberCacheStore` 的全局静态实例中。
|
||||
缓存的 `Member` 都将处于 `ReflectsCacheStore` 的全局静态实例中。
|
||||
|
||||
推荐使用 `MethodFinder`、`ConstructorFinder`、`FieldFinder` 来获取 `Member`。
|
||||
|
||||
@@ -520,20 +546,24 @@ inline fun configs(initiate: Configs.() -> Unit)
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
`v1.0.80` `修改`
|
||||
|
||||
将方法体进行 inline
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 对 `Configs` 类实现了一个 `lambda` 方法体。
|
||||
|
||||
你可以轻松的调用它进行配置。
|
||||
你可以轻松地调用它进行配置。
|
||||
|
||||
**功能示例**
|
||||
|
||||
你可以在 `HookEntryClass` 的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
你可以在 Hook 入口类的 `onInit` 方法中调用 `configs` 方法和 `debugLog` 方法完成对 API 的功能配置,实时生效。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookAPI.configs {
|
||||
@@ -544,7 +574,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
elements(TAG, PRIORITY, PACKAGE_NAME, USER_ID)
|
||||
}
|
||||
isDebug = BuildConfig.DEBUG
|
||||
isEnableModulePrefsCache = true
|
||||
isEnablePrefsBridgeCache = true
|
||||
isEnableModuleAppResourcesCache = true
|
||||
isEnableHookModuleStatus = true
|
||||
isEnableHookSharedPreferences = false
|
||||
@@ -564,7 +594,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() = configs {
|
||||
debugLog {
|
||||
@@ -574,7 +604,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
elements(TAG, PRIORITY, PACKAGE_NAME, USER_ID)
|
||||
}
|
||||
isDebug = BuildConfig.DEBUG
|
||||
isEnableModulePrefsCache = true
|
||||
isEnablePrefsBridgeCache = true
|
||||
isEnableModuleAppResourcesCache = true
|
||||
isEnableHookModuleStatus = true
|
||||
isEnableHookSharedPreferences = false
|
||||
@@ -593,7 +623,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntryClass : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
YukiHookLogger.Configs.tag = "YukiHookAPI"
|
||||
@@ -606,7 +636,7 @@ class HookEntryClass : IYukiHookXposedInit {
|
||||
YukiHookLogger.Configs.USER_ID
|
||||
)
|
||||
YukiHookAPI.Configs.isDebug = BuildConfig.DEBUG
|
||||
YukiHookAPI.Configs.isEnableModulePrefsCache = true
|
||||
YukiHookAPI.Configs.isEnablePrefsBridgeCache = true
|
||||
YukiHookAPI.Configs.isEnableModuleAppResourcesCache = true
|
||||
YukiHookAPI.Configs.isEnableHookModuleStatus = true
|
||||
YukiHookAPI.Configs.isEnableHookSharedPreferences = false
|
||||
|
@@ -0,0 +1,107 @@
|
||||
---
|
||||
pageClass: code-page
|
||||
---
|
||||
|
||||
# ExecutorType <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
enum class ExecutorType
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> Hook Framework 类型定义。
|
||||
|
||||
定义了目前已知使用频率较高的 Hook Framework。
|
||||
|
||||
后期根据 Hook Framework 特征和使用情况将会继续添加新的类型。
|
||||
|
||||
无法识别的 Hook Framework 将被定义为 `UNKNOWN`。
|
||||
|
||||
## UNKNOWN <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
UNKNOWN
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 未知类型。
|
||||
|
||||
## XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
XPOSED
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 原版、第三方 Xposed。
|
||||
|
||||
## LSPOSED_LSPATCH <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
LSPOSED_LSPATCH
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> LSPosed、LSPatch。
|
||||
|
||||
## ED_XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
ED_XPOSED
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> EdXposed。
|
||||
|
||||
## TAICHI_XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
TAICHI_XPOSED
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> TaiChi (太极)。
|
||||
|
||||
## BUG_XPOSED <span class="symbol">- enum</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
BUG_XPOSED
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> BugXposed (应用转生)。
|
@@ -14,7 +14,7 @@ class NameRules private constructor()
|
||||
|
||||
`v1.1.0` `修改`
|
||||
|
||||
`NameConditions` 更名为 `NameRules`
|
||||
~~`NameConditions`~~ 更名为 `NameRules`
|
||||
|
||||
作为 lambda 整体判断条件使用
|
||||
|
||||
|
@@ -5,7 +5,7 @@ pageClass: code-page
|
||||
# ConstructorFinder <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class ConstructorFinder internal constructor(override val hookInstance: YukiMemberHookCreator.MemberHookCreator?, override val classSet: Class<*>) : MemberBaseFinder
|
||||
class ConstructorFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -20,6 +20,10 @@ class ConstructorFinder internal constructor(override val hookInstance: YukiMemb
|
||||
|
||||
合并到 `MemberBaseFinder`
|
||||
|
||||
`v1.1.8` `修改`
|
||||
|
||||
移动 `hookInstance` 参数到 `MemberBaseFinder.MemberHookerManager`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `Constructor` 查找类。
|
||||
@@ -320,7 +324,7 @@ inner class Process internal constructor(internal val isNoSuch: Boolean, interna
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `Constructor` 查找结果处理类,为 `hookInstance` 提供。
|
||||
> `Constructor` 查找结果处理类,为 `hookManager` 提供。
|
||||
|
||||
### result <span class="symbol">- method</span>
|
||||
|
||||
@@ -364,7 +368,7 @@ fun all(): Process
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 设置全部查找条件匹配的多个 `Constructor` 实例结果到 `hookInstance`。
|
||||
> 设置全部查找条件匹配的多个 `Constructor` 实例结果到 `hookManager`。
|
||||
|
||||
### remedys <span class="symbol">- method</span>
|
||||
|
||||
@@ -715,7 +719,7 @@ fun ignored(): Result
|
||||
|
||||
> 忽略异常并停止打印任何错误日志。
|
||||
|
||||
若 `isNotIgnoredHookingFailure` 为 `false` 则自动忽略。
|
||||
若 `MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure` 为 `false` 则自动忽略。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -754,13 +758,17 @@ inner class Instance internal constructor(private val constructor: Constructor<*
|
||||
#### call <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun call(vararg param: Any?): Any?
|
||||
fun call(vararg args: Any?): Any?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.2` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Constructor` 创建目标实例,不指定目标实例类型。
|
||||
@@ -768,13 +776,17 @@ fun call(vararg param: Any?): Any?
|
||||
#### newInstance <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun <T> newInstance(vararg param: Any?): T?
|
||||
fun <T> newInstance(vararg args: Any?): T?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.2` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Constructor` 创建目标实例 ,指定 `T` 目标实例类型。
|
@@ -5,7 +5,7 @@ pageClass: code-page
|
||||
# FieldFinder <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class FieldFinder internal constructor(override val hookInstance: YukiMemberHookCreator.MemberHookCreator?, override val classSet: Class<*>?) : MemberBaseFinder
|
||||
class FieldFinder internal constructor(override val classSet: Class<*>?) : MemberBaseFinder
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -20,6 +20,10 @@ class FieldFinder internal constructor(override val hookInstance: YukiMemberHook
|
||||
|
||||
合并到 `MemberBaseFinder`
|
||||
|
||||
`v1.1.8` `修改`
|
||||
|
||||
移动 `hookInstance` 参数到 `MemberBaseFinder.MemberHookerManager`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `Field` 查找类。
|
||||
@@ -574,7 +578,7 @@ fun ignored(): Result
|
||||
|
||||
> 忽略异常并停止打印任何错误日志。
|
||||
|
||||
若 `isNotIgnoredHookingFailure` 为 `false` 则自动忽略。
|
||||
若 `MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure` 为 `false` 则自动忽略。
|
||||
|
||||
::: warning
|
||||
|
||||
|
@@ -5,7 +5,7 @@ pageClass: code-page
|
||||
# MethodFinder <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class MethodFinder internal constructor(override val hookInstance: YukiMemberHookCreator.MemberHookCreator?, override val classSet: Class<*>) : MemberBaseFinder
|
||||
class MethodFinder internal constructor(override val classSet: Class<*>) : MemberBaseFinder
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -20,6 +20,10 @@ class MethodFinder internal constructor(override val hookInstance: YukiMemberHoo
|
||||
|
||||
合并到 `MemberBaseFinder`
|
||||
|
||||
`v1.1.8` `修改`
|
||||
|
||||
移动 `hookInstance` 参数到 `MemberBaseFinder.MemberHookerManager`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `Method` 查找类。
|
||||
@@ -464,7 +468,7 @@ inner class Process internal constructor(internal val isNoSuch: Boolean, interna
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `Method` 查找结果处理类,为 `hookInstance` 提供。
|
||||
> `Method` 查找结果处理类,为 `hookManager` 提供。
|
||||
|
||||
### result <span class="symbol">- method</span>
|
||||
|
||||
@@ -508,7 +512,7 @@ fun all(): Process
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 设置全部查找条件匹配的多个 `Method` 实例结果到 `hookInstance`。
|
||||
> 设置全部查找条件匹配的多个 `Method` 实例结果到 `hookManager`。
|
||||
|
||||
### remedys <span class="symbol">- method</span>
|
||||
|
||||
@@ -845,7 +849,7 @@ fun ignored(): Result
|
||||
|
||||
> 忽略异常并停止打印任何错误日志。
|
||||
|
||||
若 `isNotIgnoredHookingFailure` 为 `false` 则自动忽略。
|
||||
若 `MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure` 为 `false` 则自动忽略。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -906,13 +910,17 @@ fun original(): Instance
|
||||
#### call <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun call(vararg param: Any?): Any?
|
||||
fun call(vararg args: Any?): Any?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.2` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,不指定返回值类型。
|
||||
@@ -920,13 +928,17 @@ fun call(vararg param: Any?): Any?
|
||||
#### invoke <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun <T> invoke(vararg param: Any?): T?
|
||||
fun <T> invoke(vararg args: Any?): T?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.2` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 `T` 返回值类型。
|
||||
@@ -934,13 +946,17 @@ fun <T> invoke(vararg param: Any?): T?
|
||||
#### byte <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun byte(vararg param: Any?): Byte?
|
||||
fun byte(vararg args: Any?): Byte?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.68` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Byte 返回值类型。
|
||||
@@ -948,7 +964,7 @@ fun byte(vararg param: Any?): Byte?
|
||||
#### int <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun int(vararg param: Any?): Int
|
||||
fun int(vararg args: Any?): Int
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -959,6 +975,10 @@ fun int(vararg param: Any?): Int
|
||||
|
||||
修改 ~~`callInt`~~ 为 `int`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Int 返回值类型。
|
||||
@@ -966,7 +986,7 @@ fun int(vararg param: Any?): Int
|
||||
#### long <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun long(vararg param: Any?): Long
|
||||
fun long(vararg args: Any?): Long
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -977,6 +997,10 @@ fun long(vararg param: Any?): Long
|
||||
|
||||
修改 ~~`callLong`~~ 为 `long`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Long 返回值类型。
|
||||
@@ -984,7 +1008,7 @@ fun long(vararg param: Any?): Long
|
||||
#### short <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun short(vararg param: Any?): Short
|
||||
fun short(vararg args: Any?): Short
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -995,6 +1019,10 @@ fun short(vararg param: Any?): Short
|
||||
|
||||
修改 ~~`callShort`~~ 为 `short`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Short 返回值类型。
|
||||
@@ -1002,7 +1030,7 @@ fun short(vararg param: Any?): Short
|
||||
#### double <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun double(vararg param: Any?): Double
|
||||
fun double(vararg args: Any?): Double
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -1013,6 +1041,10 @@ fun double(vararg param: Any?): Double
|
||||
|
||||
修改 ~~`callDouble`~~ 为 `double`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Double 返回值类型。
|
||||
@@ -1020,7 +1052,7 @@ fun double(vararg param: Any?): Double
|
||||
#### float <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun float(vararg param: Any?): Float
|
||||
fun float(vararg args: Any?): Float
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -1031,6 +1063,10 @@ fun float(vararg param: Any?): Float
|
||||
|
||||
修改 ~~`callFloat`~~ 为 `float`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Float 返回值类型。
|
||||
@@ -1038,7 +1074,7 @@ fun float(vararg param: Any?): Float
|
||||
#### string <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun string(vararg param: Any?): String
|
||||
fun string(vararg args: Any?): String
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -1049,6 +1085,10 @@ fun string(vararg param: Any?): String
|
||||
|
||||
修改 ~~`callString`~~ 为 `string`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 String 返回值类型。
|
||||
@@ -1056,13 +1096,17 @@ fun string(vararg param: Any?): String
|
||||
#### char <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun char(vararg param: Any?): Char
|
||||
fun char(vararg args: Any?): Char
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.68` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Char 返回值类型。
|
||||
@@ -1070,7 +1114,7 @@ fun char(vararg param: Any?): Char
|
||||
#### boolean <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun boolean(vararg param: Any?): Boolean
|
||||
fun boolean(vararg args: Any?): Boolean
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -1081,6 +1125,10 @@ fun boolean(vararg param: Any?): Boolean
|
||||
|
||||
修改 ~~`callBoolean`~~ 为 `boolean`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Boolean 返回值类型。
|
||||
@@ -1088,13 +1136,17 @@ fun boolean(vararg param: Any?): Boolean
|
||||
### array <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> array(vararg param: Any?): Array<T>
|
||||
inline fun <reified T> array(vararg args: Any?): Array<T>
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.68` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 Array 返回值类型。
|
||||
@@ -1102,13 +1154,17 @@ inline fun <reified T> array(vararg param: Any?): Array<T>
|
||||
### list <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> list(vararg param: Any?): List<T>
|
||||
inline fun <reified T> list(vararg args: Any?): List<T>
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.68` `新增`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 执行 `Method`,指定 List 返回值类型。
|
@@ -531,7 +531,7 @@ inline fun <reified T> classOf(loader: ClassLoader?, initialize: Boolean): Class
|
||||
我们要获取一个 `Class` 在 `Kotlin` 下不通过反射时应该这样做。
|
||||
|
||||
> 示例如下
|
||||
>
|
||||
|
||||
```kotlin
|
||||
DemoClass::class.java
|
||||
```
|
||||
@@ -901,11 +901,11 @@ inline fun <reified T : Any> T.current(ignored: Boolean, initiate: CurrentClass.
|
||||
## Class.buildOf <span class="symbol">- ext-method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditions): Any?
|
||||
inline fun Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): Any?
|
||||
```
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditions): T?
|
||||
inline fun <T> Class<*>.buildOf(vararg args: Any?, initiate: ConstructorConditions): T?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -920,6 +920,10 @@ inline fun <T> Class<*>.buildOf(vararg param: Any?, initiate: ConstructorConditi
|
||||
|
||||
加入无泛型方法 `buildOf`
|
||||
|
||||
`v1.1.6` `修改`
|
||||
|
||||
修改参数命名 `param` 为 `args`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 通过构造方法创建新实例,指定类型 `T` 或任意类型 `Any`。
|
||||
|
@@ -56,33 +56,45 @@ fun IYukiHookXposedInit.encase(vararg hooker: YukiBaseHooker)
|
||||
|
||||
> 在 `IYukiHookXposedInit` 中调用 `YukiHookAPI`。
|
||||
|
||||
## Context.modulePrefs <span class="symbol">- ext-field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val Context.modulePrefs: YukiHookModulePrefs
|
||||
```
|
||||
<h2 class="deprecated">Context.modulePrefs - ext-field</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 获取模块的存取对象。
|
||||
请转移到 `prefs` 方法
|
||||
|
||||
## Context.modulePrefs <span class="symbol">- ext-method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun Context.modulePrefs(name: String): YukiHookModulePrefs
|
||||
```
|
||||
<h2 class="deprecated">Context.modulePrefs - ext-method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
`v1.1.9` `作废`
|
||||
|
||||
请转移到 `prefs` 方法
|
||||
|
||||
## Context.prefs <span class="symbol">- ext-method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun Context.prefs(name: String): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获取模块的存取对象,可设置 `name` 为自定义 Sp 存储名称。
|
||||
> 创建 `YukiHookPrefsBridge` 对象。
|
||||
|
||||
可以同时在模块与 (Xposed) 宿主环境中使用。
|
||||
|
||||
如果你想在 (Xposed) 宿主环境将数据存入当前宿主的私有空间,请使用 `YukiHookPrefsBridge.native` 方法。
|
||||
|
||||
在未声明任何条件的情况下 (Xposed) 宿主环境默认读取模块中的数据。
|
||||
|
||||
## Context.dataChannel <span class="symbol">- ext-method</span>
|
||||
|
||||
@@ -96,7 +108,7 @@ fun Context.dataChannel(packageName: String): YukiHookDataChannel.NameSpace
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获取模块的数据通讯桥命名空间对象。
|
||||
> 获取 `YukiHookDataChannel` 对象。
|
||||
|
||||
::: danger
|
||||
|
||||
|
@@ -86,6 +86,28 @@ val instance: Any
|
||||
|
||||
:::
|
||||
|
||||
如果你不确定当前实例的对象是否为 `null`,你可以使用 `instanceOrNull`。
|
||||
|
||||
## instanceOrNull <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val instanceOrNull: Any?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.8` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获取当前 Hook 实例的对象。
|
||||
|
||||
::: danger
|
||||
|
||||
如果你当前 Hook 的对象是一个静态,那么它将不存在实例的对象。
|
||||
|
||||
:::
|
||||
|
||||
## instanceClass <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -305,6 +327,24 @@ inline fun <reified T> instance(): T
|
||||
instance<Activity>().finish()
|
||||
```
|
||||
|
||||
## instanceOrNull <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> instanceOrNull(): T?
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.8` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获取当前 Hook 实例的对象 `T`。
|
||||
|
||||
**功能示例**
|
||||
|
||||
用法请参考 [instance](#instance-method) 方法。
|
||||
|
||||
## args <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
|
@@ -235,7 +235,7 @@ val moduleAppResources: YukiModuleResources
|
||||
## prefs <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
val prefs: YukiHookModulePrefs
|
||||
val prefs: YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -244,7 +244,7 @@ val prefs: YukiHookModulePrefs
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获得当前使用的存取数据对象缓存实例。
|
||||
> 创建 `YukiHookPrefsBridge` 对象。
|
||||
|
||||
::: danger
|
||||
|
||||
@@ -255,7 +255,7 @@ val prefs: YukiHookModulePrefs
|
||||
## prefs <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun prefs(name: String): YukiHookModulePrefs
|
||||
fun prefs(name: String): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -268,7 +268,7 @@ fun prefs(name: String): YukiHookModulePrefs
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获得当前使用的存取数据对象缓存实例。
|
||||
> 创建 `YukiHookPrefsBridge` 对象。
|
||||
|
||||
你可以通过 `name` 来自定义 Sp 存储的名称。
|
||||
|
||||
@@ -290,7 +290,7 @@ val dataChannel: YukiHookDataChannel.NameSpace
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获得当前使用的数据通讯桥命名空间对象。
|
||||
> 获取 `YukiHookDataChannel` 对象。
|
||||
|
||||
::: danger
|
||||
|
||||
@@ -1143,10 +1143,18 @@ fun onConfigurationChanged(result: (self: Application, config: Configuration) ->
|
||||
fun registerReceiver(vararg action: String, result: (context: Context, intent: Intent) -> Unit)
|
||||
```
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun registerReceiver(filter: IntentFilter, result: (context: Context, intent: Intent) -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.88` `新增`
|
||||
|
||||
`v1.1.8` `修改`
|
||||
|
||||
新增直接使用 `IntentFilter` 注册系统广播监听
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 注册系统广播监听。
|
@@ -10,6 +10,6 @@ pageClass: code-page
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Android` 相关组件的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Android` 相关组件的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.kt) 进行查看。
|
@@ -10,6 +10,6 @@ pageClass: code-page
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Android` 相关 `Graphics` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Graphics` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/GraphicsTypeFactory.kt) 进行查看。
|
@@ -10,6 +10,6 @@ pageClass: code-page
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Android` 相关 `Widget` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Android` 相关 `Widget` 的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ViewTypeFactory.kt) 进行查看。
|
@@ -10,6 +10,6 @@ pageClass: code-page
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 这是一个预置 Hook 类型的常量类,主要为 `Java` 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
> 这是一个预置反射类型的常量类,主要为 `Java` 相关基本变量类型的 `Class` 内容,跟随版本更新会逐一进行增加。
|
||||
|
||||
详情可 [点击这里](https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/java/VariableTypeFactory.kt) 进行查看。
|
@@ -29,7 +29,7 @@ class YukiHookDataChannel private constructor()
|
||||
## NameSpace <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String, private val isSecure: Boolean)
|
||||
inner class NameSpace internal constructor(private val context: Context?, private val packageName: String)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -40,6 +40,10 @@ inner class NameSpace internal constructor(private val context: Context?, privat
|
||||
|
||||
新增 `isSecure` 参数
|
||||
|
||||
`v1.1.9` `修改`
|
||||
|
||||
移除 `isSecure` 参数
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `YukiHookDataChannel` 命名空间。
|
||||
@@ -58,6 +62,62 @@ inline fun with(initiate: NameSpace.() -> Unit): NameSpace
|
||||
|
||||
> 创建一个调用空间。
|
||||
|
||||
### dataMaxByteSize <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var dataMaxByteSize: Int
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `YukiHookDataChannel` 允许发送的最大数据字节大小。
|
||||
|
||||
默认为 `500 KB (500 * 1024)`,详情请参考 `receiverDataMaxByteSize` 的注释。
|
||||
|
||||
最小不能低于 `100 KB (100 * 1024)`,否则会被重新设置为 `100 KB (100 * 1024)`。
|
||||
|
||||
设置后将在全局生效,直到当前进程结束。
|
||||
|
||||
超出最大数据字节大小后的数据将被自动分段发送。
|
||||
|
||||
::: danger
|
||||
|
||||
请谨慎调整此参数,如果超出了系统能够允许的大小会引发 **TransactionTooLargeException** 异常。
|
||||
|
||||
:::
|
||||
|
||||
### dataMaxByteCompressionFactor <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
var dataMaxByteCompressionFactor: Int
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `YukiHookDataChannel` 允许发送的最大数据字节大小倍数 (分段数据)。
|
||||
|
||||
默认为 `3`,详情请参考 `receiverDataMaxByteCompressionFactor` 的注释。
|
||||
|
||||
最小不能低于 `2`,否则会被重新设置为 `2`。
|
||||
|
||||
设置后将在全局生效,直到当前进程结束。
|
||||
|
||||
超出最大数据字节大小后的数据将按照此倍数自动划分 `receiverDataMaxByteSize` 的大小。
|
||||
|
||||
::: danger
|
||||
|
||||
请谨慎调整此参数,如果超出了系统能够允许的大小会引发 **TransactionTooLargeException** 异常。
|
||||
|
||||
:::
|
||||
|
||||
### allowSendTooLargeData <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -212,6 +272,6 @@ fun obtainLoggerInMemoryData(priority: ChannelPriority?, result: (ArrayList<Yuki
|
||||
|
||||
模块与宿主必须启用 [YukiHookLogger.Configs.isRecord](../../log/LoggerFactory#isrecord-field) 才能获取到调试日志数据。
|
||||
|
||||
由于 Android 限制了数据传输大小的最大值,如果调试日志过多可能会造成 **TransactionTooLargeException** 异常。
|
||||
由于 Android 限制了数据传输大小的最大值,如果调试日志过多将会自动进行分段发送,数据越大速度越慢。
|
||||
|
||||
:::
|
@@ -18,4 +18,26 @@ open class ModuleAppActivity : Activity()
|
||||
|
||||
继承于此类的 `Activity` 可以同时在宿主与模块中启动。
|
||||
|
||||
在 (Xposed) 宿主环境需要在宿主启动时调用 `Context.registerModuleAppActivities` 进行注册。
|
||||
在 (Xposed) 宿主环境需要在宿主启动时调用 `Context.registerModuleAppActivities` 进行注册。
|
||||
|
||||
## proxyClassName <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
open val proxyClassName: String
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.10` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 设置当前代理的 `Activity` 类名。
|
||||
|
||||
留空则使用 `Context.registerModuleAppActivities` 时设置的类名
|
||||
|
||||
::: danger
|
||||
|
||||
代理的 **Activity** 类名必须存在于宿主的 AndroidMainifest 清单中。
|
||||
|
||||
:::
|
@@ -34,4 +34,26 @@ open val moduleTheme: Int
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 设置当前代理的 `Activity` 主题。
|
||||
> 设置当前代理的 `Activity` 主题。
|
||||
|
||||
## proxyClassName <span class="symbol">- field</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
open val proxyClassName: String
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.10` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 设置当前代理的 `Activity` 类名。
|
||||
|
||||
留空则使用 `Context.registerModuleAppActivities` 时设置的类名
|
||||
|
||||
::: danger
|
||||
|
||||
代理的 **Activity** 类名必须存在于宿主的 AndroidMainifest 清单中。
|
||||
|
||||
:::
|
@@ -2,25 +2,29 @@
|
||||
pageClass: code-page
|
||||
---
|
||||
|
||||
# YukiHookModulePrefs <span class="symbol">- class</span>
|
||||
# YukiHookPrefsBridge <span class="symbol">- class</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
class YukiHookModulePrefs private constructor(private var context: Context?)
|
||||
class YukiHookPrefsBridge private constructor(private var context: Context?)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
`v1.1.9` `修改`
|
||||
|
||||
~~`YukiHookModulePrefs`~~ 更名为 `YukiHookPrefsBridge`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 实现 Xposed 模块的数据存取,对接 `SharedPreferences` 和 `XSharedPreferences`。
|
||||
> `YukiHookAPI` 对 `SharedPreferences`、`XSharedPreferences` 的扩展存储桥实现。
|
||||
|
||||
在不同环境智能选择存取使用的对象。
|
||||
|
||||
::: danger
|
||||
|
||||
此功能为实验性功能,仅在 LSPosed 环境测试通过,EdXposed 理论也可以使用但不再推荐。
|
||||
模块与宿主之前共享数据存储为实验性功能,仅在 LSPosed 环境测试通过,EdXposed 理论也可以使用但不再推荐。
|
||||
|
||||
:::
|
||||
|
||||
@@ -34,13 +38,7 @@ class YukiHookModulePrefs private constructor(private var context: Context?)
|
||||
|
||||
太极请参阅 [文件权限/配置/XSharedPreference](https://taichi.cool/zh/doc/for-xposed-dev.html#文件权限-配置-xsharedpreference)。
|
||||
|
||||
::: danger
|
||||
|
||||
当你在 Xposed 模块中存取数据的时候 **context** 必须不能是空的。
|
||||
|
||||
:::
|
||||
|
||||
若你正在使用 `PreferenceFragmentCompat`,请迁移到 `ModulePreferenceFragment` 以适配上述功能特性。
|
||||
对于在模块环境中使用 `PreferenceFragmentCompat`,`YukiHookAPI` 提供了 `ModulePreferenceFragment` 来实现同样的功能。
|
||||
|
||||
**可选配置**
|
||||
|
||||
@@ -88,7 +86,7 @@ val isPreferencesAvailable: Boolean
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 获取当前 `YukiHookModulePrefs` 的可用状态。
|
||||
> 获取当前 `YukiHookPrefsBridge` 的可用状态。
|
||||
|
||||
在 (Xposed) 宿主环境中返回 `XSharedPreferences` 可用状态 (可读)。
|
||||
|
||||
@@ -97,7 +95,7 @@ val isPreferencesAvailable: Boolean
|
||||
## name <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun name(name: String): YukiHookModulePrefs
|
||||
fun name(name: String): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -115,7 +113,7 @@ fun name(name: String): YukiHookModulePrefs
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
modulePrefs("custom_name").getString("custom_key")
|
||||
prefs("custom_name").getString("custom_key")
|
||||
```
|
||||
|
||||
在 (Xposed) 宿主环境 `PackageParam` 中的使用方法。
|
||||
@@ -129,7 +127,7 @@ prefs("custom_name").getString("custom_key")
|
||||
## direct <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun direct(): YukiHookModulePrefs
|
||||
fun direct(): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
@@ -140,10 +138,24 @@ fun direct(): YukiHookModulePrefs
|
||||
|
||||
> 忽略缓存直接读取键值。
|
||||
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnableModulePrefsCache`。
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnablePrefsBridgeCache`。
|
||||
|
||||
仅在 `XSharedPreferences` 下生效。
|
||||
|
||||
## native <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun native(): YukiHookPrefsBridge
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 忽略当前环境直接使用 `Context.getSharedPreferences` 存取数据。
|
||||
|
||||
## getString <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -228,6 +240,22 @@ fun getFloat(key: String, value: Float): Float
|
||||
|
||||
> 获取 `Float` 键值。
|
||||
|
||||
## contains <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun contains(key: String): Boolean
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 判断当前是否包含 `key` 键值的数据。
|
||||
|
||||
智能识别对应环境读取键值数据。
|
||||
|
||||
## all <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
@@ -250,185 +278,85 @@ fun all(): HashMap<String, Any?>
|
||||
|
||||
:::
|
||||
|
||||
## remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun remove(key: String)
|
||||
```
|
||||
<h2 class="deprecated">remove - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 移除全部包含 `key` 的存储数据。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> remove(prefs: PrefsData<T>)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.67` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 移除 `PrefsData.key` 的存储数据。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## clear <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun clear()
|
||||
```
|
||||
<h2 class="deprecated">clear - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.77` `新增`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 移除全部存储数据。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putString <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putString(key: String, value: String)
|
||||
```
|
||||
<h2 class="deprecated">putString - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 存储 `String` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putStringSet <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putStringSet(key: String, value: Set<String>)
|
||||
```
|
||||
<h2 class="deprecated">putStringSet - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.77` `新增`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 存储 `Set<String>` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putBoolean <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putBoolean(key: String, value: Boolean)
|
||||
```
|
||||
<h2 class="deprecated">putBoolean - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 存储 `Boolean` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putInt <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putInt(key: String, value: Int)
|
||||
```
|
||||
<h2 class="deprecated">putInt - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 存储 `Int` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putLong <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putLong(key: String, value: Long)
|
||||
```
|
||||
<h2 class="deprecated">putLong - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 存储 `Long` 键值。
|
||||
请转移到 `edit` 方法
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## putFloat <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putFloat(key: String, value: Float)
|
||||
```
|
||||
<h2 class="deprecated">putFloat - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0` `添加`
|
||||
|
||||
**功能描述**
|
||||
`v1.1.9` `作废`
|
||||
|
||||
> 存储 `Float` 键值。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
请转移到 `edit` 方法
|
||||
|
||||
## get <span class="symbol">- method</span>
|
||||
|
||||
@@ -444,19 +372,55 @@ inline fun <reified T> get(prefs: PrefsData<T>, value: T): T
|
||||
|
||||
> 智能获取指定类型的键值。
|
||||
|
||||
## put <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> put(prefs: PrefsData<T>, value: T)
|
||||
```
|
||||
<h2 class="deprecated">put - method</h2>
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.0.67` `新增`
|
||||
|
||||
`v1.1.9` `作废`
|
||||
|
||||
请转移到 `edit` 方法
|
||||
|
||||
## edit <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun edit(): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 智能存储指定类型的键值。
|
||||
> 创建新的 `Editor`。
|
||||
|
||||
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
## edit <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun edit(initiate: Editor.() -> Unit)
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 创建新的 `Editor`。
|
||||
|
||||
自动调用 `Editor.apply` 方法。
|
||||
|
||||
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -476,12 +440,200 @@ fun clearCache()
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 清除 `XSharedPreferences` 中缓存的键值数据。
|
||||
> 清除 `YukiHookPrefsBridge` 中缓存的键值数据。
|
||||
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnableModulePrefsCache`。
|
||||
无论是否开启 `YukiHookAPI.Configs.isEnablePrefsBridgeCache`。
|
||||
|
||||
调用此方法将清除当前存储的全部键值缓存。
|
||||
|
||||
下次将从 `XSharedPreferences` 重新读取。
|
||||
## Editor <span class="symbol">- class</span>
|
||||
|
||||
在 (Xposed) 宿主环境中使用。
|
||||
```kotlin:no-line-numbers
|
||||
inner class Editor internal constructor()
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> `YukiHookPrefsBridge` 的存储代理类。
|
||||
|
||||
请使用 `edit` 方法来获取 `Editor`。
|
||||
|
||||
在模块环境中或启用了 `isUsingNativeStorage` 后使用。
|
||||
|
||||
::: warning
|
||||
|
||||
在 (Xposed) 宿主环境下只读,无法使用。
|
||||
|
||||
:::
|
||||
|
||||
### remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun remove(key: String): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 移除全部包含 `key` 的存储数据。
|
||||
|
||||
### remove <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> remove(prefs: PrefsData<T>): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 移除 `PrefsData.key` 的存储数据。
|
||||
|
||||
### clear <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun clear(): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 移除全部存储数据。
|
||||
|
||||
### putString <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putString(key: String, value: String): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 存储 `String` 键值。
|
||||
|
||||
### putStringSet <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putStringSet(key: String, value: Set<String>): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 存储 `Set<String>` 键值。
|
||||
|
||||
### putBoolean <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putBoolean(key: String, value: Boolean): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 存储 `Boolean` 键值。
|
||||
|
||||
### putInt <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putInt(key: String, value: Int): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 存储 `Int` 键值。
|
||||
|
||||
### putLong <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putLong(key: String, value: Long): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 存储 `Long` 键值。
|
||||
|
||||
### putFloat <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun putFloat(key: String, value: Float): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 存储 `Float` 键值。
|
||||
|
||||
### put <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
inline fun <reified T> put(prefs: PrefsData<T>, value: T): Editor
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 智能存储指定类型的键值。
|
||||
|
||||
### commit <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun commit(): Boolean
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 提交更改 (同步)。
|
||||
|
||||
### apply <span class="symbol">- method</span>
|
||||
|
||||
```kotlin:no-line-numbers
|
||||
fun apply()
|
||||
```
|
||||
|
||||
**变更记录**
|
||||
|
||||
`v1.1.9` `新增`
|
||||
|
||||
**功能描述**
|
||||
|
||||
> 提交更改 (异步)。
|
@@ -20,7 +20,7 @@ data class PrefsData<T>(var key: String, var value: T) : Serializable
|
||||
|
||||
> 键值对存储构造类。
|
||||
|
||||
这个类是对 `YukiHookModulePrefs` 的一个扩展用法。
|
||||
这个类是对 `YukiHookPrefsBridge` 的一个扩展用法。
|
||||
|
||||
**功能示例**
|
||||
|
||||
@@ -43,9 +43,9 @@ object DataConst {
|
||||
|
||||
```kotlin
|
||||
// 读取
|
||||
val data = modulePrefs.get(DataConst.TEST_KV_DATA_1)
|
||||
val data = prefs().get(DataConst.TEST_KV_DATA_1)
|
||||
// 写入
|
||||
modulePrefs.put(DataConst.TEST_KV_DATA_1, "written value")
|
||||
prefs().edit { put(DataConst.TEST_KV_DATA_1, "written value") }
|
||||
```
|
||||
|
||||
> 宿主示例如下
|
||||
|
@@ -186,6 +186,26 @@ val context: Context = ... // 假设这就是你的 Context
|
||||
context.startActivity(context, HostTestActivity::class.java)
|
||||
```
|
||||
|
||||
上面我们在 `registerModuleAppActivities` 方法中设置的 `proxy` 参数为默认的全局代理 `Activity`。
|
||||
|
||||
如果你需要指定某个代理的 `Activity` 使用另外的宿主 `Activity` 进行代理,你可以参考如下方法。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HostTestActivity : ModuleAppActivity() {
|
||||
|
||||
// 指定一个另外的代理 Activity 类名,其也必须存在于宿主的 AndroidManifest 中
|
||||
override val proxyClassName get() = "com.demo.test.activity.OtherActivity"
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
// 模块资源已被自动注入,可以直接使用 xml 装载布局
|
||||
setContentView(R.layout.activity_main)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
更多功能请参考 [Context.registerModuleAppActivities](../public/com/highcapable/yukihookapi/hook/factory/YukiHookFactory#context-registermoduleappactivities-ext-method) 方法。
|
||||
|
@@ -46,7 +46,7 @@ loggerD(tag = "YukiHookAPI", msg = "This is a log")
|
||||
loggerD(tag = "YukiHookAPI", msg = "This is a log", type = LoggerType.LOGD)
|
||||
```
|
||||
|
||||
或又仅使用 `XposedBridge.log` 来打印日志,此方法仅可在 (Xposed) 宿主环境使用。
|
||||
或仅使用 (Xposed) 宿主环境中的日志功能来打印日志,此方法仅可在 (Xposed) 宿主环境使用。
|
||||
|
||||
> 示例如下
|
||||
|
||||
|
@@ -2,6 +2,12 @@
|
||||
|
||||
> `YukiHookAPI` 为开发者封装了一套接近零反射写法的反射 API,它几乎可以完全取代原生 Java 的反射 API 相关用法。
|
||||
|
||||
此功能的核心部分已被解耦合为 [YukiReflection](https://github.com/fankes/YukiReflection) 项目,它可以独立使用于任何 Android 项目中。
|
||||
|
||||
现在 `YukiReflection` 作为核心依赖集成于 `YukiHookAPI`。
|
||||
|
||||
`YukiHookAPI` 在 `YukiReflection` 的基础上加入了针对 Hook 功能的相关扩展,使用 `YukiHookAPI` 无需引入此依赖。
|
||||
|
||||
## Class 扩展
|
||||
|
||||
> 这里是 **Class** 对象自身相关的扩展功能。
|
||||
|
@@ -186,7 +186,7 @@ class OtherActivity : AppCompatActivity() {
|
||||
|
||||
相同的 **key** 在同一个 **Activity** 不同的 **Fragment** 中注册 **dataChannel**,它们依然会在当前 **Activity** 中同时被回调。
|
||||
|
||||
在模块中,你只能使用 **Activity** 的 **Context** 注册 **dataChannel**,你不能在 **Application** 以及 **Service** 等地方使用 **dataChannel**。
|
||||
在模块中,你可以在 **Activity**、**Application** 以及 **Service** 等地方使用 **dataChannel**,在 **Activity** 以外的地方使用时每个回调事件都会即时回调,此时你可以使用 **ChannelPriority** 进行管理。
|
||||
|
||||
若要在 **Fragment** 中使用 **dataChannel**,请使用 **activity?.dataChannel(...)**。
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
## 在 Activity 中使用
|
||||
|
||||
> 这里描述了在 `Activity` 中装载 `YukiHookModulePrefs` 的场景。
|
||||
> 这里描述了在 `Activity` 中装载 `YukiHookPrefsBridge` 的场景。
|
||||
|
||||
通常情况下我们可以这样在 Hook APP (宿主) 内对其进行初始化。
|
||||
|
||||
@@ -25,7 +25,7 @@ XSharedPreferences(BuildConfig.APPLICATION_ID)
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
modulePrefs.putString("test_name", "saved_value")
|
||||
prefs().edit { putString("test_name", "saved_value") }
|
||||
```
|
||||
|
||||
当你在 Hook APP (宿主) 中读取数据时,可以使用如下方法。
|
||||
@@ -36,7 +36,7 @@ modulePrefs.putString("test_name", "saved_value")
|
||||
val testName = prefs.getString("test_name", "default_value")
|
||||
```
|
||||
|
||||
你不需要考虑传入模块的包名以及一系列复杂的权限配置,一切都交给 `YukiHookModulePrefs` 来处理。
|
||||
你不需要考虑传入模块的包名以及一系列复杂的权限配置,一切都交给 `YukiHookPrefsBridge` 来处理。
|
||||
|
||||
若要实现存储的区域划分,你可以指定每个 `prefs` 文件的名称。
|
||||
|
||||
@@ -46,9 +46,9 @@ val testName = prefs.getString("test_name", "default_value")
|
||||
|
||||
```kotlin
|
||||
// 推荐用法
|
||||
modulePrefs("specify_file_name").putString("test_name", "saved_value")
|
||||
prefs("specify_file_name").edit { putString("test_name", "saved_value") }
|
||||
// 也可以这样用
|
||||
modulePrefs.name("specify_file_name").putString("test_name", "saved_value")
|
||||
prefs().name("specify_file_name").edit { putString("test_name", "saved_value") }
|
||||
```
|
||||
|
||||
在 Hook APP (宿主) 中这样读取。
|
||||
@@ -64,21 +64,40 @@ val testName = prefs.name("specify_file_name").getString("test_name", "default_v
|
||||
|
||||
若你的项目中有大量的固定数据需要存储和读取,推荐使用 `PrefsData` 来创建模板。
|
||||
|
||||
通过上面的示例,你可以调用 `edit` 方法使用以下两种方式来批量存储数据。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
// <方案 1>
|
||||
prefs().edit {
|
||||
putString("test_name_1", "saved_value_1")
|
||||
putString("test_name_2", "saved_value_2")
|
||||
putString("test_name_3", "saved_value_3")
|
||||
}
|
||||
// <方案 2>
|
||||
prefs().edit()
|
||||
.putString("test_name_1", "saved_value_1")
|
||||
.putString("test_name_2", "saved_value_2")
|
||||
.putString("test_name_3", "saved_value_3")
|
||||
.apply()
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
更多功能请参考 [YukiHookModulePrefs](../public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookModulePrefs)、[PrefsData](../public/com/highcapable/yukihookapi/hook/xposed/prefs/data/PrefsData)。
|
||||
更多功能请参考 [YukiHookPrefsBridge](../public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge)、[PrefsData](../public/com/highcapable/yukihookapi/hook/xposed/prefs/data/PrefsData)。
|
||||
|
||||
:::
|
||||
|
||||
## 在 PreferenceFragment 中使用
|
||||
|
||||
> 这里描述了在 `PreferenceFragment` 中装载 `YukiHookModulePrefs` 的场景。
|
||||
> 这里描述了在 `PreferenceFragment` 中装载 `YukiHookPrefsBridge` 的场景。
|
||||
|
||||
若你的模块使用了 `PreferenceFragmentCompat`,你现在可以将其继承类开始迁移到 `ModulePreferenceFragment`。
|
||||
|
||||
::: danger
|
||||
|
||||
你必须继承 **ModulePreferenceFragment** 才能实现 **YukiHookModulePrefs** 的模块存储功能。
|
||||
你必须继承 **ModulePreferenceFragment** 才能实现 **YukiHookPrefsBridge** 的模块存储功能。
|
||||
|
||||
:::
|
||||
|
||||
@@ -86,4 +105,50 @@ val testName = prefs.name("specify_file_name").getString("test_name", "default_v
|
||||
|
||||
更多功能请参考 [ModulePreferenceFragment](../public/com/highcapable/yukihookapi/hook/xposed/prefs/ui/ModulePreferenceFragment)。
|
||||
|
||||
:::
|
||||
|
||||
## 使用原生方式存储
|
||||
|
||||
在模块环境中 `YukiHookPrefsBridge` 默认会将数据存储到模块自己的私有目录 (或 Hook Framework 提供的共享目录) 中。
|
||||
|
||||
在宿主环境中使用 `YukiHookPrefsBridge` 默认会读取模块自己的私有目录 (或 Hook Framework 提供的共享目录) 中的数据。
|
||||
|
||||
如果你想直接将数据存储到模块或宿主当前环境自身的私有目录,你可以使用 `native` 方法。
|
||||
|
||||
例如模块的目录是 `.../com.demo.test.module/shared_prefs`,宿主的目录是 `.../com.demo.test.host/shared_prefs`。
|
||||
|
||||
以下是在 `Activity` 中的用法。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
// 存储私有数据
|
||||
prefs().native().edit { putBoolean("isolation_data", true) }
|
||||
// 读取私有数据
|
||||
val privateData = prefs().native().getBoolean("isolation_data")
|
||||
// 存储共享数据
|
||||
prefs().edit { putBoolean("public_data", true) }
|
||||
// 读取共享数据
|
||||
val publicData = prefs().getBoolean("public_data")
|
||||
```
|
||||
|
||||
以下是在 `PackageParam` 中的用法。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
// 存储私有数据
|
||||
prefs.native().edit { putBoolean("isolation_data", true) }
|
||||
// 读取私有数据
|
||||
val privateData = prefs.native().getBoolean("isolation_data")
|
||||
// 读取共享数据
|
||||
val publicData = prefs.getBoolean("public_data")
|
||||
```
|
||||
|
||||
使用 `native` 方法后,无论在 `Activity` 还是 `PackageParam` 中都会将数据<u>**在对应环境的私有目录中**</u>存储、读取,数据相互隔离。
|
||||
|
||||
::: tip
|
||||
|
||||
更多功能请参考 [YukiHookPrefsBridge](../public/com/highcapable/yukihookapi/hook/xposed/prefs/YukiHookPrefsBridge)。
|
||||
|
||||
:::
|
@@ -105,7 +105,7 @@ object CustomHooker : YukiBaseHooker() {
|
||||
}
|
||||
```
|
||||
|
||||
子 Hooker **建议使用**单例 `object` 创建,你也可以使用 `class` 但不推荐。
|
||||
子 Hooker **建议使用**单例 `object` 创建,你也可以使用 `class` 但一般情况下不推荐。
|
||||
|
||||
::: warning
|
||||
|
||||
@@ -138,7 +138,7 @@ object CustomHooker : YukiBaseHooker() {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadApp(name = "com.example.demo", ChildCustomHooker)
|
||||
@@ -172,12 +172,12 @@ object FirstHooker : YukiBaseHooker() {
|
||||
}
|
||||
```
|
||||
|
||||
搭建完全部 Hooker 后,你就可以在你的 `HookEntryClass` 入口类中的 `onHook` 方法中装载你的 Hooker 了。
|
||||
搭建完全部 Hooker 后,你就可以在你的 Hook 入口类中的 `onHook` 方法中装载你的 Hooker 了。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() =
|
||||
YukiHookAPI.encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
@@ -189,12 +189,37 @@ class HookEntry : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase(FirstHooker, SecondHooker, ThirdHooker ...)
|
||||
}
|
||||
```
|
||||
|
||||
#### 特殊情况
|
||||
|
||||
上面我们说到,在一般情况下不推荐使用 `class` 创建子 Hooker,但是有一种特殊情况,它可能依然需要保持你的 Hooker 支持多例。
|
||||
|
||||
有极少的可能性会出现在一个进程中存在多个包名的情况,这种情况下,`YukiHookAPI` 发现子 Hooker 为单例时,将会忽略并打印一条警告信息。
|
||||
|
||||
```:no-line-numbers
|
||||
This Hooker "HOOKER" is singleton or reused, but the current process has multiple package name "NAME", the original is "NAME"
|
||||
Make sure your Hooker supports multiple instances for this situation
|
||||
The process with package name "NAME" will be ignored
|
||||
```
|
||||
|
||||
遇到这种情况时,我们只需要修改 `object` 为 `class` 或者在装载时判断包名后再装载子 Hooker。
|
||||
|
||||
例如以上情况中可使用以下形式来装载。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
encase {
|
||||
// 假设这个就是你需要装载的 APP 包名和子 Hooker
|
||||
loadApp("com.example.demo", YourCustomHooker)
|
||||
}
|
||||
```
|
||||
|
||||
### 扩展特性
|
||||
|
||||
如果你当前使用的 Hook Framework 支持并启用了资源钩子(Resources Hook)功能,你现在可以直接在 `encase` 中创建 Resources Hook。
|
||||
@@ -284,7 +309,7 @@ encase {
|
||||
> 示例代码 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
// <情景1>
|
||||
@@ -342,7 +367,7 @@ encase {
|
||||
> 示例代码 2
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() {
|
||||
encase(CustomHooker)
|
||||
|
@@ -10,7 +10,7 @@ pageClass: hidden-anchor-page
|
||||
|
||||
## 非阻断异常
|
||||
|
||||
> 这些异常不会导致 APP 停止运行(FC),但是会在控制台打印 `E` 级别的日志,也可能会停止继续执行相关功能。
|
||||
> 这些异常不会导致 APP 停止运行 (FC),但是会在控制台打印 `E` 级别的日志,也可能会停止继续执行相关功能。
|
||||
|
||||
###### exception
|
||||
|
||||
@@ -43,7 +43,7 @@ You cannot load a hooker in "onInit" or "onXposedEvent" method! Aborted
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// ❗错误的使用方法
|
||||
@@ -72,7 +72,7 @@ class HookEntry : IYukiHookXposedInit {
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onInit() {
|
||||
// 这里只能装载 configs 方法
|
||||
@@ -126,7 +126,7 @@ An exception occurred when hooking internal function
|
||||
|
||||
::: danger loggerE
|
||||
|
||||
YukiHookAPI try to load HookEntryClass failed
|
||||
YukiHookAPI try to load hook entry class failed
|
||||
|
||||
:::
|
||||
|
||||
@@ -996,7 +996,7 @@ An exception occurred during AppLifecycle event
|
||||
|
||||
## 阻断异常
|
||||
|
||||
> 这些异常会直接导致 APP 停止运行(FC),同时会在控制台打印 `E` 级别的日志,还会造成 Hook 进程“死掉”。
|
||||
> 这些异常会直接导致 APP 停止运行 (FC),同时会在控制台打印 `E` 级别的日志,还会造成 Hook 进程“死掉”。
|
||||
|
||||
###### exception
|
||||
|
||||
@@ -1016,54 +1016,6 @@ YukiHookAPI cannot support current Hook API or cannot found any available Hook A
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger RuntimeException
|
||||
|
||||
!!!DO NOT ALLOWED!!! You cannot hook or reflection to call the internal class of the YukiHookAPI itself, The called class is \[**CLASS**\]
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
你使用 `YukiHookAPI` 的相关反射或 Hook 功能调用了 API 自身的 `Class` 对象。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
// <情景1>
|
||||
YukiHookAPI.current()
|
||||
// <情景2>
|
||||
PackageParam::class.java.hook {
|
||||
// ...
|
||||
}
|
||||
// <情景3>
|
||||
MethodFinder::class.java.method {
|
||||
name = "name"
|
||||
param(StringClass)
|
||||
}.get().call("name")
|
||||
// ...
|
||||
```
|
||||
|
||||
**解决方案**
|
||||
|
||||
请检查代码部分是否有错误,例如下面的情况。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
YourClass.method {
|
||||
// ...
|
||||
// ❗ 没有调用方法执行,这里实际调用的是 MethodFinder.Result 对象
|
||||
}.get(instance).current()
|
||||
YourClass.method {
|
||||
// ...
|
||||
// ✅ 正确的使用方法,假设此方法无参
|
||||
}.get(instance).call().current()
|
||||
```
|
||||
|
||||
不允许内联、反射、Hook `YukiHookAPI` 自身的 `Class` 以及内部功能,防止发生错误。
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger UnsupportedOperationException
|
||||
|
||||
!!!DANGEROUS!!! Hook \[**CLASS**\] Class is a dangerous behavior! \[**CONTENT**\] \[**SOLVE**\]
|
||||
@@ -1215,13 +1167,13 @@ ModuleApplication.appContext...
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
YukiHookModulePrefs not allowed in Custom Hook API
|
||||
YukiHookPrefsBridge not allowed in Custom Hook API
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
在 Hook 自身 APP(非 Xposed 模块) 中使用了 `YukiHookModulePrefs`。
|
||||
在 Hook 自身 APP(非 Xposed 模块) 中使用了 `YukiHookPrefsBridge`。
|
||||
|
||||
> 示例如下
|
||||
|
||||
@@ -1240,7 +1192,7 @@ class MyApplication : Application() {
|
||||
|
||||
**解决方案**
|
||||
|
||||
你只能在 [作为 Xposed 模块使用](../config/xposed-using) 时使用 `YukiHookModulePrefs`,在 Hook 自身 APP 中请使用原生的 `Sp` 存储。
|
||||
你只能在 [作为 Xposed 模块使用](../config/xposed-using) 时使用 `YukiHookPrefsBridge`,在 Hook 自身 APP 中请使用原生的 `Sp` 存储。
|
||||
|
||||
###### exception
|
||||
|
||||
@@ -1252,7 +1204,7 @@ Cannot load the XSharedPreferences, maybe is your Hook Framework not support it
|
||||
|
||||
**异常原因**
|
||||
|
||||
在 (Xposed) 宿主环境使用了 `YukiHookModulePrefs` 但是无法得到 `XSharedPreferences` 对象。
|
||||
在 (Xposed) 宿主环境使用了 `YukiHookPrefsBridge` 但是无法得到 `XSharedPreferences` 对象。
|
||||
|
||||
> 示例如下
|
||||
|
||||
@@ -1304,29 +1256,13 @@ class MyApplication : Application() {
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
YukiHookDataChannel only support used on an Activity, but this current context is "**CLASSNAME**"
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
在模块的非 `Activity` 环境中使用了 `YukiHookDataChannel`。
|
||||
|
||||
**解决方案**
|
||||
|
||||
你只能在 `Activity` 或 `Fragment` 中使用 `YukiHookDataChannel`。
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
Xposed modulePackageName load failed, please reset and rebuild it
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
在 Hook 过程中使用 `YukiHookModulePrefs` 或 `YukiHookDataChannel` 时无法读取装载时的 `modulePackageName` 导致不能确定自身模块的包名。
|
||||
在 Hook 过程中使用 `YukiHookPrefsBridge` 或 `YukiHookDataChannel` 时无法读取装载时的 `modulePackageName` 导致不能确定自身模块的包名。
|
||||
|
||||
**解决方案**
|
||||
|
||||
@@ -1336,13 +1272,13 @@ Xposed modulePackageName load failed, please reset and rebuild it
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
YukiHookModulePrefs missing Context instance
|
||||
YukiHookPrefsBridge missing Context instance
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
在模块中使用了 `YukiHookModulePrefs` 存储数据但并未传入 `Context` 实例。
|
||||
在模块中使用了 `YukiHookPrefsBridge` 存储数据但并未传入 `Context` 实例。
|
||||
|
||||
> 示例如下
|
||||
|
||||
@@ -1353,14 +1289,14 @@ class MainActivity : AppCompatActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
// ❗错误的使用方法
|
||||
// 构造方法已在 API 1.0.88 及以后的版本中设置为 private
|
||||
YukiHookModulePrefs().getBoolean("test_data")
|
||||
YukiHookPrefsBridge().getBoolean("test_data")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**解决方案**
|
||||
|
||||
在 `Activity` 中推荐使用 `modulePrefs` 方法来装载 `YukiHookModulePrefs`。
|
||||
在 `Activity` 中推荐使用 `prefs(...)` 方法来装载 `YukiHookPrefsBridge`。
|
||||
|
||||
> 示例如下
|
||||
|
||||
@@ -1370,7 +1306,7 @@ class MainActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
// ✅ 正确的使用方法
|
||||
modulePrefs.getBoolean("test_data")
|
||||
prefs().getBoolean("test_data")
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -1379,17 +1315,42 @@ class MainActivity : AppCompatActivity() {
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
The Host App's Context has not yet initialized successfully, the native function cannot be used at this time
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
在 (Xposed) 宿主环境 `PackageParam` 中使用了 `YukiHookPrefsBridge` 并调用了 `native` 方法但此时宿主的生命周期并未初始化。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
encase {
|
||||
// 调用了此方法
|
||||
prefs.native()
|
||||
}
|
||||
```
|
||||
|
||||
**解决方案**
|
||||
|
||||
`native` 方法需要一个存在的 `Context` 对象用于存储数据,你可以在监听宿主生命周期状态中使用此方法。
|
||||
|
||||
###### exception
|
||||
|
||||
::: danger IllegalStateException
|
||||
|
||||
Key-Value type **TYPE** is not allowed
|
||||
|
||||
:::
|
||||
|
||||
**异常原因**
|
||||
|
||||
在使用 `YukiHookModulePrefs` 的 `get` 或 `put` 方法或 `YukiHookDataChannel` 的 `wait` 或 `put` 方法时传入了不支持的存储类型。
|
||||
在使用 `YukiHookPrefsBridge` 的 `get` 或 `put` 方法或 `YukiHookDataChannel` 的 `wait` 或 `put` 方法时传入了不支持的存储类型。
|
||||
|
||||
**解决方案**
|
||||
|
||||
`YukiHookModulePrefs` 支持的类型只有 `String`、`Set<String>`、`Int`、`Float`、`Long`、`Boolean`,请传入支持的类型。
|
||||
`YukiHookPrefsBridge` 支持的类型只有 `String`、`Set<String>`、`Int`、`Float`、`Long`、`Boolean`,请传入支持的类型。
|
||||
|
||||
`YukiHookDataChannel` 支持的类型为 `Intent.putExtra` 限制的类型,请传入支持的类型。
|
||||
|
||||
|
@@ -230,9 +230,21 @@ class _YukiHookXposedInit : IXposedHookZygoteInit, IXposedHookLoadPackage {
|
||||
}
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
由于 Xposed 入口类是被 **YukiHookAPI** 动态生成的,它会同时生成如下两个文件。
|
||||
|
||||
- **assets/xposed_init**
|
||||
|
||||
- **resources/META-INF/yukihookapi_init**
|
||||
|
||||
如果你正在使用 **Git** 代码控制系统,你可以将这两个文件添加到 **.gitignore** 文件中。
|
||||
|
||||
:::
|
||||
|
||||
### IYukiHookXposedInit 接口
|
||||
|
||||
`IYukiHookXposedInit` 接口为你的 `HookEntryClass` 必须实现的接口,这是你的模块开始 Hook 的起点。
|
||||
`IYukiHookXposedInit` 接口为你的 Hook 入口类必须实现的接口,这是你的模块开始 Hook 的起点。
|
||||
|
||||
::: tip
|
||||
|
||||
|
@@ -618,7 +618,13 @@ override fun onHook() = encase {
|
||||
}
|
||||
```
|
||||
|
||||
## Xposed 模块判断自身激活状态
|
||||
## Xposed 模块状态
|
||||
|
||||
通常情况下,Xposed 模块的开发者都会去选择读取当前 Xposed 模块的激活信息以更好地向用户展示当前功能的生效状态。
|
||||
|
||||
除了基本的 Hook 功能,`YukiHookAPI` 还为开发者设计了一套 Xposed 模块状态判断的功能,如激活状态、Hook Framework 信息。
|
||||
|
||||
### 判断自身激活状态
|
||||
|
||||
通常情况下,我们会选择写一个方法,使其返回 `false`,然后 Hook 掉这个方法使其返回 `true` 来证明 Hook 已经生效。
|
||||
|
||||
@@ -686,12 +692,42 @@ if(YukiHookAPI.Status.isModuleActive) {
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
```
|
||||
|
||||
若模块激活判断中包含太极、无极中的激活状态,就必须将模块的 **Application** 继承于 **ModuleApplication** 或直接使用 **ModuleApplication**;
|
||||
若模块激活判断中包含太极、无极中的激活状态,就必须将模块的 **Application** 继承于 **ModuleApplication** 或直接使用 **ModuleApplication**。
|
||||
|
||||
**1.0.91** 版本后的 API 修改了激活逻辑判断方式,现在你可以在模块与 Hook APP (宿主) 中同时使用此 API;
|
||||
:::
|
||||
|
||||
### 获取 Hook Framework 信息
|
||||
|
||||
除了判断自身激活状态之外,你还可以通过 `YukiHookAPI.Status` 中的 `Executor` 来获取当前 Hook Framework 的相关信息。
|
||||
|
||||
例如我们可以使用 `YukiHookAPI.Status.Executor.name` 来获取当前 Hook Framework 的名称。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
val frameworkName = YukiHookAPI.Status.Executor.name
|
||||
```
|
||||
|
||||
我们还可以使用 `YukiHookAPI.Status.Executor.apiLevel` 来获取当前 Hook Framework 的 API Level。
|
||||
|
||||
> 示例如下
|
||||
|
||||
```kotlin
|
||||
val frameworkApiLevel = YukiHookAPI.Status.Executor.apiLevel
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
更多功能请参考 [YukiHookAPI.Status.Executor](../api/public/com/highcapable/yukihookapi/YukiHookAPI#executor-object)。
|
||||
|
||||
:::
|
||||
|
||||
::: warning
|
||||
|
||||
**1.0.91** 版本后的 **YukiHookAPI** 修改了获取 Xposed 模块状态的逻辑判断方式,现在你可以在模块与 Hook APP (宿主) 中同时使用此 API;
|
||||
|
||||
需要确保 **YukiHookAPI.Configs.isEnableHookModuleStatus** 是启用状态;
|
||||
|
||||
除了提供标准 API 的 Hook Framework 之外,其它情况下模块可能都将无法判断自己是否被激活。
|
||||
**YukiHookAPI** 仅对已知的获取方式进行了对接,除了提供标准 API 的 Hook Framework 之外,其它情况下模块可能都将无法判断自己是否被激活或是获取 Hook Framework 的相关信息。
|
||||
|
||||
:::
|
@@ -47,7 +47,7 @@
|
||||
|
||||
```kotlin
|
||||
@InjectYukiHookWithXposed
|
||||
class HookEntry : IYukiHookXposedInit {
|
||||
object HookEntry : IYukiHookXposedInit {
|
||||
|
||||
override fun onHook() = encase {
|
||||
loadZygote {
|
||||
|
@@ -215,6 +215,6 @@ override fun attachBaseContext(base: Context?) {
|
||||
|
||||
::: warning
|
||||
|
||||
使用自定义的 Hook Framework 而并非完整的 Xposed 模块时,**YukiHookModuleStatus**、**YukiHookModulePrefs**、**YukiHookDataChannel** 以及 Resources Hook 功能将失效。
|
||||
使用自定义的 Hook Framework 而并非完整的 Xposed 模块时,**YukiHookPrefsBridge**、**YukiHookDataChannel** 以及 Resources Hook 功能将失效。
|
||||
|
||||
:::
|
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{_ as e,o as c,c as t}from"./app.6074a838.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default};
|
||||
import{_ as e,o as c,c as t}from"./app.f643a53b.js";const _={};function o(r,n){return c(),t("div")}const a=e(_,[["render",o],["__file","404.html.vue"]]);export{a as default};
|
@@ -1,4 +1,4 @@
|
||||
import{_ as s,o as e,c as o,a as n}from"./app.6074a838.js";const a={},p=n(`<h1 id="basefinder-class" tabindex="-1"><a class="header-anchor" href="#basefinder-class" aria-hidden="true">#</a> BaseFinder <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseFinder</span></span>
|
||||
import{_ as s,o as e,c as o,a as n}from"./app.f643a53b.js";const a={},p=n(`<h1 id="basefinder-class" tabindex="-1"><a class="header-anchor" href="#basefinder-class" aria-hidden="true">#</a> BaseFinder <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseFinder</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.70</code> <code>\u65B0\u589E</code></p><p><code>v1.1.0</code> <code>\u4FEE\u6539</code></p><p>\u5206\u79BB\u539F\u59CB\u547D\u540D <code>BaseFinder</code> \u4E2D\u7684\u90E8\u5206\u65B9\u6CD5\u4E0E\u53C2\u6570\u5230 <code>MemberBaseFinder</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u8FD9\u662F <code>Class</code> \u4E0E <code>Member</code> \u67E5\u627E\u7C7B\u529F\u80FD\u7684\u57FA\u672C\u7C7B\u5B9E\u73B0\u3002</p></blockquote><h2 id="basefinder-indextypecondition-class" tabindex="-1"><a class="header-anchor" href="#basefinder-indextypecondition-class" aria-hidden="true">#</a> BaseFinder.IndexTypeCondition <span class="symbol">- class</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> type</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexConfigType</span><span style="color:#ADBAC7;">)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.70</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u5B57\u8282\u7801\u4E0B\u6807\u7B5B\u9009\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h3 id="index-method" tabindex="-1"><a class="header-anchor" href="#index-method" aria-hidden="true">#</a> index <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">index</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.70</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u8BBE\u7F6E\u4E0B\u6807\u3002</p></blockquote><p>\u82E5 <code>index</code> \u5C0F\u4E8E\u96F6\u5219\u4E3A\u5012\u5E8F\uFF0C\u6B64\u65F6\u53EF\u4EE5\u4F7F\u7528 <code>IndexTypeConditionSort.reverse</code> \u65B9\u6CD5\u5B9E\u73B0\u3002</p><p>\u53EF\u4F7F\u7528 <code>IndexTypeConditionSort.first</code> \u548C <code>IndexTypeConditionSort.last</code> \u8BBE\u7F6E\u9996\u4F4D\u548C\u672B\u4F4D\u7B5B\u9009\u6761\u4EF6\u3002</p><h3 id="index-method-1" tabindex="-1"><a class="header-anchor" href="#index-method-1" aria-hidden="true">#</a> index <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">index</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeConditionSort</span></span>
|
@@ -1,4 +1,4 @@
|
||||
import{_ as s,o as e,c as n,a as o}from"./app.6074a838.js";const a={},l=o(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="basefinder-class" tabindex="-1"><a class="header-anchor" href="#basefinder-class" aria-hidden="true">#</a> BaseFinder <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseFinder</span></span>
|
||||
import{_ as s,o as e,c as n,a as o}from"./app.f643a53b.js";const a={},l=o(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="basefinder-class" tabindex="-1"><a class="header-anchor" href="#basefinder-class" aria-hidden="true">#</a> BaseFinder <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">abstract</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">BaseFinder</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.70</code> <code>added</code></p><p><code>v1.1.0</code> <code>modified</code></p><p>\u5206\u79BB\u539F\u59CB\u547D\u540D <code>BaseFinder</code> \u4E2D\u7684\u90E8\u5206\u65B9\u6CD5\u4E0E\u53C2\u6570\u5230 <code>MemberBaseFinder</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8FD9\u662F <code>Class</code> \u4E0E <code>Member</code> \u67E5\u627E\u7C7B\u529F\u80FD\u7684\u57FA\u672C\u7C7B\u5B9E\u73B0\u3002</p></blockquote><h2 id="basefinder-indextypecondition-class" tabindex="-1"><a class="header-anchor" href="#basefinder-indextypecondition-class" aria-hidden="true">#</a> BaseFinder.IndexTypeCondition <span class="symbol">- class</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> type</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexConfigType</span><span style="color:#ADBAC7;">)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.70</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5B57\u8282\u7801\u4E0B\u6807\u7B5B\u9009\u5B9E\u73B0\u7C7B\u3002</p></blockquote><h3 id="index-method" tabindex="-1"><a class="header-anchor" href="#index-method" aria-hidden="true">#</a> index <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">index</span><span style="color:#ADBAC7;">(num</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span><span style="color:#ADBAC7;">)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.70</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u4E0B\u6807\u3002</p></blockquote><p>\u82E5 <code>index</code> \u5C0F\u4E8E\u96F6\u5219\u4E3A\u5012\u5E8F\uFF0C\u6B64\u65F6\u53EF\u4EE5\u4F7F\u7528 <code>IndexTypeConditionSort.reverse</code> \u65B9\u6CD5\u5B9E\u73B0\u3002</p><p>\u53EF\u4F7F\u7528 <code>IndexTypeConditionSort.first</code> \u548C <code>IndexTypeConditionSort.last</code> \u8BBE\u7F6E\u9996\u4F4D\u548C\u672B\u4F4D\u7B5B\u9009\u6761\u4EF6\u3002</p><h3 id="index-method-1" tabindex="-1"><a class="header-anchor" href="#index-method-1" aria-hidden="true">#</a> index <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">index</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeConditionSort</span></span>
|
@@ -1,4 +1,4 @@
|
||||
import{_ as s,o as a,c as n,a as l}from"./app.6074a838.js";const e={},o=l(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="channeldata-class" tabindex="-1"><a class="header-anchor" href="#channeldata-class" aria-hidden="true">#</a> ChannelData <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">data</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelData</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> key</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> value</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Serializable</span></span>
|
||||
import{_ as s,o as a,c as n,a as l}from"./app.f643a53b.js";const e={},o=l(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="channeldata-class" tabindex="-1"><a class="header-anchor" href="#channeldata-class" aria-hidden="true">#</a> ChannelData <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">data</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelData</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> key</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> value</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Serializable</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.88</code> <code>added</code></p><p><code>v1.1.5</code> <code>modified</code></p><p>\u5B9E\u73B0\u4E86 <code>Serializable</code> \u63A5\u53E3</p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6570\u636E\u901A\u8BAF\u6865\u952E\u503C\u6784\u9020\u7C7B\u3002</p></blockquote><p>\u8FD9\u4E2A\u7C7B\u662F\u5BF9 <code>YukiHookDataChannel</code> \u7684\u4E00\u4E2A\u6269\u5C55\u7528\u6CD5\u3002</p><p><strong>Function Example</strong></p><p>\u5EFA\u7ACB\u4E00\u4E2A\u6A21\u677F\u7C7B\u5B9A\u4E49\u6A21\u5757\u4E0E\u5BBF\u4E3B\u9700\u8981\u53D1\u9001\u7684\u952E\u503C\u6570\u636E\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">object</span><span style="color:#ADBAC7;"> DataConst {</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">TEST_KV_DATA_1</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelData</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"test_data_1"</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">"defalut value"</span><span style="color:#ADBAC7;">)</span></span>
|
@@ -1,4 +1,4 @@
|
||||
import{_ as s,o as a,c as n,a as l}from"./app.6074a838.js";const e={},o=l(`<h1 id="channeldata-class" tabindex="-1"><a class="header-anchor" href="#channeldata-class" aria-hidden="true">#</a> ChannelData <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">data</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelData</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> key</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> value</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Serializable</span></span>
|
||||
import{_ as s,o as a,c as n,a as l}from"./app.f643a53b.js";const e={},o=l(`<h1 id="channeldata-class" tabindex="-1"><a class="header-anchor" href="#channeldata-class" aria-hidden="true">#</a> ChannelData <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">data</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelData</span><span style="color:#F47067;"><</span><span style="color:#F69D50;">T</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> key</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">String</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> value</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Serializable</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0.88</code> <code>\u65B0\u589E</code></p><p><code>v1.1.5</code> <code>\u4FEE\u6539</code></p><p>\u5B9E\u73B0\u4E86 <code>Serializable</code> \u63A5\u53E3</p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u6570\u636E\u901A\u8BAF\u6865\u952E\u503C\u6784\u9020\u7C7B\u3002</p></blockquote><p>\u8FD9\u4E2A\u7C7B\u662F\u5BF9 <code>YukiHookDataChannel</code> \u7684\u4E00\u4E2A\u6269\u5C55\u7528\u6CD5\u3002</p><p><strong>\u529F\u80FD\u793A\u4F8B</strong></p><p>\u5EFA\u7ACB\u4E00\u4E2A\u6A21\u677F\u7C7B\u5B9A\u4E49\u6A21\u5757\u4E0E\u5BBF\u4E3B\u9700\u8981\u53D1\u9001\u7684\u952E\u503C\u6570\u636E\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">object</span><span style="color:#ADBAC7;"> DataConst {</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">TEST_KV_DATA_1</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelData</span><span style="color:#ADBAC7;">(</span><span style="color:#96D0FF;">"test_data_1"</span><span style="color:#ADBAC7;">, </span><span style="color:#96D0FF;">"defalut value"</span><span style="color:#ADBAC7;">)</span></span>
|
@@ -1,2 +1,2 @@
|
||||
import{_ as s,o as a,c as o,a as n}from"./app.6074a838.js";const e={},l=n(`<h1 id="channelpriority-class" tabindex="-1"><a class="header-anchor" href="#channelpriority-class" aria-hidden="true">#</a> ChannelPriority <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelPriority</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> () </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span></span>
|
||||
import{_ as s,o as a,c as o,a as n}from"./app.f643a53b.js";const e={},l=n(`<h1 id="channelpriority-class" tabindex="-1"><a class="header-anchor" href="#channelpriority-class" aria-hidden="true">#</a> ChannelPriority <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelPriority</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> () </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.1.5</code> <code>\u65B0\u589E</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u6570\u636E\u901A\u8BAF\u6865\u54CD\u5E94\u4F18\u5148\u7EA7\u6784\u9020\u7C7B\u3002</p></blockquote><p>\u8FD9\u4E2A\u7C7B\u662F\u5BF9 <code>YukiHookDataChannel</code> \u7684\u4E00\u4E2A\u6269\u5C55\u7528\u6CD5\u3002</p>`,7),c=[l];function t(p,r){return a(),o("div",null,c)}const d=s(e,[["render",t],["__file","ChannelPriority.html.vue"]]);export{d as default};
|
@@ -1,2 +1,2 @@
|
||||
import{_ as s,o as n,c as o,a}from"./app.6074a838.js";const e={},t=a(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="channelpriority-class" tabindex="-1"><a class="header-anchor" href="#channelpriority-class" aria-hidden="true">#</a> ChannelPriority <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelPriority</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> () </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span></span>
|
||||
import{_ as s,o as n,c as o,a}from"./app.f643a53b.js";const e={},t=a(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="channelpriority-class" tabindex="-1"><a class="header-anchor" href="#channelpriority-class" aria-hidden="true">#</a> ChannelPriority <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ChannelPriority</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> () </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.5</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6570\u636E\u901A\u8BAF\u6865\u54CD\u5E94\u4F18\u5148\u7EA7\u6784\u9020\u7C7B\u3002</p></blockquote><p>\u8FD9\u4E2A\u7C7B\u662F\u5BF9 <code>YukiHookDataChannel</code> \u7684\u4E00\u4E2A\u6269\u5C55\u7528\u6CD5\u3002</p>`,8),l=[t];function c(r,p){return n(),o("div",null,l)}const d=s(e,[["render",c],["__file","ChannelPriority.html.vue"]]);export{d as default};
|
@@ -1 +0,0 @@
|
||||
import{_ as n,r as a,o as c,c as s,b as e,d as r,a as i,e as o}from"./app.6074a838.js";const p={},l=i('<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="componenttypefactory-kt" tabindex="-1"><a class="header-anchor" href="#componenttypefactory-kt" aria-hidden="true">#</a> ComponentTypeFactory <span class="symbol">- kt</span></h1><p><strong>Change Records</strong></p><p><code>v1.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8FD9\u662F\u4E00\u4E2A\u9884\u7F6E Hook \u7C7B\u578B\u7684\u5E38\u91CF\u7C7B\uFF0C\u4E3B\u8981\u4E3A <code>Android</code> \u76F8\u5173\u7EC4\u4EF6\u7684 <code>Class</code> \u5185\u5BB9\uFF0C\u8DDF\u968F\u7248\u672C\u66F4\u65B0\u4F1A\u9010\u4E00\u8FDB\u884C\u589E\u52A0\u3002</p></blockquote>',6),d=o("\u8BE6\u60C5\u53EF "),h={href:"https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"},_=o("\u70B9\u51FB\u8FD9\u91CC"),m=o(" \u8FDB\u884C\u67E5\u770B\u3002");function u(k,f){const t=a("ExternalLinkIcon");return c(),s("div",null,[l,e("p",null,[d,e("a",h,[_,r(t)]),m])])}const g=n(p,[["render",u],["__file","ComponentTypeFactory.html.vue"]]);export{g as default};
|
@@ -1 +1 @@
|
||||
const e=JSON.parse('{"key":"v-5e874c45","path":"/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[],"git":{"updatedTime":1663397167000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.md"}');export{e as data};
|
||||
const e=JSON.parse('{"key":"v-5e874c45","path":"/zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"zh-CN","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[],"git":{"updatedTime":1674669050000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"zh-cn/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.md"}');export{e as data};
|
@@ -1 +0,0 @@
|
||||
import{_ as n,r as c,o as a,c as r,b as e,d as s,a as p,e as o}from"./app.6074a838.js";const d={},i=p('<h1 id="componenttypefactory-kt" tabindex="-1"><a class="header-anchor" href="#componenttypefactory-kt" aria-hidden="true">#</a> ComponentTypeFactory <span class="symbol">- kt</span></h1><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u8FD9\u662F\u4E00\u4E2A\u9884\u7F6E Hook \u7C7B\u578B\u7684\u5E38\u91CF\u7C7B\uFF0C\u4E3B\u8981\u4E3A <code>Android</code> \u76F8\u5173\u7EC4\u4EF6\u7684 <code>Class</code> \u5185\u5BB9\uFF0C\u8DDF\u968F\u7248\u672C\u66F4\u65B0\u4F1A\u9010\u4E00\u8FDB\u884C\u589E\u52A0\u3002</p></blockquote>',5),l=o("\u8BE6\u60C5\u53EF "),_={href:"https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"},h=o("\u70B9\u51FB\u8FD9\u91CC"),k=o(" \u8FDB\u884C\u67E5\u770B\u3002");function m(y,f){const t=c("ExternalLinkIcon");return a(),r("div",null,[i,e("p",null,[l,e("a",_,[h,s(t)]),k])])}const b=n(d,[["render",m],["__file","ComponentTypeFactory.html.vue"]]);export{b as default};
|
@@ -1 +1 @@
|
||||
const e=JSON.parse('{"key":"v-8293d958","path":"/en/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[],"git":{"updatedTime":1664299331000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":1}]},"filePathRelative":"en/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.md"}');export{e as data};
|
||||
const e=JSON.parse('{"key":"v-8293d958","path":"/en/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.html","title":"ComponentTypeFactory - kt","lang":"en-US","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[],"git":{"updatedTime":1674669050000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.md"}');export{e as data};
|
1
docs/assets/ComponentTypeFactory.html.ee7e089a.js
Normal file
1
docs/assets/ComponentTypeFactory.html.ee7e089a.js
Normal file
@@ -0,0 +1 @@
|
||||
import{_ as n,r as a,o as c,c as s,b as o,d as r,a as i,e}from"./app.f643a53b.js";const p={},l=i('<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="componenttypefactory-kt" tabindex="-1"><a class="header-anchor" href="#componenttypefactory-kt" aria-hidden="true">#</a> ComponentTypeFactory <span class="symbol">- kt</span></h1><p><strong>Change Records</strong></p><p><code>v1.0</code> <code>first</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8FD9\u662F\u4E00\u4E2A\u9884\u7F6E\u53CD\u5C04\u7C7B\u578B\u7684\u5E38\u91CF\u7C7B\uFF0C\u4E3B\u8981\u4E3A <code>Android</code> \u76F8\u5173\u7EC4\u4EF6\u7684 <code>Class</code> \u5185\u5BB9\uFF0C\u8DDF\u968F\u7248\u672C\u66F4\u65B0\u4F1A\u9010\u4E00\u8FDB\u884C\u589E\u52A0\u3002</p></blockquote>',6),d=e("\u8BE6\u60C5\u53EF "),h={href:"https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"},_=e("\u70B9\u51FB\u8FD9\u91CC"),m=e(" \u8FDB\u884C\u67E5\u770B\u3002");function u(k,f){const t=a("ExternalLinkIcon");return c(),s("div",null,[l,o("p",null,[d,o("a",h,[_,r(t)]),m])])}const g=n(p,[["render",u],["__file","ComponentTypeFactory.html.vue"]]);export{g as default};
|
1
docs/assets/ComponentTypeFactory.html.f5d1204f.js
Normal file
1
docs/assets/ComponentTypeFactory.html.f5d1204f.js
Normal file
@@ -0,0 +1 @@
|
||||
import{_ as n,r as c,o as a,c as r,b as e,d as s,a as p,e as o}from"./app.f643a53b.js";const d={},i=p('<h1 id="componenttypefactory-kt" tabindex="-1"><a class="header-anchor" href="#componenttypefactory-kt" aria-hidden="true">#</a> ComponentTypeFactory <span class="symbol">- kt</span></h1><p><strong>\u53D8\u66F4\u8BB0\u5F55</strong></p><p><code>v1.0</code> <code>\u6DFB\u52A0</code></p><p><strong>\u529F\u80FD\u63CF\u8FF0</strong></p><blockquote><p>\u8FD9\u662F\u4E00\u4E2A\u9884\u7F6E\u53CD\u5C04\u7C7B\u578B\u7684\u5E38\u91CF\u7C7B\uFF0C\u4E3B\u8981\u4E3A <code>Android</code> \u76F8\u5173\u7EC4\u4EF6\u7684 <code>Class</code> \u5185\u5BB9\uFF0C\u8DDF\u968F\u7248\u672C\u66F4\u65B0\u4F1A\u9010\u4E00\u8FDB\u884C\u589E\u52A0\u3002</p></blockquote>',5),l=o("\u8BE6\u60C5\u53EF "),_={href:"https://github.com/fankes/YukiHookAPI/blob/master/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/type/android/ComponentTypeFactory.kt",target:"_blank",rel:"noopener noreferrer"},h=o("\u70B9\u51FB\u8FD9\u91CC"),k=o(" \u8FDB\u884C\u67E5\u770B\u3002");function m(y,f){const t=c("ExternalLinkIcon");return a(),r("div",null,[i,e("p",null,[l,e("a",_,[h,s(t)]),k])])}const b=n(d,[["render",m],["__file","ComponentTypeFactory.html.vue"]]);export{b as default};
|
@@ -1 +1 @@
|
||||
const e=JSON.parse('{"key":"v-a71937aa","path":"/en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.html","title":"ConstructorFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Process - class","slug":"process-class","link":"#process-class","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method","link":"#onnosuchconstructor-method","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method-1","link":"#result-method-1","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method-1","link":"#all-method-1","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method-1","link":"#remedys-method-1","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method-1","link":"#onnosuchconstructor-method-1","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1672424460000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":2}]},"filePathRelative":"en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.md"}');export{e as data};
|
||||
const e=JSON.parse('{"key":"v-a71937aa","path":"/en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.html","title":"ConstructorFinder - class","lang":"en-US","frontmatter":{"pageClass":"code-page"},"excerpt":"","headers":[{"level":2,"title":"paramCount - field","slug":"paramcount-field","link":"#paramcount-field","children":[]},{"level":2,"title":"modifiers - method","slug":"modifiers-method","link":"#modifiers-method","children":[]},{"level":2,"title":"emptyParam - method","slug":"emptyparam-method","link":"#emptyparam-method","children":[]},{"level":2,"title":"param - method","slug":"param-method","link":"#param-method","children":[]},{"level":2,"title":"param - method","slug":"param-method-1","link":"#param-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method","link":"#paramcount-method","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-1","link":"#paramcount-method-1","children":[]},{"level":2,"title":"paramCount - method","slug":"paramcount-method-2","link":"#paramcount-method-2","children":[]},{"level":2,"title":"superClass - method","slug":"superclass-method","link":"#superclass-method","children":[]},{"level":2,"title":"RemedyPlan - class","slug":"remedyplan-class","link":"#remedyplan-class","children":[{"level":3,"title":"constructor - method","slug":"constructor-method","link":"#constructor-method","children":[]},{"level":3,"title":"Result - class","slug":"result-class","link":"#result-class","children":[]}]},{"level":2,"title":"Process - class","slug":"process-class","link":"#process-class","children":[{"level":3,"title":"result - method","slug":"result-method","link":"#result-method","children":[]},{"level":3,"title":"all - method","slug":"all-method","link":"#all-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method","link":"#remedys-method","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method","link":"#onnosuchconstructor-method","children":[]}]},{"level":2,"title":"Result - class","slug":"result-class-1","link":"#result-class-1","children":[{"level":3,"title":"result - method","slug":"result-method-1","link":"#result-method-1","children":[]},{"level":3,"title":"get - method","slug":"get-method","link":"#get-method","children":[]},{"level":3,"title":"all - method","slug":"all-method-1","link":"#all-method-1","children":[]},{"level":3,"title":"give - method","slug":"give-method","link":"#give-method","children":[]},{"level":3,"title":"giveAll - method","slug":"giveall-method","link":"#giveall-method","children":[]},{"level":3,"title":"wait - method","slug":"wait-method","link":"#wait-method","children":[]},{"level":3,"title":"waitAll - method","slug":"waitall-method","link":"#waitall-method","children":[]},{"level":3,"title":"remedys - method","slug":"remedys-method-1","link":"#remedys-method-1","children":[]},{"level":3,"title":"onNoSuchConstructor - method","slug":"onnosuchconstructor-method-1","link":"#onnosuchconstructor-method-1","children":[]},{"level":3,"title":"ignored - method","slug":"ignored-method","link":"#ignored-method","children":[]},{"level":3,"title":"Instance - class","slug":"instance-class","link":"#instance-class","children":[]}]}],"git":{"updatedTime":1675195165000,"contributors":[{"name":"fankesyooni","email":"qzmmcn@163.com","commits":5}]},"filePathRelative":"en/api/public/com/highcapable/yukihookapi/hook/core/finder/members/ConstructorFinder.md"}');export{e as data};
|
@@ -1,5 +1,5 @@
|
||||
import{_ as s,o as n,c as o,a}from"./app.6074a838.js";const e={},l=a(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="constructorfinder-class" tabindex="-1"><a class="header-anchor" href="#constructorfinder-class" aria-hidden="true">#</a> ConstructorFinder <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorFinder</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> hookInstance</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">YukiMemberHookCreator.MemberHookCreator?</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classSet</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;"><*></span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">MemberBaseFinder</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0</code> <code>first</code></p><p><code>v1.0.2</code> <code>modified</code></p><p>\u5408\u5E76\u5230 <code>BaseFinder</code></p><p><code>v1.1.0</code> <code>modified</code></p><p>\u5408\u5E76\u5230 <code>MemberBaseFinder</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u67E5\u627E\u7C7B\u3002</p></blockquote><p>\u53EF\u901A\u8FC7\u6307\u5B9A\u7C7B\u578B\u67E5\u627E\u6307\u5B9A <code>Constructor</code> \u6216\u4E00\u7EC4 <code>Constructor</code>\u3002</p><h2 id="paramcount-field" tabindex="-1"><a class="header-anchor" href="#paramcount-field" aria-hidden="true">#</a> paramCount <span class="symbol">- field</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> paramCount</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span></span>
|
||||
import{_ as s,o as n,c as o,a}from"./app.f643a53b.js";const e={},l=a(`<div class="custom-container warning"><p class="custom-container-title">Notice</p><p>The English translation of this page has not been completed, you are welcome to contribute translations to us.</p><p>You can use the <strong>Chrome Translation Plugin</strong> to translate entire pages for reference.</p></div><h1 id="constructorfinder-class" tabindex="-1"><a class="header-anchor" href="#constructorfinder-class" aria-hidden="true">#</a> ConstructorFinder <span class="symbol">- class</span></h1><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ConstructorFinder</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> classSet</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Class</span><span style="color:#F47067;"><*></span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">MemberBaseFinder</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0</code> <code>first</code></p><p><code>v1.0.2</code> <code>modified</code></p><p>\u5408\u5E76\u5230 <code>BaseFinder</code></p><p><code>v1.1.0</code> <code>modified</code></p><p>\u5408\u5E76\u5230 <code>MemberBaseFinder</code></p><p><code>v1.1.8</code> <code>modified</code></p><p>\u79FB\u52A8 <code>hookInstance</code> \u53C2\u6570\u5230 <code>MemberBaseFinder.MemberHookerManager</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u67E5\u627E\u7C7B\u3002</p></blockquote><p>\u53EF\u901A\u8FC7\u6307\u5B9A\u7C7B\u578B\u67E5\u627E\u6307\u5B9A <code>Constructor</code> \u6216\u4E00\u7EC4 <code>Constructor</code>\u3002</p><h2 id="paramcount-field" tabindex="-1"><a class="header-anchor" href="#paramcount-field" aria-hidden="true">#</a> paramCount <span class="symbol">- field</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">var</span><span style="color:#ADBAC7;"> paramCount</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Int</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.67</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u53C2\u6570\u4E2A\u6570\u3002</p></blockquote><p>\u4F60\u53EF\u4EE5\u4E0D\u4F7F\u7528 <code>param</code> \u6307\u5B9A\u53C2\u6570\u7C7B\u578B\u800C\u662F\u4EC5\u4F7F\u7528\u6B64\u53D8\u91CF\u6307\u5B9A\u53C2\u6570\u4E2A\u6570\u3002</p><p>\u82E5\u53C2\u6570\u4E2A\u6570\u5C0F\u4E8E\u96F6\u5219\u5FFD\u7565\u5E76\u4F7F\u7528 <code>param</code>\u3002</p><h2 id="modifiers-method" tabindex="-1"><a class="header-anchor" href="#modifiers-method" aria-hidden="true">#</a> modifiers <span class="symbol">- method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">modifiers</span><span style="color:#ADBAC7;">(conditions</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ModifierConditions</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.67</code> <code>added</code></p><p><code>v1.0.80</code> <code>modified</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><code>v1.1.0</code> <code>modified</code></p><p>\u5408\u5E76\u5230 <code>ModifierConditions</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u6807\u8BC6\u7B26\u7B5B\u9009\u6761\u4EF6\u3002</p></blockquote><p>\u53EF\u4E0D\u8BBE\u7F6E\u7B5B\u9009\u6761\u4EF6\uFF0C\u9ED8\u8BA4\u6A21\u7CCA\u67E5\u627E\u5E76\u53D6\u7B2C\u4E00\u4E2A\u5339\u914D\u7684 <code>Constructor</code>\u3002</p><div class="custom-container danger"><p class="custom-container-title">Pay Attention</p><p>\u5B58\u5728\u591A\u4E2A <strong>IndexTypeCondition</strong> \u65F6\u9664\u4E86 <strong>order</strong> \u53EA\u4F1A\u751F\u6548\u6700\u540E\u4E00\u4E2A\u3002</p></div><h2 id="emptyparam-method" tabindex="-1"><a class="header-anchor" href="#emptyparam-method" aria-hidden="true">#</a> emptyParam <span class="symbol">- method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">emptyParam</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.75</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E <code>Constructor</code> \u7A7A\u53C2\u6570\u3001\u65E0\u53C2\u6570\u3002</p></blockquote><h2 id="param-method" tabindex="-1"><a class="header-anchor" href="#param-method" aria-hidden="true">#</a> param <span class="symbol">- method</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">param</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> paramType</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">IndexTypeCondition</span></span>
|
||||
@@ -18,7 +18,7 @@ import{_ as s,o as n,c as o,a}from"./app.6074a838.js";const e={},l=a(`<div class
|
||||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="process-class" tabindex="-1"><a class="header-anchor" href="#process-class" aria-hidden="true">#</a> Process <span class="symbol">- class</span></h2><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Process</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> isNoSuch</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Boolean</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> throwable</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Throwable?</span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">BaseResult</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u67E5\u627E\u7ED3\u679C\u5904\u7406\u7C7B\uFF0C\u4E3A <code>hookInstance</code> \u63D0\u4F9B\u3002</p></blockquote><h3 id="result-method" tabindex="-1"><a class="header-anchor" href="#result-method" aria-hidden="true">#</a> result <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">result</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Process</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Process</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u67E5\u627E\u7ED3\u679C\u5904\u7406\u7C7B\uFF0C\u4E3A <code>hookManager</code> \u63D0\u4F9B\u3002</p></blockquote><h3 id="result-method" tabindex="-1"><a class="header-anchor" href="#result-method" aria-hidden="true">#</a> result <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">result</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Process</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Process</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u521B\u5EFA\u76D1\u542C\u7ED3\u679C\u4E8B\u4EF6\u65B9\u6CD5\u4F53\u3002</p></blockquote><p><strong>Function Example</strong></p><p>\u4F60\u53EF\u4EE5\u4F7F\u7528 <code>lambda</code> \u5F62\u5F0F\u521B\u5EFA <code>Result</code> \u7C7B\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;"> {</span></span>
|
||||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||||
<span class="line"><span style="color:#ADBAC7;">}.result {</span></span>
|
||||
@@ -27,7 +27,7 @@ import{_ as s,o as n,c as o,a}from"./app.6074a838.js";const e={},l=a(`<div class
|
||||
<span class="line"><span style="color:#ADBAC7;"> onNoSuchConstructor {}</span></span>
|
||||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="all-method" tabindex="-1"><a class="header-anchor" href="#all-method" aria-hidden="true">#</a> all <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">all</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Process</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u5168\u90E8\u67E5\u627E\u6761\u4EF6\u5339\u914D\u7684\u591A\u4E2A <code>Constructor</code> \u5B9E\u4F8B\u7ED3\u679C\u5230 <code>hookInstance</code>\u3002</p></blockquote><h3 id="remedys-method" tabindex="-1"><a class="header-anchor" href="#remedys-method" aria-hidden="true">#</a> remedys <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">remedys</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RemedyPlan</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u8BBE\u7F6E\u5168\u90E8\u67E5\u627E\u6761\u4EF6\u5339\u914D\u7684\u591A\u4E2A <code>Constructor</code> \u5B9E\u4F8B\u7ED3\u679C\u5230 <code>hookManager</code>\u3002</p></blockquote><h3 id="remedys-method" tabindex="-1"><a class="header-anchor" href="#remedys-method" aria-hidden="true">#</a> remedys <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">remedys</span><span style="color:#ADBAC7;">(initiate</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">RemedyPlan</span><span style="color:#ADBAC7;">.() </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u521B\u5EFA <code>Constructor</code> \u91CD\u67E5\u627E\u529F\u80FD\u3002</p></blockquote><p><strong>Function Example</strong></p><p>\u5F53\u4F60\u9047\u5230\u4E00\u79CD <code>Constructor</code> \u53EF\u80FD\u5B58\u5728\u4E0D\u540C\u5F62\u5F0F\u7684\u5B58\u5728\u65F6\uFF0C\u53EF\u4EE5\u4F7F\u7528 <code>RemedyPlan</code> \u91CD\u65B0\u67E5\u627E\u5B83\uFF0C\u800C\u6CA1\u6709\u5FC5\u8981\u4F7F\u7528 <code>onNoSuchConstructor</code> \u6355\u83B7\u5F02\u5E38\u4E8C\u6B21\u67E5\u627E <code>Constructor</code>\u3002</p><p>\u82E5\u7B2C\u4E00\u6B21\u67E5\u627E\u5931\u8D25\u4E86\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u8FD9\u91CC\u7EE7\u7EED\u6DFB\u52A0\u6B64\u65B9\u6CD5\u4F53\u76F4\u5230\u6210\u529F\u4E3A\u6B62\u3002</p><blockquote><p>The following example</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;"> {</span></span>
|
||||
<span class="line"><span style="color:#ADBAC7;"> </span><span style="color:#768390;">// Your code here.</span></span>
|
||||
<span class="line"><span style="color:#ADBAC7;">}.remedys {</span></span>
|
||||
@@ -82,7 +82,7 @@ import{_ as s,o as n,c as o,a}from"./app.6074a838.js";const e={},l=a(`<div class
|
||||
<span class="line"><span style="color:#ADBAC7;">}</span></span>
|
||||
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="onnosuchconstructor-method-1" tabindex="-1"><a class="header-anchor" href="#onnosuchconstructor-method-1" aria-hidden="true">#</a> onNoSuchConstructor <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">inline</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onNoSuchConstructor</span><span style="color:#ADBAC7;">(result</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> (</span><span style="color:#F69D50;">Throwable</span><span style="color:#ADBAC7;">) </span><span style="color:#F47067;">-></span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Unit</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0</code> <code>first</code></p><p><code>v1.0.80</code> <code>modified</code></p><p>\u5C06\u65B9\u6CD5\u4F53\u8FDB\u884C inline</p><p><strong>Function Illustrate</strong></p><blockquote><p>\u76D1\u542C\u627E\u4E0D\u5230 <code>Constructor</code> \u65F6\u3002</p></blockquote><p>\u53EA\u4F1A\u8FD4\u56DE\u7B2C\u4E00\u6B21\u7684\u9519\u8BEF\u4FE1\u606F\uFF0C\u4E0D\u4F1A\u8FD4\u56DE <code>RemedyPlan</code> \u7684\u9519\u8BEF\u4FE1\u606F\u3002</p><h3 id="ignored-method" tabindex="-1"><a class="header-anchor" href="#ignored-method" aria-hidden="true">#</a> ignored <span class="symbol">- method</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">ignored</span><span style="color:#ADBAC7;">()</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Result</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5FFD\u7565\u5F02\u5E38\u5E76\u505C\u6B62\u6253\u5370\u4EFB\u4F55\u9519\u8BEF\u65E5\u5FD7\u3002</p></blockquote><p>\u82E5 <code>isNotIgnoredHookingFailure</code> \u4E3A <code>false</code> \u5219\u81EA\u52A8\u5FFD\u7565\u3002</p><div class="custom-container warning"><p class="custom-container-title">Notice</p><p>\u6B64\u65F6\u82E5\u8981\u76D1\u542C\u5F02\u5E38\u7ED3\u679C\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u5B9E\u73B0 <strong>onNoSuchConstructor</strong> \u65B9\u6CD5\u3002</p></div><h3 class="deprecated">ignoredError - method</h3><p><strong>Change Records</strong></p><p><code>v1.0.3</code> <code>added</code></p><p><code>v1.1.0</code> <code>deprecated</code></p><p>\u8BF7\u8F6C\u79FB\u5230\u65B0\u65B9\u6CD5 <code>ignored()</code></p><h3 id="instance-class" tabindex="-1"><a class="header-anchor" href="#instance-class" aria-hidden="true">#</a> Instance <span class="symbol">- class</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Instance</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> constructor</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Constructor</span><span style="color:#F47067;"><*></span><span style="color:#ADBAC7;">?)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.2</code> <code>added</code></p><p><code>v1.1.0</code> <code>modified</code></p><p>\u65B0\u589E <code>constructor</code> \u53C2\u6570</p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\u3002</p></blockquote><h4 id="call-method" tabindex="-1"><a class="header-anchor" href="#call-method" aria-hidden="true">#</a> call <span class="symbol">- method</span></h4><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">call</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> param</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.2</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6267\u884C <code>Constructor</code> \u521B\u5EFA\u76EE\u6807\u5B9E\u4F8B\uFF0C\u4E0D\u6307\u5B9A\u76EE\u6807\u5B9E\u4F8B\u7C7B\u578B\u3002</p></blockquote><h4 id="newinstance-method" tabindex="-1"><a class="header-anchor" href="#newinstance-method" aria-hidden="true">#</a> newInstance <span class="symbol">- method</span></h4><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;"><</span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">newInstance</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> param</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.2</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6267\u884C <code>Constructor</code> \u521B\u5EFA\u76EE\u6807\u5B9E\u4F8B \uFF0C\u6307\u5B9A <code>T</code> \u76EE\u6807\u5B9E\u4F8B\u7C7B\u578B\u3002</p></blockquote>`,295),p=[l];function c(t,r){return n(),o("div",null,p)}const i=s(e,[["render",c],["__file","ConstructorFinder.html.vue"]]);export{i as default};
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.1.0</code> <code>added</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u5FFD\u7565\u5F02\u5E38\u5E76\u505C\u6B62\u6253\u5370\u4EFB\u4F55\u9519\u8BEF\u65E5\u5FD7\u3002</p></blockquote><p>\u82E5 <code>MemberBaseFinder.MemberHookerManager.isNotIgnoredNoSuchMemberFailure</code> \u4E3A <code>false</code> \u5219\u81EA\u52A8\u5FFD\u7565\u3002</p><div class="custom-container warning"><p class="custom-container-title">Notice</p><p>\u6B64\u65F6\u82E5\u8981\u76D1\u542C\u5F02\u5E38\u7ED3\u679C\uFF0C\u4F60\u9700\u8981\u624B\u52A8\u5B9E\u73B0 <strong>onNoSuchConstructor</strong> \u65B9\u6CD5\u3002</p></div><h3 class="deprecated">ignoredError - method</h3><p><strong>Change Records</strong></p><p><code>v1.0.3</code> <code>added</code></p><p><code>v1.1.0</code> <code>deprecated</code></p><p>\u8BF7\u8F6C\u79FB\u5230\u65B0\u65B9\u6CD5 <code>ignored()</code></p><h3 id="instance-class" tabindex="-1"><a class="header-anchor" href="#instance-class" aria-hidden="true">#</a> Instance <span class="symbol">- class</span></h3><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">inner </span><span style="color:#F47067;">class</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Instance</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">internal</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">constructor</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">private</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> constructor</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Constructor</span><span style="color:#F47067;"><*></span><span style="color:#ADBAC7;">?)</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.2</code> <code>added</code></p><p><code>v1.1.0</code> <code>modified</code></p><p>\u65B0\u589E <code>constructor</code> \u53C2\u6570</p><p><strong>Function Illustrate</strong></p><blockquote><p><code>Constructor</code> \u5B9E\u4F8B\u5904\u7406\u7C7B\u3002</p></blockquote><h4 id="call-method" tabindex="-1"><a class="header-anchor" href="#call-method" aria-hidden="true">#</a> call <span class="symbol">- method</span></h4><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">call</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> args</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.2</code> <code>added</code></p><p><code>v1.1.6</code> <code>modified</code></p><p>\u4FEE\u6539\u53C2\u6570\u547D\u540D <code>param</code> \u4E3A <code>args</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6267\u884C <code>Constructor</code> \u521B\u5EFA\u76EE\u6807\u5B9E\u4F8B\uFF0C\u4E0D\u6307\u5B9A\u76EE\u6807\u5B9E\u4F8B\u7C7B\u578B\u3002</p></blockquote><h4 id="newinstance-method" tabindex="-1"><a class="header-anchor" href="#newinstance-method" aria-hidden="true">#</a> newInstance <span class="symbol">- method</span></h4><div class="language-kotlin ext-kt"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;"><</span><span style="color:#DCBDFB;">T</span><span style="color:#F47067;">></span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">newInstance</span><span style="color:#ADBAC7;">(</span><span style="color:#F47067;">vararg</span><span style="color:#ADBAC7;"> args</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#6CB6FF;">Any?</span><span style="color:#ADBAC7;">)</span><span style="color:#F47067;">:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">T</span><span style="color:#ADBAC7;">?</span></span>
|
||||
<span class="line"></span></code></pre></div><p><strong>Change Records</strong></p><p><code>v1.0.2</code> <code>added</code></p><p><code>v1.1.6</code> <code>modified</code></p><p>\u4FEE\u6539\u53C2\u6570\u547D\u540D <code>param</code> \u4E3A <code>args</code></p><p><strong>Function Illustrate</strong></p><blockquote><p>\u6267\u884C <code>Constructor</code> \u521B\u5EFA\u76EE\u6807\u5B9E\u4F8B \uFF0C\u6307\u5B9A <code>T</code> \u76EE\u6807\u5B9E\u4F8B\u7C7B\u578B\u3002</p></blockquote>`,301),p=[l];function c(t,r){return n(),o("div",null,p)}const i=s(e,[["render",c],["__file","ConstructorFinder.html.vue"]]);export{i as default};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user