audio policy: fix connected device address.

Also update the audio device address with the one passed by
setDeviceConnectionState() if the device is in the list of
declared devices but does not have an address set.

Change-Id: Ibe9008b0c96fc336a90646b98703ed238a6cf4a9
diff --git a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp
index 5bfe957..dd2a60a 100644
--- a/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp
+++ b/services/audiopolicy/common/managerdefinitions/src/HwModule.cpp
@@ -312,6 +312,8 @@
         }
         deviceList = hwModule->getDeclaredDevices().getDevicesFromType(device);
         if (!deviceList.isEmpty()) {
+            deviceList.itemAt(0)->setName(String8(device_name));
+            deviceList.itemAt(0)->mAddress = address;
             return deviceList.itemAt(0);
         }
     }