Hide overlay notification
If app's own foreground service notification is tagged.
Test: atest SystemUITests
Bug: 64085448
Change-Id: If10b8dda529c72ee063c9c18c932ceb6d4f92bb4
diff --git a/packages/SystemUI/src/com/android/systemui/ForegroundServiceControllerImpl.java b/packages/SystemUI/src/com/android/systemui/ForegroundServiceControllerImpl.java
index fc2b5b4..1fa925e 100644
--- a/packages/SystemUI/src/com/android/systemui/ForegroundServiceControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/ForegroundServiceControllerImpl.java
@@ -23,6 +23,7 @@
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
+import android.util.Slog;
import android.util.SparseArray;
import com.android.internal.messages.nano.SystemMessageProto;
@@ -174,9 +175,9 @@
@Override
public boolean isSystemAlertNotification(StatusBarNotification sbn) {
- // TODO: tag system alert notifications so they can be suppressed if app's notification
- // is tagged
- return false;
+ return sbn.getPackageName().equals("android")
+ && sbn.getTag() != null
+ && sbn.getTag().contains("AlertWindowNotification");
}
/**