mediaplayer: bluetooth: update discovery_result response to new format 21/13821/1
authorMatt Ranostay <matt.ranostay@konsulko.com>
Fri, 20 Apr 2018 01:54:14 +0000 (18:54 -0700)
committerMatt Ranostay <matt.ranostay@konsulko.com>
Fri, 20 Apr 2018 01:54:18 +0000 (18:54 -0700)
Response is switched to map with "list" member to be more consistent with
other binding APIs, and to make libqtappfw access easier

Bug-AGL: SPEC-1385
Change-Id: I10c315827ce6c1c47be5123e95a3f88e06ea4515
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
app/api/BluetoothManager.qml

index 63e3e60..ea33dfe 100644 (file)
@@ -66,10 +66,10 @@ WebSocket {
                 var address = ""
 
                 if (request.info == "BT - Scan Result is Displayed") {
-                    for (var i = 0; i < response.length; i++) {
-                        var data = response[i]
+                    for (var i = 0; i < response.list.length; i++) {
+                        var data = list.response[i]
                         if (data.Connected == "True" && data.UUIDs.indexOf(avrcp_uuid) >= 0) {
-                            address = response[i].Address
+                            address = data.Address
                             console.debug("Connected Device: " + address)
 
                             root.connected = true