MCPcopy Create free account
hub / github.com/cinit/TMoe / hookBeforeAlways

Method hookBeforeAlways

app/src/main/java/cc/ioctl/tmoe/util/HookUtils.java:177–192  ·  view source on GitHub ↗
(final @NonNull CommonDynamicHook this0, final @NonNull Method method,
                                        int priority, final @NonNull BeforeHookedMethod beforeHookedMethod)

Source from the content-addressed store, hash-verified

175 }
176
177 public static void hookBeforeAlways(final @NonNull CommonDynamicHook this0, final @NonNull Method method,
178 int priority, final @NonNull BeforeHookedMethod beforeHookedMethod) {
179 Objects.requireNonNull(this0, "this0 == null");
180 Objects.requireNonNull(method, "method == null");
181 XposedBridge.hookMethod(method, new XC_MethodHook(priority) {
182 @Override
183 protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
184 try {
185 beforeHookedMethod.beforeHookedMethod(param);
186 } catch (Throwable e) {
187 this0.logError(e);
188 throw e;
189 }
190 }
191 });
192 }
193
194 public static void hookAfterAlways(final @NonNull CommonDynamicHook this0, final @NonNull Method method,
195 final @NonNull AfterHookedMethod afterHookedMethod) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected