diff options
Diffstat (limited to 'core/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r-- | core/java/android/bluetooth/BluetoothDevice.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java index 71148180cbd..83edb34b6e4 100644 --- a/core/java/android/bluetooth/BluetoothDevice.java +++ b/core/java/android/bluetooth/BluetoothDevice.java @@ -648,7 +648,11 @@ public final class BluetoothDevice implements Parcelable { return null; } try { - return sService.getRemoteName(this); + String name = sService.getRemoteName(this); + if (name != null) { + return name.replaceAll("[\\t\\n\\r]+", " "); + } + return null; } catch (RemoteException e) {Log.e(TAG, "", e);} return null; } |