OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6299be
)
DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name
author
Hansong Zhang
<hsz@google.com>
Thu, 26 Apr 2018 21:13:45 +0000
(14:13 -0700)
committer
Hansong Zhang
<hsz@google.com>
Thu, 26 Apr 2018 21:17:52 +0000
(14:17 -0700)
Test: manual
Bug:
73173182
Change-Id: I3c25af233742e63351a68e8c5a279b51a94e49e2
core/java/android/bluetooth/BluetoothDevice.java
patch
|
blob
|
history
diff --git
a/core/java/android/bluetooth/BluetoothDevice.java
b/core/java/android/bluetooth/BluetoothDevice.java
index
f7e2504
..
3f2b93c
100644
(file)
--- a/
core/java/android/bluetooth/BluetoothDevice.java
+++ b/
core/java/android/bluetooth/BluetoothDevice.java
@@
-723,7
+723,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;
}