Hiding videoState values in telecomm APIs. (2/3)

Ensuring audio-only calls only trigger the "answer" method in
ConnectionServices.

Bug: 17243002
Change-Id: I5f19d96fa7dabc335748cd473ad285e94f4d698f
diff --git a/src/com/android/telecomm/ConnectionServiceWrapper.java b/src/com/android/telecomm/ConnectionServiceWrapper.java
index 7d1f01a..52180e9 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) {
             }
         }