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

Commit 50520b0e authored by Sungsoo Lim's avatar Sungsoo Lim Committed by Cherrypicker Worker
Browse files

Fix failing tests

Bug: 255682218
Bug: 255682560
Tag: #refactor
Test: atest BluetoothInstrumentationTests
Change-Id: I8d7cc2883cec80702e3d7446d9490be723b50cfd
(cherry picked from commit 0cd24626)
Merged-In: I8d7cc2883cec80702e3d7446d9490be723b50cfd
parent 46e00181
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ public class ActiveDeviceManagerTest {
                }
        );
        a2dpDisconnected(mA2dpDevice);
        verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(isNull());
        verify(mA2dpService, timeout(TIMEOUT_MS).atLeast(1)).setActiveDevice(isNull());
        verify(mHearingAidService, timeout(TIMEOUT_MS).times(2))
                .setActiveDevice(mHearingAidDevice);
    }
+5 −0
Original line number Diff line number Diff line
@@ -180,6 +180,11 @@ public class HearingAidServiceTest {
        Assert.assertEquals(newState, intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1));
        Assert.assertEquals(prevState, intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE,
                -1));
        if (newState == BluetoothProfile.STATE_CONNECTED) {
            // ActiveDeviceManager calls setActiveDevice when connected.
            mService.setActiveDevice(device);
        }

    }

    private void verifyNoConnectionStateIntent(int timeoutMs, BluetoothDevice device) {