• Home
  • Raw
  • Download

Lines Matching refs:call

42 import com.android.incallui.call.CallList;
43 import com.android.incallui.call.DialerCall;
44 import com.android.incallui.call.DialerCall.CameraDirection;
45 import com.android.incallui.call.DialerCallListener;
46 import com.android.incallui.call.TelecomAdapter;
47 import com.android.incallui.call.state.DialerCallState;
67 private DialerCall call; field in CallButtonPresenter
106 if (call != null) { in onInCallButtonUiUnready()
107 call.removeListener(this); in onInCallButtonUiUnready()
114 if (call != null) { in onStateChange()
115 call.removeListener(this); in onStateChange()
118 call = callList.getOutgoingCall(); in onStateChange()
120 call = callList.getActiveOrBackgroundCall(); in onStateChange()
126 if (oldState == InCallState.OUTGOING && call != null) { in onStateChange()
127 if (call.isVoiceMailNumber() && getActivity() != null) { in onStateChange()
135 call = callList.getIncomingCall(); in onStateChange()
137 call = null; in onStateChange()
140 if (call != null) { in onStateChange()
141 call.addListener(this); in onStateChange()
143 updateUi(newState, call); in onStateChange()
156 public void onDetailsChanged(DialerCall call, android.telecom.Call.Details details) { in onDetailsChanged() argument
158 if (inCallButtonUi != null && call != null && call.equals(this.call)) { in onDetailsChanged()
159 updateButtonsState(call); in onDetailsChanged()
164 public void onIncomingCall(InCallState oldState, InCallState newState, DialerCall call) { in onIncomingCall() argument
170 if (inCallButtonUi != null && call != null) { in onCanAddCallChanged()
171 updateButtonsState(call); in onCanAddCallChanged()
211 if (call != null) { in toggleSpeakerphone()
215 call.getUniqueCallId(), in toggleSpeakerphone()
216 call.getTimeAddedMs()); in toggleSpeakerphone()
220 if (call != null) { in toggleSpeakerphone()
224 call.getUniqueCallId(), in toggleSpeakerphone()
225 call.getTimeAddedMs()); in toggleSpeakerphone()
242 call.getUniqueCallId(), in muteClicked()
243 call.getTimeAddedMs()); in muteClicked()
250 if (call == null) { in holdClicked()
254 LogUtil.i("CallButtonPresenter", "putting the call on hold: " + call); in holdClicked()
255 call.hold(); in holdClicked()
257 LogUtil.i("CallButtonPresenter", "removing the call from hold: " + call); in holdClicked()
258 call.unhold(); in holdClicked()
264 if (call == null) { in swapClicked()
268 LogUtil.i("CallButtonPresenter", "swapping the call: " + call); in swapClicked()
269 TelecomAdapter.getInstance().swap(call.getId()); in swapClicked()
277 call.getUniqueCallId(), in mergeClicked()
278 call.getTimeAddedMs()); in mergeClicked()
279 TelecomAdapter.getInstance().merge(call.getId()); in mergeClicked()
287 call.getUniqueCallId(), in addCallClicked()
288 call.getTimeAddedMs()); in addCallClicked()
297 call.getUniqueCallId(), in showDialpadClicked()
298 call.getTimeAddedMs()); in showDialpadClicked()
309 call.getUniqueCallId(), in changeToVideoClicked()
310 call.getTimeAddedMs()); in changeToVideoClicked()
311 call.getVideoTech().upgradeToVideo(context); in changeToVideoClicked()
317 call.sendRttUpgradeRequest(); in changeToRttClicked()
322 LogUtil.i("CallButtonPresenter.onEndCallClicked", "call: " + call); in onEndCallClicked()
323 if (call != null) { in onEndCallClicked()
324 call.disconnect(); in onEndCallClicked()
340 call, in swapSimClicked()
365 if (call == null) { in toggleCameraClicked()
371 call.getUniqueCallId(), in toggleCameraClicked()
372 call.getTimeAddedMs()); in toggleCameraClicked()
392 call.getUniqueCallId(), in pauseVideoClicked()
393 call.getTimeAddedMs()); in pauseVideoClicked()
396 call.getVideoTech().stopTransmission(); in pauseVideoClicked()
400 call.getVideoTech().resumeTransmission(context); in pauseVideoClicked()
417 call.setCameraDir(cameraDir); in updateCamera()
418 call.getVideoTech().setCamera(cameraId); in updateCamera()
422 private void updateUi(InCallState state, DialerCall call) { in updateUi() argument
423 LogUtil.v("CallButtonPresenter", "updating call UI for call: %s", call); in updateUi()
429 if (call != null) { in updateUi()
435 state.isConnectingOrConnected() && !state.isIncoming() && call != null; in updateUi()
438 if (call == null) { in updateUi()
442 updateButtonsState(call); in updateUi()
451 private void updateButtonsState(DialerCall call) { in updateButtonsState() argument
453 final boolean isVideo = call.isVideoCall(); in updateButtonsState()
459 final boolean showSwap = call.can(android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE); in updateButtonsState()
462 && call.can(android.telecom.Call.Details.CAPABILITY_SUPPORT_HOLD) in updateButtonsState()
463 && call.can(android.telecom.Call.Details.CAPABILITY_HOLD); in updateButtonsState()
464 final boolean isCallOnHold = call.getState() == DialerCallState.ONHOLD; in updateButtonsState()
476 && call.can(android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE); in updateButtonsState()
477 final boolean showUpgradeToVideo = !isVideo && (hasVideoCallCapabilities(call)); in updateButtonsState()
478 final boolean showDowngradeToAudio = isVideo && isDowngradeToAudioSupported(call); in updateButtonsState()
479 final boolean showMute = call.can(android.telecom.Call.Details.CAPABILITY_MUTE); in updateButtonsState()
486 && call.getState() != DialerCallState.DIALING in updateButtonsState()
487 && call.getState() != DialerCallState.CONNECTING; in updateButtonsState()
489 otherAccount = TelecomUtil.getOtherAccount(getContext(), call.getAccountHandle()); in updateButtonsState()
491 !call.isEmergencyCall() in updateButtonsState()
493 && !call.isVoiceMailNumber() in updateButtonsState()
494 && DialerCallState.isDialing(call.getState()) in updateButtonsState()
498 boolean showUpgradeToRtt = call.canUpgradeToRttCall(); in updateButtonsState()
499 boolean enableUpgradeToRtt = showUpgradeToRtt && call.getState() == DialerCallState.ACTIVE; in updateButtonsState()
515 isVideo && hasCameraPermission && call.getVideoTech().isTransmitting()); in updateButtonsState()
518 inCallButtonUi.setVideoPaused(!call.getVideoTech().isTransmitting() || !hasCameraPermission); in updateButtonsState()
526 private boolean hasVideoCallCapabilities(DialerCall call) { in hasVideoCallCapabilities() argument
527 return call.getVideoTech().isAvailable(context, call.getAccountHandle()); in hasVideoCallCapabilities()
538 private boolean isDowngradeToAudioSupported(DialerCall call) { in isDowngradeToAudioSupported() argument
540 return !call.can(CallCompat.Details.CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO); in isDowngradeToAudioSupported()
551 if (call != null) { in onCameraPermissionGranted()
552 updateButtonsState(call); in onCameraPermissionGranted()
566 if (inCallButtonUi != null && call != null) { in onDialerCallSessionModificationStateChange()
568 updateButtonsState(call); in onDialerCallSessionModificationStateChange()