Telephony: Request audio focus when call state is RINGING

When call state is RINGING, request for audio focus
even though STREAM_RING volume level is Zero.
This is to mute the Music and all other audio streams
when call state is Ringing
Change-Id: I9eae1ab1a4e847971a897d02ad08e24acd38afc7

CRs-Fixed: 649662
Change-Id: Ia1aa9632d68ce30962f35e95da415a915c9f415a
MSIM(DSDA): play ring tone only when there is no active/hold call

When there is active call/held call on any subscription, ring tone
should not be played, instead call waiting tone should be played.

Change-Id: Ie5614e532b346539b3d7416ec39198a5937c0d66
CRs-Fixed: 722420
Conflicts:
src/com/android/telecomm/InCallAdapter.java
MSIM(DSDA): For SCH tones, use proper audio stream

use STREAM_INCALL_MUSIC as audio stream, for SCH inband tones.

Change-Id: I0e36799bd61cd6086d73585979dae7f00dbbdf01
Telephony: Check user permission before making a call

Check if package is allowed to make phone calls.

If not allowed then reject the request.

Do not allow MO call to proceed if a user is restricted to do
so and it is a non-emergency call.

Change-Id: I5ded27c33bd92afc310bd65e0d97b8e1d020aac8

Conflicts:
src/com/android/telecomm/CallActivity.java
CRs-Fixed: 717759
Change-Id: I5ded27c33bd92afc310bd65e0d97b8e1d020aac8
Display Supplementary Service Notification

New interface added to support supplementary service notification
messages.

Conflicts:
src/com/android/server/telecom/Call.java
Change-Id: I3e8fdb62055f6d71adb62fb464e0c676754d38f7
MSIM: Phone account related changes

- Do not set "always ask" if only one account present
- Use voice subId from SIM Settings as default outgoing account
- Enable debug log level

Conflicts:
AndroidManifest.xml
src/com/android/server/telecom/PhoneAccountRegistrar.java
src/com/android/server/telecom/TelecomBroadcastReceiver.java
Change-Id: I9e7b16f20c357f8d3ceedfba781bc893d11c39ea
Phone: Add headset notification when wired headset plugin

When wired headset is plugged in, show a notification on status bar,
and cancel such notification when the wired headset is plugged out.

Conflicts:
src/com/android/server/telecom/TtyManager.java
Change-Id: Iefb452e496d2f30a333f130f04742505b782b006
IMS: Conference URI support.

Retrieve extra DIAL_CONFERENCE_URI
from dial intent and propagate it
to TeleService.

CRs-Fixed: 713839

Conflicts:
src/com/android/server/telecom/CallActivity.java
Change-Id: I9110f779a3899be9fe52a54dd94fea9994134a8a
IMS: Add participant support

Implement addParticipant() API and
propagate ADD_PARTICIPANT_KEY extra
to TeleService.

CRs-Fixed: 720697

Conflicts:
src/com/android/telecomm/CallActivity.java
Change-Id: Id226a96365df8317ee3b5a027be24aba7c830fc2
MSIM: set phone account handle changes for ECall

Add interface API between Telephony to Telecomm for
updating phoneAcount.
Currently on multisim, Telephony(PhoneApp) picks the best
possible sub for placing emergency call, after selecting the
best possible sub, Telephony uses this new interface API to update
the phoneAcount handle to Telecomm which inturn helps to display
the proper subId on which ECall placed.

Change-Id: Ic0fdc01810ccc35479a1a9447c40e38122a155a9
CRs-Fixed: 722205
MSIM(DSDA): Align DSDA to new changes

Align DSDA to new changes

Change-Id: Ideed022c3ebab00d53bbb28f5d7024540e7d5be0
IMS: Allow placeCall with complete uri.

Add code to dial with complete uri if dial intent contains
extra "org.codeaurora.extra.SKIP_SCHEMA_PARSING" set to true.

Change-Id: Ia2b9ca3480951ce759992fe0dfd6c9792a58a34a
CRs-Fixed: 680318
Fix to set active sub to conversation sub

On disconnection of a call update active subscription to conversation
subscription based on current LCH state.

Change-Id: Ia43e30a3cf81928bd3e43c400ea622cfe7d89a83
CRs-Fixed: 726443

Conflicts:
	src/com/android/server/telecom/CallsManager.java

Change-Id: Ia43e30a3cf81928bd3e43c400ea622cfe7d89a83
Display the call duration properly

The call duration is incorrect in call log.
Consider the connectTime for updating call logs
instead of creationTime.

CRs-Fixed: 730243
Change-Id: I2112c2493a6d73f7e58db467496419b86e4d9ba3
Telecomm: compiler fix in Log.d

Change-Id: Iec4ba8f4d50f604d6829c9ae718c58fffcb77c45
Do not consider PRE_DIAL_WAIT as live call state.

When the account selection dialog is displayed,
the call state is PRE_DIAL_WAIT. Hence
hasMaximumLiveCalls API returns true.

Remove the PRE_DIAL_WAIT state from LIVE_CALL_STATES.

Change-Id: I22b8f4a317bc3e554b9334a6540c8a5eb0837d37
CRs-Fixed: 734372
Add support for DSDA.

Add support for below.
1) Maintain LCH & Active subscriptions and inform changes to
lower layers.
2) LCHR and SCH tones
3) Allow calls on other sub, when call is already active
in the current sub.

MSIM(DSDA): Check subscription of other active calls

For updating add call capability to a call, check if any other
active call is there in same subscription or not. if other call
is in same subscription, only then disable add call capability as
maximum of 2 active calls are supported per subscription.

Conflicts:
	src/com/android/server/telecom/Call.java

Change-Id: Id6c774496266afbda61c0ab10610221fab3daa47
Fix to prevent crash during split/hangup of conference calls .

Add null check while fetching other call phone account.

Change-Id: I33618d9451f9fe878a91b2a471d44ea7f7904967
IMS: Deflect call feature

Code changes to support Deflect call feature.

Conflicts:
src/com/android/server/telecom/CallsManager.java
src/com/android/server/telecom/InCallAdapter.java
Change-Id: I272a15676a865c32c64b1576240903f0731154f7
CRs-Fixed: 713856
Compilation Fix on New Aosp.

Compilation Fix on New Aosp.

Change-Id: I08559233d3c450f2bf82365f056b507ab506c51b