From 71c2d74d4cf00b5e2fe72f1d8c318da5894f133f Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 22 Jul 2014 18:20:51 -0700 Subject: Use VideoCall instead of RemoteCallVideoProvider in InCallUi. Bug: 16494880 Bug: 16495203 Change-Id: I61d981d835a5a4b452c20c736af1eabd64da198c --- InCallUI/src/com/android/incallui/Call.java | 22 ++-- .../com/android/incallui/CallButtonPresenter.java | 36 +++--- .../android/incallui/InCallVideoCallListener.java | 140 +++++++++++++++++++++ .../com/android/incallui/InCallVideoClient.java | 140 --------------------- .../com/android/incallui/VideoCallPresenter.java | 59 +++++---- 5 files changed, 197 insertions(+), 200 deletions(-) create mode 100644 InCallUI/src/com/android/incallui/InCallVideoCallListener.java delete mode 100644 InCallUI/src/com/android/incallui/InCallVideoClient.java diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java index 3887eca5b..a11703a49 100644 --- a/InCallUI/src/com/android/incallui/Call.java +++ b/InCallUI/src/com/android/incallui/Call.java @@ -18,9 +18,9 @@ package com.android.incallui; import android.net.Uri; import android.telecomm.CallCapabilities; -import android.telecomm.PhoneAccountHandle; -import android.telecomm.RemoteCallVideoProvider; import android.telecomm.GatewayInfo; +import android.telecomm.InCallService.VideoCall; +import android.telecomm.PhoneAccountHandle; import android.telecomm.VideoCallProfile; import android.telephony.DisconnectCause; @@ -145,8 +145,8 @@ public final class Call { } @Override - public void onCallVideoProviderChanged(android.telecomm.Call call, - RemoteCallVideoProvider callVideoProvider) { + public void onVideoCallChanged(android.telecomm.Call call, + VideoCall videoCall) { update(); } @@ -163,7 +163,7 @@ public final class Call { private String mParentCallId; private final List mChildCallIds = new ArrayList<>(); - private InCallVideoClient mCallVideoClient; + private InCallVideoCallListener mVideoCallListener; public Call(android.telecomm.Call telecommCall) { mTelecommCall = telecommCall; @@ -200,11 +200,11 @@ public final class Call { mTelecommCall.getParent()).getId(); } - if (mTelecommCall.getCallVideoProvider() != null) { - if (mCallVideoClient == null) { - mCallVideoClient = new InCallVideoClient(this); + if (mTelecommCall.getVideoCall() != null) { + if (mVideoCallListener == null) { + mVideoCallListener = new InCallVideoCallListener(this); } - mTelecommCall.getCallVideoProvider().setCallVideoClient(mCallVideoClient); + mTelecommCall.getVideoCall().setVideoCallListener(mVideoCallListener); } mChildCallIds.clear(); @@ -315,8 +315,8 @@ public final class Call { return mTelecommCall.getDetails().getAccountHandle(); } - public RemoteCallVideoProvider getCallVideoProvider() { - return mTelecommCall.getCallVideoProvider(); + public VideoCall getVideoCall() { + return mTelecommCall.getVideoCall(); } public List getChildCallIds() { diff --git a/InCallUI/src/com/android/incallui/CallButtonPresenter.java b/InCallUI/src/com/android/incallui/CallButtonPresenter.java index 622a74f39..c0e8cd555 100644 --- a/InCallUI/src/com/android/incallui/CallButtonPresenter.java +++ b/InCallUI/src/com/android/incallui/CallButtonPresenter.java @@ -21,7 +21,7 @@ import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraCharacteristics; import android.hardware.camera2.CameraManager; import android.telecomm.CallCapabilities; -import android.telecomm.RemoteCallVideoProvider; +import android.telecomm.InCallService.VideoCall; import android.telecomm.VideoCallProfile; import com.android.contacts.common.util.PhoneNumberHelper; @@ -213,14 +213,14 @@ public class CallButtonPresenter extends Presenter