Refactor IMSI and SubscriberId handling for CDMAPhone/CDMALTEPhone

IccRecords
CdmaServiceStateTracker does not need to set IMSI on an IccRecord.
CDMAPhone
When queried for the subscriber Id return the IMSI from
CdmaServiceStateTracker or the card depending on whether the active
subscription source is NV or RUIM respectively.

Change-Id: Id613f2df91b94ae5d7613dfcef3e097cb817ff4e
CRs-Fixed: 323977,323977,342146,505580

Conflicts:
	src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
IMS-VT: Unregister CallManager from ModifyCallRequest

CallManager needs to unregister the UNSOL_MODIFY_CALL
request when it unregisters all phone events.

Change-Id: I0d383f8b406a69670f1e69890e5b635346c2657f
CRs-Fixed: 587612

Conflicts:
	src/java/com/android/internal/telephony/CallManager.java
Ims: Add SRVCC errorinfo

Added errorinfo ERROR_INFO_SRVCC_CALL_DROP and is issued
when call is cleaned up after SRVCC.

Change-Id: Idcb8c095e2f337adc3e850fd57217b00b489f122
CRs-Fixed: 576256

Conflicts:
	src/java/com/android/internal/telephony/Connection.java
Telephony: Reset the duration after the call is accepted

In android original design, the duration of CDMA MO call is started from
the dial command sent, so it is not the real duration of the active time.
In this patch, a new message is registered to listen the event of the call
accepted, and reset the duration when the event happens.

Change-Id: Ibb4de7c9eed45bd3183722b67854374182c5ef43
Mms: Add subscription for SIM full notification

SmsStorageMonitor doesn't notify which subscription is full when
receiving EVENT_ICC_FULL message.

Add subscription info into the SIM_FULL_ACTION intent.

CRs-Fixed: 536713

Change-Id: Idaf40167fcf31e4c7708e543d05f1a58793f7234
ICC: Get EF_PLMNWACT to support user controlled PLMN list

Add the EF_PLMNWACT ID into the SIM file handler.

Change-Id: I5c04729b6b7bfb6342c7fd3b968a9762eb92210a
Allow ECT MMI Command to be dialled in Alerting State

MMI Commands are not allowed to dialled if there
is a Foreground Call with Dialing/Alerting State.
Allow ECT MMI Command (4+Send) in Alerting state
as per spec 3GPP TC 31.13.1.4 Requirement

Change-Id: I9dcc07dc31e05462dce0c34dfa2bd8e4e347b709
CRs-Fixed: 585553

Conflicts:
	src/java/com/android/internal/telephony/CallManager.java
	src/java/com/android/internal/telephony/ExtCallManager.java
Allow Ruim Records to be loaded when requested.

Current Functionality works only for First time Load
and subsequent Ruim Records are blocked.

Change-Id: Id74b0a7d4d5c0a746b21a576fd7169e31084aeea
CRs-Fixed: 587956
Process LOADED and IMSI only in READY State.

Allow IMSI event to be accessed from MSim File.

Change-Id: I955986ee8621e170ebe78153438357c471b4b772
CRs-Fixed: 574876

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

Clean run of GSMPhoneTest

Change-Id: Ibf5d76de75ba2cb8c3eaa8b976b8f5d65bdf9f11

Conflicts:
	src/java/com/android/internal/telephony/uicc/UiccController.java
	tests/telephonytests/src/com/android/internal/telephony/gsm/GSMPhoneTest.java
Add an API to set ConnectTime in Connection.

This new API is used by IMS CallTracker to transfer ConnectTime
from IMS to CS connection after SRVCC.

Change-Id: I764d5310c9b9e0a590578bc92289fe5e449d901a
CRs-Fixed: 589223
Fix cdma data call failure due to incorrect RuimRecords loaded state.

Don't reset mRecordsRequested after records loaded as it causes
getRecordsLoaded() to return false always.
Remove check for mRecordsRequested in fetchRuimRecords() to fix
SIM REFRESH issue and make sure recordsRequired() calls
fetchRuimRecords() only once.

Change-Id: Iddc8428229c30cc70fa28b3208112f29cbf2e92a
CRs-Fixed: 593154

Conflicts:
	src/java/com/android/internal/telephony/uicc/RuimRecords.java
Call API with proper input argumnets to add message to provider

Android uses addMessageToUri in telephony to add messages from
third party applications, but while calling the function it is
not passing last argument type(threadId) properly, so instead
 of actual API it is calling MSIM overloaded API.

Change-Id: I33cd743ea97840f21e8979ad163f2a80b6cb4502
CRs-Fixed: 590125
Telephony: add the support for Anr and Email for SIM Card

- Add ANR/EMAIL support for AdnRecord
- add the related interface for ADN,ANR,EMAIL
- Support loading part of records in IccFileHandler.
- Cleanup some unused codes.

Change-Id: I282650251b98317a4a2bf59d61adad66a30cc9c9

Conflicts:
	src/java/com/android/internal/telephony/IccProvider.java
	src/java/com/android/internal/telephony/msim/IIccPhoneBookMSim.aidl
	src/java/com/android/internal/telephony/uicc/IccFileHandler.java
Parsing of CDMA MMS notification carried by SMS

Decode operator specific WDP header

Change-Id: I8dd67633f607086e4a79703e55c9c96fa3982a15
Telephony: Add 7bit Ascii support for long message

Add 7bit Ascii encoding and decoding support for long messages.

Change-Id: I90a21902056fb0e301d996f6eabd8eda005ca0ac
Add Radio Tech Support in manual PLMN

Add radio technology interface when search available
PLMNs and manually select PLMN

Change-Id: I825a0159f7125cce0ea6fc3738a838392fbe8d3a
Fix to avoid Out of State Indications to apps

During the Out Of Service (OOS) bursts, an existing data connection is
reported as disconnected and the corresponding link properties are
removed, resulting in data connection loss.

We need to ignore OOS bursts. If the service is indeed lost, data call
disconnect indication will be sent by modem, else we will wait
optimistically for a quick reattach.

Add a system property to ignore out of service bursts.

Change-Id: I36f709b4cfc04a68542ec64c905f0850d2db231d
CRs-Fixed: 593413
Telephony(MSIM): Modify Local Call Hold flow.

The present change contains below fixes.
1) While an active voice call exists on a subscription, follow
below order to update LCH state to RIL layer.

 - When user placed MO call on another subscription, update
   LCH on existing/active subscription before sending DIAL request.
 - When user answer MT call on another subscription, update
   LCH on existing subscription before sending ANSWER request. Also
   Set audio mode to incall immediately after accepting the call
   and not wait till call is reported as ACTIVE by RIL.
2) If there is a Network held call on one sub and MO/MT call gets
connected on other sub, move network held call to lch.

CRs-Fixed:571380
Change-Id: I6086998df637b071872868e55abe1c30006e7aba
Mms: Add support for sending and receiving mms when mobile data is off.

Can not set up mms apn while mobile data is turned off, so it will fail
to connect when use mms connectivity in app.
Even if mobile data is turned off, we also allow set up mms data when
use mms connectivity.

CRs-Fixed: 532101

Change-Id: I32eac49bec9687052ddbb5ad89da5efc478326df

Conflicts:
	src/java/com/android/internal/telephony/dataconnection/DcTracker.java