Use Data Radio Tech for concurrent voice and data support

To determine concurrent voice and data support
we need to query Data Radio Tech.

Change-Id: I1fb43442e08915a7fff1cf2a5bcfb01d2a66a63b
CRs-Fixed: 505524
Uicc: Fix NullPointerException issue after turn on airplane mode

Response may be cleared when SimRecord is reset,so check if it is
null before using response.

CRs-Fixed: 521604

Change-Id: Ia2f36ab7421644de27f31e342c242f007a0d4912
STK: Image/icon related fixes

1. Handle invalid images/icons
If the coding scheme of the image is not understood, then the
loading of the icon will fail.
Send a TR with ResultCode.PRFRMD_ICON_NOT_DISPLAYED back to
the card when this happens, but continue processing the command.

2. For Idle Mode Text the icon should be loaded even when text
is not present

Change-Id: I29a9a3a1d33fa4f8193aa4dc2940633c72f802a8
Handle SIM Refresh for MSISDN, CFIS, CFF_CPHS

When we receive a Sim Refresh of type file update
add support for re-loading the following EFs:
MSISDN, CFIS, CFF_CPHS

CRs-Fixed: 181461, 278534, 278075, 325699, 440321
Change-Id: I5f467c1a40979529125ee3ccc11b36ea8caa4e46
Telephony: Don't read records from card if not needed.

Specifically handle the scenario where there is an RUIM card
 inserted but we are in NV mode. In this case, don't read
records from the card.
IccCardProxy tells the IccRecord that it will be requiring records
from the card. RuimRecord waits for this indication before fetching
records from the card

Change-Id: Ifa95dda2958922901e887b386c55556f947a881d
Telephony: Set digit_mode to 8 bit in case when ton set to 1

C.S0005 requires that digit_mode parameter in mobile originated
cdma sms address needs to be set to 8 bit when type_of_number
parameter is present.
CRs-Fixed: 295542

Change-Id: I3077d9a7b09933732bbff8119308ae3de6259821
CDMA SMS decoding support for GSM data coding scheme.

Decoding support for MT sms encoding type "GSM data coding scheme"

Change-Id: Ib36fcd75272a5a66632f00660b6152b00a0b1455
CRs-Fixed: 505673
Update copyright to The Linux Foundation

Change-Id: I2954254ec766b882179edebdf7d98159495926a8
Conflicts:
src/java/com/android/internal/telephony/cdma/sms/CdmaSmsSubaddress.java
Fix CDMA MT message decoding issue

Fix issue to decode CDMA long MT message with 7bit ASCII encoding.

Change-Id: I019f0c5da147eb671589afa750f702e945e294e6
CRs-Fixed: 551626
Frameworks: Add ADN capabilities for CDMA phone

CDMA can support Abbreviated Dialing Numbers so add
CDMA in TelephonyCapabilities.

Change-Id: Ia33618d42664560f33bfa5b995b89cd030ee20de
Stk: Handle LAUNCH_BROWSER_ERROR Response

- ensure that we process a LAUNCH_BROWSER_ERROR response in
  handleCmdResponse()

Change-Id: I3dc1412e3cdb65b761ad66aa6e849969be4f7e16
Reorganize code to handle class 2 SMS.

If SIM card is having more than one USIM application the
registering mechanism in SIMRecords.java to the
CommandsInterface is not as expected. The CommandsInterface
will hold only the last registered application registrant
due to for every application the it is overwritten. So
whenever telephony received SMS_ON_SIM it will come to only
last USIM application created not the desired application
which is used by actual phone object.
Move registering mechanism for SMS_ON_SIM to SMSDispatcher
where we can get the proper application.

Change-Id: I02616e7a2e0f0250cc27780e53a061ef49f72fd6
CRs-fixed: 432656
Stk: Ensure that APDU input length does NOT exceed 255 Bytes.

- Depending on the encoding , the number of characters that
can be stored in 255 bytes varies. See details below.
- detect the current encoding used and enforce max length

Details:
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.

Change-Id: I6a12b9a9c8f8b6b44c0164fc4e038c92c05284ce
Add getOperatorNumeric method in RuimRecords.

Add getOperatorNumeric in RuimRecords in order to
override base class method in IccRecords.

Change-Id: Ia22dd161c6250c34b2408d367ec6565e0439232d
CRs-Fixed: 522455
Do not update External state until we receive card status.

When updateExternalState is called before card state is received
from RIL, unwanted ABSENT state is getting broadcasted to
external apps incase of property apm_sim_not_pwdn is  set to 1.

So do not broadcast card state to external apps until we
receive card status from RIL atlease once.

Change-Id: I8803360dd57055ca3534b6dc7bade63ff629c730
CRs-Fixed: 520485
Do not send terminal response incase of 'SET_UP_CALL' user timeout.

Currently for SET_UP_CALL proactive command, a redundant terminal
response is sent on user timeout.

Add a condition in CatService, to prevent terminal response
for 'SET_UP_CALL' user timeout response.

Change-Id: I794a3ead971485bda920f722ad7bfa8b7ff74383
CRs-Fixed: 633521
Change to return proper MNC in case of CSIM

As per spec C.S0065 section 5.2.2 MNC length in case of CSIM
IMSI is 2. So modify the code to return the MNC of proper length.

Change-Id: Id046b9ff3173c038fb2196e18625f077b1897beb
CRs-Fixed: 656508
Initialize AdnCache for ISIM app type.

In case of ISIM app type initialize adncache, so that
it can be used in ICC records for generic purposes.

Change-Id: I82ab6bb85387a96f546bd0e5e90311023eb00f1c
CRs-Fixed: 564267
SIM Phone Book : Modify update operation

Add empty number check during update operation to comply
with the 3GPP 51.101 sections
10.5.1 EFADN (Abbreviated dialling numbers) and
10.5.2 EFFDN (Fixed dialling numbers)

Change-Id: I22584704ac961ea0bd7648cd6e9fa5ae33f655ee
CRs-Fixed: 539346
Add Dual Transfer Mode support.

In GsmServiceStateTracker, decode the "concurrent services support
indicator" field from RIL_REQUEST_VOICE_REGISTRATION_STATE
request and based on the value of this CSSI field allow concurrent
CS and PS services to applications.

Notify data connection changed on CSS indicator update.

When the phone moves from a DTM cell to a non DTM cell while in
active voice call, data connection is not suspended.
To fix this, consider CSS indicator change also for notifying
data connection.

CRs-Fixed:  564063, 641116
Change-Id: I57c445ee28be4e1c0f2934cb136a70d39447511c