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

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

Set RTT flag while logging call

am: 3a75c622

Change-Id: I1e1c426bdfdff5e6da5d959d9bbb196591fb977e
parents 47bc46e9 3a75c622
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -477,6 +477,10 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable {
     * Integer constant from {@link android.telecom.Call.RttCall}. Describes the current RTT mode.
     */
    private int mRttMode;
    /**
     * True if the call was ever an RTT call.
     */
    private boolean mWasEverRtt = false;

    /**
     * Integer indicating the remote RTT request ID that is pending a response from the user.
@@ -2383,6 +2387,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable {
                && mConnectionServiceToInCallStreams != null;
        if (shouldBeRtt && !areStreamsInitialized) {
            try {
                mWasEverRtt = true;
                mInCallToConnectionServiceStreams = ParcelFileDescriptor.createReliablePipe();
                mConnectionServiceToInCallStreams = ParcelFileDescriptor.createReliablePipe();
            } catch (IOException e) {
@@ -2442,6 +2447,10 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable {
        return (mConnectionProperties & Connection.PROPERTY_IS_RTT) == Connection.PROPERTY_IS_RTT;
    }

    public boolean wasEverRttCall() {
        return mWasEverRtt;
    }

    public ParcelFileDescriptor getCsToInCallRttPipeForCs() {
        return mConnectionServiceToInCallStreams == null ? null
                : mConnectionServiceToInCallStreams[RTT_PIPE_WRITE_SIDE_INDEX];
+6 −2
Original line number Diff line number Diff line
@@ -230,7 +230,8 @@ public final class CallLogManager extends CallsManagerListenerBase {
                call.getDisconnectCause().getCode() == DisconnectCause.CALL_PULLED,
                shouldSaveHdInfo(call, accountHandle),
                (call.getConnectionProperties() & Connection.PROPERTY_ASSISTED_DIALING_USED) ==
                        Connection.PROPERTY_ASSISTED_DIALING_USED);
                        Connection.PROPERTY_ASSISTED_DIALING_USED,
                call.wasEverRttCall());
        logCall(call.getCallerInfo(), logNumber, call.getPostDialDigits(), formattedViaNumber,
                call.getHandlePresentation(), callLogType, callFeatures, accountHandle,
                creationTime, age, callDataUsage, call.isEmergencyCall(), call.getInitiatingUser(),
@@ -310,7 +311,7 @@ public final class CallLogManager extends CallsManagerListenerBase {
     * @return The call features.
     */
    private static int getCallFeatures(int videoState, boolean isPulledCall, boolean isStoreHd,
                                       boolean isUsingAssistedDialing) {
            boolean isUsingAssistedDialing, boolean isRtt) {
        int features = 0;
        if (VideoProfile.isVideo(videoState)) {
            features |= Calls.FEATURES_VIDEO;
@@ -324,6 +325,9 @@ public final class CallLogManager extends CallsManagerListenerBase {
        if (isUsingAssistedDialing) {
            features |= Calls.FEATURES_ASSISTED_DIALING_USED;
        }
        if (isRtt) {
            features |= Calls.FEATURES_RTT;
        }
        return features;
    }