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

Commit 6a3c4739 authored by Jaikumar Ganesh's avatar Jaikumar Ganesh
Browse files

Add FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT to name changed broadcast.

BT can come up before the system boots up and we send a broadcast,
this can cause issues.

Bug: 3259948
Change-Id: I53ce6b9851fbf611309db1f0a16768ef9f388e0c
parent 7184f361
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -259,6 +259,7 @@ class BluetoothEventLoop {
            mBluetoothService.setProperty(name, propValues[1]);
            Intent intent = new Intent(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED);
            intent.putExtra(BluetoothAdapter.EXTRA_LOCAL_NAME, propValues[1]);
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            mContext.sendBroadcast(intent, BLUETOOTH_PERM);
        } else if (name.equals("Pairable") || name.equals("Discoverable")) {
            String pairable = name.equals("Pairable") ? propValues[1] :