| changeset 79 | 2f468c1958d0 |
| parent 76 | 4ad59aaee882 |
| 76:4ad59aaee882 | 79:2f468c1958d0 |
|---|---|
362 |
362 |
363 JELOG2(EJavaBluetooth); |
363 JELOG2(EJavaBluetooth); |
364 TInt error = RProperty::Get(KPropertyUidBluetoothCategory, |
364 TInt error = RProperty::Get(KPropertyUidBluetoothCategory, |
365 KPropertyKeyBluetoothGetDeviceName, bluetoothName); |
365 KPropertyKeyBluetoothGetDeviceName, bluetoothName); |
366 |
366 |
367 if (error != KErrNone) |
367 if (error != KErrNone || (0 == bluetoothName.Length())) |
368 { |
368 { |
369 ELOG(EJavaBluetooth, "Bluetooth friendly name was not set"); |
|
369 return NULL; |
370 return NULL; |
370 } |
371 } |
371 |
|
372 std::wstring *deviceName = |
372 std::wstring *deviceName = |
373 new std::wstring((wchar_t*) bluetoothName.Ptr()); |
373 new std::wstring((wchar_t*) bluetoothName.Ptr()); |
374 |
374 |
375 deviceName->resize(bluetoothName.Length()); |
375 deviceName->resize(bluetoothName.Length()); |
376 return deviceName; |
376 return deviceName; |