Bootstrap hookings should only be done once
This commit is contained in:
parent
af4feada27
commit
12667f5bd2
|
|
@ -47,11 +47,15 @@ public final class XposedInit {
|
||||||
private XposedInit() {
|
private XposedInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static volatile AtomicBoolean bootstrapHooked = new AtomicBoolean(false);
|
||||||
/**
|
/**
|
||||||
* Hook some methods which we want to create an easier interface for developers.
|
* Hook some methods which we want to create an easier interface for developers.
|
||||||
*/
|
*/
|
||||||
/*package*/
|
/*package*/
|
||||||
public static void initForZygote(boolean isSystem) throws Throwable {
|
public static void initForZygote(boolean isSystem) throws Throwable {
|
||||||
|
if (!bootstrapHooked.compareAndSet(false, true)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
startsSystemServer = isSystem;
|
startsSystemServer = isSystem;
|
||||||
Router.startBootstrapHook(isSystem);
|
Router.startBootstrapHook(isSystem);
|
||||||
// MIUI
|
// MIUI
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue