Add the pairing string for CSIP supported device
Show the pairing dialog with the hint message that pairing this device will pair all of the set member of a coordinated set. If the device supports CSIP, the message will be shown. Screenshot: https://screenshot.googleplex.com/8WcrdgBoLRgJjHs Bug: 178981521 Test: make RunSettingsRoboTests ROBOTEST_FILTER=BlueotohPairingDialog Change-Id: I5432b7264652dd4485e2669f6004caa4f7459238 Merged-In: I5432b7264652dd4485e2669f6004caa4f7459238
This commit is contained in:
@@ -427,6 +427,34 @@ public class BluetoothPairingDialogTest {
|
||||
userEntryDialogExistingTextTest("test");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void groupPairing_setMemberDevice_showsMessageHint() {
|
||||
// set the correct dialog type
|
||||
when(controller.getDialogType()).thenReturn(BluetoothPairingController.CONFIRMATION_DIALOG);
|
||||
when(controller.isCoordinatedSetMemberDevice()).thenReturn(true);
|
||||
|
||||
// build the fragment
|
||||
BluetoothPairingDialogFragment frag = makeFragment();
|
||||
|
||||
// verify message is what we expect it to be and is visible
|
||||
TextView message = frag.getmDialog().findViewById(R.id.pairing_group_message);
|
||||
assertThat(message.getVisibility()).isEqualTo(View.VISIBLE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void groupPairing_nonSetMemberDevice_hidesMessageHint() {
|
||||
// set the correct dialog type
|
||||
when(controller.getDialogType()).thenReturn(BluetoothPairingController.CONFIRMATION_DIALOG);
|
||||
when(controller.isCoordinatedSetMemberDevice()).thenReturn(false);
|
||||
|
||||
// build the fragment
|
||||
BluetoothPairingDialogFragment frag = makeFragment();
|
||||
|
||||
// verify message is what we expect it to be and is visible
|
||||
TextView message = frag.getmDialog().findViewById(R.id.pairing_group_message);
|
||||
assertThat(message.getVisibility()).isEqualTo(View.GONE);
|
||||
}
|
||||
|
||||
// Runs a test simulating the user entry dialog type in a situation like device rotation, where
|
||||
// the dialog fragment gets created and we already have some existing text entered into the
|
||||
// pin field.
|
||||
|
Reference in New Issue
Block a user