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

Commit 28f0b85b authored by Tyler Gunn's avatar Tyler Gunn
Browse files

resolve merge conflicts of 5b326ce0 to m-wireless-dev.

Change-Id: I6327e47b036f9c0ad968e465b4b3f4d74038edd1
parents 781905d9 5b326ce0
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ public abstract class Connection {
        public void onAudioQualityChanged(int audioQuality);
        public void onConferenceParticipantsChanged(List<ConferenceParticipant> participants);
        public void onCallSubstateChanged(int callSubstate);
        public void onMultipartyStateChanged(boolean isMultiParty);
    }

    /**
@@ -72,7 +73,10 @@ public abstract class Connection {
        public void onAudioQualityChanged(int audioQuality) {}
        @Override
        public void onConferenceParticipantsChanged(List<ConferenceParticipant> participants) {}
        @Override
        public void onCallSubstateChanged(int callSubstate) {}
        @Override
        public void onMultipartyStateChanged(boolean isMultiParty) {}
    }

    public static final int AUDIO_QUALITY_STANDARD = 1;
@@ -635,6 +639,17 @@ public abstract class Connection {
        }
    }

    /**
     * Notifies listeners of a change to the multiparty state of the connection..
     *
     * @param isMultiparty The participant(s).
     */
    public void updateMultipartyState(boolean isMultiparty) {
        for (Listener l : mListeners) {
            l.onMultipartyStateChanged(isMultiparty);
        }
    }

    /**
     * Notifies this Connection of a request to disconnect a participant of the conference managed
     * by the connection.
+18 −0
Original line number Diff line number Diff line
@@ -1248,6 +1248,24 @@ public final class ImsPhoneCallTracker extends CallTracker {
                    ", targetAccessTech=" + targetAccessTech + ", reasonInfo=" + reasonInfo);
            }
        }

        /**
         * Handles a change to the multiparty state for an {@code ImsCall}.  Notifies the associated
         * {@link ImsPhoneConnection} of the change.
         *
         * @param imsCall The IMS call.
         * @param isMultiParty {@code true} if the call became multiparty, {@code false}
         *      otherwise.
         */
        @Override
        public void onMultipartyStateChanged(ImsCall imsCall, boolean isMultiParty) {
            if (DBG) log("onMultipartyStateChanged to " + (isMultiParty ? "Y" : "N"));

            ImsPhoneConnection conn = findConnection(imsCall);
            if (conn != null) {
                conn.updateMultipartyState(isMultiParty);
            }
        }
    };

    /**
+16 −1
Original line number Diff line number Diff line
@@ -131,7 +131,6 @@ public class ImsPhoneConnection extends Connection {
                    imsCall.getCallProfile().getCallExtraInt(ImsCallProfile.EXTRA_OIR));
            mCnapNamePresentation = ImsCallProfile.OIRToPresentation(
                    imsCall.getCallProfile().getCallExtraInt(ImsCallProfile.EXTRA_CNAP));

            updateMediaCapabilities(imsCall);
        } else {
            mNumberPresentation = PhoneConstants.PRESENTATION_UNKNOWN;
@@ -537,6 +536,21 @@ public class ImsPhoneConnection extends Connection {
        return mImsCall != null && mImsCall.isMultiparty();
    }

    /**
     * Where {@link #isMultiparty()} is {@code true}, determines if this {@link ImsCall} is the
     * origin of the conference call (i.e. {@code #isConferenceHost()} is {@code true}), or if this
     * {@link ImsCall} is a member of a conference hosted on another device.
     *
     * @return {@code true} if this call is the origin of the conference call it is a member of,
     *      {@code false} otherwise.
     */
    public boolean isConferenceHost() {
        if (mImsCall == null) {
            return false;
        }
        return mImsCall.isConferenceHost();
    }

    /*package*/ ImsCall getImsCall() {
        return mImsCall;
    }
@@ -575,6 +589,7 @@ public class ImsPhoneConnection extends Connection {
        boolean updateParent = mParent.update(this, imsCall, state);
        boolean updateMediaCapabilities = updateMediaCapabilities(imsCall);
        boolean updateWifiState = updateWifiState();

        return updateParent || updateMediaCapabilities || updateWifiState;
    }