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

Commit a6942694 authored by Hemant Gupta's avatar Hemant Gupta 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: 709335
Change-Id: Ice042a21f08566cadc9540aa75cde726b2e86575
parent 431c5250
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1719,6 +1719,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);
            }
        }