Bluetooth: Handling BLE disable during device power off.

Problem: When device is turned off, Shutdown thread initiates
Bluetooth disable. However, in case of BLE on, Bluetooth does
not turn off and ultimately process is killed by the framework
Once Bluetooth process is killed, BluetoothManagerService take
it as a crash and initiates  Bluetooth enable again.

Fix: To fix the issue, the disable method, when called as part
of shutdown sequence, need to reset ble app count. Further, it
need to send appropriate signal to AdapterService to completely
turn ooff Bluetooth based on current state.

CRs-Fixed: 1106158

Change-Id: I4a3bc6b4f584373d1afd5f61e6acdbc31d6e2ef9
1 file changed