Merge "Hiding videoState values in telecomm APIs. (2/3)" into lmp-dev
diff --git a/src/com/android/telecomm/ConnectionServiceWrapper.java b/src/com/android/telecomm/ConnectionServiceWrapper.java
index 5fcb9bd..33f472f 100644
--- a/src/com/android/telecomm/ConnectionServiceWrapper.java
+++ b/src/com/android/telecomm/ConnectionServiceWrapper.java
@@ -35,6 +35,7 @@
import android.telecomm.PhoneAccount;
import android.telecomm.PhoneAccountHandle;
import android.telecomm.StatusHints;
+import android.telecomm.VideoProfile;
import android.telephony.DisconnectCause;
import com.android.internal.os.SomeArgs;
@@ -740,7 +741,11 @@
if (callId != null && isServiceValid("answer")) {
try {
logOutgoing("answer %s %d", callId, videoState);
- mServiceInterface.answer(callId, videoState);
+ if (videoState == VideoProfile.VideoState.AUDIO_ONLY) {
+ mServiceInterface.answer(callId);
+ } else {
+ mServiceInterface.answerVideo(callId, videoState);
+ }
} catch (RemoteException e) {
}
}