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

Commit bc56b977 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "IMS: RTT interface changes"

am: 814fdf93

Change-Id: Ifecb02604cebdd5ae1a16d996940d11bee920ea8
parents d0be6092 814fdf93
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -345,4 +345,29 @@ public class ImsCallSessionImplBase extends IImsCallSession.Stub {
    public boolean isMultiparty() throws RemoteException {
        return false;
    }

    /**
     * Device issues RTT modify request
     * @param toProfile The profile with requested changes made
     */
    @Override
    public void sendRttModifyRequest(ImsCallProfile toProfile) {
    }

    /**
     * Device responds to Remote RTT modify request
     * @param status true  Accepted the request
     *                false  Declined the request
     */
    @Override
    public void sendRttModifyResponse(boolean status) {
    }

    /**
     * Device sends RTT message
     * @param rttMessage RTT message to be sent
     */
    @Override
    public void sendRttMessage(String rttMessage) {
    }
}
+30 −0
Original line number Diff line number Diff line
@@ -247,5 +247,35 @@ public class ImsCallSessionListenerImplBase extends IImsCallSessionListener.Stub
            ImsSuppServiceNotification suppSrvNotification) {
        // no-op
    }

    /**
     * Received RTT modify request from Remote Party
     * @param session The call session.
     * @param callProfile ImsCallProfile with updated attribute
     */
    @Override
    public void callSessionRttModifyRequestReceived(IImsCallSession session,
            ImsCallProfile callProfile) {
        // no-op
    }

    /**
     * Received response for RTT modify request
     * @param status true : Accepted the request
     *               false : Declined the request
     */
    @Override
    public void callSessionRttModifyResponseReceived(int status) {
        // no -op
    }

    /**
     * Device received RTT message from Remote UE
     * @param rttMessage RTT message received
     */
    @Override
    public void callSessionRttMessageReceived(String rttMessage) {
        // no-op
    }
}
+7 −1
Original line number Diff line number Diff line
@@ -475,9 +475,15 @@ public class ImsConfig {
         */
        public static final int VICE_SETTING_ENABLED = 65;

        /**
         * RTT status: Enabled (1), or Disabled (0).
         * Value is in Integer format.
         */
        public static final int RTT_SETTING_ENABLED = 66;

        // Expand the operator config items as needed here, need to change
        // PROVISIONED_CONFIG_END after that.
        public static final int PROVISIONED_CONFIG_END = VICE_SETTING_ENABLED;
        public static final int PROVISIONED_CONFIG_END = RTT_SETTING_ENABLED;

        // Expand the operator config items as needed here.
    }
+34 −3
Original line number Diff line number Diff line
@@ -72,14 +72,20 @@ public class ImsStreamMediaProfile implements Parcelable {
    public static final int VIDEO_QUALITY_VGA_LANDSCAPE = (1 << 3);
    public static final int VIDEO_QUALITY_VGA_PORTRAIT = (1 << 4);

    /**
     * RTT Modes
     */
    public static final int RTT_MODE_DISABLED = 0;
    public static final int RTT_MODE_FULL = 1;

    // Audio related information
    public int mAudioQuality;
    public int mAudioDirection;
    // Video related information
    public int mVideoQuality;
    public int mVideoDirection;


    // Rtt related information
    public int mRttMode;

    public ImsStreamMediaProfile(Parcel in) {
        readFromParcel(in);
@@ -90,6 +96,7 @@ public class ImsStreamMediaProfile implements Parcelable {
        mAudioDirection = DIRECTION_SEND_RECEIVE;
        mVideoQuality = VIDEO_QUALITY_NONE;
        mVideoDirection = DIRECTION_INVALID;
        mRttMode = RTT_MODE_DISABLED;
    }

    public ImsStreamMediaProfile(int audioQuality, int audioDirection,
@@ -100,11 +107,16 @@ public class ImsStreamMediaProfile implements Parcelable {
        mVideoDirection = videoDirection;
    }

    public ImsStreamMediaProfile(int rttMode) {
        mRttMode = rttMode;
    }

    public void copyFrom(ImsStreamMediaProfile profile) {
        mAudioQuality = profile.mAudioQuality;
        mAudioDirection = profile.mAudioDirection;
        mVideoQuality = profile.mVideoQuality;
        mVideoDirection = profile.mVideoDirection;
        mRttMode = profile.mRttMode;
    }

    @Override
@@ -112,7 +124,8 @@ public class ImsStreamMediaProfile implements Parcelable {
        return "{ audioQuality=" + mAudioQuality +
                ", audioDirection=" + mAudioDirection +
                ", videoQuality=" + mVideoQuality +
                ", videoDirection=" + mVideoDirection + " }";
                ", videoDirection=" + mVideoDirection +
                ", rttMode=" + mRttMode + " }";
    }

    @Override
@@ -126,6 +139,7 @@ public class ImsStreamMediaProfile implements Parcelable {
        out.writeInt(mAudioDirection);
        out.writeInt(mVideoQuality);
        out.writeInt(mVideoDirection);
        out.writeInt(mRttMode);
    }

    private void readFromParcel(Parcel in) {
@@ -133,6 +147,7 @@ public class ImsStreamMediaProfile implements Parcelable {
        mAudioDirection = in.readInt();
        mVideoQuality = in.readInt();
        mVideoDirection = in.readInt();
        mRttMode = in.readInt();
    }

    public static final Creator<ImsStreamMediaProfile> CREATOR =
@@ -147,4 +162,20 @@ public class ImsStreamMediaProfile implements Parcelable {
            return new ImsStreamMediaProfile[size];
        }
    };

    /**
     * Determines if it's RTT call
     * @return true if RTT call, false otherwise.
     */
    public boolean isRttCall() {
        return (mRttMode == RTT_MODE_FULL);
    }

    /**
     * Updates the RttCall attribute
     */
    public void setRttMode(int rttMode) {
        mRttMode = rttMode;
    }

}
+19 −0
Original line number Diff line number Diff line
@@ -255,4 +255,23 @@ interface IImsCallSession {
     * @return {@code True} if the session is multiparty.
     */
    boolean isMultiparty();

    /**
     * Device issues RTT modify request
     * @param toProfile The profile with requested changes made
     */
    void sendRttModifyRequest(in ImsCallProfile toProfile);

    /*
     * Device responds to Remote RTT modify request
     * @param status true : Accepted the request
     *                false : Declined the request
     */
    void sendRttModifyResponse(in boolean status);

    /*
     * Device sends RTT message
     * @param rttMessage RTT message to be sent
     */
    void sendRttMessage(in String rttMessage);
}
Loading