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

Commit f3bbb9b5 authored by Grzegorz Kolodziejczyk (xWF)'s avatar Grzegorz Kolodziejczyk (xWF) Committed by Gerrit Code Review
Browse files

Merge "bass_client: Imitate receive state change when source removed" into main

parents bcc2880e 444b1a9f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1693,10 +1693,16 @@ public class BassClientServiceTest {
                });
        doReturn(stateList).when(sm).getAllSources();

        Optional<BluetoothLeBroadcastReceiveState> receiveState =
                stateList.stream().filter(e -> e.getSourceId() == sourceId).findFirst();

        mBassClientService
                .getCallbacks()
                .notifySourceRemoved(
                        sm.getDevice(), sourceId, BluetoothStatusCodes.REASON_LOCAL_APP_REQUEST);
        mBassClientService
                .getCallbacks()
                .notifyReceiveStateChanged(sm.getDevice(), sourceId, receiveState.get());
        TestUtils.waitForLooperToFinishScheduledTask(mBassClientService.getCallbacks().getLooper());
    }