UiccController: Query GET_SIM_STATUS when radio state is ON

mCi.registerForAvailable resulted in the SIM query firing off
too quickly and resulted in the SIM initially being identifed
as ABSENT.

Change-Id: Iaef6ffe1315560262e19ebacd304716982bb8174
Legacy RIL requires radio technology equals CDMA or GSM

With the latest update radio technology is set to indicate the type of network connected (GPRS, HSUPA, etc) and not just CDMA/GSM, breaking data connectivity for legacy RILs.

Will only affect RIL Versions 4 or below for now, I don't know if later versions are also affected.

Change-Id: I7062acf3299d67b3f62ce02b875e25a83c19fa62
Revert "Fix the roaming searching text display in standby screen"

This reverts commit 6d87d18add0ed7264e6a7f96b7a2c8ffbee719a5.

Change-Id: I78a6739f3895255e9d7932fa8e2f1f423b9940f7
Implement UICC TLV Data decoding.

Some phones / SIMs returns data in TLV format as decribed in ETSI TS 102 221 11.1.1
This enables parsing of TLV data if it finds one. This fixes reading of SIM_IO
data like ICCID, MSISDN, etc on affected SIMs.

In CM-12 this is needed for phone to function properly. In CM-12 Multisim support
requires ICCID. If ICCID is not found then user is unable to make any outgoing
calls. User is shown "Call not sent" error.

Change-Id: I0fe20a9ec4cdd6021e7cb614ae578bc1c2c1d1fd
Correctly provide the technology to setup data connection

This commit allows to correctly manage GSM data connection on legacy
RILs and provides a better readable method to get the technology that
will be used to setup data connection.

Change-Id: Ide4e5d193a35d6f02c5320fe8afe9a24659c97d9
Telephony : Add TRANSPORT_TYPE_COUNT_COLUMN column

Change-Id: I2ed25d2e55f114e87406be29d03eb58925b74b9e
telephony: pick correct APN for MSim

The subId should be sent to TelephonyProvider to pick the correct
preferred APN. Without it, the first APN will simply gets used.

For non-MSim, sending subId shouldn't break anything (Settings send
it anyway)

Change-Id: I837e33391b39bf9bc0b7af06840bfe899c6ffcb7
Proper supplementary service notification handling (2/5).

Allow registering SSN listeners, and add missing constants.

Change-Id: I339a395fda5cca7617e7619cfc93312a1282f60e
Store correct IMSI when retreived from SIMRecords and use it for RuimRecords

Stock stores the IMSI gathered with SIMRecords and uses that value when
RuimRecords wants to get the APN/operator number.

Set System prop "ro.telephony.get_imsi_from_sim=true" to enable this function

Change-Id: I7df5d3c721afa3eeaf2f077b9f7399bd027d448b
Telephony: Allow ruim to fetch in CDMA LTE mode

... if device has LTE in NV mode.
Fixes cases where iccid could be unknown on some CDMA NV devices.

Conflicts:
	src/java/com/android/internal/telephony/uicc/IccCardProxy.java

Change-Id: Ie8e676a59e20c6da70eded511a979022667aa6fa
SubscriptionController: do not return info for invalid slot id

This causes Keyguard to crash when you switch a dual SIM phone into
single SIM mode for testing because the old data with the now-invalid
slotId is stored in the database.

Change-Id: I9d6102f94c11b808c272111230322507408b2d87
Forward port Samsung STK support (frameworks/opt/telephony)

Squashed commit of the following:

commit 7940f7ced44976f03171d09c2ba8b1d29bc9432e
Author: Flamefire <alex@grundis.de>
Date:   Sat Nov 15 21:26:33 2014 +0100

    Fix crash of Samsung phones

    Using an alternative SMS app like chompSMS leads to a crash as
    sendResult is an array without any entries (sendResult[0] is accessed)
    The default SMS app does not show this because mCurrntCmd == null

    Change-Id: Icfef6d20f9082dd1f64ed29b67031d2575896513

commit ed0cac138315b4dd5b36c35651ba6d23f1a47ae0
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Tue Dec 11 17:22:30 2012 +0700

    Samsung STK: Fix SMS-based STK

    SEND_SMS was falling through to SEND_USSD (which used to do nothing
    until USSD support was added) causing an Exception because cmdParams
    is not an instance of SendUSSDParams.

    Fix by using type-checking instead of checking if Samsung STK is
    enabled (because SendSMSParams and SendUSSDParams will only be
    created if Samsung STK is enabled.)

    Change-Id: I671014e295e9e529aad25a8b6fbd5a2e5788fc44

commit 7a9f16293abc6e216004d0c80822d39dac98db98
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Fri Nov 30 21:35:50 2012 +0700

    Samsung STK: Add USSD support

    Allow USSD-based STK applications to work

    Change-Id: I483f37a44a6c3ed43eefcf979e17b84877d03f93

commit b5ade3b5a527193ffc6e71f6ce55d3a96a83792a
Author: Pawit Pornkitprasan <p.pawit@gmail.com>
Date:   Fri Nov 30 19:30:08 2012 +0700

    Add Samsung STK support (telephony part)

    Support for SMS-based SIM applications.
    Partially rewritten the original patch by Jüri Schultz to be less intrusive.

    Change-Id: I15d2de1781a2823e24941dd792db3d372578aa9f

Change-Id: I476959cfadab0ab14f5ed32adf51adca1e3b26b4
DCTracker: HACK Fix eHRPD/LTE data connection.

* UICC controller is suppose to send a event that says uicc updated
  We are experiencing a race condition when UICC is init before the
  radio start which cause the sim is not ready response from radio.
* This forces data when we have cdma voice connection.

Change-Id: Ifccafa148a703a2f9e137733d8450a3a961dca2a
Telephony: DcTracker: Fix CDMA APN Data issues.

Fix CDMA data issue when it can't find an APN match. This fixes cases
CDMA NV or RIUM/SIM doesn't have the information to pass on.
It assumes GSM like mode on CDMA. So fix that and pass on to CDMA
stubbed apn found in android 4.2.

Change-Id: I53a229de353bae34b7180ef3e7253d83d1f9d20c
Merge remote-tracking branch 'origin/lollipop' into L
Merge remote-tracking branch 'origin/lollipop' into L
Telephony: Add OperatorReplace api to framework:

this converts the operator number into carrier name, 2 API

this one load once if the number is the same through the life span of the SIM.
public static String operatorReplace(String response)

This one is for loop based sisuation, doesn't lazy load the selective-spn.xml,

public String unOptimizedOperatorReplace(String response)

Change-Id: I4273e6091df8c0e59ca86ac6d69bd8e40e9c4d44
Fix for correct subscription in Cell Broadcast message

Issue: When CB message sent over SUB2, it displays as SUB1 in UI
Fix: Update the subscription ID as per CB message in Parcel

Change-Id: Iff4f2f52c95dbf557b953d8579c70e5c404ca7af
CRs-Fixed: 625204
IMS-VT: Do not allow changing the TTY mode during a Video call

When the device is already in a video call, the user SHOULD NOT
be allowed to change the TTY mode. If the user tries to change,
then an UI alert message will be displayed explaining it cannot
be changed during video calls.

Change-Id: Id7fdeb7d90fbbdf94a6418eb58fd4bf00a5c241c
CRs-Fixed: 734258
Fix bug in CDMA phantom call handling.

Update the unknown connection object when a phantom call
is received during polling.

Change-Id: Idd1a9e25baec1ea460776338f465b32572196dc8
CRs-Fixed: 703983