[automerger] DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name am: b6cde9ecc1 am: b906043c81 am: 9822117184 am: 2b41ff76b0

Change-Id: I6e5bf8c2f05f44bc292f4c0ec1fcc885a4a24655
This commit is contained in:
Android Build Merger (Role)
2018-04-26 21:19:03 +00:00

View File

@@ -727,7 +727,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;
}