Skip to content

Commit

Permalink
chore: SendGiftHook: do not hook startSendGiftActivity which has been…
Browse files Browse the repository at this point in the history
… removed in NT
  • Loading branch information
cinit committed Jun 26, 2023
1 parent dcf9262 commit d49fc24
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/src/main/java/cc/ioctl/hook/chat/SendGiftHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ private SendGiftHook() {
@Override
public boolean initOnce() throws Exception {
{
Method m = Reflex.findSingleMethod(Objects.requireNonNull(DexKit.loadClassFromCache(CTroopGiftUtil.INSTANCE), "CTROOP_GIFT_UTIL.INSTANCE"),
Class<?> kTroopGiftUtil = Objects.requireNonNull(DexKit.loadClassFromCache(CTroopGiftUtil.INSTANCE), "CTROOP_GIFT_UTIL.INSTANCE");
Method startSendGiftActivity = Reflex.findSingleMethodOrNull(kTroopGiftUtil,
void.class, false,
Activity.class, String.class, String.class, Initiator._QQAppInterface());
HookUtils.hookBeforeIfEnabled(this, m, 47, param -> param.setResult(null));
if (startSendGiftActivity != null) {
// startSendGiftActivity was not used on NT and was removed iin 8.9.63 near 4190
HookUtils.hookBeforeIfEnabled(this, startSendGiftActivity, 47, param -> param.setResult(null));
}
}
{
Class<?> kQWalletTextChangeCallback = Initiator.load("com/tencent/mobileqq/activity/aio/rebuild/input/edittext/QWalletTextChangeCallback");
Expand Down

0 comments on commit d49fc24

Please sign in to comment.