Click left side of list in "previously connected devices" should connect to the device
* For fix the TreeHugger error in pi-dev, cherry pick the ag/3943978 in master and fix TreeHugger error. Change android.support.v7.* to androidx.* * In "previously connected devices", to connect device * In "Available media devices", to activate device Bug: 77607104 Test: make -j50 RunSettingsRoboTests Change-Id: If5005031bd3f5dc4950abf2c77575785cd6f67b1
This commit is contained in:
@@ -57,7 +57,8 @@ public class SavedBluetoothDeviceUpdaterTest {
|
||||
private LocalBluetoothProfileManager mLocalBluetoothProfileManager;
|
||||
|
||||
private Context mContext;
|
||||
private BluetoothDeviceUpdater mBluetoothDeviceUpdater;
|
||||
private SavedBluetoothDeviceUpdater mBluetoothDeviceUpdater;
|
||||
private BluetoothDevicePreference mPreference;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -71,6 +72,7 @@ public class SavedBluetoothDeviceUpdaterTest {
|
||||
mBluetoothDeviceUpdater = spy(new SavedBluetoothDeviceUpdater(mDashboardFragment,
|
||||
mDevicePreferenceCallback, mLocalManager));
|
||||
mBluetoothDeviceUpdater.setPrefContext(mContext);
|
||||
mPreference = new BluetoothDevicePreference(mContext, mCachedBluetoothDevice, false);
|
||||
doNothing().when(mBluetoothDeviceUpdater).addPreference(any());
|
||||
doNothing().when(mBluetoothDeviceUpdater).removePreference(any());
|
||||
}
|
||||
@@ -110,4 +112,11 @@ public class SavedBluetoothDeviceUpdaterTest {
|
||||
|
||||
verify(mBluetoothDeviceUpdater).addPreference(mCachedBluetoothDevice);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onClick_Preference_setConnect() {
|
||||
mBluetoothDeviceUpdater.onPreferenceClick(mPreference);
|
||||
|
||||
verify(mCachedBluetoothDevice).connect(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user