Telephony: Remove Upgrade Call dialog when the request times out.

While in IMS call user can send Upgrade Call request to upgrade voice
call to video call. The request displays Upgrade Call dialog on the
other side asking the user to upgrade the call. The dialog stays on
if the user chooses not to press on YES or NO buttons.

Remove the Upgrade Call dialog after the request times out in QMI-RIL.

Change-Id: Iafa72a6890397d86203b79b856c5a6ecd70ca1dc
CRs-Fixed: 375159
IMS-VT: Fix mImsCamera initialization

For first VT call, mImsCamera object is not initialized before
querying for isZoomSupported. So, the zoom slider does not show
for first VT call

Change-Id: Ibf17a232fa2e44e0e7a6c4792374f212a72a3fbb
CRs-Fixed: 533601
Settings: "Mobile network type" is "unknown" for sim card

Mobile network type should be data network.

So we should change getNetworkType() into getDataNetworkType()
in MSimPhoneInterfaceManager.java.

CRs-Fixed: 528986

Change-Id: I291312af4d22eb895b38e6aaf371553e4a68c3af
Phone(MSIM): Don't convert emergency call action to call action

In current implementation, if an emergency call action intent is
launched directly from the OutgoingCallBroadcaster, it will be
converted to a call action intent. This causes placeCall to fail.

The change does not convert emergency call actions when the above
scenario happens.

Change-Id: Ied524f9ed22d6cfec9981a897feedece32573527
CRs-Fixed: 534524
Revert "merge fixes"

This reverts commit 0918b8178855addb1e7c519edbde38b81dfe8c7a.
IMS-VT: Reject Modify Call request before removing the Consent dialog.

The Consent dialog is closed when UE receives an incoming call.
Since user cannot accept or reject the upgrade request,
the request times out at the lower layers.

Reject the upgrade request before dismissing the dialog.

Change-Id: I3828f1f890e62f34487aacb279c10939df89ea54
CRs-Fixed: 526707
Ims: Reset mAudioDeviceInitialized for non-VT call or downgrade scenarios

Reset mAudioDeviceInitialized when VT call is downgraded to VoLTE call
to enable audio to be routed to speaker when MO VT call is initiated.

Change-Id: I018d94028df5d9da6ce90b92dcbfe8abb2fdb6d9
CRs-Fixed: 533519
Phone: Add modifyCallButton for landscape layout

modifyCallButton resource was not added for landscape layout hence
causing the phone app to crash when InCallScreen is rotated to landscape
by inserting a HDMI cable during call. This is fixed by adding
the resource properly.

Change-Id: Ica78549c80d19981ff6dd649b57b505a71444f1f
CRs-Fixed: 444857
IMS: VT Conference screen orientation

When VT conference is ongoing, VT lib will
send the orientation mode. Set the InCallScreen
accordingly

Change-Id: Ib5e09139d1fa51cd970e1549638befe21d2fb808
CRs-Fixed: 535025
IMS-VT: Fix Camera Preview box not showing for VT_RX to VT upgrade

-Resize Camera preview whenever startPreview is called
-Change TextureView's visibility from View.GONE to View.INVISIBLE
Without this change camera surface is not created for VT_RX call type

Change-Id: Ib6ccd014c5ad7f60e1940ba72436a3ca20bd2b03
CRs-Fixed: 459715
IMS-VT: For CVO mode, rotate far end surface

-CVO - Coordinated Video Orientation feature
-In CVO mode, whenever the receiver side device is rotated,
use sensor orientation information to rotate the far end surface,
so that co-ordinate system of surface always has (0,0) fixed with
respect to earth
-Cleanup CVO related code

Change-Id: I3ee9fb44d3d212f4d4f051bf625d059dcc38a19b
CRs-Fixed: 535129
Bluetooth: Handling DSDA call states.

This feature will enable handling of
Dual SIM calls using connected Bluetooth
headsets.

CRs-Fixed: 545484
Change-Id: Icf62fa46fdc534ac6091f8f2f2b80c469b14061f
Fix crash while doing emergency call in airplane mode.

When emergency call is attempted in APM, radio is powered on first.
If there is voice radio tech switch after radio on, the old
phone instance is disposed and a new one is created.
EmergencyCallhelper crashes when trying to use the disposed phone
instance.Use PhoneProxy object instead of PhoneBase which will take
care of radio tech change.

Change-Id: Ie7f367f5b9e29c6870cabc8c3cb832ebc49f8c3a
CRs-Fixed: 534652
Phone(MSIM): Remove unwanted characters in FDN

Remove inappropriate characters from number before
sending them to IccProvider.

Change-Id: I09b5a96d2b5cbc34668876f688a50e4a8e615301
CRs-Fixed: 548549
Update modify Call Visibility using peer capability

1. The modify button is refreshed after receiving peer capability
for the scenario where the local device supports modify but
peer does not support modify.

Change-Id: Ib85231329339b8af90f3be9f7cc85926313931ba
CRs-Fixed: 548039
Phone(MSIM): Use subscription to retreive PIN2/PUK2 status

PhoneFactory.getDefaultPhone() used in EditFdnContactScreen
retreives PIN2/PUK2 status for default phone. handleResult
is overridden in MSimEditFdnContactScreen to use the
mSubscription to obtain the status of PIN2/PUK2.

Change-Id: I61ce3c9b4f7ad9533a0b7329cf464b1b6a557463
CRs-Fixed: 547839
Phone(MSIM): Do not dismiss prompt dialog when touched outside

When prompt option displayed while placing voice call,
if user touches out side of prompt dialog, the dialog getting
dismissed.

To avoid dismissing prompt dialog when touches outside of dialog,
set the dialog setCanceledOnTouchOutside() property to false.

Change-Id: I244f582022af7ca9a3bf805e2a7e062985e312f8
CRs-Fixed: 543464
Phone(MSIM): Do not disconnect BT audio when other sub has call

When device has an active voice call on LCH subscription
do not disconnect the BT audio.

Change-Id: I6bcb742dabc1667652a92ef50be8dd18e21903f2
CRs-Fixed: 549824
Phone(MSIM): Change class name to MSimCallFeaturesSetting

Update the class MSimCallFeaturesSetting on call forward
notification expand instead of CallFeaturesSetting on
DSDS enabled target.This fix enables to load the proper
call forward settings depending on the subscription chosen.

Change-Id: Iaa796cb921744cbfb783ac8fd1248ef38b016d04
CRs-Fixed: 550519
Bluetooth: Added PHONE_ON_DISCONNECT event.

This will help in getting the call
disconnect event properly as sometimes
in three way call states, the
PRECISE_CALL_STATE_CHANGED is missed
and application fails to update call
disconnect state to BT app.

CRs-Fixed: 552239
Change-Id: I55f5bea9e2437149db5946bc01acb66ae99038b0