am a383452a
: Merge change 25125 into eclair
Merge commit 'a383452afd6576da5a56c8b1ef73750892e43636' into eclair-plus-aosp * commit 'a383452afd6576da5a56c8b1ef73750892e43636': Show name for incoming pairing requests.
This commit is contained in:
@@ -140,7 +140,12 @@ public class CachedBluetoothDeviceManager {
|
||||
*/
|
||||
public String getName(BluetoothDevice device) {
|
||||
CachedBluetoothDevice cachedDevice = findDevice(device);
|
||||
return cachedDevice != null ? cachedDevice.getName() : device.getAddress();
|
||||
if (cachedDevice != null) return cachedDevice.getName();
|
||||
|
||||
String name = device.getName();
|
||||
if (name != null) return name;
|
||||
|
||||
return device.getAddress();
|
||||
}
|
||||
|
||||
private void dispatchDeviceAdded(CachedBluetoothDevice cachedDevice) {
|
||||
|
@@ -256,7 +256,10 @@ public class LocalBluetoothManager {
|
||||
CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(device);
|
||||
String name = null;
|
||||
if (cachedDevice == null) {
|
||||
name = mContext.getString(R.string.bluetooth_remote_device);
|
||||
name = device.getName();
|
||||
if (name == null) {
|
||||
name = mContext.getString(R.string.bluetooth_remote_device);
|
||||
}
|
||||
} else {
|
||||
name = cachedDevice.getName();
|
||||
}
|
||||
|
Reference in New Issue
Block a user