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

Commit 359aceb6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix ConcurrentModificationException in radio test" into main

parents 6f31eac8 a412c9e3
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -610,8 +610,6 @@ public final class TunerSessionTest extends ExtendedRadioMockitoTestCase {
    @Test
    public void cancel() throws Exception {
        openAidlClients(/* numClients= */ 1);
        ProgramSelector initialSel = AidlTestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]);
        mTunerSessions[0].tune(initialSel);

        mTunerSessions[0].cancel();

@@ -621,9 +619,6 @@ public final class TunerSessionTest extends ExtendedRadioMockitoTestCase {
    @Test
    public void cancel_forNonCurrentUser_doesNotCancel() throws Exception {
        openAidlClients(/* numClients= */ 1);
        ProgramSelector initialSel = AidlTestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]);
        mTunerSessions[0].tune(initialSel);
        verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onCurrentProgramInfoChanged(any());
        doReturn(false).when(() -> RadioServiceUserController.isCurrentOrSystemUser());

        mTunerSessions[0].cancel();
+0 −5
Original line number Diff line number Diff line
@@ -540,8 +540,6 @@ public final class TunerSessionHidlTest extends ExtendedRadioMockitoTestCase {
    @Test
    public void cancel() throws Exception {
        openAidlClients(/* numClients= */ 1);
        ProgramSelector initialSel = TestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]);
        mTunerSessions[0].tune(initialSel);

        mTunerSessions[0].cancel();

@@ -551,9 +549,6 @@ public final class TunerSessionHidlTest extends ExtendedRadioMockitoTestCase {
    @Test
    public void cancel_forNonCurrentUser_doesNotCancel() throws Exception {
        openAidlClients(/* numClients= */ 1);
        ProgramSelector initialSel = TestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]);
        mTunerSessions[0].tune(initialSel);
        verify(mAidlTunerCallbackMocks[0], CALLBACK_TIMEOUT).onCurrentProgramInfoChanged(any());
        doReturn(false).when(() -> RadioServiceUserController.isCurrentOrSystemUser());

        mTunerSessions[0].cancel();