Hide redundant foreground service notifications.

If an app with a foreground service has (at least one)
FLAG_FOREGROUND notification shown to the user, we allow
that to satisfy the requirement that the user be informed
about such things. But if the fg notification or its channel
is blocked by the user, we show the NOTE_FOREGROUND_SERVICES
notification (a/k/a Dianne's Dungeon) provided to us by the
activity manager.

Note that if even one of the foreground processes for the
current user is missing its disclosure notification, the
user will see the whole dungeon.

Bug: 36891897
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ForegroundServiceControllerTest.java
Change-Id: I435b7c01e60f99da162c9ea61656e2991d2cb87c
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 5197c95..73a2a43 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -272,6 +272,9 @@
 
         mProviders.put(TunablePaddingService.class, () -> new TunablePaddingService());
 
+        mProviders.put(ForegroundServiceController.class,
+                () -> new ForegroundServiceControllerImpl(mContext));
+
         mProviders.put(UiOffloadThread.class, UiOffloadThread::new);
 
         // Put all dependencies above here so the factory can override them if it wants.