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

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

Communicating participant changes to conference controller.

- Add event handlers to pass participant info to conference controller.

Bug: 18057361
Change-Id: Ifdd2d871994fc6e347f54d1e69686f7c68a7d6b0
parent 481a66b5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony;

import android.os.SystemClock;
import android.telecom.ConferenceParticipant;
import android.telephony.Rlog;
import android.util.Log;

@@ -45,6 +46,7 @@ public abstract class Connection {
        public void onVideoProviderChanged(
                android.telecom.Connection.VideoProvider videoProvider);
        public void onAudioQualityChanged(int audioQuality);
        public void onConferenceParticipantChanged(ConferenceParticipant participant);
    }

    /**
@@ -62,6 +64,8 @@ public abstract class Connection {
                android.telecom.Connection.VideoProvider videoProvider) {}
        @Override
        public void onAudioQualityChanged(int audioQuality) {}
        @Override
        public void onConferenceParticipantChanged(ConferenceParticipant participant) {}
    }

    public static final int AUDIO_QUALITY_STANDARD = 1;
@@ -542,6 +546,17 @@ public abstract class Connection {
        mDialString = oriNumber;
    }

    /**
     * Notifies listeners of a change to a conference participant.
     *
     * @param conferenceParticipant The participant.
     */
    public void updateConferenceParticipant(ConferenceParticipant conferenceParticipant) {
        for (Listener l : mListeners) {
            l.onConferenceParticipantChanged(conferenceParticipant);
        }
    }

    /**
     * Build a human representation of a connection instance, suitable for debugging.
     * Don't log personal stuff unless in debug mode.
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ public class TelephonyTester {
     */
    private void handleTestConferenceEventPackage(Context context, String fileName) {
        // Attempt to get the active IMS call before parsing the test XML file.
        ImsPhone imsPhone = (ImsPhone) mPhone.getImsPhone();
        ImsPhone imsPhone = (ImsPhone) mPhone;
        if (imsPhone == null) {
            return;
        }
+18 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.os.RemoteException;
import android.os.SystemProperties;
import android.provider.Settings;
import android.preference.PreferenceManager;
import android.telecom.ConferenceParticipant;
import android.telecom.VideoProfile;
import android.telephony.DisconnectCause;
import android.telephony.PhoneNumberUtils;
@@ -1101,6 +1102,23 @@ public final class ImsPhoneCallTracker extends CallTracker {
            if (DBG) log("onCallMergeFailed reasonCode=" + reasonInfo.getCode());
            mPhone.notifySuppServiceFailed(Phone.SuppService.CONFERENCE);
        }

        /**
         * Called when the state of an IMS conference participant has changed.
         *
         * @param call the call object that carries out the IMS call.
         * @param participant the participant and its new state information.
         */
        @Override
        public void onConferenceParticipantStateChanged(ImsCall call,
                ConferenceParticipant participant) {
            if (DBG) log("onConferenceParticipantStateChanged");

            ImsPhoneConnection conn = findConnection(call);
            if (conn != null) {
                conn.updateConferenceParticipant(participant);
            }
        }
    };

    /**