Add preference group for saved devcies.
Currently it only contains bluetooth devices. Bug: 3240835 Test: RunSettingsRoboTests Change-Id: Ief102e7174a4c4610dbda6b728419b303ff928f9
This commit is contained in:
@@ -51,16 +51,8 @@ public class ConnectedBluetoothDeviceUpdater extends BluetoothDeviceUpdater {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(CachedBluetoothDevice cachedDevice) {
|
||||
public boolean isFilterMatched(CachedBluetoothDevice cachedDevice) {
|
||||
final BluetoothDevice device = cachedDevice.getDevice();
|
||||
final boolean filterMatch =
|
||||
device.getBondState() == BluetoothDevice.BOND_BONDED && device.isConnected();
|
||||
|
||||
if (filterMatch) {
|
||||
// Add the preference if it is new one
|
||||
addPreference(cachedDevice);
|
||||
} else {
|
||||
removePreference(cachedDevice);
|
||||
}
|
||||
return device.getBondState() == BluetoothDevice.BOND_BONDED && device.isConnected();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user