Revert "Adding "start call with video" extra for ACTION_CALL intent."

This reverts commit ba2ef678370bc8e5407a0a15f0baf50b3d6391a6.

Change-Id: I5884ca395288ba68b46e7316e2f9920d9fe81daf
diff --git a/src/com/android/telecomm/Call.java b/src/com/android/telecomm/Call.java
index 2810dc8..3d4771b 100644
--- a/src/com/android/telecomm/Call.java
+++ b/src/com/android/telecomm/Call.java
@@ -55,6 +55,7 @@
  *  connected etc).
  */
 final class Call implements OutgoingCallResponse {
+
     /**
      * Listener for events on the call.
      */
@@ -173,8 +174,6 @@
 
     private boolean mSpeakerphoneOn;
 
-    private int mVideoState;
-
     /**
      * Disconnect cause for the call. Only valid if the state of the call is DISCONNECTED.
      * See {@link android.telephony.DisconnectCause}.
@@ -1032,30 +1031,4 @@
             l.onFeaturesChanged(Call.this);
         }
     }
-
-    /**
-     * The current video state for the call.
-     * Valid values: {@link android.telecomm.VideoCallProfile#VIDEO_STATE_AUDIO_ONLY},
-     * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_BIDIRECTIONAL},
-     * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_TX_ENABLED},
-     * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_RX_ENABLED}.
-     *
-     * @return True if video is enabled.
-     */
-    public int getVideoState() {
-        return mVideoState;
-    }
-
-    /**
-     * At the start of the call, determines the desired video state for the call.
-     * Valid values: {@link android.telecomm.VideoCallProfile#VIDEO_STATE_AUDIO_ONLY},
-     * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_BIDIRECTIONAL},
-     * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_TX_ENABLED},
-     * {@link android.telecomm.VideoCallProfile#VIDEO_STATE_RX_ENABLED}.
-     *
-     * @param videoState The desired video state for the call.
-     */
-    public void setVideoState(int videoState) {
-        mVideoState = videoState;
-    }
 }
diff --git a/src/com/android/telecomm/CallsManager.java b/src/com/android/telecomm/CallsManager.java
index 3884adb..f78fb7c 100644
--- a/src/com/android/telecomm/CallsManager.java
+++ b/src/com/android/telecomm/CallsManager.java
@@ -29,6 +29,9 @@
 import com.google.common.collect.ImmutableCollection;
 import com.google.common.collect.ImmutableList;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.Set;
@@ -283,11 +286,9 @@
      * @param gatewayInfo Optional gateway information that can be used to route the call to the
      *         actual dialed handle via a gateway provider. May be null.
      * @param speakerphoneOn Whether or not to turn the speakerphone on once the call connects.
-     * @param videoState The desired video state for the outgoing call.
      */
     void placeOutgoingCall(Uri handle, ContactInfo contactInfo, GatewayInfo gatewayInfo,
-            PhoneAccount account, boolean speakerphoneOn, int videoState) {
-
+            PhoneAccount account, boolean speakerphoneOn) {
         final Uri uriHandle = (gatewayInfo == null) ? handle : gatewayInfo.getGatewayHandle();
 
         if (gatewayInfo == null) {
@@ -301,7 +302,6 @@
                 uriHandle, gatewayInfo, account,
                 false /* isIncoming */, false /* isConference */);
         call.setStartWithSpeakerphoneOn(speakerphoneOn);
-        call.setVideoState(videoState);
 
         // TODO(santoscordon): Move this to be a part of addCall()
         call.addListener(this);
diff --git a/src/com/android/telecomm/ConnectionServiceWrapper.java b/src/com/android/telecomm/ConnectionServiceWrapper.java
index f53eeb3..00eb6d5 100644
--- a/src/com/android/telecomm/ConnectionServiceWrapper.java
+++ b/src/com/android/telecomm/ConnectionServiceWrapper.java
@@ -538,8 +538,7 @@
                             NewOutgoingCallIntentBroadcaster.EXTRA_GATEWAY_ORIGINAL_URI,
                             gatewayInfo.getOriginalHandle());
                 }
-                ConnectionRequest request = new ConnectionRequest(callId, call.getHandle(), extras,
-                        call.getVideoState());
+                ConnectionRequest request = new ConnectionRequest(callId, call.getHandle(), extras);
 
                 try {
                     mServiceInterface.call(request);
@@ -632,7 +631,7 @@
                     String callId = mCallIdMapper.getCallId(call);
                     logOutgoing("createIncomingCall %s %s", callId, extras);
                     ConnectionRequest request = new ConnectionRequest(
-                            callId, call.getHandle(), extras, call.getVideoState());
+                            callId, call.getHandle(), extras);
                     try {
                         mServiceInterface.createIncomingCall(request);
                     } catch (RemoteException e) {
diff --git a/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java b/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java
index c75e184..770b75d 100644
--- a/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java
+++ b/src/com/android/telecomm/NewOutgoingCallIntentBroadcaster.java
@@ -26,7 +26,6 @@
 import android.telecomm.GatewayInfo;
 import android.telecomm.PhoneAccount;
 import android.telecomm.TelecommConstants;
-import android.telecomm.VideoCallProfile;
 import android.telephony.PhoneNumberUtils;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
@@ -124,9 +123,7 @@
             mCallsManager.placeOutgoingCall(resultHandleUri, mContactInfo, gatewayInfo,
                     account,
                     mIntent.getBooleanExtra(TelecommConstants.EXTRA_START_CALL_WITH_SPEAKERPHONE,
-                            false),
-                    mIntent.getIntExtra(TelecommConstants.EXTRA_START_CALL_WITH_VIDEO_STATE,
-                            VideoCallProfile.VIDEO_STATE_AUDIO_ONLY));
+                            false));
         }
     }
 
@@ -195,9 +192,7 @@
             mCallsManager.placeOutgoingCall(
                     Uri.fromParts(scheme, handle, null), mContactInfo, null, null,
                     mIntent.getBooleanExtra(TelecommConstants.EXTRA_START_CALL_WITH_SPEAKERPHONE,
-                            false),
-                    mIntent.getIntExtra(TelecommConstants.EXTRA_START_CALL_WITH_VIDEO_STATE,
-                            VideoCallProfile.VIDEO_STATE_AUDIO_ONLY));
+                            false));
 
             // Don't return but instead continue and send the ACTION_NEW_OUTGOING_CALL broadcast
             // so that third parties can still inspect (but not intercept) the outgoing call. When
diff --git a/tests/src/com/android/telecomm/testapps/TestConnectionService.java b/tests/src/com/android/telecomm/testapps/TestConnectionService.java
index e655d87..34aa22b 100644
--- a/tests/src/com/android/telecomm/testapps/TestConnectionService.java
+++ b/tests/src/com/android/telecomm/testapps/TestConnectionService.java
@@ -241,8 +241,7 @@
                         mAccountIterator.next(),
                         mOriginalRequest.getCallId(),
                         mOriginalRequest.getHandle(),
-                        null,
-                        mOriginalRequest.getVideoState());
+                        null);
                 createRemoteOutgoingConnection(connectionRequest, this);
             } else {
                 mCallback.onFailure(mOriginalRequest, 0, null);
@@ -325,7 +324,7 @@
         final ConnectionRequest request = new ConnectionRequest(
                 originalRequest.getCallId(),
                 Uri.fromParts(handle.getScheme(), handle.getSchemeSpecificPart() + "..", ""),
-                originalRequest.getExtras(), originalRequest.getVideoState());
+                originalRequest.getExtras());
 
         // If the number starts with 555, then we handle it ourselves. If not, then we
         // use a remote connection service.