DO NOT MERGE Bluetooth: Fix formatting in getAlias()

Bug: 180747689
Test: manual
Change-Id: Ic309f4aad116fd424d5d0d0e2016d61be8826b78
This commit is contained in:
Hansong Zhang
2021-08-18 16:35:00 -07:00
parent b0fccf4d9d
commit 3bdad2df2e

View File

@@ -894,7 +894,14 @@ public final class BluetoothDevice implements Parcelable {
return null;
}
try {
return service.getRemoteAlias(this);
String alias = service.getRemoteAlias(this);
if (alias == null) {
return getName();
}
return alias
.replace('\t', ' ')
.replace('\n', ' ')
.replace('\r', ' ');
} catch (RemoteException e) {
Log.e(TAG, "", e);
}