{
System.arraycopy(replyBuf, 2, device, 0, ADDRESS_LEN);
System.arraycopy(replyBuf, 9, name, 0, NAME_LEN);
System.arraycopy(replyBuf, 25, retCod, 0, 4);
// add the Element to the Vector List
retVec.addElement(new RemoteDevice(nameToString(name), addressToString(device), retCod));
}
else if (replyBuf[1] == MSG_INQUIRY_STOPPED)
{
cmdComplete();
// Fill in the names
for (int i = 0; i < retVec.size(); i++) {
RemoteDevice btrd = ((RemoteDevice) retVec.elementAt(i));
String s = btrd.getFriendlyName(false);
if (s.length() == 0) {
String nm = lookupName(btrd.getDeviceAddr());
btrd.setFriendlyName(nm);
}
}
return retVec;
}
}