Loading core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/BroadcastRadioServiceImplTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -210,9 +210,9 @@ public final class BroadcastRadioServiceImplTest extends ExtendedRadioMockitoTes any(IServiceCallback.class))); doReturn(mFmRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(FM_RADIO_MODULE_ID), anyString(), any(IBinder.class), any(Object.class))); eq(FM_RADIO_MODULE_ID), anyString(), any(IBinder.class))); doReturn(mDabRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(DAB_RADIO_MODULE_ID), anyString(), any(IBinder.class), any(Object.class))); eq(DAB_RADIO_MODULE_ID), anyString(), any(IBinder.class))); when(mFmRadioModuleMock.getProperties()).thenReturn(mFmModuleMock); when(mDabRadioModuleMock.getProperties()).thenReturn(mDabModuleMock); Loading core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/RadioModuleTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -58,14 +58,13 @@ public final class RadioModuleTest { @Mock private android.hardware.broadcastradio.ICloseHandle mHalCloseHandleMock; private final Object mLock = new Object(); // RadioModule under test private RadioModule mRadioModule; private android.hardware.broadcastradio.IAnnouncementListener mHalListener; @Before public void setup() throws RemoteException { mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES, mLock); mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES); // TODO(b/241118988): test non-null image for getImage method when(mBroadcastRadioMock.getImage(anyInt())).thenReturn(null); Loading core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/TunerSessionTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,6 @@ public final class TunerSessionTest extends ExtendedRadioMockitoTestCase { @Mock private IBroadcastRadio mBroadcastRadioMock; private android.hardware.radio.ITunerCallback[] mAidlTunerCallbackMocks; private final Object mLock = new Object(); // RadioModule under test private RadioModule mRadioModule; Loading @@ -104,7 +103,7 @@ public final class TunerSessionTest extends ExtendedRadioMockitoTestCase { doReturn(true).when(() -> RadioServiceUserController.isCurrentOrSystemUser()); mRadioModule = new RadioModule(mBroadcastRadioMock, AidlTestUtils.makeDefaultModuleProperties(), mLock); AidlTestUtils.makeDefaultModuleProperties()); doAnswer(invocation -> { mHalTunerCallback = (ITunerCallback) invocation.getArguments()[0]; Loading core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/BroadcastRadioServiceHidlTest.java +3 −5 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ public final class BroadcastRadioServiceHidlTest extends ExtendedRadioMockitoTes new ArrayList<>(Arrays.asList("FmService", "DabService")); private static final int[] TEST_ENABLED_TYPES = new int[]{Announcement.TYPE_TRAFFIC}; private final Object mLock = new Object(); private BroadcastRadioService mBroadcastRadioService; private DeathRecipient mFmDeathRecipient; Loading Loading @@ -200,7 +198,7 @@ public final class BroadcastRadioServiceHidlTest extends ExtendedRadioMockitoTes mockServiceManager(); mBroadcastRadioService = new BroadcastRadioService(/* nextModuleId= */ FM_RADIO_MODULE_ID, mLock, mServiceManagerMock); mServiceManagerMock); } private void mockServiceManager() throws RemoteException { Loading @@ -221,9 +219,9 @@ public final class BroadcastRadioServiceHidlTest extends ExtendedRadioMockitoTes }).thenReturn(true); doReturn(mFmRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(FM_RADIO_MODULE_ID), anyString(), any(Object.class))); eq(FM_RADIO_MODULE_ID), anyString())); doReturn(mDabRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(DAB_RADIO_MODULE_ID), anyString(), any(Object.class))); eq(DAB_RADIO_MODULE_ID), anyString())); when(mFmRadioModuleMock.getProperties()).thenReturn(mFmModuleMock); when(mDabRadioModuleMock.getProperties()).thenReturn(mDabModuleMock); Loading core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/RadioModuleHidlTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -62,13 +62,12 @@ public final class RadioModuleHidlTest { @Mock private android.hardware.broadcastradio.V2_0.ICloseHandle mHalCloseHandleMock; private final Object mLock = new Object(); private RadioModule mRadioModule; private android.hardware.broadcastradio.V2_0.IAnnouncementListener mHalListener; @Before public void setup() throws RemoteException { mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES, mLock); mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES); when(mBroadcastRadioMock.getImage(anyInt())).thenReturn(new ArrayList<Byte>(0)); Loading Loading
core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/BroadcastRadioServiceImplTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -210,9 +210,9 @@ public final class BroadcastRadioServiceImplTest extends ExtendedRadioMockitoTes any(IServiceCallback.class))); doReturn(mFmRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(FM_RADIO_MODULE_ID), anyString(), any(IBinder.class), any(Object.class))); eq(FM_RADIO_MODULE_ID), anyString(), any(IBinder.class))); doReturn(mDabRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(DAB_RADIO_MODULE_ID), anyString(), any(IBinder.class), any(Object.class))); eq(DAB_RADIO_MODULE_ID), anyString(), any(IBinder.class))); when(mFmRadioModuleMock.getProperties()).thenReturn(mFmModuleMock); when(mDabRadioModuleMock.getProperties()).thenReturn(mDabModuleMock); Loading
core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/RadioModuleTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -58,14 +58,13 @@ public final class RadioModuleTest { @Mock private android.hardware.broadcastradio.ICloseHandle mHalCloseHandleMock; private final Object mLock = new Object(); // RadioModule under test private RadioModule mRadioModule; private android.hardware.broadcastradio.IAnnouncementListener mHalListener; @Before public void setup() throws RemoteException { mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES, mLock); mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES); // TODO(b/241118988): test non-null image for getImage method when(mBroadcastRadioMock.getImage(anyInt())).thenReturn(null); Loading
core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/aidl/TunerSessionTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -83,7 +83,6 @@ public final class TunerSessionTest extends ExtendedRadioMockitoTestCase { @Mock private IBroadcastRadio mBroadcastRadioMock; private android.hardware.radio.ITunerCallback[] mAidlTunerCallbackMocks; private final Object mLock = new Object(); // RadioModule under test private RadioModule mRadioModule; Loading @@ -104,7 +103,7 @@ public final class TunerSessionTest extends ExtendedRadioMockitoTestCase { doReturn(true).when(() -> RadioServiceUserController.isCurrentOrSystemUser()); mRadioModule = new RadioModule(mBroadcastRadioMock, AidlTestUtils.makeDefaultModuleProperties(), mLock); AidlTestUtils.makeDefaultModuleProperties()); doAnswer(invocation -> { mHalTunerCallback = (ITunerCallback) invocation.getArguments()[0]; Loading
core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/BroadcastRadioServiceHidlTest.java +3 −5 Original line number Diff line number Diff line Loading @@ -59,8 +59,6 @@ public final class BroadcastRadioServiceHidlTest extends ExtendedRadioMockitoTes new ArrayList<>(Arrays.asList("FmService", "DabService")); private static final int[] TEST_ENABLED_TYPES = new int[]{Announcement.TYPE_TRAFFIC}; private final Object mLock = new Object(); private BroadcastRadioService mBroadcastRadioService; private DeathRecipient mFmDeathRecipient; Loading Loading @@ -200,7 +198,7 @@ public final class BroadcastRadioServiceHidlTest extends ExtendedRadioMockitoTes mockServiceManager(); mBroadcastRadioService = new BroadcastRadioService(/* nextModuleId= */ FM_RADIO_MODULE_ID, mLock, mServiceManagerMock); mServiceManagerMock); } private void mockServiceManager() throws RemoteException { Loading @@ -221,9 +219,9 @@ public final class BroadcastRadioServiceHidlTest extends ExtendedRadioMockitoTes }).thenReturn(true); doReturn(mFmRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(FM_RADIO_MODULE_ID), anyString(), any(Object.class))); eq(FM_RADIO_MODULE_ID), anyString())); doReturn(mDabRadioModuleMock).when(() -> RadioModule.tryLoadingModule( eq(DAB_RADIO_MODULE_ID), anyString(), any(Object.class))); eq(DAB_RADIO_MODULE_ID), anyString())); when(mFmRadioModuleMock.getProperties()).thenReturn(mFmModuleMock); when(mDabRadioModuleMock.getProperties()).thenReturn(mDabModuleMock); Loading
core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/RadioModuleHidlTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -62,13 +62,12 @@ public final class RadioModuleHidlTest { @Mock private android.hardware.broadcastradio.V2_0.ICloseHandle mHalCloseHandleMock; private final Object mLock = new Object(); private RadioModule mRadioModule; private android.hardware.broadcastradio.V2_0.IAnnouncementListener mHalListener; @Before public void setup() throws RemoteException { mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES, mLock); mRadioModule = new RadioModule(mBroadcastRadioMock, TEST_MODULE_PROPERTIES); when(mBroadcastRadioMock.getImage(anyInt())).thenReturn(new ArrayList<Byte>(0)); Loading