Fix for data and roaming icons

- Display data icon independent of voice service state
i.e even if voice network is unavailable

- Show cdma roaming indicators if either voice
or data is roaming.

- Cleanup roaming indicator default values.
Set default CDMA Eri index to roaming off

Change-Id: I915421a6f5906d80ed5b8dd9c433115ad5df1f14
CRs-Fixed: 285986, 303275, 326204, 326634, 333008, 339297
SRVCC: Add support for incoming call SRVCC

Transfer connections from ringing call to handover call on getting
Handover Complete notification. This allows for accept to be done
on the default phone instead of IMS phone after SRVCC. Set the
state of ImsPhoneCall object to Idle after the transfer.

Change-Id: I09cfcc9fc99b3ea4b3a4bd332af546bcfae4b679
CRs-Fixed: 737743
Telephony: Keep RADIO state off in APM for iwlan RAT.

- Due to polling in APM the current service state gets changed
from OFF to OOS which is incorrect.
- Let the radio state be in OFF state and added additional checks
to allow non-default PDP activation if current RAT is iwlan.

Change-Id: I3f62b225fa2345a278858560a44ccd6ab1a9e32a
MSIM: Fix ECBM dialog issue in G+C

Fix ECBM dialog issue by setting ECM mode property value
 as single SIM instead of comma separation in MSIM.

Change-Id: I7bb3c169dc0e0216afbf773236e4d08fda33a0c0
CRs-Fixed: 732984
Telephony: Fix the failure of copying SMS to SIM card for sub2.

While copying SMS of sub2 to its SIM memory, in process of getting
current Phonetype will return default sub's(i.e,sub1's)Phonetype.
But we want to get sub2's Phonetype here.

To fix this, get current Phonetype based on subscription id.

Change-Id: Id554430378ae0837d5eba2d2029ead147b8c3e83
CRs-Fixed: 727110
telephony: Apply regional spn rule

Change-Id: I7ae28472812aa26b80ae3fd7ec5f4a3a5584c132
Add support for sending and receiving mms when mobile data is off. Fix crash during data setup error with null fail cause value.

1. 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.
2. Assign DcFailCause.UNKNOWN to fail cause if a null value is received
from DataConnection.

CRs-Fixed: 532101, 600935
Change-Id: I32eac49bec9687052ddbb5ad89da5efc478326df
Telephony: Don't validate status field.

- status field is also being used to update the intermediate downloading status
to update the UI accordingly.
- these intermediate values exceed the spec defined valid range.

Change-Id: I853983d186c3c79b4bbec459d017f0dd4298af5d
Fix Mms issues on Cdma

For apn with empty apn name, Mms app will query
for mms info matching apns in telephony db.
Set apn name to empty string for Omh profiles

Change-Id: I256964750bf763848591314b208b7e823e538682
CRs-Fixed: 731752
Cleanup the StateMachine thread during RilMessageDecoder dispose.

Currently the dispose() method in RilMessageDecoder wont stop the
state machine thread, and each time a new state Machine thread is
created which causes the file descriptor leakage.

Add quitNow() method  in dispose() of RilMessageDecoder to stop the
state machine thread.

Change-Id: I83f773adf7f5fc0b82abf912f2db7fec8a0aa87b
CRs-Fixed: 725656
Set Network Selection Mode to Automatic after flex mapping.

Set the Network Selection Mode to Automatic on all subs
after flex mapping because if network selection mode is
manual on any of the sub it will be in Limited service after
flex mapping...

Change-Id: Ica0d71e154963a08702c3d62c869b7efd1d5e25e
CRs-Fixed: 726384
Telephony: Consider dataRegState to determine SPN display

There may be situations where voice service state is OOS and data
service state is IN_SERVICE. In such cases, both regStates need to be
considered to determine what to show in UI for SPN.

Change-Id: Iab17ed07611b6fd95d6bc6ee3e2e095f6700e3ba
CRs-Fixed: 532471
Ims: Add support for WIFI network mode notifications

Added support for enabling and disabling features for Voice and
Video when network mode is WIFI or IWLAN

Change-Id: I27f2ba28077bc3eecc97d376cb0b4799ef7da54b
CRs-Fixed: 743490
Telephony: Dont detach on-demand subscription during DDS switch to on-demand subscription.

- DDS switch leads to PS DETACH on current subscription. The current
subscription could be the on-demand PS attached subscription.
- Do not detach while getting out of PsAttachReservedState if current subscription
is the default DDS sub.

Change-Id: I86fa922acbd955e43786763681b1177b2421a29e
Fix CDMA data call issue after emergency call failure.

When emergency call is dialled in CDMA mode, telephony disables
data internally. Data is re enabled after call is ended  if
not in ECBM. If emergency mo call is dropped by network/modem
before going to dialing state, the data is not re enabled.
Fix this scenario by explicitly re enabling data.

Change-Id: I7a62d459dbd6ef6a833fe87e7d35e29311a515fe
CRs-Fixed: 687863
Fix DDS switch issue for Mms on C+G

On a C+G device, when DDS is on Cdma sub, if Mms is
tried on Gsm sub, DDS switch is blocked as ps detach
on Cdma sub doesn't deactivate data call at modem.
Explicitly cleanup data call at Telephony to enable DDS
switch.

Change-Id: I6ca5c9e5073ca183e6675faf9aa14aef4443fd20
Fix data call issue for single pdn case.

When a higher priority apncontext is scheduled for retry, default
data cannot be setup if only single pdn is allowed. If the higher
priority apncontext is later cleaned up before the retry alarm expires,
default data is never re established.
To fix this, try setup data on connectable apns after an apncontext
is cleaned up.

Change-Id: I80e97f6d862ef27e0237db332280e7296d9eebe9
CRs-Fixed: 715866
Fix CDMA data call issue after SIM refresh.

Icc records are reloaded during Sim refresh init and forces DCT
to reload the APNs. However if the data is not registered during
refresh, dummy APNs for CDMA are not created leading to no data.

To fix this, check the selected iccrecords type and if it is of
type RuimRecords then add dummy data profiles even if data RAT
is unknown.

Change-Id: I2051209ac2b987e8544cd9592b31e87e89971336
CRs-Fixed: 688497
Fix data icon issue for null apn

When data call is setup on null apn, data
connection state is notified as suspended
as Telephony is treating null apn as provisioning
apn. This is because the xml entry for
provisioning apn is empty which is matching
empty apn name.
Add isEmpty check for provisioning apn xml entry

Change-Id: Ifbb3aaaf18926b9209aa05f8346da839178dc803
CRs-Fixed: 713896
Fix back to back data call requests on same apn.

If one ApnContext is in DISCONNECTING state and another ApnContext
which uses the same apn needs to be brought up, current code doesnot
share the same DataConnection object. This may lead to back to back
requests on same apn. To avoid this, allow sharing of DC even when it
is in DISCONNECTING state. This will allow DC to be brought up immediately
after getting disconnected.

CRs-Fixed: 712333
Change-Id: I3d6fef87014f339b04393ec33f86d89beab8c644