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

Commit d3a9cc4e authored by Joseph Pirozzo's avatar Joseph Pirozzo
Browse files

AVRCP Controller test resource files

Return the targetcontext resources when the mocked service tries to
getResources().

Bug: 132340980
Test: atest AvrcpControllerStateMachineTest
Change-Id: Ia6f167bd0074e5d32a88b8e77537a5ea94a59104
Merged-In: Ia6f167bd0074e5d32a88b8e77537a5ea94a59104
parent 1d259f6a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ public class AvrcpControllerStateMachineTest {
        MockitoAnnotations.initMocks(this);
        TestUtils.setAdapterService(mAdapterService);
        TestUtils.startService(mServiceRule, AvrcpControllerService.class);
        doReturn(mTargetContext.getResources()).when(mAvrcpControllerService).getResources();

        // This line must be called to make sure relevant objects are initialized properly
        mAdapter = BluetoothAdapter.getDefaultAdapter();