From c1dabd3b8dc312497212ec36f777f338cf07c793 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Tue, 2 Aug 2022 08:43:31 +0800 Subject: [PATCH] fix plugin info --- .../main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt | 5 +---- dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt b/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt index 200bbf6..ba9e704 100644 --- a/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt +++ b/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt @@ -130,10 +130,7 @@ object PluginUtils { fun getPluginLoadInfo(): String { return try { - (MapleUtils.getStaticObjectField( - appLoader?.javaClass, - "pluginLoadInfo" - ) as StringBuilder).toString() + MapleUtils.callMethod(appLoader, "getPluginLoadInfo") as String } catch (e: Exception) { "" } diff --git a/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt b/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt index bacb399..7d7e247 100644 --- a/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt +++ b/dynamic/src/main/java/xyz/fycz/dynamic/AppLoadImpl.kt @@ -130,4 +130,8 @@ class AppLoadImpl : IAppLoader { MapleUtils.log(e) } } + + fun getPluginLoadInfo(): String { + return allFixInfoSb.toString() + } }