Passing video state through to phone dial.
Bug: 16014224
Change-Id: I9fce676527b22f8649238dcce35903e6877af58e
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index 2b76c91..9452fc5 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -37,6 +37,7 @@
import android.os.Message;
import android.os.RemoteException;
import android.os.SystemProperties;
+import android.telecomm.VideoCallProfile;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;
@@ -714,7 +715,7 @@
final boolean initiallyIdle = app.mCM.getState() == PhoneConstants.State.IDLE;
try {
- connection = app.mCM.dial(phone, numberToDial);
+ connection = app.mCM.dial(phone, numberToDial, VideoCallProfile.VIDEO_STATE_AUDIO_ONLY);
} catch (CallStateException ex) {
// CallStateException means a new outgoing call is not currently
// possible: either no more call slots exist, or there's another
diff --git a/src/com/android/services/telephony/PstnConnectionService.java b/src/com/android/services/telephony/PstnConnectionService.java
index 91e3db2..82165da 100644
--- a/src/com/android/services/telephony/PstnConnectionService.java
+++ b/src/com/android/services/telephony/PstnConnectionService.java
@@ -144,7 +144,8 @@
}
respondWithResult(
- new ConnectionRequest(request.getCallId(), handle, request.getExtras()),
+ new ConnectionRequest(request.getCallId(), handle, request.getExtras(),
+ request.getVideoState()),
response,
telephonyConnection);
}
diff --git a/src/com/android/services/telephony/TelephonyConnectionService.java b/src/com/android/services/telephony/TelephonyConnectionService.java
index 04e4e14..717049c 100644
--- a/src/com/android/services/telephony/TelephonyConnectionService.java
+++ b/src/com/android/services/telephony/TelephonyConnectionService.java
@@ -87,7 +87,7 @@
com.android.internal.telephony.Connection connection;
try {
- connection = phone.dial(number);
+ connection = phone.dial(number, request.getVideoState());
} catch (CallStateException e) {
Log.e(this, e, "Call to Phone.dial failed with exception");
respondWithError(