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

Commit ecdc2ce0 authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Added support for Calls.FEATURES_VOLTE in call log."

parents 6306f47d d577d232
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -461,6 +461,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
    private boolean mWasConferencePreviouslyMerged = false;
    private boolean mWasHighDefAudio = false;
    private boolean mWasWifi = false;
    private boolean mWasVolte = false;

    // For conferences which support merge/swap at their level, we retain a notion of an active
    // call. This is used for BluetoothPhoneService.  In order to support hold/merge, it must have
@@ -2392,6 +2393,13 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
            l.onExtrasChanged(this, source, extras);
        }
      
        // If mExtra shows that the call using Volte, record it with mWasVolte
        if (mExtras.containsKey(TelecomManager.EXTRA_CALL_NETWORK_TYPE) &&
            mExtras.get(TelecomManager.EXTRA_CALL_NETWORK_TYPE)
                    .equals(TelephonyManager.NETWORK_TYPE_LTE)) {
            mWasVolte = true;
        }

        // If the change originated from an InCallService, notify the connection service.
        if (source == SOURCE_INCALL_SERVICE) {
            if (mConnectionService != null) {
@@ -3494,7 +3502,7 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
    }

    /**
     * Returns wether or not Wifi call was used.
     * Returns whether or not Wifi call was used.
     *
     * @return true if wifi call was used during this call.
     */
@@ -3506,6 +3514,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable,
        mIsUsingCallFiltering = isUsingCallFiltering;
    }       
          
    /**
     * Returns whether or not Volte call was used.
     *
     * @return true if Volte call was used during this call.
     */
    public boolean wasVolte() {
        return mWasVolte;
    }

    /**
     * In some cases, we need to know if this call has ever gone active (for example, the case
     * when the call was put into the {@link CallState#AUDIO_PROCESSING} state after being active)
+6 −2
Original line number Diff line number Diff line
@@ -339,7 +339,8 @@ public final class CallLogManager extends CallsManagerListenerBase {
                call.wasHighDefAudio(), call.wasWifi(),
                (call.getConnectionProperties() & Connection.PROPERTY_ASSISTED_DIALING_USED) ==
                        Connection.PROPERTY_ASSISTED_DIALING_USED,
                call.wasEverRttCall());
                call.wasEverRttCall(),
                call.wasVolte());

        if (callLogType == Calls.BLOCKED_TYPE) {
            logCall(call.getCallerInfo(), logNumber, call.getPostDialDigits(), formattedViaNumber,
@@ -464,7 +465,7 @@ public final class CallLogManager extends CallsManagerListenerBase {
     * @return The call features.
     */
    private static int getCallFeatures(int videoState, boolean isPulledCall, boolean isStoreHd,
            boolean isWifi, boolean isUsingAssistedDialing, boolean isRtt) {
            boolean isWifi, boolean isUsingAssistedDialing, boolean isRtt, boolean isVolte) {
        int features = 0;
        if (VideoProfile.isVideo(videoState)) {
            features |= Calls.FEATURES_VIDEO;
@@ -484,6 +485,9 @@ public final class CallLogManager extends CallsManagerListenerBase {
        if (isRtt) {
            features |= Calls.FEATURES_RTT;
        }
        if (isVolte) {
            features |= Calls.FEATURES_VOLTE;
        }
        return features;
    }