Merge "Fix broken tests on LocalBluetoothProfileManagerTest"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7370da0224
@@ -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