copyAndSetPaired

open override fun copyAndSetPaired(devices: Map<Identifier, () -> ConnectableDevice>, filter: Filter, removeForAllPairedFilters: Boolean): ScanningState.Devices

Creates a new Devices instance that sets the paired ConnectableDevice for a given Filter

Return

the new instance of Devices where allDevices contains a ConnectableDevice for all Identifier in devices and identifiersFoundForDeviceDiscoveryMode will contains all Identifier in devices for a DeviceDiscoveryMode.Paired with filter

Parameters

devices

map of all the Identifier paired and a method for creating the corresponding ConnectableDevice

filter

a Filter applied for acquiring the scanned devices

removeForAllPairedFilters

if true the list of paired devices for all filters will be emptied