Fix parasitic manager hooker in 8.1 (#1724)
This commit is contained in:
parent
3fdc4e51c9
commit
bc8b4c69a5
|
|
@ -116,6 +116,7 @@ public class ParasiticManagerHooker {
|
|||
}
|
||||
});
|
||||
|
||||
var activityClientRecordClass = XposedHelpers.findClass("android.app.ActivityThread$ActivityClientRecord", ActivityThread.class.getClassLoader());
|
||||
var activityHooker = new XC_MethodHook() {
|
||||
@Override
|
||||
protected void beforeHookedMethod(MethodHookParam param) {
|
||||
|
|
@ -141,6 +142,7 @@ public class ParasiticManagerHooker {
|
|||
|
||||
@Override
|
||||
protected void afterHookedMethod(MethodHookParam param) {
|
||||
if (activityClientRecordClass.isInstance(param.thisObject)) {
|
||||
var aInfo = (ActivityInfo) XposedHelpers.getObjectField(param.thisObject, "activityInfo");
|
||||
Hookers.logD("loading state of " + aInfo.name);
|
||||
states.computeIfPresent(aInfo.name, (k, v) -> {
|
||||
|
|
@ -152,8 +154,8 @@ public class ParasiticManagerHooker {
|
|||
return v;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
var activityClientRecordClass = XposedHelpers.findClass("android.app.ActivityThread$ActivityClientRecord", ActivityThread.class.getClassLoader());
|
||||
XposedBridge.hookAllConstructors(activityClientRecordClass, activityHooker);
|
||||
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue