Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
teble committed Nov 29, 2023
1 parent 1d2599e commit 5cb3e9b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public class MainHook implements IXposedHookLoadPackage {
// Strings used by all methods in the class
.usingStrings("PlayActivity", "onClick", "onCreate")
)
).singleOrThrow(() -> new IllegalStateException("No class found"));
).singleOrThrow(() -> new IllegalStateException("返回结果非唯一"));
// Print the found class: org.luckypray.dexkit.demo.PlayActivity
System.out.println(classData.getName());
// Get the corresponding class instance
Expand Down Expand Up @@ -284,7 +284,7 @@ class MainHook : IXposedHookLoadPackage {
// If you need to use it globally, please manage the life cycle yourself and ensure
// that the .close() method is called when not needed to prevent memory leaks.
// Here we use `Closable.use` to automatically close the DexKitBridge instance.
DexKitBridge.create(apkPath)?.use { bridge ->
DexKitBridge.create(apkPath).use { bridge ->
findPlayActivity(bridge)
// Other use cases
}
Expand Down Expand Up @@ -370,7 +370,7 @@ class MainHook : IXposedHookLoadPackage {
// Strings used by all methods in the class
usingStrings("PlayActivity", "onClick", "onCreate")
}
}.singleOrNull() ?: error("Not found class")
}.singleOrNull() ?: error("返回结果非唯一")
// Print the found class: org.luckypray.dexkit.demo.PlayActivity
println(classData.name)
// Get the corresponding class instance
Expand Down
6 changes: 3 additions & 3 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public class MainHook implements IXposedHookLoadPackage {
// 类中所有方法使用的字符串
.usingStrings("PlayActivity", "onClick", "onCreate")
)
).singleOrThrow(() -> new IllegalStateException("No class found"));
).singleOrThrow(() -> new IllegalStateException("The returned result is not unique"));
// 打印找到的类:org.luckypray.dexkit.demo.PlayActivity
System.out.println(classData.getName());
// 获取对应的类实例
Expand Down Expand Up @@ -276,7 +276,7 @@ class MainHook : IXposedHookLoadPackage {
// DexKit 创建是一项耗时操作,请不要重复创建。如果需要全局使用,
// 请自行管理生命周期,确保在不需要时调用 .close() 方法以防止内存泄漏。
// 这里使用 `Closable.use` 语法糖自动关闭 DexKitBridge 实例。
DexKitBridge.create(apkPath)?.use { bridge ->
DexKitBridge.create(apkPath).use { bridge ->
findPlayActivity(bridge)
// Other use cases
}
Expand Down Expand Up @@ -362,7 +362,7 @@ class MainHook : IXposedHookLoadPackage {
// 类中所有方法使用的字符串
usingStrings("PlayActivity", "onClick", "onCreate")
}
}.singleOrNull() ?: error("Not found class")
}.singleOrNull() ?: error("The returned result is not unique")
// 打印找到的类:org.luckypray.dexkit.demo.PlayActivity
println(classData.name)
// Get the corresponding class instance
Expand Down
2 changes: 1 addition & 1 deletion doc-source/src/en/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AppHooker {
// If you need to use it globally, please manage the life cycle yourself and ensure
// that the .close() method is called when not needed to prevent memory leaks.
// Here we use `Closable.use` to automatically close the DexKitBridge instance.
DexKitBridge.create(apkPath)?.use { bridge ->
DexKitBridge.create(apkPath).use { bridge ->
isVipHook(bridge)
// Other hook ...
}
Expand Down
2 changes: 1 addition & 1 deletion doc-source/src/zh-cn/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class AppHooker {
// DexKit 创建是一项耗时操作,请不要重复创建。如果需要全局使用,
// 请自行管理生命周期,确保在不需要时调用 .close() 方法以防止内存泄漏。
// 这里使用 `Closable.use` 语法糖自动关闭 DexKitBridge 实例
DexKitBridge.create(apkPath)?.use { bridge ->
DexKitBridge.create(apkPath).use { bridge ->
isVipHook(bridge)
// Other hook ...
}
Expand Down

0 comments on commit 5cb3e9b

Please sign in to comment.