Shown toast when BT turned on
* Shown "Bluetooth turned on" toast only when BT turned on in "Pair new device" * Add test to verify shown toast function can be called when BT turned on. Bug: 79383997 Test: make -j42 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothPairingDetailTest Change-Id: I25f75aaa04063d9ef8a0df4bb06aeaa70d7ac146
This commit is contained in:
@@ -192,4 +192,13 @@ public class BluetoothPairingDetailTest {
|
||||
// Verify that clean up only happen once at initialization
|
||||
verify(mAvailableDevicesCategory, times(1)).removeAll();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onBluetoothStateChanged_whenTurnedOnBTShowToast() {
|
||||
doNothing().when(mFragment).updateContent(anyInt());
|
||||
|
||||
mFragment.onBluetoothStateChanged(BluetoothAdapter.STATE_ON);
|
||||
|
||||
verify(mFragment).showBluetoothTurnedOnToast();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user