Telephony: Set the operator numeric property correctly.

In RuimRecords, changes to set the PROPERTY_ICC_OPERATOR_NUMERIC
only if the operator is not null.  This is to ensure that the
property is set from ro.cdma.home.operator.numeric even if the
GET_IMSI failed in case of CDMA RUIM mode.
In SimRecords, changes to make sure that the PROPERTY_ICC_OPERATOR_NUMERIC
is not reset, to allow the property to be updated from
the ro.cdma.home.operator.numeric in case of CDMA RUIM mode with
more than one applications in the card.
telephony: Ignore UNSOL_NITZ in case of Cdma

Ignore UNSOL_NITZ if time services not running
Otherwise, time updated with UNSOL_NITZ could overwrite
the RTC causing the modem to loose synchronization
with the network in CDMA mode

Change-Id: I51496ff692e62dff802f2934b0f440b1ffb9207d

CRs-Fixed: 214153, 211003, 246895
CRs-Fixed: 287112
Telephony: Handle SIM Refresh for MSISDN, CFIS, CFF_CPHS

Change-Id: Ia34af5a5ff3b311ffde41b097b932ee8e66cd0c1
Telephony: Icon display issue for STK proactive commands.

These changes ensure that the complete path for EF-IMG (4F20)
is sent to qcril UIM during SIM IO operation instead of only
sending only the fileid (4f20). These changes also take care of
sending right terminal response when Icon is loaded from
EF Image file instances (4fXX).

Change-Id: I4690be11280a2fcc13598f636cf83bd34fa0425e
Telephony: Handle RIL_APPSTATE_ILLEGAL

Map APPSTATE_ILLEGAL to APPSTATE_READY. APPSTATE_ILLEGAL means
card is valid but the subscription is rejected by network.
All ICC operations must be permitted.
Registration will anyway not happen as network would reject
registration request.

Change-Id: Ia892c97258000aff7e2015fb9f994ff74f95c81d
Telephony: Enhanced Operator Name String (EONS) algorithm.

The operator name for registered PLMN is displayed in the
following order of preference.

1) Name from EF_OPL/EF_PNN files.

2) Name from NITZ messge.

3) Name from ME database.

4) Name from Network.

This algorithm implements this operator name deriving logic.
3GPP specs referred
1) TS 22.101 A.3 - operator name priority.
2) TS 31.102 - for EF data description.
3) TS 24.008 - for PLMN and LAC coding details.
4) TS 23.122 - for PLMN matching.

Add support to derive EONS for LTE networks based on TAC.

Change-Id: I558af4972ded6c1bd891cad00090688df4c6aa47

Conflicts:

	src/java/com/android/internal/telephony/uicc/SIMRecords.java
Telephony: Read IMSI using SIM I/O for CSIM/RUIM

Use Sim I/O command to read the EF_IMSIM to retrieve the IMSI
from the card, rather than using CommandsInterface.getIMSIForApp.
When both SIM and RUIM app exists, we cannot specify the
application for which we should retrieve the IMSI using the getIMSI
API, since SIM and RUIM have no AID
Telephony: Some Stk related bug fixes

1. As per TS 102.223 Annex C, Structure of CAT communications,
the APDU length can be max 255 bytes. This leaves only 239 bytes for user
input string. CMD details TLV + Device IDs TLV + Result TLV + Other
details of TextString TLV not including user input take 16 bytes.

If UCS2 encoding is used, maximum 118 UCS2 chars can be encoded in 238 bytes.
Each UCS2 char takes 2 bytes. Byte Order Mask(BOM), 0xFEFF takes 2 bytes.

If GSM 7 bit default(use 8 bits to represent a 7 bit char) format is used,
maximum 239 chars can be encoded in 239 bytes since each char takes 1 byte.

No issues for GSM 7 bit packed format encoding.

2.CR flag in command details(CD) TLV is always set as true and
sent to Stk app. When CR flag in CD TLV is false in the proactive
command, there is a mismatch of CD TLV data between Stk framework
and Stk app. Terminal Response (TR) is not sent for the proactive
command. Fixed this issue by sending correct CR flag to Stk App.

3.Launch Browser related testcases in 3GPP 31.124 Sec. 27.22.4.26.2
requires that additional information be sent in terminal response.

4.The GCF Testcase GCF-PTCRB SAT/USAT 27.22.4.1.1seq1.2 expects a screen busy
response if the ME is not in idle screen and if the display text message is a
low priority message. Hence sending screen busy response instead of
RESPONSE_TIMEOUT. In present implementation a USER_RESPONSE_TIMEOUT response
is sent for all timeout cases.

5.The Comprehension required bit is always set for result tag. This should
set if comprehension required field is set by the card.

Change-Id: I7d09c8c7b68b2fd337a0f54808530964ce645250
Telephony: Update the state of FDN Service correctly

FDN Service state was derived based on the state of PIN2. Update the
state of FDN service based on the FACILTY_LOCK messages instead.

Telephony: Change the file path to FDN,MSISDN for USIM and CSIM
Correcting the file path to EF_FDN and EF_MSISDN from Telecom DF to ADF
for USIM and CSIM.

Telephony: Correcting the file path to EF_ADN and EF_MSISDN
This fix corrects the file path to EF_ADN and EF_MSISDN.

Change-Id: I099698d0031f980c3883c17f3c170fbcadd7fb84
Telephony: Do not broadcast card error intent when app index is invalid

IccCardProxy broadcasts card error intent when application index
received from UIM is invalid(i.e.mUiccAplication is null) during
initialization of card for fraction of time. As a result of which
"Invalid Card" is displayed on UI momentarily.

To fix this, When app index received from UIM is invalid broadcast
"NOT_READY" intent.

Change-Id: I94e583c9becfc6ee1fcb7c22a7b9965e8b8c794d
CRs-Fixed: 399597
Telephony: Add null checks in CdmaDataConnection

Change-Id: Ie8001543e7d2967c58b7701f324a011e2a5b8aa9
Telephony: Display of Opertor name.

Operator name was displayed in junk charaters on CDMA network
due to wrong encoding scheme.Corrected the same.

Change-Id: I8d18a90deab7fb14935d265b885cbf405fcc7d8d
Telephony: Introduce DataProfile base class

DataProfile is a base class from which we derive ApnSetting
for GSM and DataProfileCdma for CDMA. This can be extended
for other classes of DataProfiles.

Change-Id: I61bddbe6e57baf44325264a7f255cf19c1119f81

Conflicts:

	src/java/com/android/internal/telephony/ApnContext.java
	src/java/com/android/internal/telephony/DataConnectionTracker.java
	src/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
	src/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
	src/java/com/android/internal/telephony/gsm/GsmDataConnection.java
	src/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
rameworks/base: Add OEM Hook, constants and methods for QualcommSettings

Changes to get Qualcomm Settings to work include:
1) Export OEM RIL request raw for OEM applications: Currently
invokeOemRilRequestRaw method of the RIL interface can only be
invoked from the Phone application. This method needs to be
exported through the ITelephony.aidl Binder interface.

2) RIL_UNSOL_OEM_HOOK_RAW messages with Internal OEM ID are processed
based on the Response ID. External OEM messages are notified to registrant.

3) Add stub isMultiSimEnabled()

4) Add asynchronous request support for OemHook library.

5) Add variables needed for QualcommSettings to Settings database

    -Add AUTO_ANSWER_TIMEOUT, DEFAULT_FILE_MANAGER, DUALMIC and ANC
    -Set AUTO_ANSWER_TIMEOUT to -1 (default is disabled)