Bluetooth: Fix formatting in getAlias()

Bug: 180747689
Test: manual
Change-Id: Ic309f4aad116fd424d5d0d0e2016d61be8826b78
(cherry picked from commit 3c4a917cb9)
This commit is contained in:
Hansong Zhang
2021-08-18 16:35:00 -07:00
committed by Android Build Coastguard Worker
parent 9a4e52fa56
commit afa5f3c37a

View File

@@ -1329,7 +1329,10 @@ public final class BluetoothDevice implements Parcelable, Attributable {
if (alias == null) {
return getName();
}
return alias;
return alias
.replace('\t', ' ')
.replace('\n', ' ')
.replace('\r', ' ');
} catch (RemoteException e) {
Log.e(TAG, "", e);
}