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

Commit 31b97304 authored by Rekha Kumar's avatar Rekha Kumar Committed by Gerrit - the friendly Code Review server
Browse files

IMS-VT: Peer capabilities

-Add support for peer capabilities

Change-Id: I44177dd6804b69a7b790021502eda0eb3bea3cab
parent dca77760
Loading
Loading
Loading
Loading
+24 −4
Original line number Diff line number Diff line
@@ -148,12 +148,18 @@ public class ImsPhoneConnection extends Connection {
            try {
                ImsCallProfile localCallProfile = imsCall.getLocalCallProfile();
                if (localCallProfile != null) {
                    int localCallTypeCapability = localCallProfile.mCallType;
                    boolean isLocalVideoCapable = localCallTypeCapability
                    boolean isLocalVideoCapable = localCallProfile.mCallType
                            == ImsCallProfile.CALL_TYPE_VT;

                    setLocalVideoCapable(isLocalVideoCapable);
                }
                ImsCallProfile remoteCallProfile = imsCall.getRemoteCallProfile();
                if (remoteCallProfile != null) {
                    boolean isRemoteVideoCapable = remoteCallProfile.mCallType
                            == ImsCallProfile.CALL_TYPE_VT;

                    setRemoteVideoCapable(isRemoteVideoCapable);
                }
            } catch (ImsException e) {
                // No session, so cannot get local capabilities.
            }
@@ -646,9 +652,10 @@ public class ImsPhoneConnection extends Connection {
                // Get the current local VT capabilities (i.e. even if currentCallType above is
                // audio-only, the local capability could support bi-directional video).
                ImsCallProfile localCallProfile = imsCall.getLocalCallProfile();
                Rlog.d(LOG_TAG, " update localCallProfile=" + localCallProfile
                        + "isLocalVideoCapable()= " + isLocalVideoCapable());
                if (localCallProfile != null) {
                    int localCallTypeCapability = localCallProfile.mCallType;
                    boolean newLocalVideoCapable = localCallTypeCapability
                    boolean newLocalVideoCapable = localCallProfile.mCallType
                            == ImsCallProfile.CALL_TYPE_VT;

                    if (isLocalVideoCapable() != newLocalVideoCapable) {
@@ -656,6 +663,19 @@ public class ImsPhoneConnection extends Connection {
                        changed = true;
                    }
                }

                ImsCallProfile remoteCallProfile = imsCall.getRemoteCallProfile();
                Rlog.d(LOG_TAG, " update remoteCallProfile=" + remoteCallProfile
                        + "isRemoteVideoCapable()= " + isRemoteVideoCapable());
                if (remoteCallProfile != null) {
                    boolean newRemoteVideoCapable = remoteCallProfile.mCallType
                            == ImsCallProfile.CALL_TYPE_VT;

                    if (isRemoteVideoCapable() != newRemoteVideoCapable) {
                        setRemoteVideoCapable(newRemoteVideoCapable);
                        changed = true;
                    }
                }
            } catch (ImsException e) {
                // No session in place -- no change
            }