Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 726cc14c authored by Hugh Chen's avatar Hugh Chen
Browse files

Fix broken tests on LocalBluetoothProfileManagerTest

Bug: 215308761
Test: make -j64 RunSettingsLibRoboTests
Change-Id: Id2146dd4461ea848fc59f90c8caafcf6104647f8
parent 9e02fbf6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ public class LocalBluetoothProfileManagerTest {
        when(mCachedBluetoothDevice.getDevice()).thenReturn(mDevice);
        mProfileManager = new LocalBluetoothProfileManager(mContext, mLocalBluetoothAdapter,
                mDeviceManager, mEventManager);
        mEventManager.registerProfileIntentReceiverForTest();
    }

    /**