use of android.telecom.VideoProfile in project android_packages_apps_Dialer by LineageOS.
the class ImsVideoTech method resumeTransmission.
@Override
public void resumeTransmission() {
LogUtil.enterBlock("ImsVideoTech.resumeTransmission");
transmissionStopped = false;
int unpausedVideoState = getUnpausedVideoState(call.getDetails().getVideoState());
call.getVideoCall().sendSessionModifyRequest(new VideoProfile(unpausedVideoState | VideoProfile.STATE_TX_ENABLED));
setSessionModificationState(SessionModificationState.WAITING_FOR_RESPONSE);
}
use of android.telecom.VideoProfile in project android_packages_apps_Dialer by LineageOS.
the class ImsVideoTech method acceptVideoRequest.
@Override
public void acceptVideoRequest() {
int requestedVideoState = callback.getRequestedVideoState();
Assert.checkArgument(requestedVideoState != VideoProfile.STATE_AUDIO_ONLY);
LogUtil.i("ImsVideoTech.acceptUpgradeRequest", "videoState: " + requestedVideoState);
call.getVideoCall().sendSessionModifyResponse(new VideoProfile(requestedVideoState));
setSessionModificationState(SessionModificationState.NO_REQUEST);
// Telecom manages audio route for us
listener.onUpgradedToVideo(false);
logger.logImpression(DialerImpression.Type.IMS_VIDEO_REQUEST_ACCEPTED);
}
use of android.telecom.VideoProfile in project android_packages_apps_Dialer by LineageOS.
the class ImsVideoTech method upgradeToVideo.
@Override
public void upgradeToVideo() {
LogUtil.enterBlock("ImsVideoTech.upgradeToVideo");
int unpausedVideoState = getUnpausedVideoState(call.getDetails().getVideoState());
call.getVideoCall().sendSessionModifyRequest(new VideoProfile(unpausedVideoState | VideoProfile.STATE_BIDIRECTIONAL));
setSessionModificationState(SessionModificationState.WAITING_FOR_UPGRADE_TO_VIDEO_RESPONSE);
logger.logImpression(DialerImpression.Type.IMS_VIDEO_UPGRADE_REQUESTED);
}
use of android.telecom.VideoProfile in project android_packages_apps_Dialer by MoKee.
the class ImsVideoTech method unpause.
@Override
public void unpause() {
if (call.getState() != Call.STATE_ACTIVE) {
LogUtil.i("ImsVideoTech.unpause", "not unpausing because call is not active");
return;
}
if (!isTransmittingOrReceiving()) {
LogUtil.i("ImsVideoTech.unpause", "not unpausing because this is not a video call");
return;
}
if (!paused) {
LogUtil.i("ImsVideoTech.unpause", "already unpaused");
return;
}
paused = false;
if (canPause()) {
LogUtil.i("ImsVideoTech.unpause", "sending unpause request");
int unpausedVideoState = getUnpausedVideoState(call.getDetails().getVideoState());
if (transmissionStopped && VideoProfile.isTransmissionEnabled(unpausedVideoState)) {
LogUtil.i("ImsVideoTech.unpause", "overriding TX to false due to user request");
unpausedVideoState &= ~VideoProfile.STATE_TX_ENABLED;
}
call.getVideoCall().sendSessionModifyRequest(new VideoProfile(unpausedVideoState));
} else {
// This video call does not support pause so we fall back to re-enabling the camera
LogUtil.i("ImsVideoTech.pause", "re-enabling camera");
setCamera(savedCameraId);
}
}
use of android.telecom.VideoProfile in project android_packages_apps_Dialer by MoKee.
the class ImsVideoTech method stopTransmission.
@Override
public void stopTransmission() {
LogUtil.enterBlock("ImsVideoTech.stopTransmission");
transmissionStopped = true;
int unpausedVideoState = getUnpausedVideoState(call.getDetails().getVideoState());
call.getVideoCall().sendSessionModifyRequest(new VideoProfile(unpausedVideoState & ~VideoProfile.STATE_TX_ENABLED));
}
Aggregations