Skip to content

Commit

Permalink
fix: FlashPicHook on QQNT
Browse files Browse the repository at this point in the history
Signed-off-by: Hicores <me@hicore.cc>
  • Loading branch information
Hicores committed Jun 22, 2023
1 parent 88c217e commit 59d3946
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/src/main/java/cc/ioctl/hook/msg/FlashPicHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.NonNull;
import cc.hicore.QApp.QAppUtils;
import cc.ioctl.util.HookUtils;
import cc.ioctl.util.Reflex;
import com.tencent.qqnt.kernel.nativeinterface.MsgRecord;
import de.robv.android.xposed.XposedHelpers;
import io.github.qauxv.base.annotation.FunctionHookEntry;
import io.github.qauxv.base.annotation.UiItemAgentEntry;
Expand Down Expand Up @@ -83,6 +85,14 @@ public boolean isFlashPic(Object msgRecord) {

@Override
public boolean initOnce() throws Exception {
if (QAppUtils.isQQnt()){
HookUtils.hookAfterIfEnabled(this, MsgRecord.class.getDeclaredMethod("getSubMsgType"),param -> {
int result = (int) param.getResult();
if (result == 8194)param.setResult(2);
else if (result == 12288)param.setResult(4096);
});
return true;
}
Class<?> clz = DexKit.loadClassFromCache(CFlashPicHelper.INSTANCE);
Objects.requireNonNull(clz, "CFLASH_PIC_HELPER.INSTANCE");
Method isFlashPic = null;
Expand Down

0 comments on commit 59d3946

Please sign in to comment.