Initialise Notification*Manager dependencies directly.

Currently, adding a new dependency to any of these classes means
updating the constructors of any subclasses, and the construction in the
corresponding SystemUIFactory classes and subclasses. In particular,
updating these in separate vendor/ projects is annoying. So, initialise
the dependencies using field initialisers. The downside is that it's
harder to notice circular Dependencys.

Bug: 63874929
Bug: 62602530
Test: runtest systemui
Test: Compile and run
Change-Id: I21d58d0cc0edeb6d53fb7b387c9baeec7bd80589
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index bf6e9ba..99202f4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -150,8 +150,7 @@
 
         mMetricsLogger = new FakeMetricsLogger();
         mDependency.injectTestDependency(MetricsLogger.class, mMetricsLogger);
-        mNotificationLogger = new NotificationLogger(mNotificationListener,
-                mDependency.get(UiOffloadThread.class));
+        mNotificationLogger = new NotificationLogger();
         mDependency.injectTestDependency(NotificationLogger.class, mNotificationLogger);
 
         IPowerManager powerManagerService = mock(IPowerManager.class);
@@ -183,8 +182,8 @@
             return null;
         }).when(mStatusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(any());
 
-        mEntryManager = new TestableNotificationEntryManager(mMetricsLogger,
-                mSystemServicesProxy, mPowerManager, mContext);
+        mEntryManager = new TestableNotificationEntryManager(mSystemServicesProxy, mPowerManager,
+                mContext);
         mStatusBar = new TestableStatusBar(mStatusBarKeyguardViewManager, mUnlockMethodCache,
                 mKeyguardIndicationController, mStackScroller, mHeadsUpManager,
                 mPowerManager, mNotificationPanelView, mBarService, mNotificationListener,
@@ -637,21 +636,9 @@
 
     private class TestableNotificationEntryManager extends NotificationEntryManager {
 
-        public TestableNotificationEntryManager(MetricsLogger metricsLogger,
-                SystemServicesProxy systemServicesProxy, PowerManager powerManager,
-                Context context) {
-            super(mDependency.get(NotificationLockscreenUserManager.class),
-                    mDependency.get(NotificationGroupManager.class),
-                    mDependency.get(NotificationGutsManager.class),
-                    mDependency.get(NotificationRemoteInputManager.class),
-                    mDependency.get(NotificationMediaManager.class),
-                    mDependency.get(ForegroundServiceController.class),
-                    mDependency.get(NotificationListener.class),
-                    metricsLogger,
-                    mDependency.get(DeviceProvisionedController.class),
-                    mDependency.get(VisualStabilityManager.class),
-                    mDependency.get(UiOffloadThread.class),
-                    context);
+        public TestableNotificationEntryManager(SystemServicesProxy systemServicesProxy,
+                PowerManager powerManager, Context context) {
+            super(context);
             mSystemServicesProxy = systemServicesProxy;
             mPowerManager = powerManager;
         }