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

Commit 8a0e3d48 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

am: 0da90398

Change-Id: I3742fef604439681ded828e62bdb1a017442bb29
parents 5b39b554 0da90398
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
@@ -955,6 +955,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) {
@@ -1337,9 +1346,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));
        }
    }
}