Bluetooth: Remove Connect time-out in stable state.

Remove connect time-out when moved to
Connected/Disconnected instead of Pending state.
Initiate disconnect on timer expiry.

Change-Id: I687d6916e037c30e6c0619bfe6404ddd4ddfa46a
CRs-Fixed: 678043
Bluetooth: Broadcast Audio Stopped Event.

When remote has suspended A2dp streaming broadcast
audio state as a2dp stopped.

Change-Id: I6389031f364d506d9f4b334f2a81bdef4542fc54
CRs-Fixed: 645135
Bluetooth: Added null check condtion.

Added null check before accessing
mCurrentDevice. Due to delay in broadcasting
A2dp connection states, Bluetooth settings can
query getConnectedDevices when current state is
disconnected causing NPE.

Change-Id: I2a612e05a3c1a830c9f3bda742bff1b32784e51b
CRs-Fixed: 644148
Bluetooth: Fix for Intent to reach the receiver timebound

Set the flag foreground to make sure the intent is reached to
receiver immediately.

CRs-fixed: 635246

Change-Id: I3d317f6e8f65ce47fa2fa8e0ed84235fc8e7f889
Bluetooth: Delay timeout for ConnectOtherProfile.

Some devices reject connection when connection is
initiated after 6 secs, delay connection timeout for
such devices to 10 secs.

Change-Id: I676b98ae64085a45bd6ecb9a6aeac7921a009e84
CRs-Fixed: 671762
Bluetooth: Initiate SDP after remote disconnect.

Initiate SDP if remote has disconnected just after pairing
and initiated A2dp/HFP connection.

Change-Id: Ia4ab534be1b9813c7147e1b1b037aa8e721ee190
CRs-Fixed: 664310
CRs-Fixed: 667989
Fix to avoid the invalid state of profiles

Due to STOP_TIMEOUT followed by ANR crash, we need to
kill the process similar to DISABLE_TIMEOUT case.

Change-Id: I89cc46481610457142b479acb68de224b1eecda3
Bluetooth: Fix for BT fails to turn on in PDT test

Fix for BT fails to turn on after several hours of PDT test
Issue is due to disable timeout, host fails to get the wack ACK from
the SoC during BT turn of. Adding ssr cleanup routine in disable
timout routine

CRs-Fixed: 614585

Change-Id: Ia32da9426f976ddc71f0ad740312222b4b646c94
Bluetooth: Re-try connection in Quiet Mode.

When pairing and connection is initiated by NFC
and connection for either of A2dp/HFP fails, then
re-try for connection of failed profile.

Change-Id: I5102e3e2468fcbd9bfc28899d4939bc81722b30c
CRs-Fixed: 680489
Bluetooth-OPP: Cleanup pending share while BT turn OFF

This will ensure that pending OPP shares will be removed from database
while BT is turning OFF. Otherwise, BT turned back ON if there are some
pending share in database it will start sending automatically.

CRs-Fixed: 611970
Change-Id: Ibc2664840f11bfeaefb5984e8ac18a171d515129