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

Method afterIfEnabled

app/src/main/java/cc/ioctl/tmoe/util/HookUtils.java:70–86  ·  view source on GitHub ↗
(final @NonNull CommonDynamicHook this0, int priority,
                                               final @NonNull AfterHookedMethod afterHookedMethod)

Source from the content-addressed store, hash-verified

68 }
69
70 public static XC_MethodHook afterIfEnabled(final @NonNull CommonDynamicHook this0, int priority,
71 final @NonNull AfterHookedMethod afterHookedMethod) {
72 Objects.requireNonNull(this0, "this0 == null");
73 return new XC_MethodHook(priority) {
74 @Override
75 protected void afterHookedMethod(MethodHookParam param) throws Throwable {
76 try {
77 if (this0.isEnabled()) {
78 afterHookedMethod.afterHookedMethod(param);
79 }
80 } catch (Throwable e) {
81 this0.logError(e);
82 throw e;
83 }
84 }
85 };
86 }
87
88 public static XC_MethodHook afterAlways(final @NonNull CommonDynamicHook this0, int priority,
89 final @NonNull AfterHookedMethod afterHookedMethod) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected