下面列举了俩种方法 :都时通过包名 来判断的
diff --git a/alps/frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java b/alps/frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java
index b9c65b7b72b..f4da1abca7b 100755
--- a/alps/frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/alps/frameworks/base/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -5729,6 +5729,10 @@ public class NotificationManagerService extends SystemService {
void enqueueNotificationInternal(final String pkg, final String opPkg, final int callingUid,
final int callingPid, final String tag, final int id, final Notification notification,
int incomingUserId) {
+ if(pkg.equals("com.jxw.pushservice") || pkg.equals("com.jxw.mskt.video") || pkg.equals("com.jxw.newyouer.video")){
+ return;
+ }
+
enqueueNotificationInternal(pkg, opPkg, callingUid, callingPid, tag, id, notification,
incomingUserId, false);
}
diff --git a/alps/frameworks/base/services/core/java/com/android/server/wm/AlertWindowNotification.java b/alps/frameworks/base/services/core/java/com/android/server/wm/AlertWindowNotification.java
old mode 100644
new mode 100755
index fde03695024..85259397678
--- a/alps/frameworks/base/services/core/java/com/android/server/wm/AlertWindowNotification.java
+++ b/alps/frameworks/base/services/core/java/com/android/server/wm/AlertWindowNotification.java
@@ -69,7 +69,11 @@ class AlertWindowNotification {
void post() {
// We can't create/post the notification while the window manager lock is held since it will
// end up calling into activity manager. So, we post a message to do it later.
- mService.mH.post(this::onPostNotification);
+ if(mPackageName.contains("com.qi")||mPackageName.contains("wyt")||mPackageName.contains("aiworks")||mPackageName.equals("com.tencent.deviceapp")){
+ //nothing to do
+ }else{
+ mService.mH.post(this::onPostNotification);
+ }
}
以上是屏蔽 懒人教育 和 九学王 学习软件的一些通知窗口