BT: Multi HF support in Settings App.

1. The connected sinks are not disconnected from
HeadsetProfile when new sink is connecting.
2. Also return correct connection status for
specific HS.
3. Sets priority for specific HS while disconnecting.

Change-Id: I876f9810be82482cb360451343e4eb2a9f3ed668
Settings: Show Service State status in Phone Status properly

When the network mode is data only mode, the voice service state
would be OOS. In such cases, data service state is not checked to
show the phone status UI. Fix to consider data service state also to
update the UI properly.

Change-Id: I20fb6ea3256d0fe4a534fbb781e664d7ce774a05
CRs-Fixed: 517234
Bluetooth: Avoid window leak when screen orientation changes

Enable screen orientation change support in Bluetooth Settings app
during any Bluetooth Setting Activity. Otherwise, window leak may
observe while screen orientation changes.

CRs-Fixed: 556653
Change-Id: I8868f4c6e96277fd17484f810de6a700198a5287
Conflicts:
	AndroidManifest.xml

Bluetooth: Set Scan Mode to Connectable after user switch

Set the scan mode to connectable after user is switched if
end discoverable time is zero. Otherwise, if BT turned ON
after switch BT will be discoverable and timeout will be improper
if previous user set timeout to never timeout.

CRs-Fixed: 691014
Change-Id: I9765f314faa41d6cba1367a493ddf7b64b0d27eb
Conflicts:
	src/com/android/settings/bluetooth/BluetoothEnabler.java

Bluetooth: Not allow Blank BT device name.

Add empty string check for BT device name
and not enable ok button until entered
device name is not empty.

CRs-fixed: 471158
Change-Id: Ib7c460bee5c8d86d13acd66d228279dd1a240c25
Add support for below network modes info in hidden menu

 LTE/WCDMA
 TD-SCDMA only
 TD-SCDMA and WCDMA
 TD-SCDMA and LTE
 TD-SCDMA and GSM
 TD-SCDMA,GSM and LTE
 TD-SCDMA, GSM/WCDMA
 TD-SCDMA, WCDMA and LTE
 TD-SCDMA, GSM/WCDMA and LTE
 TD-SCDMA, GSM/WCDMA, CDMA and EvDo
 TD-SCDMA, LTE, CDMA, EvDo GSM/WCDMA

Add support for other network modes in set preferred
network mode UI option in phone information in hidden menu

Change-Id: Id3fd9a27be84e85f4f32a0fd2a7eee9eec545227
CRs-Fixed: 569944
Bluetooth: Check device address.

If connect is initiated for same device,
Ignore it instead of disconnecting and
reconnecting it.

Change-Id: Ie167bf3a28581ac8687d892204edacf1da257e6c
CRs-Fixed: 664310
CRs-Fixed: 667989
Bluetooth: DUN: Add DUN profile support in Settings APP

This patch registers service listener for DUN profile with the
BT adapter, and it will track the profile status with the service
listener state chnages. It also has support for DUN profile
connection status updation and DUN Disconnection from server.

Change-Id: I6bd0069b3619b3487433c2e05f1e27ce9375a7e7
CRs-Fixed: 557180
Bluetooth: Fix resource leak in OPP (2/3).

This patch handles onPause in DevicePickerFragment class, which
would be called when user presses back button and does not select
any device. This will send intent to class that called
DevicePickerFragment that no device is selected.

Change-Id: Ib3965d7dea8d59b244abdc6ffe61ef21109346fb
CRs-Fixed: 662147
Bluetooth: Handle pairing Cancel intent.

Receive Pairing cancel intent and clear pairing request
from notification window.

CRs-fixed: 463362

Change-Id: I63c9299edca4356485f26cbc6332e3be9bdfbf17
Bluetooth: Remove out of range devices after ScanComplete

Change to remove device from UI when Bluetooth of remote
device is off or not discoverable anymore. Without this
change a device that discovered previously is available
in available devices list always, though the remote device
is not discoverable anymore. The current change updates
available devices list on scan complete removing the
devices that are available in cached devices and are not
discoverable anymore.

CRs-Fixed: 523374
Change-Id: Ia250d52e6fb7a69af242c961d33027f1e724ab25
Bluetooth: SAP: Add SAP profile support in Settings APP.

- Handles 16 digit Authentication
- Added Handles SAP profile connection status changes
- Added SAP Disconnect from server related changes

Change-Id: I655a8c8bcdcc275c5d95c8ddd3d7bac2691fa818
Increase allowed duration to connect to HOGP profile

This patch increases the duration allowed between the first device
connection attempt (immidiately after bonding) and profile connection
after service discovery from 5 seconds to 30 seconds to allow
HOGP connections for slow connection conditions.

Change-Id: Ia8a33a6ef8951d6e08b4a22837fcfdb70910112c
Telephony: Disable PIN Toggle option if SIM is in Locked state.

When user presses cancel in PIN lock screen, card will be in
LOCKED state and hence cannot access SIM for any transactions.

So Disable PIN Toggle option in Locked State.

Change-Id: Id569c9976c6fb9a3b2490577c80348cf2f2489ab
CRs-Fixed: 576782
Fixes error message during pairing of HOGP devices

When incorrect pin key is entered by user in
the pairing pop up while pairing with a HOGP
device, no error message regarding the failure
is displayed to the user.

CRs-fixed: 618905
Change-Id: I1a5a8baf9ef6c71bf285a28b3e1839fe5ddbca95