WifiAp: Bring back support for legacy interface
Telephony: Add support for NETWORK_TYPE_GSM

Add support for NETWORK_TYPE_GSM in TelephonyManager and
corresponding mapping in ServicState.java so that when
application queries getVoiceNetworkType() and currently
camped rat is GSM, they get network mode as GSM instead
of network mode unknown.

Change-Id: I5e971c625532696776b9555ad8cfd85eba4fc423
CRs-Fixed: 526435
(cherry picked from commit 3e01fcec13725955f0ca3fb20730ff21f4edc128)
(cherry picked from commit c70f5687965908cd585e52901cf6cd88bd405140)
(cherry picked from commit 8e3c2300729ecb3cd3e6b640b0174f49e2189f0c)
Telephony: Add Managed Roaming Intent.

Introduce new intent with name ACTION_MANAGED_ROAMING_IND.
This intent is used to inform "location reject" status
information to applications.

Change-Id: I79c7ea2e647617e58526b5b550406214455a58aa
(cherry picked from commit 53f8c89c8c80fe6145828fce863d3e2dd44d3e53)
(cherry picked from commit 4d8c1003c621ca05473e8d5b0a1cfbdd81f9b66e)
(cherry picked from commit f266505d3431d4015adf72f63c6568ee4320bb9c)
Telephony: Initialize GsmCellLocation class members properly

Default values for class members mLac, mCid, mPsc would be 0.
Initialize these variables with -1 as 0 is considered as valid
value.

Change-Id: I08dc4031bb16293e80e5b7f51afcb8dc11747d3b
CRs-Fixed: 406479
(cherry picked from commit 416e0a2b6983af94245d8aa92d3aa0b1e0ce79aa)
(cherry picked from commit b25e0849cc2449fc95c3091a4599d4f72d2a436b)
(cherry picked from commit 5e48706429f229c8dd54f31a1e19a9a76618f591)
Telephony: Add functionality to handle ICC IO error

At present in Android all ICC Card states other than
ICC PRESENT are treated as ICC ABSENT.Adding functionality
to handle ICC IO error card state.

Change-Id: I229bd80cb5e487f4345bef9fb7fee60850f085d9
CRs-Fixed: 184479
(cherry picked from commit 5f414649d354f5b5f3208524e9827d488d183c76)
(cherry picked from commit fa5fb0852573189c107847da711ed61489cf92b5)
(cherry picked from commit 49e48d07a9cb7660d65ee3de30cf6e9f05bbc0ec)
Telephony: Add 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: I3831a703a2fdc69df8552af57e0bb981d0c7e46f
(cherry picked from commit ec7c7b24a19a1a3c323aec9e0acc719bf85022ff)
(cherry picked from commit 6cc218bb1c2f0149c301c1ab07f57f67ccb424c8)
(cherry picked from commit e619c7e9e5cb7db48740d73c23d8cf90b25d5ff1)
Telephony: SMS over IMS

Add RIL_REQUEST_IMS_REGISTRATION_STATE, RIL_REQUEST_IMS_SEND_SMS, and
RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED.  Add FORMAT_UNKNOWN to
SmsConstants.

Change-Id: I87ca9841b4ace931c55e2d379fe6d7589b2dc8a5
(cherry picked from commit 876c2cdbcfb2650c30da158ecccf2d1eeaa7a916)
(cherry picked from commit f0cf40d0aa80b01607c394cc613a9ca708e4affe)
(cherry picked from commit 8ed4a4e1f2a0b9e86ddae0f5813bce41c6e312f8)
Telephony: Add data rat constant

This event constant is used in DcTracker

Change-Id: I1f9b34a8689c43c2586e9e3a92f0453649775d73
(cherry picked from commit f7ca98035479b670ff51bc9298fd7928a5e0f80d)
(cherry picked from commit f4d8f7b8fa390302b9cc51a5640e017ff393dfcc)
(cherry picked from commit 77d810390fbca8cb1d10bce148035fada414e0eb)
Property constants to support OMH

Add static constant variables required for OMH support

