telecom: fix ringtone NPE when profile is set to silent

If ringmode is set to SUPPRESS ringtone manager returns a null ringtone.
Note: to repro exception set profile to silent, then configure, click
on phone app group, and set ring mode to "off"

Change-Id: Iaa80a628d9d80f1741d5a4c736a34e0cbbe00685
Bluetooth: Send default value for CNUM.

 - When null value is returned for operator's
   name and subscriber number from telephony
   API's add default values for those.

Change-Id: Ic00e79bd9c8ad1a69ea25683081634225090c563
CRs-Fixed: 756104
Reset the connection pending flag when SCO is disconnected

When bluetooth audio is disconnected mBluetoothConnectionPending
needs to be reset in order to get correct bluetooth state.

Change-Id: I2aab54147a9f9f0f35257e6366f400bd65d9be52
CRs-Fixed: 753883
BT: Send proper updates to headset for call swap.

In gsm network, when active and held calls are swapped, firstly
active call is put to hold making held call count as 2 and
BluetoothPhoneService updates callheld indicator as no call active.
After this next update comes to make original held call as active
and again callheld indicator as active and held is updated.
Avoid unnecessary first update to headset.
In cdma network, send callheld indicator for call swap within
active conference.

CRs-Fixed: 758732
Change-Id: Idc66a90b18391f53f196567b6f6e149b11ce11c8
Bluetooth: NPE found in static anaysis.

Fix NPE identified by static analysis.

Change-Id: I3704ea503684068528afb05db2ef9ff79d90455d
CRs-Fixed: 759479
IMS-VT: When TTY is ON, do not allow MO VT call

When TTY mode is ON, the user SHOULD NOT be allowed to make
a Mobile Originating (MO) VT call and an UI alert message will
be displayed explaining MO VT call cannot be initiated.

Change-Id: I774f0490850c6376be923c73aa8c930d66253f28
CRs-Fixed: 734257
Send 'reject call with sms' on the correct subscription.

Send sms on the subscription on which the call is rejected.
Add subscription info with the intent 'ACTION_RESPOND_VIA_MESSAGE'
on which the call was rejected.

Change-Id: I357184eae875e501b988375261cede68f796f00b
CRs-Fixed: 594214
Telecomm: Add support to set ring tone for SIM2

Can set different ring tone for SIM1 and SIM2.

Change-Id: Ie715e2c2d7e3760f7d0fe9ba2a9ecdafd9a42277
IMS-VT: Change parameter type of data usage

Change Data Usage methods to take parameters of type long
instead of int

CRs-Fixed: 747694

Change-Id: I6a277dedb5976261035084955ed8a90da256061a
Accept waiting call, when hold & active calls are present.

In order to accept waiting call when hold & active calls are
present on same subscription, disconnect active call before
sending answer request for waiting call.

Change-Id: Id33224e43ca6db283bf6f8a03cbaac4b6cdefac2
CRs-Fixed: 723716
Set audio mode after accepting the call

Set the audio mode to incall immediately after accepting the call and not wait
till call is reported as ACTIVE by RIL. This is done to speed up time taken for audio
to set up the voice path

Change-Id: Id78c467869693087c49b743e67b7a77aff841ae3
CRs-Fixed: 726708
Propagate the call substate changed message to the UI

Change-Id: I0465c65d9ac7af22cac544f6404056d0c2094cf4
CRs-Fixed: 749824
Telecomm: Don't prompt to select the subscription when adding another call

Can't MO calls in different SIM cards in DSDS mode,
no need to prompt again when adding another call.

Use the current active call's phoneAccount to MO a second call.

CRs-Fixed: 746622

Change-Id: I5169cf4b5406b39ca6c28a090e21a79074b8c56a
Telecom: Disable "Add call" if the call is not active or on hold

The call state check is missing in isAddCallCapable function.

When set the capabilities for call, check it's state,
enable the "add call" capability only for the
"ACTIVE/ON_HOLD" state.

Change-Id: If6220e68a55fcf10798c8e6909c3038788a8a55e
CRs-Fixed: 740949
IMS: Allow dial Conference call without URI List

Remove empty string check to place Conference call
without URI List.

Change-Id: Ibcd76618cab820973a769a23af5ee13c956ed23c
CRs-Fixed: 681238
IMS Call Extras Feature

Adding support to allow OEMs to send
extra information with the Dial Intent all the
way to the IMS service layer and beyond.
Similarly, extras for MT calls are propagated
from IMS Service layer till the UI layer.

Change-Id: I351d32c15494c7df5d00c05053368fd5fa17b49b
CRs-Fixed: 724860
Fix to prevent null pointer exception

Add null check while checking for phone account.

Change-Id: I0eeeee3c5d42b9230a2c5bff450b193db8504e9f
CRs-Fixed: 753768
Set active subscription properly

Unset ACTIVE bit only for a subscription which is not an active
subscription.

CRs-Fixed: 755483
Change-Id: Ie8aa357dc16057bea7c99128e3c68258d6bfdde7
IMS-VT : Set the flag to start call with speaker on for incoming VT calls

- There seems to be a race condition between when InCallUI
  enters the video mode and sets the speaker phone on and
  when call state changes to active.

- As a result, the audio route gets reset to earpiece as we
  are not setting speaker phone on flag for the incoming
  case. This change fixes that issue.

Change-Id: I3e665cbd426da0f321d85cd4a23310776c80cc96
CRs-Fixed: 741320
DSDA: Update the active sub when no live calls.

Unset the ACTIVE bit of phone account when there
are no active calls.

Change-Id: I0ef458e8704298ca2791cf0afd1289979887363e
CRs-Fixed: 759506