[bluetooth] BluetoothAdapterWinrt should get its name via its DeviceInformation |
||
Issue descriptionCurrently BluetoothAdapterWinrt exposes its DeviceId [1] via the GetName() method. However, this id is meant for internal use, and does not provide useful information for clients. In order to provide a real name, this DeviceId should be used to obtain the appropriate DeviceInformation [2] via CreateFromIdAsync [3], which exposes a Name [4] property as part of its interface. In order to provide a fake implementation for tests, fake implementations of IDeviceInformationStatics and IDeviceInformation need to be introduced. Furthermore, a virtual GetDeviceInformationStaticsActivationFactory method should be added to BluetoothAdapterWinrt, which will be overidden by tests. [1] https://docs.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.bluetoothadapter.deviceid [2] https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.deviceinformation [3] https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.deviceinformation.createfromidasync [4] https://docs.microsoft.com/en-us/uwp/api/windows.devices.enumeration.deviceinformation.name
,
May 16 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, May 16 2018