Merge "DO NOT MERGE Bluetooth: Fix formatting in getAlias()" into qt-dev

This commit is contained in:
TreeHugger Robot
2021-09-02 01:20:06 +00:00
committed by Android (Google) Code Review

View File

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