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

Conflicts:
	src/com/android/server/telecom/AsyncRingtonePlayer.java
	src/com/android/server/telecom/Ringer.java
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

Conflicts:
	src/com/android/server/telecom/ConnectionServiceWrapper.java
	src/com/android/server/telecom/InCallController.java
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
Display merge icon to add users to existing conference call

Set phone account for conference call to get correct call
capabilities.

Change-Id: I0c2c9b4d38bf192a48a7cc19728ce981d43400d8
CRs-Fixed: 738818
DSDA: Fix to stop playing LCH tone

When there are no more calls on a particular sub and it is in LCH
state then reset its LCH state.

Change-Id: Iec6948a2b10d9478d07af55764167138bcf09860
CRs-Fixed: 749515
Fix the difference in design between SSSS and DSDA

In SSSS when an additional call is attempted on top of an active call the call
is allowed if the call was made on the  same account as that of active call.
But in DSDA the hold capability of an ACTIVE call is checked and if it had
the capability then the active  is first put to hold and then the new call
was placed which contradicts the SSSS behavior.
So allow the call in DSDA if the phone account of the new call is same as
the ACTIVE call.

Change-Id: I6c06723884638e1b92af16c873c517f89ceb35b8
CRs-Fixed: 761862
Handle NumberFormatException gracefully.

Handle NumberFormatException at relevant places
when subId is parsed as Long.

Change-Id: Ie245c840a9aa394629a4eff86f10cecaa5ec2955

Conflicts:
	src/com/android/server/telecom/Ringer.java
IMS-VT: Set speaker phone to true only if bluetooth or headset is not connected

Change-Id: I29fbbc3640453e5713193b815e64a3355e26be04
CRs-Fixed: 755377