Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
fix: improve NotificationDetect
Browse files Browse the repository at this point in the history
  • Loading branch information
mkx173 committed Mar 19, 2024
1 parent 00f4cee commit 879c937
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package gm.tieba.tabswitch.hooker.auto;

import android.app.NotificationManager;

import androidx.annotation.NonNull;

import de.robv.android.xposed.XC_MethodReplacement;
Expand All @@ -22,5 +24,11 @@ public void hook() throws Throwable {
"areNotificationsEnabled",
XC_MethodReplacement.returnConstant(true)
);
XposedHelpers.findAndHookMethod(
"android.app.NotificationChannel",
sClassLoader,
"getImportance",
XC_MethodReplacement.returnConstant(NotificationManager.IMPORTANCE_DEFAULT)
);
}
}

0 comments on commit 879c937

Please sign in to comment.