Telephone(MSIM): Multisim UI changes.

Add multi sim Tab view support for below UI elements
 - Apn Settings
 - About Phone
 - Icc Lock settings
 - Data usage summary
 - Wireless settings.

Conflicts:
	src/com/android/settings/ApnSettings.java
	src/com/android/settings/WirelessSettings.java

Change-Id: Ic5de08919b64e0a56e662aef2c404bb49093eb84
Settings:PIN/PUK Lock and Status

- Added support for RUIM PIN locking
- Display message to indicate PIN/PUK status changes
Changes done to display retry counter on wrong entry of PIN1,
and message to indicate PIN1 enable/disable as per certain
carrier requirements.
- Process NOT_SUPPORTED response for pin lock checkbox
If RIL replies with REQUEST_NOT_SUPPORTED
when trying to enable or disable pin lock
process such response and display appropriate message.
-For some cards, ICC LOCK should be enabled
to change the password. In this case RIL_E_REQUEST_NOT_SUPPORTED
should be sent by RIL. On receiving this message
the Settings app should display Enable ICC LOCK message.
-Don't assume that the exception returned on a PIN operation
is a CommandException. Handle other types as well, like
RuntimeException
-Display appropriate toast error message based on the SIM PIN
lock operation.
-Break all lines > 80 chars.

CRs-Fixed: 222544, 181380, 181401, 229819, 246807, 249863, 337001, 441001, 611221

Change-Id: I142137e44cc11a8a5d42b0e458d5654422c4c630
Packages: Fix for SAP turn ON/OFF fails issue.

Turnig ON/OFF SAP repeatedly when WIFI is ON results
in to command CMD_SET_AP being received in WifiStaEnabledState
of the state machine, which will not be handled and because
of this SoftAP is not turned ON and we receive no events
thus the check box remains greyed out/disabled.

To resolve this wait for WIFI_STATE_CHANGED intent before
re-enabling the SAP.

CRs-Fixed: 525872

Conflicts:
src/com/android/settings/wifi/WifiApEnabler.java
Change-Id: I1a37ac6406ea5e342d6dcb80654c2728fa447e57
Packages : Fix for Softap turn ON/OFF fail issue

If Softap enabled using third party applications which make use
of WifiManager APIs, Softap enable fails. This is due to improper
handling of Softap State change event.

To resolve this issue, handle the Softap state change intent with
proper initialization of variable "mWaitForWifiStateChange".

CRs-Fixed: 634896

Conflicts:
src/com/android/settings/wifi/WifiApEnabler.java
Change-Id: I63f8845ec3e8ebfa8ec09a7b1a1bc4ee175336cf
AppOps: Fix previous conflict resolution bug

Fix merge conflict resolution issue caused by
19ae20d2149e5898927eba460d1656a7509c53ab.
"toggle_install_applications" should be
SwitchPreference.

Change-Id: Ia54648f96ee8a77797f1d007c24a5d157426d448
Bluetooth: HID: Use proper values of connection status

This patch fixes issue in retrieving correct connection status when
more than one hid device was connected to DUT. In such situation
current implementation was sending STATE_DISCONNECTED as connection
state because of wrong check of matching device as 1st device in
connected device list. Instead of this now actual connection state
device is retrieved from HidService.

Change-Id: I2c766e9fc6eb9e97c3745016e38fa5c374c16539
CRs-Fixed: 662147
Replace Internal Memory with SD-card

For detecting whether UMS is active or not, use the state of
External SD card and not Internal memory, as we are
using SD card for sharing.

CRs-Fixed: 618997

Conflicts:
	src/com/android/settings/TetherSettings.java

Change-Id: If7b3ab5324f4224bc02d02aa8675177c515e197a
MSim: Add support to enable/disable mobile data

Extending mobile data api's per subscription

Change-Id: Iee379b41b8adf4ab82d1dfaba8d96d4342421919
Add Manual Provisioning Support.

*Add Sim enabler button in Sim Card Settings screen to
 activate or deactivate the SIM
*Add custom layout for Sim enabler button
*Modify Sim Settings class to show progressDialog and AlertDislogs
*Add MultiSimEnabler class to actual send request for sim
 activation or deactivation

Conflicts:
res/values/strings.xml
src/com/android/settings/sim/SimSettings.java
Change-Id: I5b67f51c13c8ce94d28f093ce2bb280460c0dd03
Settings: change argument list to SubscriptionManager method calls

Change-Id: I7bf8f678ee99f7d0951d32bb5c963c47fb0287e5
AppOps: Add 'Always ask' option under appOps setting.

Add always ask option for each operation.

Change-Id: Ia4f331a5b7d0b1c8ae6946c55a4f78818fe0454f
AppOps: Clean up AppOps settings.

Remove unused operations

Change-Id: I20b3cd3eae5a8e669ced9767b9a9602848ab65a1
AppOps: Show only operations that are allowed to be modified.

Not all the operations of packages are allowed to be modified.
Just show operations of all pacakges that are allowed to be modified.

Change-Id: I86097acf038c044c97124e581b2806d921dc4a1d
AppOps: Add more operations in app ops settings.

Add following operations in app ops settings.

-- Wifi enable/disable
-- Bluetooth enable/disable

Change-Id: I32183d77b88c326168557444a445765b5a69de6f
Bluetooth: DEVICE_NOT_SELECTED intent is broadcast in onDestroy

DEVICE_NOT_SELECTED intent is broadcast in onDestroy instead of
onPause to avoid broadcast while device went suspend/display OFF.
onDistroy will be called when focus is out of the activity.

CRs-Fixed: 706665
Change-Id: I3dcf2811b300e44c0f3cb713c1397b5d334e8284
Compilation Fix on New AoSP

Compilation Fix on New AoSP

Change-Id: I916130c9cf228e2062b85eb3b6dfced981205ea5
Fix mcc, mnc population on multisim

Read operator numeric value from sim property constant
for 3GPP RATs and eHRPD, and from ruim property constant for 3GPP2
RATs.

Change-Id: I7f9c69f89daa39a44a2c01d1265d4ee46a121d6e
CRs-Fixed: 717691
P2P : Fix for P2P group name

When device is in Chinese language, P2P group SSID names will be encoded
into UTF-8 hex format. When displaying group SSID in UI Settings, this
UTF-8 should be converted back to UTF-8 binary format.
Implemented method to convert UTF-8 hex to UTF-8 binary format. When
group is created, it checks the hex format by looking '\x' sequence,
then converts to binary format.

Change-Id: I381b9e6c89ea4c82d41d2d4b69effe0d5e71d2e8
CRs-Fixed: 661989
AppOps: Add support for MMS operations.

Add support  for following MMS operations:

-- Send MMS
-- Read MMS
-- Write MMS

Change-Id: Icc823b9bcb446f962927ac0b50fbdae2f3ed3b02
AppOps: Add bootup tempelate

This tempelate lists all the sevices and apps that auto start on bootup.

User can use this tempelate to control list of auto start applications.

Change-Id: Ibf03d7df0037c87eb2ef3ca48a34ef46a103b4d7