Lines Matching refs:call

38 import com.android.incallui.call.CallList;
39 import com.android.incallui.call.DialerCall;
40 import com.android.incallui.call.DialerCall.CameraDirection;
41 import com.android.incallui.call.InCallVideoCallCallbackNotifier;
42 import com.android.incallui.call.InCallVideoCallCallbackNotifier.SurfaceChangeListener;
43 import com.android.incallui.call.state.DialerCallState;
197 private static void updateCameraSelection(DialerCall call) { in updateCameraSelection() argument
198 LogUtil.v("VideoCallPresenter.updateCameraSelection", "call=" + call); in updateCameraSelection()
199 LogUtil.v("VideoCallPresenter.updateCameraSelection", "call=" + toSimpleString(call)); in updateCameraSelection()
206 if (call == null) { in updateCameraSelection()
214 else if (isAudioCall(call) && !isVideoUpgrade(call)) { in updateCameraSelection()
216 call.setCameraDir(cameraDir); in updateCameraSelection()
222 else if (isVideoCall(activeCall) && isIncomingVideoCall(call)) { in updateCameraSelection()
228 else if (isOutgoingVideoCall(call) && !isCameraDirectionSet(call)) { in updateCameraSelection()
229 cameraDir = toCameraDirection(call.getVideoState()); in updateCameraSelection()
230 call.setCameraDir(cameraDir); in updateCameraSelection()
235 else if (isOutgoingVideoCall(call)) { in updateCameraSelection()
236 cameraDir = call.getCameraDir(); in updateCameraSelection()
241 else if (isActiveVideoCall(call) && !isCameraDirectionSet(call)) { in updateCameraSelection()
242 cameraDir = toCameraDirection(call.getVideoState()); in updateCameraSelection()
243 call.setCameraDir(cameraDir); in updateCameraSelection()
248 else if (isActiveVideoCall(call)) { in updateCameraSelection()
249 cameraDir = call.getCameraDir(); in updateCameraSelection()
254 cameraDir = toCameraDirection(call.getVideoState()); in updateCameraSelection()
261 call); in updateCameraSelection()
275 private static boolean isCameraDirectionSet(DialerCall call) { in isCameraDirectionSet() argument
276 return isVideoCall(call) && call.getCameraDir() != CameraDirection.CAMERA_DIRECTION_UNKNOWN; in isCameraDirectionSet()
279 private static String toSimpleString(DialerCall call) { in toSimpleString() argument
280 return call == null ? null : call.toSimpleString(); in toSimpleString()
461 InCallPresenter.InCallState oldState, InCallPresenter.InCallState newState, DialerCall call) { in onIncomingCall() argument
565 private void checkForVideoStateChange(DialerCall call) { in checkForVideoStateChange() argument
566 final boolean shouldShowVideoUi = shouldShowVideoUiForCall(call); in checkForVideoStateChange()
567 final boolean hasVideoStateChanged = currentVideoState != call.getVideoState(); in checkForVideoStateChange()
577 VideoProfile.videoStateToString(call.getVideoState())); in checkForVideoStateChange()
582 updateCameraSelection(call); in checkForVideoStateChange()
585 adjustVideoMode(call); in checkForVideoStateChange()
591 private void checkForCallStateChange(DialerCall call) { in checkForCallStateChange() argument
592 final boolean shouldShowVideoUi = shouldShowVideoUiForCall(call); in checkForCallStateChange()
594 currentCallState != call.getState() || isRemotelyHeld != call.isRemotelyHeld(); in checkForCallStateChange()
595 isRemotelyHeld = call.isRemotelyHeld(); in checkForCallStateChange()
613 updateCameraSelection(call); in checkForCallStateChange()
616 if (!Objects.equals(prevCameraId, newCameraId) && isActiveVideoCall(call)) { in checkForCallStateChange()
617 enableCamera(call, true); in checkForCallStateChange()
623 call.getVideoState(), in checkForCallStateChange()
624 call.getState(), in checkForCallStateChange()
625 call.getVideoTech().getSessionModificationState(), in checkForCallStateChange()
626 call.isRemotelyHeld()); in checkForCallStateChange()
657 private void updateCallCache(DialerCall call) { in updateCallCache() argument
658 if (call == null) { in updateCallCache()
664 currentVideoState = call.getVideoState(); in updateCallCache()
665 videoCall = call.getVideoCall(); in updateCallCache()
666 currentCallState = call.getState(); in updateCallCache()
667 primaryCall = call; in updateCallCache()
679 public void onDetailsChanged(DialerCall call, android.telecom.Call.Details details) { in onDetailsChanged() argument
683 call, in onDetailsChanged()
686 if (call == null) { in onDetailsChanged()
690 if (!call.equals(primaryCall)) { in onDetailsChanged()
695 updateVideoCall(call); in onDetailsChanged()
697 updateCallCache(call); in onDetailsChanged()
700 private void updateVideoCall(DialerCall call) { in updateVideoCall() argument
701 checkForVideoCallChange(call); in updateVideoCall()
702 checkForVideoStateChange(call); in updateVideoCall()
703 checkForCallStateChange(call); in updateVideoCall()
704 checkForOrientationAllowedChange(call); in updateVideoCall()
706 call.getState(), call.getVideoTech().getSessionModificationState()); in updateVideoCall()
709 private void checkForOrientationAllowedChange(@Nullable DialerCall call) { in checkForOrientationAllowedChange() argument
712 if (call != null) { in checkForOrientationAllowedChange()
714 .setInCallAllowsOrientationChange(isVideoCall(call) || isVideoUpgrade(call)); in checkForOrientationAllowedChange()
733 private void checkForVideoCallChange(DialerCall call) { in checkForVideoCallChange() argument
734 final VideoCall videoCall = call.getVideoCall(); in checkForVideoCallChange()
741 changeVideoCall(call); in checkForVideoCallChange()
751 private void changeVideoCall(DialerCall call) { in changeVideoCall() argument
752 final VideoCall videoCall = call == null ? null : call.getVideoCall(); in changeVideoCall()
766 if (shouldShowVideoUiForCall(call) && hasChanged) { in changeVideoCall()
767 adjustVideoMode(call); in changeVideoCall()
783 private void adjustVideoMode(DialerCall call) { in adjustVideoMode() argument
784 VideoCall videoCall = call.getVideoCall(); in adjustVideoMode()
785 int newVideoState = call.getVideoState(); in adjustVideoMode()
799 call.getState(), in adjustVideoMode()
800 call.getVideoTech().getSessionModificationState(), in adjustVideoMode()
801 call.isRemotelyHeld()); in adjustVideoMode()
817 call, isCameraRequired(newVideoState, call.getVideoTech().getSessionModificationState())); in adjustVideoMode()
826 maybeAutoEnterFullscreen(call); in adjustVideoMode()
830 private static boolean shouldShowVideoUiForCall(@Nullable DialerCall call) { in shouldShowVideoUiForCall() argument
831 if (call == null) { in shouldShowVideoUiForCall()
835 if (isVideoCall(call)) { in shouldShowVideoUiForCall()
839 if (isVideoUpgrade(call)) { in shouldShowVideoUiForCall()
846 private void enableCamera(DialerCall call, boolean isCameraRequired) { in enableCamera() argument
847 LogUtil.v("VideoCallPresenter.enableCamera", "call: %s, enabling: %b", call, isCameraRequired); in enableCamera()
848 if (call == null) { in enableCamera()
855 call.getVideoTech().setCamera(null); in enableCamera()
860 call.getVideoTech().setCamera(cameraManager.getActiveCameraId()); in enableCamera()
864 call.getVideoTech().setCamera(null); in enableCamera()
923 public void onUpdatePeerDimensions(DialerCall call, int width, int height) { in onUpdatePeerDimensions() argument
929 if (!call.equals(primaryCall)) { in onUpdatePeerDimensions()
951 public void onCameraDimensionsChange(DialerCall call, int width, int height) { in onCameraDimensionsChange() argument
955 call, in onCameraDimensionsChange()
963 if (!call.equals(primaryCall)) { in onCameraDimensionsChange()
1038 protected void maybeExitFullscreen(DialerCall call) { in maybeExitFullscreen() argument
1039 if (call == null) { in maybeExitFullscreen()
1043 if (!isVideoCall(call) || call.getState() == DialerCallState.INCOMING) { in maybeExitFullscreen()
1056 protected void maybeAutoEnterFullscreen(DialerCall call) { in maybeAutoEnterFullscreen() argument
1061 if (call == null in maybeAutoEnterFullscreen()
1062 || call.getState() != DialerCallState.ACTIVE in maybeAutoEnterFullscreen()
1063 || !isBidirectionalVideoCall(call) in maybeAutoEnterFullscreen()
1130 private static boolean isVideoUpgrade(DialerCall call) { in isVideoUpgrade() argument
1131 return call != null in isVideoUpgrade()
1132 && (call.hasSentVideoUpgradeRequest() || call.hasReceivedVideoUpgradeRequest()); in isVideoUpgrade()
1141 public void onIncomingCall(DialerCall call) {} in onIncomingCall() argument
1144 public void onUpgradeToVideo(DialerCall call) {} in onUpgradeToVideo() argument
1147 public void onSessionModificationStateChange(DialerCall call) {} in onSessionModificationStateChange() argument
1153 public void onDisconnect(DialerCall call) {} in onDisconnect() argument
1156 public void onWiFiToLteHandover(DialerCall call) { in onWiFiToLteHandover() argument
1157 if (call.isVideoCall() || call.hasSentVideoUpgradeRequest()) { in onWiFiToLteHandover()
1163 public void onHandoverToWifiFailed(DialerCall call) {} in onHandoverToWifiFailed() argument
1166 public void onInternationalCallOnWifi(@NonNull DialerCall call) {} in onInternationalCallOnWifi() argument
1280 private static boolean isBidirectionalVideoCall(DialerCall call) { in isBidirectionalVideoCall() argument
1281 return VideoProfile.isBidirectional(call.getVideoState()); in isBidirectionalVideoCall()
1284 private static boolean isIncomingVideoCall(DialerCall call) { in isIncomingVideoCall() argument
1285 if (!isVideoCall(call)) { in isIncomingVideoCall()
1288 final int state = call.getState(); in isIncomingVideoCall()
1292 private static boolean isActiveVideoCall(DialerCall call) { in isActiveVideoCall() argument
1293 return isVideoCall(call) && call.getState() == DialerCallState.ACTIVE; in isActiveVideoCall()
1296 private static boolean isOutgoingVideoCall(DialerCall call) { in isOutgoingVideoCall() argument
1297 if (!isVideoCall(call)) { in isOutgoingVideoCall()
1300 final int state = call.getState(); in isOutgoingVideoCall()
1306 private static boolean isAudioCall(DialerCall call) { in isAudioCall() argument
1307 return call != null && VideoProfile.isAudioOnly(call.getVideoState()); in isAudioCall()
1310 private static boolean isVideoCall(@Nullable DialerCall call) { in isVideoCall() argument
1311 return call != null && call.isVideoCall(); in isVideoCall()