Fix broken tests on LocalBluetoothProfileManagerTest
Bug: 215308761 Test: make -j64 RunSettingsLibRoboTests Change-Id: Id2146dd4461ea848fc59f90c8caafcf6104647f8
This commit is contained in:
@@ -175,6 +175,12 @@ public class BluetoothEventManager {
|
||||
null, mReceiverHandler);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void registerProfileIntentReceiverForTest() {
|
||||
mContext.registerReceiverAsUser(mProfileBroadcastReceiver, mUserHandle,
|
||||
mProfileIntentFilter, null, mReceiverHandler);
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
void addProfileHandler(String action, Handler handler) {
|
||||
mHandlerMap.put(action, handler);
|
||||
|
||||
@@ -84,6 +84,7 @@ public class LocalBluetoothProfileManagerTest {
|
||||
when(mCachedBluetoothDevice.getDevice()).thenReturn(mDevice);
|
||||
mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
|
||||
mDeviceManager, mEventManager);
|
||||
mEventManager.registerProfileIntentReceiverForTest();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user