Change-Id: Idfeb2f3f1a3aa0403a7ff0ab7c69fc945d9e7083
(cherry picked from commit cf61f807ee07b4497da78c6bb753a835fa46b5b5)
(cherry picked from commit 8e68d056ca7c14fdefecbcf9b2b69048f092754a)
(cherry picked from commit 4a3b31e38c92bb1943c9290d8a4dd535b42bbd07)
Update markings for the OMH changes

Update markings for the OMH gerrit: 478700

Change-Id: I4cdebe5f383efe1153bfc0a58bafb4168106736b
(cherry picked from commit 7adf9268e08978c9a458c98ee3465293e383c35c)
(cherry picked from commit 5ed1fe759759b41a1fa886a35f46ea2984700fdc)
(cherry picked from commit 5db5f0c0f7e5f57c81a0a4fe5a625f98f711a1ab)
Fix for data and roaming icons

- Enable data connected flag based on the data state.

- Do not display data icon in data connected state
if radio type is unknown

- Display data icon independent of voice service state
i.e even if voice network is unavailable

- Show cdma roaming indicators if either voice
or data is roaming.

- Cleanup roaming indicator default values.
Set default CDMA Eri index to roaming off

- Show service if either voice/data is in
service if ro.config.combined_signal is true

- Consider eri only when in service

- Add in service check to isCdmaEri.
roaming related information
in registration state will not be valid
during out of service.

Change-Id: I915421a6f5906d80ed5b8dd9c433115ad5df1f14
CRs-Fixed: 285986, 303275, 326204, 326634, 333008, 339297
(cherry picked from commit 7a3c1c3)
(cherry picked from commit 83894db)
Destination PS no: 2
Conflicts:
            core/res/res/values/config.xml
Telephony: STK CC feature implementation

Add strings and constants required for stk cc feature.

Change-Id: Id5ec987cdc8dc2d9eebdf01fe546eb96ec0c69f9
(cherry picked from commit 0647546)
(cherry picked from commit 17e39ec)

Conflicts:

telephony/java/com/android/internal/telephony/RILConstants.java
Telephony(MSIM): Add support for MultiSim

Make changes to add support for MultiSim.
  -Add TelephonyManager and TelePhonyRegistry for MultiSim
  -Add ITelephony and IPhoneSubinfo aidl files for MultiSim
  -Extend ShutdownThread to close all radio's for MultiSim
  -Add Constants and Utils used for MultiSim

Add prompt support for SMS
 - Add prompt option in SMS multi sim settings.
 - New iterface API to get SMS prompt is enabled or not.
 - Disply prompt while sending SMS, if user selects
   prompt mode in multi sim settings.

Change Default subscription property name.
 - Change default subscription property name from
   persist.default.subscription to persist.radio.default.sub so
   that it can be set by radio group access processes.

Subscription specific for Mobile data, roaming and usage
 - Provide database flags as per subscription for both Mobile
   data and Data roaming options.
 - Add function to provide DDS susbcriber id.

Set priority when send sms
 - Add the priority support in 3gpp2 text message

Add support for emergency calls
 -Populate ecclist by reading ril.ecclist corresponds to
  each subscription.
 -If dialed number is present in consolidated ecclist then
  mark as emergency number.

Define invalid subscription constant
 -Define a new constant for invalid subscription id.

Third Party Intent Handling
 -Remove firing of below intents from TelephonyRegistry when
  Multisim is enabled, as they will be fired from MSimTelephonyReistry
  ACTION_SERVICE_STATE_CHANGED
  ACTION_SIGNAL_STRENGTH_CHANGED
  ACTION_ANY_DATA_CONNECTION_STATE_CHANGED
  ACTION_DATA_CONNECTION_FAILED
 -Remove below intent from both TelephonyRegistry & MSimTelephonyReistry
  as it will be fired in MSimDefaultNotifier.
   ACTION_PHONE_STATE_CHANGED

Change-Id: I6ee5d2a22e44fe7d0d68a41af0481ddbbbe21c3f
(cherry picked from commit 1014515)
(cherry picked from commit 021c08f)
Strange commit
Revert "Strange commit"

This reverts commit 4985d9586d0e3f7bbd1f0a17c0053ff34c36a3c3.