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

Commit 0da90398 authored by Brad Ebinger's avatar Brad Ebinger Committed by android-build-merger
Browse files

Merge "IMS-VT: Set whether video is enabled locally or not."

am: 58337e6c

Change-Id: Ia96c6152d47142d104577d5ff79e8473505c2503
parents 14c402b0 58337e6c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3558,6 +3558,10 @@ public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall {
        }
    }

    public boolean isViLteDataMetered() {
        return mIsViLteDataMetered;
    }

    /**
     * Handler of data enabled changed event
     * @param enabled True if data is enabled, otherwise disabled.
+9 −4
Original line number Diff line number Diff line
@@ -952,6 +952,15 @@ public class ImsPhoneConnection extends Connection implements
                changed = true;
            }

            if (!mOwner.isViLteDataMetered()) {
                Rlog.v(LOG_TAG, "data is not metered");
            } else {
                if (mImsVideoCallProviderWrapper != null) {
                    mImsVideoCallProviderWrapper.setIsVideoEnabled(
                            hasCapabilities(Connection.Capability.SUPPORTS_VT_LOCAL_BIDIRECTIONAL));
                }
            }

            int newAudioQuality =
                    getAudioQualityFromCallProfile(localCallProfile, remoteCallProfile);
            if (getAudioQuality() != newAudioQuality) {
@@ -1324,9 +1333,5 @@ public class ImsPhoneConnection extends Connection implements
        Rlog.i(LOG_TAG, "handleDataEnabledChange: isDataEnabled=" + isDataEnabled
                + "; updating local video availability.");
        updateMediaCapabilities(getImsCall());
        if (mImsVideoCallProviderWrapper != null) {
            mImsVideoCallProviderWrapper.setIsVideoEnabled(
                    hasCapabilities(Connection.Capability.SUPPORTS_VT_LOCAL_BIDIRECTIONAL));
        }
    }
}