Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6431276d authored by Tyler Gunn's avatar Tyler Gunn Committed by android-build-merger
Browse files

Merge "Adding some new multi-endpoint stuff." into nyc-dev

am: a6f12cf3

* commit 'a6f12cf3':
  Adding some new multi-endpoint stuff.

Change-Id: Ia53b795e65a86b58d081fc0222b580fcdd6da9d8
parents c6eca1da a6f12cf3
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -336,12 +336,27 @@ public class ImsCallProfile implements Parcelable {
     * Converts from the call types defined in {@link com.android.ims.ImsCallProfile} to the
     * video state values defined in {@link VideoProfile}.
     *
     * @param callType The call type.
     * @param callProfile The call profile.
     * @return The video state.
     */
    public static int getVideoStateFromImsCallProfile(ImsCallProfile callProfile) {
        int videostate = getVideoStateFromCallType(callProfile.mCallType);
        if (callProfile.isVideoPaused() && !VideoProfile.isAudioOnly(videostate)) {
            videostate |= VideoProfile.STATE_PAUSED;
        } else {
            videostate &= ~VideoProfile.STATE_PAUSED;
        }
        return videostate;
    }

    /**
     * Translates a {@link ImsCallProfile} {@code CALL_TYPE_*} constant into a video state.
     * @param callType The call type.
     * @return The video state.
     */
    public static int getVideoStateFromCallType(int callType) {
        int videostate = VideoProfile.STATE_AUDIO_ONLY;
        switch (callProfile.mCallType) {
        switch (callType) {
            case CALL_TYPE_VT_TX:
                videostate = VideoProfile.STATE_TX_ENABLED;
                break;
@@ -358,11 +373,6 @@ public class ImsCallProfile implements Parcelable {
                videostate = VideoProfile.STATE_AUDIO_ONLY;
                break;
        }
        if (callProfile.isVideoPaused() && !VideoProfile.isAudioOnly(videostate)) {
            videostate |= VideoProfile.STATE_PAUSED;
        } else {
            videostate &= ~VideoProfile.STATE_PAUSED;
        }
        return videostate;
    }

+5 −0
Original line number Diff line number Diff line
@@ -216,6 +216,11 @@ public class ImsReasonInfo implements Parcelable {
     */
    public static final int CODE_ECBM_NOT_SUPPORTED = 901;

    /**
     * Fail code used to indicate that Multi-endpoint is not supported by the Ims framework.
     */
    public static final int CODE_MULTIENDPOINT_NOT_SUPPORTED = 902;

    /**
     * Ims Registration error code
     */