Use Msim api to retrieve sim state

While updating the cellular data preference visibility,
use msim api to retrieve sim state

Change-Id: Ia3e953fd4bdd74423aa9cfb913f7bf6126d803f4
CRs-Fixed: 723706
Wifi: Display IP Address in setting

This particular change from google
"Ib33f35c004e30b6067bb20235ffa43c247d174df"
removed the getLinkProperties usage to get ip address
which breaks displaying of IP address obtained from dhcp server,
using WifiInfo to display the same.

Change-Id: Id5c5133161d7bfbbf68e349886ca62aa5c15e263
CRs-Fixed: 730397
Bluetooth: Acquire wakelock to turn on lcd during Connection.

This patch acquires wakelock to turn on LCD display of DUT if screen
is off during connection access request for PBAP/MAP. Without this
patch it was observed that if screen was off, lcd remained off for
incoming connection access request from remote device and user only
was hearing notification sound without lcd being lit up.

CRs-Fixed: 650261

Conflicts:
src/com/android/settings/bluetooth/BluetoothPermissionRequest.java
Change-Id: I87c296fce4cd8e0c133f74169d991eee263fed08
Bluetooth: Set alias name only through Rename option.

Set the alias name only when user is trying to change the
name using the Rename option of paired device.

Conflicts:
	src/com/android/settings/bluetooth/CachedBluetoothDevice.java

CRs-Fixed: 539420
Change-Id: I415b6a962d8e7884b67d37b94c04df19e2c23012
Wifi: Fix setting application crash

Bellow commit causing setting application crash
"Id5c5133161d7bfbbf68e349886ca62aa5c15e263"

For saved profiles, wifiInfo is null need to validate wifiInfo
before trying to get IP address.

Change-Id: I9685393402d8785aa792049e96dc092970fee37c
CRs-Fixed: 730397
Bluetooth: Destroy BT Dialog on BT power off.

Check for Bluetooth off Broadcast to destroy disconnect
dialog when Bluetooth is turned off from power widget.

CRs-Fixed: 579028
Conflicts:
	src/com/android/settings/bluetooth/DeviceProfilesSettings.java

Change-Id: Ie556a17c7d574f77da5181c08705648ebf5733cc
Bluetooth:GAP: Handle exception while unregistering the Receiver

Handle the IllegalArgumentException while unregistering the
Receiver.

Usually when user presses both cancel and okay for the disconnect
dialog, OnClickListener will be called twice for both options,
and for the second time it is expected that receiver would have
already unregistered.

Change-Id: I36e30d551df76b7cfd1754305a1087578fd4a275
CRs-Fixed: 595648
Bluetooth: Pan fixes Squashed commit of the following:

commit e4a4007eeb640c72c052f87874a369563dce8668
Author: Nitin Shivpure <nshivpur@codeaurora.org>
Date:   Wed Oct 23 17:54:14 2013 +0530

    Bluetooth: Fix to show internet access as marked when pan is connected

    isPrefered is always true for PAN. So internet access menu checkbox
    is always marked on. Marking internet access menu checkbox based on
    pan connection status should solve this issue.

    Change-Id: I4343cc6f1b46377caa54aa3d39c08489ff14adac
    CRs-Fixed: 550731

commit 4e5a8decfdbb119b4fa4806f68e098dd9844e700
Author: Nitin Shivpure <nshivpur@codeaurora.org>
Date:   Fri Sep 27 16:03:01 2013 +0530

    Bluetooth: Fix to connect PANU from the internet access menu

    isPrefered is always true for PAN. So PANU connect fails,
    Once user clicks on the internet access menu in Profiles
    Setting. As PAN is not auto connect profile, So PANU should
    connect from the internet access menu in Profiles Setting.

    Change-Id: I6007c848e7c2703dc97f7f2113356a7aaeed0a0e
    CRs-Fixed: 545350

commit 3164ad62c3ee18f626417aa4bddf450de657a86b
Author: Pradeep Panigrahi <pradeepp@codeaurora.org>
Date:   Mon Apr 8 13:32:51 2013 +0530

    Bluetooth: Set isPreferred to true for PanProfile Connections.

    isPreferred is always true for PAN profile so that DUT can
    initiate connection with remote device. Curretnly we are
    returning true only when pan profile is in connected, so
    it will return false when pan profile is not connected and
    will never initiate connection on click.

    Change-Id: I7c789add73ca944d074b0ecd8af223f6d61b547a
    CRs-fixed: 463887
    (cherry picked from commit ca3988a7394eb189835647a5aaa04707fe5c2517)
    (cherry picked from commit ea5ce47bf7b918affc66467adf4e38b1c870e86f)
    (cherry picked from commit 2a3bfb2ed0102de6aa6e659ee7714ce8fcec25cd)

