Hide pair other ear button after device connected via CSIP
The pair other ear button should disappear after both ears of binaural hearing aids are connected. Remove checking if CSIP is enabled since CSIP is always enabled in pairing stage. Bug: 296646732 Test: check the UI manually Change-Id: I804819eef41b5d3754ad0a79d9fc1afc66cef5cc
This commit is contained in:
@@ -156,14 +156,13 @@ public class HearingAidUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void launchHearingAidPairingDialog_deviceSupportsCsip_csipEnabled_noDialog() {
|
||||
public void launchHearingAidPairingDialog_deviceSupportsCsip_noDialog() {
|
||||
when(mCachedBluetoothDevice.isConnectedAshaHearingAidDevice()).thenReturn(true);
|
||||
when(mCachedBluetoothDevice.getDeviceMode()).thenReturn(
|
||||
HearingAidInfo.DeviceMode.MODE_BINAURAL);
|
||||
when(mCachedBluetoothDevice.getDeviceSide()).thenReturn(
|
||||
HearingAidInfo.DeviceSide.SIDE_LEFT);
|
||||
makeDeviceSupportCsip();
|
||||
makeDeviceEnableCsip(true);
|
||||
|
||||
HearingAidUtils.launchHearingAidPairingDialog(mFragmentManager, mCachedBluetoothDevice,
|
||||
TEST_LAUNCH_PAGE);
|
||||
@@ -173,24 +172,6 @@ public class HearingAidUtilsTest {
|
||||
assertThat(dialog).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void launchHearingAidPairingDialog_deviceSupportsCsip_csipDisabled_dialogShown() {
|
||||
when(mCachedBluetoothDevice.isConnectedAshaHearingAidDevice()).thenReturn(true);
|
||||
when(mCachedBluetoothDevice.getDeviceMode()).thenReturn(
|
||||
HearingAidInfo.DeviceMode.MODE_BINAURAL);
|
||||
when(mCachedBluetoothDevice.getDeviceSide()).thenReturn(
|
||||
HearingAidInfo.DeviceSide.SIDE_LEFT);
|
||||
makeDeviceSupportCsip();
|
||||
makeDeviceEnableCsip(false);
|
||||
|
||||
HearingAidUtils.launchHearingAidPairingDialog(mFragmentManager, mCachedBluetoothDevice,
|
||||
TEST_LAUNCH_PAGE);
|
||||
|
||||
shadowMainLooper().idle();
|
||||
final AlertDialog dialog = ShadowAlertDialogCompat.getLatestAlertDialog();
|
||||
assertThat(dialog.isShowing()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void launchHearingAidPairingDialog_dialogShown() {
|
||||
when(mCachedBluetoothDevice.isConnectedAshaHearingAidDevice()).thenReturn(true);
|
||||
@@ -213,11 +194,6 @@ public class HearingAidUtilsTest {
|
||||
when(mCachedBluetoothDevice.getProfiles()).thenReturn(uuids);
|
||||
}
|
||||
|
||||
private void makeDeviceEnableCsip(boolean enabled) {
|
||||
when(mCsipSetCoordinatorProfile.isEnabled(mCachedBluetoothDevice.getDevice()))
|
||||
.thenReturn(enabled);
|
||||
}
|
||||
|
||||
private void setupEnvironment() {
|
||||
ShadowBluetoothUtils.sLocalBluetoothManager = mLocalBluetoothManager;
|
||||
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
|
||||
|
||||
Reference in New Issue
Block a user