Query GET_SIM_STATUS when radio state is OFF

Boot up target in airplane mode with SIM, not showing any
card status on lock screen because telephony will query
GET_SIM_STATUS only if radio is ON.

Query GET_SIM_STATUS if radio is OFF to show the card
status on lock screen even in airplane mode.

Change-Id: I2ed2a41b25fc6b95fe6fd300cc8792f9d5babcf6
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.

Change-Id: Ib05931db426ea932d418596cc37e5dbb6bd20313
Set RESULT tag properly when sending TR

While encoding terminal response, result tag is
always encoded with CR flag, although spec is not
clear on when to set CR flag, setting it always leads to
issues with some cards, hence set CR flag based on
CR flag in command details tag received from card.

Change-Id: I34956a018ec56767c49175add8ce71d5821f059c
Telephony: Add + for international number for MT SMS

Add + if international number is not having + at starting.

Change-Id: I0000b0685181f17ba6b5b0eaaba60a77971e7908
Bug: 10951615
Use EF_EXT5 as extension for EF_MSISDN on USIM

For USIM applications, use EF_EXT5 as the extension for EF_MSISDN
as per TS 31.102 Section 4.2.37

Change-Id: I9fa811bcb57306a07e270a05883f067ad44b369e
Telephony: Specify file path when reading contacts from EF_ADN

Some cards, like RUIM and UICC with CSIM, have the same file ID for
multiple EFs. e.g. EF_ADN and EF_CSIM_LI. When trying to retrieve
the EF_ADN from such a card, the path gets mapped to that of
EF_CSIM_LI resulting in incorrect behavior.

To avoid this, specify the EF Id and the path to uniquely identify
EF_ADN, when reading contacts.

Change-Id: Ia4ae528cd60db127cba7faa7a958d28e65db1699
SIM Phone Book : Modify insert and delete operations

The following 2 fixes are submitted as part of this change
1. Add empty number check during insert operation to comply
with the 3GPP 51.101 sections
10.5.1 EFADN (Abbreviated dialling numbers) and
10.5.2 EFFDN (Fixed dialling numbers)
2. Add support to delete SIM record which is stored with only
name and no number. Earlier, if record did not contain number,
delete operation was not performed and error was shown to
the user.

Change-Id: I987c88bf7a19137f157e165a242a115ec1c1d421
Handle ICC IO error

Following changes have been made as part of this:
-> 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.
->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: I229bd80cb5e487f4345bef9fb7fee60850f085d9
Bug: 10643652
fix mvno_match_data OutOfBounds Exception in substring check routine.

When the length of mvno_match_data is greater than GID from IccRecord,
It will generate StringIndexOutOfBoundsException.
Therefore, codes are changed to use startsWith() insteads of subString().

Change-Id: I04c5c5039edb2cfa757bf2f5a4b9f124afb69b06
Bugs: 10171336
Do not set audioGroup ECHO SUPRESSION mode

when speaker enable, do not set AudioGroup EC mode
if EC already supported in hardware.

Change-Id: I3623b0c49011d6db5e0060999d17963a7e58f775
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.

Change-Id: I3077d9a7b09933732bbff8119308ae3de6259821
Telephony:Prevent duplicate auto mode request on EF_CSP read

Prevent duplicate auto network selection mode request
if triggered internally by Android due to
PLMN disabled in EF_CSP SIM record.
Allow mode change request if triggered by user.

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

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

Change-Id: I190a60c763d959a44bb5de8179a10a7568c9b51f
Telephony: Optimizations on alarms used

* Use non wakeup alarms for data stall detection
* Stop data stall alarms during dormancy

Change-Id: I74945648431245b9b4aaf4e8781855e1d4b76b20
Don't assume 3GPP as active app on CDMA with LTE device

IccCardProxy assumes, that on a CDMA+LTE device, the active app
is the SIM/USIM and not the RUIM/CSIM. However, for voice RUIM/CSIM
is the active app on such a device. All services, like FDN,etc. should
be tied to the active voice app.

Change-Id: I70894a1aab0a812a50f1cbab986161bb3b708b85
Telephony: Display Supplementary Service notifications.

Display SS notifictions to user as per 3GPP TS 27.007, 7.17

Change-Id: I51901e50b71f919ed53e2dc81cc5af6d8a8132ad
Bug: 9041233
Telephony: Ignore data registration when bringing down call

Bring down data call even if we have it while data registration indicates
phone is in unregistered state.
getAnyDataEnabled will return false if phone is not registered hence
user disabling data while phone is unregistered will have no effect
(and data call will remain there indefinitely).

Change-Id: I72cf1fb8b89cad5bb8595233721d1ac315750dbf
Revert "Handle ICC IO error"

This reverts commit 31ff83b7faf9a97e8266ee2f04c8689a80efc6bf.