Remove InjectionInflationController from NPV

NotificationPanelViewController can use LayoutInflator directly. The
views it was applied to were not using dagger injection.

Also, replace static usages of LayoutInflator.from() with injected
LayoutInflator instance.

Test: atest SystemUITests
Change-Id: I206b7d388c61aa1821b7c52c2ef1497c0b533fa9
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
index ba08e76..3519ce1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java
@@ -129,7 +129,6 @@
 import com.android.systemui.statusbar.policy.KeyguardStateController;
 import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
 import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
-import com.android.systemui.util.InjectionInflationController;
 import com.android.wm.shell.animation.FlingAnimationUtils;
 
 import java.io.FileDescriptor;
@@ -266,8 +265,7 @@
                             && mAuthController.getUdfpsRegion() != null
                             && mAuthController.isUdfpsEnrolled(
                                    KeyguardUpdateMonitor.getCurrentUser())) {
-                        LayoutInflater.from(mView.getContext())
-                                .inflate(R.layout.disabled_udfps_view, mView);
+                        mLayoutInflater.inflate(R.layout.disabled_udfps_view, mView);
                         mDisabledUdfpsController = new DisabledUdfpsController(
                                 mView.findViewById(R.id.disabled_udfps_view),
                                 mStatusBarStateController,
@@ -279,7 +277,7 @@
                 }
     };
 
-    private final InjectionInflationController mInjectionInflationController;
+    private final LayoutInflater mLayoutInflater;
     private final PowerManager mPowerManager;
     private final AccessibilityManager mAccessibilityManager;
     private final NotificationWakeUpCoordinator mWakeUpCoordinator;
@@ -523,7 +521,7 @@
     @Inject
     public NotificationPanelViewController(NotificationPanelView view,
             @Main Resources resources,
-            InjectionInflationController injectionInflationController,
+            LayoutInflater layoutInflater,
             NotificationWakeUpCoordinator coordinator, PulseExpansionHandler pulseExpansionHandler,
             DynamicPrivacyController dynamicPrivacyController,
             KeyguardBypassController bypassController, FalsingManager falsingManager,
@@ -568,7 +566,7 @@
         mKeyguardStatusViewComponentFactory = keyguardStatusViewComponentFactory;
         mQSDetailDisplayer = qsDetailDisplayer;
         mView.setWillNotDraw(!DEBUG);
-        mInjectionInflationController = injectionInflationController;
+        mLayoutInflater = layoutInflater;
         mFalsingManager = falsingManager;
         mFalsingCollector = falsingCollector;
         mPowerManager = powerManager;
@@ -774,8 +772,7 @@
         KeyguardStatusView keyguardStatusView = mView.findViewById(R.id.keyguard_status_view);
         int index = mView.indexOfChild(keyguardStatusView);
         mView.removeView(keyguardStatusView);
-        keyguardStatusView = (KeyguardStatusView) mInjectionInflationController.injectable(
-                LayoutInflater.from(mView.getContext())).inflate(
+        keyguardStatusView = (KeyguardStatusView) mLayoutInflater.inflate(
                 R.layout.keyguard_status_view, mView, false);
         mView.addView(keyguardStatusView, index);
 
@@ -786,8 +783,7 @@
         index = mView.indexOfChild(mKeyguardBottomArea);
         mView.removeView(mKeyguardBottomArea);
         KeyguardBottomAreaView oldBottomArea = mKeyguardBottomArea;
-        mKeyguardBottomArea = (KeyguardBottomAreaView) mInjectionInflationController.injectable(
-                LayoutInflater.from(mView.getContext())).inflate(
+        mKeyguardBottomArea = (KeyguardBottomAreaView) mLayoutInflater.inflate(
                 R.layout.keyguard_bottom_area, mView, false);
         mKeyguardBottomArea.initFrom(oldBottomArea);
         mView.addView(mKeyguardBottomArea, index);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java
index d452861..aa7143e 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NotificationPanelViewTest.java
@@ -40,6 +40,7 @@
 import android.testing.AndroidTestingRunner;
 import android.testing.TestableLooper;
 import android.util.DisplayMetrics;
+import android.view.LayoutInflater;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
@@ -84,7 +85,6 @@
 import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController;
 import com.android.systemui.statusbar.policy.ConfigurationController;
 import com.android.systemui.statusbar.policy.KeyguardStateController;
-import com.android.systemui.util.InjectionInflationController;
 import com.android.wm.shell.animation.FlingAnimationUtils;
 
 import org.junit.Before;
@@ -139,7 +139,7 @@
     @Mock
     private NotificationPanelView mView;
     @Mock
-    private InjectionInflationController mInjectionInflationController;
+    private LayoutInflater mLayoutInflater;
     @Mock
     private DynamicPrivacyController mDynamicPrivacyController;
     @Mock
@@ -264,7 +264,7 @@
                 .thenReturn(mKeyguardStatusViewController);
         mNotificationPanelViewController = new NotificationPanelViewController(mView,
                 mResources,
-                mInjectionInflationController,
+                mLayoutInflater,
                 coordinator, expansionHandler, mDynamicPrivacyController, mKeyguardBypassController,
                 new FalsingManagerFake(), new FalsingCollectorFake(), mShadeController,
                 mNotificationLockscreenUserManager, mNotificationEntryManager,