Restrict user from enabling/disabling adb in Charging mode

This change will make the preference option to turn ON/OFF
adb disabled when the device is in charging mode as adb
is not supported in charging mode

Change-Id: I9c13104b7ce38ce885a06f59211f5c476072805b
AppOps: Use switch widget for non-strict ops.

There are few Ops for which 'Always Ask' mode is not allwoed.
So use switch widget to control such Ops.

Change-Id: Ic7464a207c00e4cb9efff57c1f060e04379c1ee7
MSIM: Enable SIM Cards UI for multi-sim

Reverting Google's change to disable SIM Cards UI

Change-Id: I9c2d457d951840ca0535085e5b1f3535ec985286
Telephony(MSIM): enable SIM settings activity

- Enable SIM settings activity in multisim configuration.

- Add checks while accessing displayName from subInfoRecord

Change-Id: I1252b3ed5a94cebd28b0898c5e8817e1be0163c5
AppOps: change "modify" to "write"

change "modify" to "write" as request.

Change-Id: Iec9df89c6e35be1326f23b8aeb84bfbd8fa97942
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
Fix apn population issue on msim

On a multisim device, apns of DDS subcription
are getting displayed for both subs. This is
because sub id is missing in the intent
broadcasted to start ApnSettings.
Read subscription info from PhoneConstants.

Change-Id: I604f48dd55c34cf0be61a5337f2a39c7465e06d7
CRs-Fixed: 725081
Get icc operator numeric from TelephonyManager

Change-Id: Ide036103fcc80955b44acad12fb9fc0dc9769782
CRs-Fixed: 727780
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
Manual provisioning clean up

Clean up the code used for Manual Provisioning for
Stability.

Conflicts:
src/com/android/settings/sim/SimSettings.java
CRs-Fixed: 719499
Change-Id: I0c459da34d36bc2584c43113ddb59659e69a7959
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