[core] Remove disableHooks
This commit is contained in:
parent
a12336f69b
commit
f9adf20eeb
|
|
@ -250,14 +250,6 @@ public class HookStubManager {
|
|||
thiz = originMethod.getDeclaringClass();
|
||||
}
|
||||
|
||||
if (XposedBridge.disableHooks) {
|
||||
if (hasStubBackup) {
|
||||
return callOrigin.call(stubArgs);
|
||||
} else {
|
||||
return callOrigin(entity, originMethod, thiz, args);
|
||||
}
|
||||
}
|
||||
|
||||
DexLog.printMethodHookIn(originMethod);
|
||||
|
||||
Object[] snapshot = additionalHookInfos[id].callbacks.getSnapshot();
|
||||
|
|
@ -337,10 +329,6 @@ public class HookStubManager {
|
|||
public static Object hookBridge(Member origin, Method backup, XposedBridge.AdditionalHookInfo additionalHookInfo, Object thiz, Object... args) throws Throwable {
|
||||
|
||||
|
||||
if (XposedBridge.disableHooks) {
|
||||
return SandHook.callOriginMethod(true, origin, backup, thiz, args);
|
||||
}
|
||||
|
||||
DexLog.printMethodHookIn(origin);
|
||||
|
||||
Object[] snapshot = additionalHookInfo.callbacks.getSnapshot();
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@ import java.lang.reflect.Member;
|
|||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import static de.robv.android.xposed.XposedBridge.disableHooks;
|
||||
|
||||
public class LspHooker {
|
||||
private final XposedBridge.AdditionalHookInfo additionalInfo;
|
||||
private final Member method;
|
||||
|
|
@ -57,13 +55,6 @@ public class LspHooker {
|
|||
System.arraycopy(args, 1, param.args, 0, args.length - 1);
|
||||
}
|
||||
|
||||
if (disableHooks) {
|
||||
try {
|
||||
return backup.invoke(param.thisObject, param.args);
|
||||
} catch (InvocationTargetException ite) {
|
||||
throw ite.getCause();
|
||||
}
|
||||
}
|
||||
Object[] callbacksSnapshot = additionalInfo.callbacks.getSnapshot();
|
||||
final int callbacksLength = callbacksSnapshot.length;
|
||||
if (callbacksLength == 0) {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,6 @@ public final class XSharedPreferences implements SharedPreferences {
|
|||
}
|
||||
}
|
||||
if (newModule) {
|
||||
|
||||
mFile = new File(serviceClient.getPrefsPath( packageName ), prefFileName + ".xml");
|
||||
} else {
|
||||
mFile = new File(Environment.getDataDirectory(), "data/" + packageName + "/shared_prefs/" + prefFileName + ".xml");
|
||||
|
|
|
|||
|
|
@ -82,8 +82,6 @@ public final class XposedBridge {
|
|||
private static final int RUNTIME_DALVIK = 1;
|
||||
private static final int RUNTIME_ART = 2;
|
||||
|
||||
public static boolean disableHooks = false;
|
||||
|
||||
// This field is set "magically" on MIUI.
|
||||
/*package*/ static long BOOT_START_TIME;
|
||||
|
||||
|
|
@ -321,15 +319,6 @@ public final class XposedBridge {
|
|||
Object thisObject, Object[] args) throws Throwable {
|
||||
AdditionalHookInfo additionalInfo = (AdditionalHookInfo) additionalInfoObj;
|
||||
|
||||
if (disableHooks) {
|
||||
try {
|
||||
return invokeOriginalMethodNative(method, originalMethodId, additionalInfo.parameterTypes,
|
||||
additionalInfo.returnType, thisObject, args);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw e.getCause();
|
||||
}
|
||||
}
|
||||
|
||||
Object[] callbacksSnapshot = additionalInfo.callbacks.getSnapshot();
|
||||
final int callbacksLength = callbacksSnapshot.length;
|
||||
if (callbacksLength == 0) {
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@ public class StartBootstrapServicesHooker extends XC_MethodHook {
|
|||
|
||||
@Override
|
||||
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
|
||||
if (XposedBridge.disableHooks) {
|
||||
return;
|
||||
}
|
||||
|
||||
logD("SystemServer#startBootstrapServices() starts");
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -35,9 +35,6 @@ public class SystemMainHooker extends XC_MethodHook {
|
|||
|
||||
@Override
|
||||
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
|
||||
if (XposedBridge.disableHooks) {
|
||||
return;
|
||||
}
|
||||
Hookers.logD("ActivityThread#systemMain() starts");
|
||||
try {
|
||||
// get system_server classLoader
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ public abstract class BaseRouter implements Router {
|
|||
XposedInit.initForZygote(isSystem);
|
||||
} catch (Throwable t) {
|
||||
Utils.logE("error during Xposed initialization", t);
|
||||
XposedBridge.disableHooks = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue