Update AOSP Dialer source from internal google3 repository at
cl/152373142.

Test: make, treehugger

This CL updates the AOSP Dialer source with all the changes that have
gone into the private google3 repository. This includes all the
changes from cl/151342913 (3/27/2017) to cl/152373142 (4/06/2017).

This goal of these drops is to keep the AOSP source in sync with the
internal google3 repository. Currently these sync are done by hand
with very minor modifications to the internal source code.
See the Android.mk file for list of modifications.
Our current goal is to do frequent drops (daily if possible) and
eventually switched to an automated process.

Change-Id: I2fbc88cf6867b90ac8b65f75e5e34468988c7217
diff --git a/java/com/android/incallui/VideoCallPresenter.java b/java/com/android/incallui/VideoCallPresenter.java
index 5d2138e..31999ef 100644
--- a/java/com/android/incallui/VideoCallPresenter.java
+++ b/java/com/android/incallui/VideoCallPresenter.java
@@ -154,8 +154,8 @@
 
   /**
    * Determines if the incoming video surface should be shown based on the current videoState and
-   * callState. The video surface is shown when incoming video is not paused, the call is active,
-   * and video reception is enabled.
+   * callState. The video surface is shown when incoming video is not paused, the call is active or
+   * dialing and video reception is enabled.
    *
    * @param videoState The current video state.
    * @param callState The current call state.
@@ -168,8 +168,13 @@
 
     boolean isPaused = VideoProfile.isPaused(videoState);
     boolean isCallActive = callState == DialerCall.State.ACTIVE;
+    //Show incoming Video for dialing calls to support early media
+    boolean isCallOutgoingPending =
+        DialerCall.State.isDialing(callState) || callState == DialerCall.State.CONNECTING;
 
-    return !isPaused && isCallActive && VideoProfile.isReceptionEnabled(videoState);
+    return !isPaused
+        && (isCallActive || isCallOutgoingPending)
+        && VideoProfile.isReceptionEnabled(videoState);
   }
 
   /**