IMS UT Processing CF 002/004 Cases

Adding logic to properly handle
'All' and 'All Conditional' call
forwarding condition types in
call forwarding supplementary
service operations.

Change-Id: Ia623818e6bcd60a832dc07afb53d0c19429e515f
CRs-Fixed: 730824
IMS UT Supplementary Service Query Handling

Adding changes to properly format
the AyncResult object of query
supplementary service responses.
Not doing so causes an exception and
a crash.

Change-Id: I72ad3034a94a8aa8ff84ffe3a3f35f0182b47e7e
CRs-Fixed: 733315
Fix apn population in cdma

Rename getRUIMOperatorNumeric method to
getOperatorNumeric.

Change-Id: I2d3ae4cdfed9cafb8f4f6f77ccbcf1410c2c4862
CRs-Fixed: 731653
Set IMS service state properly after RADIO becomes available

Currently canDial() method blocks placing any MO call in IMS pipe
when service state is power OFF and few other reasons.

When RADIO becomes NOT_AVAILABLE/OFF, GSM/CDMA phones set IMSPhone's
service state as POWER_OFF. This is NOT correct where there may be
cases where device may be in Airplane mode with WiFi ON and IMS
registered. Hence removed the changes in order to cater 911 calls
after APM ON/OFF, modem SSR and IMS on WiFi.

Change-Id: Id27a2ce86fd2bc5db66e3b5a01cb21bd0f6ad62e
CRs-Fixed: 731702
Ims: Enable IMS feature in multi-sim

1. Add Phone ID check before creating IMS phone
2. Revert the codechanges of MSIM blocking IMS calls

Change-Id: Idd9eb20a9f9084d05d71328a89d3a3998d9be418
CRs-Fixed: 699956
IMS-VT: Notify call updates

-When call type is updated from VoLTE to VT, this notification
 does not reach UI. Fix this

Change-Id: Ieb109eff40c63cc83f6e89023c0916593aca5acd
Send retry SMS over 1x

If MO SMS fails with SMS_FAIL_RETRY and phone's radio tech is CDMA,
 send the subsequent retry sms on 1x if criteria for active 1x
voice call and IMS registration still apply

Change-Id: I797b9218ef013402fae2d01242f1f7b9a02c64f2
CRs-Fixed: 607158

Send SMS over 1x when on eHRPD and active voice call

When UE is attached to eHRPD network and IMS is registered:
- If there is an active 1x RTT voice call, send SMS over 1x
- If there no active 1xRTT voice call, send SMS over IMS

This feature is enabled by default. To disable it, set
config_send_sms1x_on_voice_call to false in config.xml

CRs-Fixed: 565247

Conflicts:
src/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java
Change-Id: I767ff1747c8498a5fd3760e2a8a6cbd764716b37
Create cdma dummy apns.

Create cdma dummy apns if none are found in database.

Conflicts:
src/java/com/android/internal/telephony/dataconnection/DcTracker.java
Change-Id: I00ed7cfaff9b1543f9d687ceb8d48d39c88f4651
Temp change to compile telephony.

Change-Id: I43fa8a10ed12d15fb2dc846750901f566e11d0c7
Compilation fix for ApnSetting update

Include MTU in ApnSettings

Change-Id: Id814cf9f856ac86e3d328e554ba484f2978e13da
Clean up Icc Refresh handling

1. When a SIM refresh is received of type INIT or RESET,
don't immediately start re-fetching the records, because
the app might not be ready. In this case, we could end up
broadcasting that all records are loaded pre-maturely.

On a refresh of the above type, the app will move out of the
ready state and back into the PIN state, if PIN is enabled.
Start reading the records only after the PIN has been verified
and the app has moved to the READY state.

2. UiccController will listen for refresh and propagate it to
the Card and the Apps. The App will set its state to UNKNOWN
on receiving a refresh.
UiccController will also request card status on receiving
refresh to get the latest state.

This avoids having to make assumptions on the ordering of the
Unsols for Sim Refresh and card state changes. This also
ensures that after an app state is marked UNKNOWN,
it will move to READY, if it is truly ready.

3. Moved common implementation for refresh into IccRecords
for better code reuse.

4. Side effect of #3 is RuimRecords will now reset AdnCache when
refresh of type INIT is received.

5. Do not send Radio Power Off on SIM_RESET

This change is needed as per GCF test spec

CRs-Fixed: 441924
CRs-Fixed: 503646

Conflicts:
src/java/com/android/internal/telephony/uicc/UiccController.java
Change-Id: I58b1237a49d4f943a699d751a8680c25ce4394ad
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.

