From e3da58952fd77fd8af4cb2fb236a26a8fbb8b9a9 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Sat, 30 Sep 2023 23:32:56 +0800 Subject: [PATCH] feat: update demo --- .../yukihookapi/demo_module/hook/HookEntry.kt | 12 ++++++++---- .../demo_module/hook/java/HookEntry.java | 19 ++++++++++--------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/HookEntry.kt b/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/HookEntry.kt index fe14e410..813c45af 100644 --- a/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/HookEntry.kt +++ b/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/HookEntry.kt @@ -100,10 +100,14 @@ object HookEntry : IYukiHookXposedInit { // 可用的元素有:[TAG]、[PRIORITY]、[PACKAGE_NAME]、[USER_ID] elements(TAG, PRIORITY, PACKAGE_NAME, USER_ID) } - // Whether to enable debug mode - // Please note, for a release build, be sure to turn off debugging to prevent a lot of log stuffing on the user's device - // 是否开启调试模式 - // 请注意 - 若作为发布版本请务必关闭调试功能防止对用户设备造成大量日志填充 + // Whether to enable debug mode, not enabled by default + // Note: Please selectively enable this feature, this can cause I/O performance issues caused by continuous output logs + // Please note, for a release build, be sure to turn off this function to prevent a lot of log stuffing on the user's device + // To facilitate testing whether the module is activated, the demo enables this function by default + // 是否启用调试模式 - 默认不启用 + // 注意:请选择性启用此功能 - 这会导致持续输出日志造成的 I/O 性能问题 + // 若作为发布版本请务必关闭此功能防止对用户设备造成大量日志填充 + // 为方便测试模块是否激活 - Demo 默认启用此功能 isDebug = 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 diff --git a/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/java/HookEntry.java b/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/java/HookEntry.java index 0405b671..0c6e0366 100644 --- a/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/java/HookEntry.java +++ b/samples/demo-module/src/main/java/com/highcapable/yukihookapi/demo_module/hook/java/HookEntry.java @@ -52,20 +52,21 @@ public class HookEntry implements IYukiHookXposedInit { @Override public void onInit() { - YukiHookAPI.Configs config = YukiHookAPI.Configs.INSTANCE; - YLog.Configs.INSTANCE.setTag("YukiHookAPI-Demo"); - YLog.Configs.INSTANCE.setEnable(true); - YLog.Configs.INSTANCE.setRecord(false); - YLog.Configs.INSTANCE.elements( + YukiHookAPI.Configs configs = YukiHookAPI.Configs.INSTANCE; + YLog.Configs logConfigs = YLog.Configs.INSTANCE; + logConfigs.setTag("YukiHookAPI-Demo"); + logConfigs.setEnable(true); + logConfigs.setRecord(false); + logConfigs.elements( YLog.Configs.TAG, YLog.Configs.PRIORITY, YLog.Configs.PACKAGE_NAME, YLog.Configs.USER_ID ); - config.setDebug(true); - config.setEnableModuleAppResourcesCache(true); - config.setEnableHookModuleStatus(true); - config.setEnableDataChannel(true); + configs.setDebug(true); + configs.setEnableModuleAppResourcesCache(true); + configs.setEnableHookModuleStatus(true); + configs.setEnableDataChannel(true); } @Override