Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32aa6476 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name

Test: manual
Bug: 73173182
Change-Id: I3c25af233742e63351a68e8c5a279b51a94e49e2
parent b630ddc4
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -727,7 +727,11 @@ public final class BluetoothDevice implements Parcelable {
            return null;
            return null;
        }
        }
        try {
        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);}
        } catch (RemoteException e) {Log.e(TAG, "", e);}
        return null;
        return null;
    }
    }