Skip to content

Commit

Permalink
fix the problem of loading library too late
Browse files Browse the repository at this point in the history
  • Loading branch information
GuhDoy committed May 19, 2023
1 parent b393afe commit 00910c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/me/gm/cleaner/plugin/xposed/XposedInit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ class XposedInit : ManagerService(), IXposedHookLoadPackage, IXposedHookZygoteIn
XposedBridge.hookAllMethods(
mediaProvider, "deleteInternal", DeleteHooker(this@XposedInit)
)
try {
System.loadLibrary("plugin")
} catch (e: Throwable) {
XposedBridge.log(e)
}
}

@Throws(Throwable::class)
Expand All @@ -72,6 +67,11 @@ class XposedInit : ManagerService(), IXposedHookLoadPackage, IXposedHookZygoteIn
if (lpparam.appInfo.flags and ApplicationInfo.FLAG_SYSTEM == 0) {
return
}
try {
System.loadLibrary("plugin")
} catch (e: Throwable) {
XposedBridge.log(e)
}
XposedHelpers.findAndHookMethod(
ContentProvider::class.java, "attachInfo",
Context::class.java, ProviderInfo::class.java, object : XC_MethodHook() {
Expand Down

0 comments on commit 00910c4

Please sign in to comment.