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

Commit e70972cf authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Correcting issue where video call icon shows for all calls.

The issue is in the ImsPhoneConnection code which checks for the
VideoState of the current call.  There was some work done at the RIL
level to restructure what the various ImsCallProfile instances mean.
When this code was written, getLocalCallProfile() was intended to refer
to the capabilities of the current call.  This has since changed so that
there are 3 profiles:
getCallProfile() -- the actual profile.
getLocalCallProfile() -- what the local device supports.
getRemoteCallProfile() -- what the remote device supports.

On a video capable device, getLocalCallProfile() appears to now return
DO NOT MERGE "Video", where it did not in the past.

There must have been a change in the modem code recently which has caused
this to show up now (where it was not an issue in the past).

Bug: 19144923
Change-Id: If58d58a073feb05e3509570eaac4dc02749ca212
(cherry picked from commit 1259a643)
parent 17faeca7
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -613,9 +613,23 @@ public class ImsPhoneConnection extends Connection {
        boolean changed = false;

        try {
            // The actual call profile (negotiated between local and peer).
            ImsCallProfile negotiatedCallProfile = imsCall.getCallProfile();
            // The capabilities of the local device.
            ImsCallProfile localCallProfile = imsCall.getLocalCallProfile();
            // The capabilities of the peer device.
            ImsCallProfile remoteCallProfile = imsCall.getRemoteCallProfile();

            if (negotiatedCallProfile != null) {
                int callType = negotiatedCallProfile.mCallType;

                int newVideoState = ImsCallProfile.getVideoStateFromCallType(callType);
                if (getVideoState() != newVideoState) {
                    setVideoState(newVideoState);
                    changed = true;
                }
            }

            if (localCallProfile != null) {
                int callType = localCallProfile.mCallType;

@@ -624,12 +638,6 @@ public class ImsPhoneConnection extends Connection {
                    setLocalVideoCapable(newLocalVideoCapable);
                    changed = true;
                }

                int newVideoState = ImsCallProfile.getVideoStateFromCallType(callType);
                if (getVideoState() != newVideoState) {
                    setVideoState(newVideoState);
                    changed = true;
                }
            }

            int newAudioQuality =