ohos: report paired devices from the device discovery agent
An OHOS device inquiry reports only the peers that are currently
discoverable, so a peer already paired with the local device stays
invisible to QBluetoothDeviceDiscoveryAgent unless it happens to be
advertising at that moment. Applications that pick a peer from the
discovery results - the Bluetooth Chat example among them - therefore
cannot reach a device the user has already paired, which is the very
device they are most likely to want.
Union the system's paired device list into the discovery results and
mark those entries as cached, so the agent reports every reachable
peer while still telling the application which entries an inquiry
confirmed. Fill their name and class through the remote device
readers, collecting the whole list in a single crossing to the JS
thread. Skip paired devices whose transport is LE only, since this
backend advertises Bluetooth Classic discovery exclusively. Use the
same reader to resolve the name of an inquiry result that arrives
without one.
Task-number: QTBUG-147192
Pick-to: 6.12
Change-Id: Ia831546793e769f0472ce036c3bc768cea7ba25b
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Zbigniew Chyla <zbigniew.chyla@qt.io>