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

Commit 08f866f9 authored by Jack He's avatar Jack He Committed by Automerger Merge Worker
Browse files

Merge "bt: Set alias for all devices in a set" am: 2c2aced0 am: 8937e79c

parents bde88cf2 8937e79c
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -576,9 +576,14 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
     */
    public void setName(String name) {
        // Prevent getName() to be set to null if setName(null) is called
        if (name != null && !TextUtils.equals(name, getName())) {
        if (name == null || TextUtils.equals(name, getName())) {
            return;
        }
        mDevice.setAlias(name);
        dispatchAttributesChanged();

        for (CachedBluetoothDevice cbd : mMemberDevices) {
            cbd.setName(name);
        }
    }