Use mock dependency LocalBluetoothManager
A *real* LocalBluetoothManager was being used in the tests and
registering (and not unregistering) multiple broadcast receivers which
was causing the systemui.tests package to exceed its limit for
registered receivers.
Test: atest SystemUITests
Bug: 151614195
Change-Id: I6976abf8ea4f3e984be7aa5393dd7aac5a3ee509
diff --git a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
index a36f2c7..bb2eea9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/SysuiTestCase.java
@@ -31,6 +31,7 @@
import androidx.test.InstrumentationRegistry;
import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.settingslib.bluetooth.LocalBluetoothManager;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.plugins.FalsingManager;
@@ -80,6 +81,9 @@
// None of them actually need it.
mDependency.injectTestDependency(FalsingManager.class, new FalsingManagerFake());
mDependency.injectMockDependency(KeyguardUpdateMonitor.class);
+
+ // TODO: b/151614195 investigate root cause of needing this mock dependency
+ mDependency.injectMockDependency(LocalBluetoothManager.class);
}
@After