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
CRs-Fixed: 222544, 181380, 181401, 229819, 246807, 249863, 337001, 441001

Change-Id: I142137e44cc11a8a5d42b0e458d5654422c4c630
(cherry picked from commit 9d10205f218ba6dbe02dc7625e9dc6f5d629d3cc)
Telephony: Use new apn.sim.operator_numeric property

Use new property to filter apns. We need this new property
because icc.operator_numeric property is also used in cdma
and ApnSetting UI might display wrong set of apns if the
peroperty value used was set by RuimRecords.
CRs-Fixed: 362846

Change-Id: Ie740c9b3bb6a14621e19c55e4fa18c66bc0d7b0c
(cherry picked from commit 0ff226ff8488bc018397051ddbde7de76206f9e8)
Telephony: Avoid list of Apns in ApnSettingsMenu

Don't display any Apns in the ApnSettingsMenu when
getOperatorNumericSelection returns empty
CRs-fixed: 486026

Change-Id: I8f425e75c995f9825905983dc1bdc94f15f2054e
(cherry picked from commit ecc8d85d368c5919b3f69f1158de911f500d73eb)
Settings(MSIM): Add support for MSIM

Add Multi SIM Settings screen in UI which is used to select
Voice, SMS, Data preferences.
Extend APN Settings, Security Settings, Wireless Settings
for MSIM.

Change-Id: I84abe80f20de2415ff819c7250ef0a0799662b52
(cherry picked from commit 6acd09e4761c88ab13851fc9ad13868e91d703c4)
Settings(MSIM): Extend CB "Operator info" feature to MSIM.

1) Add SUB information while broadcasting CB intent for MSIM.
2) Remove country specific checks for cellbroadcast Operator
   info for MSIM.
3) Move Operator info to About phone->Status->SelectSubscription
   ->SUB1/SUB2->Operator info in MSIM

Change-Id: Idb6a2e3aac2a30528740729ea9e5b941bc495083
CRs-fixed: 498245
(cherry picked from commit 4a2e790b7b840c0c8e5c4ef3db60453779c80473)
Telephony(MSIM): Add prompt support for SMS

1) Add prompt option in SMS multi sim settings.
2) New iterface API to get SMS prompt is enabled or not.
3) Disply prompt while sending SMS, if user selects
   prompt mode in multi sim settings.
CRs-fixed: 474694

Change-Id: I0b46dc05c50ca69a806613ecf2c5eae3964f043f
(cherry picked from commit 9d253ed788e941751d76aa2fbdf55f2ed6c8ad8d)
DSDS: Subscription specific for Mobile data, roaming and usage

1. Provide per subscription based support for both Mobile Data
   and Data roaming options. UI and functionality changes in:
   a. Settings -> Data Usage application
   b. Settings -> Mobile Networks menu

2. Provide per subscription based data usage information. UI and
   functionality changes in Settings -> Data Usage application.
CRs-Fixed: 503932

Change-Id: I8e0088dd5cb3de63f880ef02a9cf125f0d986009
(cherry picked from commit f5e9685d4585860c0705979c2f41cacd017a6ece)
Settings(DSDS): Add TuneAway and PrioritySub to MultiSimSettings

1. Add support for TuneAway and PrioritySub UI options in
MultiSimSettings
2. Add setDefaultVoiceSub, setTuneAway and setPrioritySub
OEM HOOK requests in OSS space
CRs-fixed: 464483

Change-Id: I3b1bc4ed98b3ed7b280938878ba9d7bdb244fcf9
(cherry picked from commit d114b5d079f668357fd0a0174291b1f84d0c6a72)
Add initial preferred APN feature

In multi-sim scenarios, each sim will have its own preferred APN
setting. When ApnSettings sets/reads the preferred Apn, SUB id will
be passed to TelephonyProvider.  TelephonyProvider will update/return
the value of the key 'apn-id0' or 'apn-id1' based on the given SUB id.

Change-Id: Ifbbb49f2b38a5c6cff56785313a80a34479ea08f
(cherry picked from commit ccde1021d34acacaf2ab710814985afb52c28e43)
Settings(MSIM): Update signal strength with the correct dBm & asu values

In the current implementation, when phone is in CDMA mode, EVDO dBm
value is not considered. And when phone is in GSM mode, Lte and TdsCdma
dBm values are not considered.

Also, in both modes, only GSM signal strength is considered for asu
value.

This fix updates signal strength with the correct dBm and asu values.

Change-Id: I0786cfcc3b0d2b75a633063e4f48e3f9ce0cf4b6
CRs-Fixed: 532035
(cherry picked from commit 9ba6fbfe92a2fb3d73a7c725d86377fd6885670a)
Settings: Tune Away option is not retained on UI.

The Tune away status setting is not written to the settings
database. Writing the value to Settings database through
MSimPhoneFactory in telephony framework.

Change-Id: Ieb27c6e421d37308e0d97e26dbd8db52281d966d
CRs-Fixed: 533245
(cherry picked from commit d8ebd7b9971512119317c33cd082e65cab0f24d4)
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
(cherry picked from commit f0f1f41269712b7a53afc4f1ce3edc30afd9f20c)
Settings: Add preference header to make the RoamingSettings.

Add preference header to make the RoamingSettings.

CRs-fixed: 525245

Change-Id: I3fe4edd3d76ce09b0b85aebc9228ea9bad6ec9b7
(cherry picked from commit fede18285080146cd9e51c15114f4dedcfea629d)
telephony-msim: Fix package errors

Change-Id: I64f0d59812fa6f9b8bd9ad5d9969ba7e352a27ac
(cherry picked from commit 206e3e1eeedf2b958844e9c60e3ad4169937cbd6)
Bluetooth: DUN: Add DUN profile support in Settings APP

It 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: I83d4919821cb095429ff7e73a8974d92c4df086c
(cherry picked from commit a47a5a92d21e2f643bef564decccced635ae7211)
Merge branch 'cm-10.2' of git://github.com/CyanogenMod/android_packages_apps_Settings into cm-10.2

(cherry picked from commit ea5d95377daf57eb0a7c06df72a1ca24ebee43de)