Commits squashed:
I57a1bb36902cb01172c5ec35e847c3f2c8a2a423
If8d96115fdb8b0f65d75b57ee32da5fec2f4c178

Conflicts:
        src/java/com/android/internal/telephony/PhoneBase.java

Change-Id: I36f709b4cfc04a68542ec64c905f0850d2db231d
CRs-Fixed: 593413
MSIM: voice/sms/data subscription related changes

--> Add APIs to get/set the default sms subscription.

--> Add APIs to get/set SMS prompt mode status.

-->Subscription specific for Mobile data, roaming and usage

   Provide per subscription based support for both Mobile Data
   and Data roaming options. UI and functionality changes in:
     a. Settings -> Data Usage application
     b. Settings -> Mobile Networks menu

-->Telephony: Phone sub info and sms interface manager changes

   Add following support in Telephony for MSIM targets.
   - The methods in ISms.aidl always use or act on the
     user preferred sms subscription.
   - getDeviceId() and getDeviceSvn() methods, in IPhoneSubInfo.aidl
     always return the values of first subscription.
   - Except getDeviceId() and getDeviceSvn() methods remaining all
     methods in IPhoneSubInfo.aidl shall use or act on the voice
     preferred subscription

Fix disable mobile data issue.

On Mobile data disable, phoneId is used as reference
to set mobile data in database (mobile_data + phoneId)
to false. On powerup, while reading mobile data from
database, phoneId is not used, hence the issue.
Use phoneId to do set, get operations for mobile data.

CRs-Fixed: 720215

Conflicts:
src/java/com/android/internal/telephony/SubscriptionController.java
Change-Id: I7f06a1f45d59c617e07c1b142a11828f7cda944b
IMS: Proper UI after CFUT deactivation

1) Showing proper UI for CFUT query
   after deactivating the request.

CRs-Fixed: 734970

Change-Id: I9b67ea37aa276135563d5f97096a7e0bbf46f26d
IMS: Allow CFUT request

Allowed CFUT requests like activate,
deactivate etc when timer values are not
provide.

Change-Id: I759ead50c3300965206bbeed0151aabc305727ec
CRs-Fixed: 734971
Check config for data call errors

As certain data call errors can be treated as temporary or
permanent errors by different carriers, use the carrier
specific config to determine retry behaviour

Add config option for pdp regular deactivation
- Default AOSP implementation is to restart the radio for PDP
error cause = 36-Regular deactivation.
- Added xml based option to disable this implementation and treat
error=36 as temp failure.

Change-Id: I5f1931578f720d50dc8f272ee39e5c7abd1126b9
IMS/911: Do not clear handover connections on SRVCC COMPLETE

Even though SRVCC or silent redial is successful, the handover connection
objects are cleared before migrated to CS domain. Proper checks are added
NOT to clear the handover connection objects as they are removed as and
when a new driver call via CS pipe is received and processed.

Change-Id: I061fa81e651b4c6b6bdea1f1cf0b09dde39fdb4a
CRs-Fixed: 713730
BACKUP: Fix Phone tip "backup has stopped" when backup mms to SD card .

The send out mms's pdu type is Retrieve Conf, but the PduComposer didn't
support this type, so always return null, this will cause backup failed.

Add Retrieve Conf support for PduComposer.

CRs-Fixed: 731522

Change-Id: I57444cd8a9ddc2db4586088a05600f21331ef465
Telephony: Implementation of IWLAN

-- Allow registration polling in radio off state.
-- Disable default APN if current RAT is IWLAN.
-- Allow non-default PDP activation in radio off state provided
current RAT is IWLAN.
CRs-Fixed: 600118

Telephony: Implementation of iwlan and wwan coexistence.
- Use unsol oem hook event to identify the coexistence of
wwan with iwlan.
- Allow default and ia apn type when wwan is available.
- Allow non-default pdp as long as iwlan is available.
CRs-Fixed: 628227

Conflicts:
	src/java/com/android/internal/telephony/CommandsInterface.java

Change-Id: I8f72e8ce7b5852d5b97d01412ee9ded99f85856c
Add support for DSDA

1. inform to clients whenever active sub change information
is received from telephony service.
2. inform local call hold status to RIL, whenever update on
the same is received.

Conflicts:
	src/java/com/android/internal/telephony/BaseCommands.java
	src/java/com/android/internal/telephony/Phone.java

Change-Id: If45351cce38c1ef0ea20ca45a821edd1fa594c82