diff options
author | Andrew Lee <anwlee@google.com> | 2014-07-22 18:20:51 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-07-25 08:59:18 -0700 |
commit | 71c2d74d4cf00b5e2fe72f1d8c318da5894f133f (patch) | |
tree | a9dbfdc03f63f5d97d27431640010f1d35040113 /InCallUI/src/com/android/incallui/CallButtonPresenter.java | |
parent | 6e1588189961c4aab0f036dd781ca0f218cbbe28 (diff) |
Use VideoCall instead of RemoteCallVideoProvider in InCallUi.
Bug: 16494880
Bug: 16495203
Change-Id: I61d981d835a5a4b452c20c736af1eabd64da198c
Diffstat (limited to 'InCallUI/src/com/android/incallui/CallButtonPresenter.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/CallButtonPresenter.java | 36 |
1 files changed, 18 insertions, 18 deletions
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<CallButtonPresenter.CallButto } public void changeToVoiceClicked() { - RemoteCallVideoProvider callVideoProvider = mCall.getCallVideoProvider(); - if (callVideoProvider == null) { + VideoCall videoCall = mCall.getVideoCall(); + if (videoCall == null) { return; } VideoCallProfile videoCallProfile = new VideoCallProfile( VideoCallProfile.VIDEO_STATE_AUDIO_ONLY, VideoCallProfile.QUALITY_DEFAULT); - callVideoProvider.sendSessionModifyRequest(videoCallProfile); + videoCall.sendSessionModifyRequest(videoCallProfile); } public void swapClicked() { @@ -234,14 +234,14 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto } public void changeToVideoClicked() { - RemoteCallVideoProvider callVideoProvider = mCall.getCallVideoProvider(); - if (callVideoProvider == null) { + VideoCall videoCall = mCall.getVideoCall(); + if (videoCall == null) { return; } VideoCallProfile videoCallProfile = new VideoCallProfile(VideoCallProfile.VIDEO_STATE_BIDIRECTIONAL); - callVideoProvider.sendSessionModifyRequest(videoCallProfile); + videoCall.sendSessionModifyRequest(videoCallProfile); } /** @@ -252,14 +252,14 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto public void switchCameraClicked(boolean useFrontFacingCamera) { mUseFrontFacingCamera = useFrontFacingCamera; - RemoteCallVideoProvider callVideoProvider = mCall.getCallVideoProvider(); - if (callVideoProvider == null) { + VideoCall videoCall = mCall.getVideoCall(); + if (videoCall == null) { return; } String cameraId = getCameraId(); if (cameraId != null) { - callVideoProvider.setCamera(cameraId); + videoCall.setCamera(cameraId); } getUi().setSwitchCameraButton(!useFrontFacingCamera); } @@ -270,21 +270,21 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto * video. */ public void pauseVideoClicked(boolean pause) { - RemoteCallVideoProvider callVideoProvider = mCall.getCallVideoProvider(); - if (callVideoProvider == null) { + VideoCall videoCall = mCall.getVideoCall(); + if (videoCall == null) { return; } if (pause) { - callVideoProvider.setCamera(null); + videoCall.setCamera(null); VideoCallProfile videoCallProfile = new VideoCallProfile( mCall.getVideoState() | VideoCallProfile.VIDEO_STATE_PAUSED); - callVideoProvider.sendSessionModifyRequest(videoCallProfile); + videoCall.sendSessionModifyRequest(videoCallProfile); } else { - callVideoProvider.setCamera(getCameraId()); + videoCall.setCamera(getCameraId()); VideoCallProfile videoCallProfile = new VideoCallProfile( mCall.getVideoState() & ~VideoCallProfile.VIDEO_STATE_PAUSED); - callVideoProvider.sendSessionModifyRequest(videoCallProfile); + videoCall.sendSessionModifyRequest(videoCallProfile); } getUi().setPauseVideoButton(pause); } @@ -306,7 +306,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto } if (call.isVideoCall()) { - updateVideoCallButtons(call); + updateVideoCallButtons(); } else { updateVoiceCallButtons(call); } @@ -326,7 +326,7 @@ public class CallButtonPresenter extends Presenter<CallButtonPresenter.CallButto updateExtraButtonRow(); } - private void updateVideoCallButtons(Call call) { + private void updateVideoCallButtons() { Log.v(this, "Showing buttons for video call."); final CallButtonUi ui = getUi(); |