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

Commit e447405f authored by Matadeen Mishra's avatar Matadeen Mishra Committed by Linux Build Service Account
Browse files

Bluetooth: Handle BT state change

Add foreground flag to state change intent. Fix for few profiles
not syncing with the BT adapter state in multiple BT on/off test
case.

CRs-fixed: 1036876
Change-Id: Ice042a21f08566cadc9540aa75cde726b2e86575
parent facebfa8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1513,6 +1513,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, prevState);
                intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState);
                intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
                intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
                mContext.sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_PERM);
            }
        }