diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 5dfba52..b06b043 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -669,8 +669,10 @@
 
     /**
      * Answers the call if it is ringing.
+     *
+     * @param videoState The video state in which to answer the call.
      */
-    void answer() {
+    void answer(int videoState) {
         Preconditions.checkNotNull(mConnectionService);
 
         // Check to verify that the call is still in the ringing state. A call can change states
@@ -680,7 +682,7 @@
             // that it will work. Instead, we wait until confirmation from the connectino service
             // that the call is in a non-RINGING state before changing the UI. See
             // {@link ConnectionServiceAdapter#setActive} and other set* methods.
-            mConnectionService.answer(this);
+            mConnectionService.answer(this, videoState);
         }
     }
 
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index 8265b20..c752625 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -344,8 +344,11 @@
      * Instructs Telecomm to answer the specified call. Intended to be invoked by the in-call
      * app through {@link InCallAdapter} after Telecomm notifies it of an incoming call followed by
      * the user opting to answer said call.
+     *
+     * @param call The call to answer.
+     * @param videoState The video state in which to answer the call.
      */
-    void answerCall(Call call) {
+    void answerCall(Call call, int videoState) {
         if (!mCalls.contains(call)) {
             Log.i(this, "Request to answer a non-existent call %s", call);
         } else {
@@ -368,7 +371,7 @@
 
             // We do not update the UI until we get confirmation of the answer() through
             // {@link #markCallAsActive}.
-            call.answer();
+            call.answer(videoState);
         }
     }
 
@@ -577,7 +580,7 @@
                     mCallAudioManager.toggleMute();
                     return true;
                 } else {
-                    ringingCall.answer();
+                    ringingCall.answer(ringingCall.getVideoState());
                     return true;
                 }
             } else if (HeadsetMediaButton.LONG_PRESS == type) {
diff --git a/src/com/android/telecomm/ConnectionServiceWrapper.java b/src/com/android/telecomm/ConnectionServiceWrapper.java
index 870d61c..a47dc09 100644
--- a/src/com/android/telecomm/ConnectionServiceWrapper.java
+++ b/src/com/android/telecomm/ConnectionServiceWrapper.java
@@ -632,11 +632,11 @@
     }
 
     /** @see ConnectionService#answer(String) */
-    void answer(Call call) {
+    void answer(Call call, int videoState) {
         if (isServiceValid("answer")) {
             try {
-                logOutgoing("answer %s", mCallIdMapper.getCallId(call));
-                mServiceInterface.answer(mCallIdMapper.getCallId(call));
+                logOutgoing("answer %s %d", mCallIdMapper.getCallId(call), videoState);
+                mServiceInterface.answer(mCallIdMapper.getCallId(call), videoState);
             } catch (RemoteException e) {
             }
         }
diff --git a/src/com/android/telecomm/InCallAdapter.java b/src/com/android/telecomm/InCallAdapter.java
index 161d4a4..0822dc4 100644
--- a/src/com/android/telecomm/InCallAdapter.java
+++ b/src/com/android/telecomm/InCallAdapter.java
@@ -50,14 +50,21 @@
         public void handleMessage(Message msg) {
             Call call;
             switch (msg.what) {
-                case MSG_ANSWER_CALL:
-                    call = mCallIdMapper.getCall(msg.obj);
-                    if (call != null) {
-                        mCallsManager.answerCall(call);
-                    } else {
-                        Log.w(this, "answerCall, unknown call id: %s", msg.obj);
+                case MSG_ANSWER_CALL: {
+                    SomeArgs args = (SomeArgs) msg.obj;
+                    try {
+                        call = mCallIdMapper.getCall(args.arg1);
+                        int videoState = (int) args.arg2;
+                        if (call != null) {
+                            mCallsManager.answerCall(call, videoState);
+                        } else {
+                            Log.w(this, "answerCall, unknown call id: %s", msg.obj);
+                        }
+                    } finally {
+                        args.recycle();
                     }
                     break;
+                }
                 case MSG_REJECT_CALL: {
                     SomeArgs args = (SomeArgs) msg.obj;
                     try {
@@ -192,10 +199,13 @@
     }
 
     @Override
-    public void answerCall(String callId) {
-        Log.d(this, "answerCall(%s)", callId);
+    public void answerCall(String callId, int videoState) {
+        Log.d(this, "answerCall(%s,%d)", callId, videoState);
         mCallIdMapper.checkValidCallId(callId);
-        mHandler.obtainMessage(MSG_ANSWER_CALL, callId).sendToTarget();
+        SomeArgs args = SomeArgs.obtain();
+        args.arg1 = callId;
+        args.arg2 = videoState;
+        mHandler.obtainMessage(MSG_ANSWER_CALL, args).sendToTarget();
     }
 
     @Override
diff --git a/src/com/android/telecomm/TelecommServiceImpl.java b/src/com/android/telecomm/TelecommServiceImpl.java
index d848029..f93a7a7 100644
--- a/src/com/android/telecomm/TelecommServiceImpl.java
+++ b/src/com/android/telecomm/TelecommServiceImpl.java
@@ -298,7 +298,7 @@
     private void acceptRingingCallInternal() {
         Call call = mCallsManager.getFirstCallWithState(CallState.RINGING);
         if (call != null) {
-            call.answer();
+            call.answer(call.getVideoState());
         }
     }
 
