Skip to content

Commit

Permalink
chore: NT QQ may not really have legacy StartDirector
Browse files Browse the repository at this point in the history
  • Loading branch information
cinit committed Jul 2, 2023
1 parent a5c9ccc commit 6789a65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/java/io/github/qauxv/core/MainHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import android.system.Os;
import android.system.StructUtsname;
import androidx.annotation.Nullable;
import cc.hicore.QApp.QAppUtils;
import cc.ioctl.hook.SettingEntryHook;
import cc.ioctl.hook.bak.MuteAtAllAndRedPacket;
import cc.ioctl.hook.chat.GagInfoDisclosure;
Expand Down Expand Up @@ -172,6 +173,11 @@ private static boolean isForegroundStartupForMainProcess(Context ctx, Object ste
@Nullable
private static Object getStartDirector(Object step) {
Class<?> director = Initiator._StartupDirector();
if (director == null && (QAppUtils.isQQnt())) {
// NT QQ has different StartupDirector, and removed in 8.9.63(4190)
// TODO: 2023-07-02 handle NT QQ correctly
return null;
}
Object dir = Reflex.getInstanceObjectOrNull(step, "mDirector", director);
if (dir == null) {
dir = Reflex.getInstanceObjectOrNull(step, "a", director);
Expand Down

0 comments on commit 6789a65

Please sign in to comment.