Add the pairing string for CSIP supported device am: f57f720c38 am: 5d1aee76c2

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1903830

Change-Id: I51ff75f8a8005985a9696616edd1c8c5cdd651fe
This commit is contained in:
Alice Kuo
2021-11-29 02:48:43 +00:00
committed by Automerger Merge Worker
5 changed files with 61 additions and 0 deletions

View File

@@ -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.