Update AOSP Dialer source from internal google3 repository at
cl/151128062

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/150756069 (3/21/2017) to cl/151128062 (3/24/2017).

Notable this release:
- Explicitly enumerate host and target dependencies.
- Update proguard flag references.

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.

Bug: 33210202 36511925

Addresses
33210202 - Proguard support
36511925 - Compiler warnings when building against platform sdk

Change-Id: I448ec3b3f2358886859cf7a4ef76a8fcef3244ae
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index 15a0233..4f5a8b7 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -56,7 +56,7 @@
 import com.android.incallui.videotech.VideoTech.VideoTechListener;
 import com.android.incallui.videotech.empty.EmptyVideoTech;
 import com.android.incallui.videotech.ims.ImsVideoTech;
-import com.android.incallui.videotech.rcs.RcsVideoShare;
+import com.android.incallui.videotech.utils.VideoUtils;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
@@ -1253,21 +1253,26 @@
 
   private static class VideoTechManager {
     private final EmptyVideoTech emptyVideoTech = new EmptyVideoTech();
-    private final VideoTech[] videoTechs;
+    private final List<VideoTech> videoTechs;
     private VideoTech savedTech;
 
     VideoTechManager(DialerCall call) {
       String phoneNumber = call.getNumber();
 
       // Insert order here determines the priority of that video tech option
-      videoTechs =
-          new VideoTech[] {
-            new ImsVideoTech(call, call.mTelecomCall),
-            new RcsVideoShare(
-                EnrichedCallComponent.get(call.mContext).getEnrichedCallManager(),
-                call,
-                phoneNumber != null ? phoneNumber : "")
-          };
+      this.videoTechs = new ArrayList<>();
+      videoTechs.add(new ImsVideoTech(call, call.mTelecomCall));
+
+      VideoTech rcsVideoTech =
+          EnrichedCallComponent.get(call.mContext)
+              .getRcsVideoShareFactory()
+              .newRcsVideoShare(
+                  EnrichedCallComponent.get(call.mContext).getEnrichedCallManager(),
+                  call,
+                  phoneNumber != null ? phoneNumber : "");
+      if (rcsVideoTech != null) {
+        videoTechs.add(rcsVideoTech);
+      }
     }
 
     VideoTech getVideoTech() {