Unifies constants accross hearing aid related profiles (2/2)
Hearing aid constants defined differently across different hearing aid related profiles. For hearing aid device mode, HearingAidProfile and HapClientProfile have different values for mode definition and there is also a new BANDED hearing aid type in HapClientProfile spec. For hearing aid device side, HearingAidProfile has only 2 kinds of side which is left and right whereas BLE hearing aid can retrieve 27 different kinds of audio location. We therefore introduce a new class HearingAidInfo for mapping these different constants across these profiles into a single unified set of constants. Bug: 253192350 Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityHearingAidPreferenceControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidPairingDialogFragmentTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=HearingAidUtilsTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsPairOtherControllerTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableMediaDeviceGroupControllerTest Change-Id: Id14928dbc051fcf76fe0d66b43aefefb1b5f7baf
This commit is contained in:
@@ -52,7 +52,7 @@ import com.android.settingslib.bluetooth.BluetoothCallback;
|
||||
import com.android.settingslib.bluetooth.BluetoothEventManager;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDevice;
|
||||
import com.android.settingslib.bluetooth.CachedBluetoothDeviceManager;
|
||||
import com.android.settingslib.bluetooth.HearingAidProfile;
|
||||
import com.android.settingslib.bluetooth.HearingAidInfo;
|
||||
import com.android.settingslib.bluetooth.LocalBluetoothManager;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -246,9 +246,9 @@ public class AvailableMediaDeviceGroupControllerTest {
|
||||
public void onActiveDeviceChanged_hearingAidProfile_launchHearingAidPairingDialog() {
|
||||
when(mCachedBluetoothDevice.isConnectedAshaHearingAidDevice()).thenReturn(true);
|
||||
when(mCachedBluetoothDevice.getDeviceMode()).thenReturn(
|
||||
HearingAidProfile.DeviceMode.MODE_BINAURAL);
|
||||
HearingAidInfo.DeviceMode.MODE_BINAURAL);
|
||||
when(mCachedBluetoothDevice.getDeviceSide()).thenReturn(
|
||||
HearingAidProfile.DeviceSide.SIDE_LEFT);
|
||||
HearingAidInfo.DeviceSide.SIDE_LEFT);
|
||||
mAvailableMediaDeviceGroupController.init(mDashboardFragment);
|
||||
|
||||
mAvailableMediaDeviceGroupController.onActiveDeviceChanged(mCachedBluetoothDevice,
|
||||
|
Reference in New Issue
Block a user