Add support for Multi-A2DP state machines per device
Update usage of A2dpService API calls that take BluetoothDevice as an additional argument. If the BluetoothDevice argument is null, the API applies to the device that is currently the Active A2DP device. Exempt-From-Owner-Approval: De-facto owner of the relevant changes is the Bluetooth team. Bug: 69269748 Test: Manual Change-Id: I7417b7b0741f706df475cb2b27fbe6525f744269
This commit is contained in:
@@ -74,8 +74,8 @@ public class AbstractBluetoothA2dpPreferenceControllerTest {
|
||||
mLifecycle = new Lifecycle(mLifecycleOwner);
|
||||
mController = spy(new AbstractBluetoothA2dpPreferenceControllerImpl(mContext, mLifecycle,
|
||||
mBluetoothA2dpConfigStore));
|
||||
doReturn(mBluetoothCodecConfig).when(mController).getCodecConfig();
|
||||
doNothing().when(mController).setCodecConfigPreference(any());
|
||||
doReturn(mBluetoothCodecConfig).when(mController).getCodecConfig(null);
|
||||
doNothing().when(mController).setCodecConfigPreference(any(), any());
|
||||
when(mBluetoothA2dpConfigStore.createCodecConfig()).thenReturn(mBluetoothCodecConfig);
|
||||
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
|
||||
mController.displayPreference(mScreen);
|
||||
@@ -87,7 +87,7 @@ public class AbstractBluetoothA2dpPreferenceControllerTest {
|
||||
|
||||
mController.onPreferenceChange(mPreference, "" /* new value */);
|
||||
|
||||
verify(mController).setCodecConfigPreference(any());
|
||||
verify(mController).setCodecConfigPreference(any(), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -96,7 +96,7 @@ public class AbstractBluetoothA2dpPreferenceControllerTest {
|
||||
|
||||
mController.onPreferenceChange(mPreference, "" /* new value */);
|
||||
|
||||
verify(mController, never()).setCodecConfigPreference(any());
|
||||
verify(mController, never()).setCodecConfigPreference(any(), any());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user