summaryrefslogtreecommitdiffstats
path: root/telecomm/java/android/telecom/Connection.java
diff options
context:
space:
mode:
Diffstat (limited to 'telecomm/java/android/telecom/Connection.java')
-rw-r--r--telecomm/java/android/telecom/Connection.java31
1 files changed, 20 insertions, 11 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 4c1f75f..9bdbba8 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -19,7 +19,6 @@ package android.telecom;
import com.android.internal.telecom.IVideoCallback;
import com.android.internal.telecom.IVideoProvider;
-import android.annotation.SystemApi;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
@@ -44,9 +43,7 @@ import java.util.concurrent.ConcurrentHashMap;
* Implementations are then responsible for updating the state of the {@code Connection}, and
* must call {@link #destroy()} to signal to the framework that the {@code Connection} is no
* longer used and associated resources may be recovered.
- * @hide
*/
-@SystemApi
public abstract class Connection {
public static final int STATE_INITIALIZING = 0;
@@ -85,6 +82,9 @@ public abstract class Connection {
public void onConferenceableConnectionsChanged(
Connection c, List<Connection> conferenceableConnections) {}
public void onConferenceChanged(Connection c, Conference conference) {}
+ /** @hide */
+ public void onConferenceParticipantChanged(Connection c, ConferenceParticipant participant)
+ {}
}
/** @hide */
@@ -876,7 +876,7 @@ public abstract class Connection {
return mUnmodifiableConferenceableConnections;
}
- /**
+ /*
* @hide
*/
public final void setConnectionService(ConnectionService connectionService) {
@@ -921,6 +921,7 @@ public abstract class Connection {
mConference = conference;
if (mConnectionService != null && mConnectionService.containsConference(conference)) {
fireConferenceChanged();
+ onConferenceChanged();
}
return true;
}
@@ -936,6 +937,7 @@ public abstract class Connection {
Log.d(this, "Conference reset");
mConference = null;
fireConferenceChanged();
+ onConferenceChanged();
}
}
@@ -1020,14 +1022,9 @@ public abstract class Connection {
public void onPostDialContinue(boolean proceed) {}
/**
- * Merge this connection and the specified connection into a conference call. Once the
- * connections are merged, the calls should be added to the an existing or new
- * {@code Conference} instance. For new {@code Conference} instances, use
- * {@code ConnectionService#addConference}.
- *
- * @param otherConnection The connection with which this connection should be conferenced.
+ * Notifies this Connection that the conference which is set on it has changed.
*/
- public void onConferenceWith(Connection otherConnection) {}
+ public void onConferenceChanged() {}
static String toLogSafePhoneNumber(String number) {
// For unknown number, log empty string.
@@ -1123,4 +1120,16 @@ public abstract class Connection {
}
mConferenceableConnections.clear();
}
+
+ /**
+ * Notifies listeners of a change to a conference participant.
+ *
+ * @param conferenceParticipant The participant.
+ * @hide
+ */
+ protected final void updateConferenceParticipant(ConferenceParticipant conferenceParticipant) {
+ for (Listener l : mListeners) {
+ l.onConferenceParticipantChanged(this, conferenceParticipant);
+ }
+ }
}