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

Commit 8b819d75 authored by Aditi Katragadda's avatar Aditi Katragadda
Browse files

Randomize media ID to correct lost audio focus fix

This change creates a new state machine outside of set up so that it
follows the corresponding flag rule for BrowseTree when created.

Tag: #stability
Bug: 215263047
Bug: 332367017
Flag: EXEMPT, test change only
Test: atest AvrcpControllerStateMachineTest.java
Change-Id: I0a8dc727475c700e7fc2fe99fe6aed27496ed29d
parent 4afbd601
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -474,6 +474,8 @@ public class AvrcpControllerStateMachineTest {
    @Test
    public void testGetDeviceRootNode_flagRandomDeviceIdDisabled_rootNodeMatchesUuidFormat() {
        mSetFlagsRule.disableFlags(Flags.FLAG_RANDOMIZE_DEVICE_LEVEL_MEDIA_IDS);
        // create new state machine to follow current flags rule
        mAvrcpStateMachine = makeStateMachine(mTestDevice);
        setUpConnectedState(true, true);
        final String rootName = "__ROOT__" + mTestDevice.getAddress().toString();
        // Get the root of the device
@@ -485,6 +487,8 @@ public class AvrcpControllerStateMachineTest {
    @Test
    public void testGetDeviceRootNode_flagRandomDeviceIdEnabled_rootNodeMatchesUuidFormat() {
        mSetFlagsRule.enableFlags(Flags.FLAG_RANDOMIZE_DEVICE_LEVEL_MEDIA_IDS);
        // create new state machine to follow current flags rule
        mAvrcpStateMachine = makeStateMachine(mTestDevice);
        setUpConnectedState(true, true);
        final String rootName = "__ROOT__" + mTestDevice.getAddress().toString();
        // Get the root of the device