Conflicts:
	src/com/android/settings/bluetooth/DeviceProfilesSettings.java

Change-Id: I1c5eac11115d2e77262aa78f93fbbd349f5e001a
Bluetooth:apps: Fix to avoid taking space as name upon orientation

This fix is to avoid taking space character as a name in the
BluetoothNameDialogFragment upon orientation change from
PORTRAIT mode to LANDSCAPE mode and vice versa.

Change-Id: Ia66f27bb9b06739e42d73b15745c12a42512a1fc
CRs-Fixed: 650910
Bluetooth: Ignore the second button if one already pressed

Ignore the second buton if already one button is pressed,
this case comes when user is trying to press the both
cancel and ok for the pairing dialog.

Change-Id: I77516ec59a972b4451bb8cff69645f7b9089497f
CRs-Fixed: 624285
SAP: Proper device name in high security pairing dialog box

In the pairing dialog box, there is no editable text option for the caption, hence
we need to use static string which was appearing as junk characters sticking with
the remote device name which is is already displayed in next line so no need to use
dynamic string again anyways.

Change-Id: I45c4b3ebcabd38dff6ee84a82fd6fe082f36400f
CRs-fixed: 735774
Bluetooth: disable scan icon when BT state is off

Usually onScanningStateChanged function should take care
of disabling the scan icon when the scan is completed.

But When the BT scan is going on and try to switch of the
BT, as onScanningStateChanged function doesn't have the
reference for scan icon it will not disable it, so disabling
is taken care in BluetoothSettings on receiving BT Off state.

On receiving BT Off state, disable the scan progress icon only
when available device category is present.

CRs-Fixed: 543777,596214
Change-Id: Ib827903d4f5c80eeb6ac8a06fb1a945140dd20c9
Settings:Removed acceptance of Blank/NULL Alias Name

Added TextChangedListener to Remote Alias Name to verify whether
it is atleast 1 character long and not a Blank character.

Change-Id: I56c0ce1636430e6a238bd7f13e45ee318b9f41da
CRs-Fixed: 736512
Remove duplicate and add comments for SIM PIN messages.

Remove duplicate sim change failed string and add
comments for sim pin enable/disable failed messages.

Change-Id: Iaef56b2be063784f7470e46e6b735baf088fed63
CRs-Fixed: 736956
Settings: Add IZat location feature.

Add IZat "Accelerated location" item in "Location mode" page in
Settings. The feature can be turned on and off with a toggle switch.
CRs-Fixed: 584373

Conflicts:
res/values-hi/strings.xml
Change-Id: Iddd8863536b9f85b36a59284b4b1f16f11a1e40e
Start intent with package name.

Intent needs to bind to package before
it can be used

Change-Id: Ib6e902ee1c67475c6f779c8788a596b11458998b
Bluetooth: Fixing incorrect Remote name during pairing

While pairing when the pop up comes to accept the
connection, DUT wasn't able to display some
special characters of the remote name.Fixed this
issue by parsing the HTML tags of the special
characters in the remote device name.

CRs-Fixed: 736532
Change-Id: I6442db9eacb04bacaac9e76dc92d02c784c29f5e
WPS-PIN pop-up is disappearing from GUI when rotate the device

WPS-PIN pop-up is disappearing from GUI when rotate the device.The
Create dialog for WPS_PUSH and WPS_PIN is implemented as in the
WifiSettings.

CRs-Fixed: 725630

Change-Id: I6a0a4fca89285ea2a69e81d181a93f91485444d1
Bluetooth: GAP: Fixed Remote Name restriciton of 32 characters.

The Maximum length of Bluetooth name according to Bluetooth spec is 248
characters.When Remote name is set from 0-32 characters and paired
with DUT, the remote name is displayed correctly in DUT. But, when we
set remote name from 33-248 characters, only the first 32 characters
are displayed and the rest are cropped as the dimension value for
the bluetooth_name_length text field is set as 32. Fixed this
issue by changing the limitation of text field length from 32 to 248 so
that DUT can display upto 248 characters.

CRs-Fixed: 724203

Change-Id: I82a9ec0451e0aed7a07939959b1d0eb3122c636f