BT: Update wait function in ManagerService to handle BLE states
-> The wairforOnOff method while waiting for on/off event to
occur doesn't takes BLE states into account. Since Bluetooth
Manager Service needs to takes action to completely turn On
or completely turn off Bluetooth when BLE turns ON, this
intermediate state to handle BLE On State need to be handled
at Manager Service to avoid waitforOnOff timeout.
-> Replaced the waitforOnOff method with waitForMonitoredOnOff
which handles state changes while waiting.
-> In an another change, after receiving Enable Message, added
condition to wait for off event only when Bluetooth is being
disabled, no need to wait for Off while enabling Bluetooth
because this serialization is handled at Adapter State.
Change-Id: I83dd6c8b28b819b1f305ba45853d56a685eccc4e
CRs-Fixed: 1102756
1 file changed