Update friendly name for a paired device by properly initializing mAlias
member of DeviceProperties in Property Changed Callback() for remote device.
bug
6884149
Change-Id: I01d0679af4facfe6e92527f7618f4ff791928d0e
debugLog("Remote Device name is: " + device.mName);
break;
case AbstractionLayer.BT_PROPERTY_REMOTE_FRIENDLY_NAME:
- // TODO(BT) is null device.mAlias a valid senario?
if (device.mAlias != null) {
System.arraycopy(val, 0, device.mAlias, 0, val.length);
}
+ else {
+ device.mAlias = new String(val);
+ }
break;
case AbstractionLayer.BT_PROPERTY_BDADDR:
device.mAddress = val;