use of com.lody.virtual.client.hook.base.ReplaceSequencePkgHook in project VirtualApp by asLody.
the class PowerManagerPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceSequencePkgHook("acquireWakeLock", 2) {
@Override
public Object call(Object who, Method method, Object... args) throws Throwable {
try {
return super.call(who, method, args);
} catch (InvocationTargetException e) {
return onHandleError(e);
}
}
});
addHook(new ReplaceLastPkgHook("acquireWakeLockWithUid") {
@Override
public Object call(Object who, Method method, Object... args) throws Throwable {
try {
return super.call(who, method, args);
} catch (InvocationTargetException e) {
return onHandleError(e);
}
}
});
addHook(new ResultStaticHook("updateWakeLockWorkSource", 0));
}
use of com.lody.virtual.client.hook.base.ReplaceSequencePkgHook in project VirtualApp by asLody.
the class TelephonyRegistryPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceCallingPkgHook("listen"));
addHook(new ReplaceSequencePkgHook("listenForSubscriber", 1));
}
Aggregations