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.java103
1 files changed, 11 insertions, 92 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index d4274b9..e79584f 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -44,7 +44,7 @@ import java.util.concurrent.ConcurrentHashMap;
* must call {@link #destroy()} to signal to the framework that the {@code Connection} is no
* longer used and associated resources may be recovered.
*/
-public abstract class Connection implements IConferenceable {
+public abstract class Connection implements Conferenceable {
public static final int STATE_INITIALIZING = 0;
@@ -180,7 +180,7 @@ public abstract class Connection implements IConferenceable {
/**
* Speed up audio setup for MT call.
* @hide
- */
+ */
public static final int CAPABILITY_SPEED_UP_MT_AUDIO = 0x00040000;
/**
@@ -200,48 +200,6 @@ public abstract class Connection implements IConferenceable {
// Next CAPABILITY value: 0x00200000
//**********************************************************************************************
- /**
- * Call substate bitmask values
- */
-
- /* Default case */
- /**
- * @hide
- */
- public static final int SUBSTATE_NONE = 0;
-
- /* Indicates that the call is connected but audio attribute is suspended */
- /**
- * @hide
- */
- public static final int SUBSTATE_AUDIO_CONNECTED_SUSPENDED = 0x1;
-
- /* Indicates that the call is connected but video attribute is suspended */
- /**
- * @hide
- */
- public static final int SUBSTATE_VIDEO_CONNECTED_SUSPENDED = 0x2;
-
- /* Indicates that the call is established but media retry is needed */
- /**
- * @hide
- */
- public static final int SUBSTATE_AVP_RETRY = 0x4;
-
- /* Indicates that the call is multitasking */
- /**
- * @hide
- */
- public static final int SUBSTATE_MEDIA_PAUSED = 0x8;
-
- /* Mask containing all the call substate bits set */
- /**
- * @hide
- */
- public static final int SUBSTATE_ALL = SUBSTATE_AUDIO_CONNECTED_SUSPENDED |
- SUBSTATE_VIDEO_CONNECTED_SUSPENDED | SUBSTATE_AVP_RETRY |
- SUBSTATE_MEDIA_PAUSED;
-
// Flag controlling whether PII is emitted into the logs
private static final boolean PII_DEBUG = Log.isLoggable(android.util.Log.DEBUG);
@@ -374,13 +332,12 @@ public abstract class Connection implements IConferenceable {
public void onAudioModeIsVoipChanged(Connection c, boolean isVoip) {}
public void onStatusHintsChanged(Connection c, StatusHints statusHints) {}
public void onConferenceablesChanged(
- Connection c, List<IConferenceable> conferenceables) {}
+ Connection c, List<Conferenceable> conferenceables) {}
public void onConferenceChanged(Connection c, Conference conference) {}
/** @hide */
public void onConferenceParticipantsChanged(Connection c,
List<ConferenceParticipant> participants) {}
public void onConferenceStarted() {}
- public void onCallSubstateChanged(Connection c, int substate) {}
}
public static abstract class VideoProvider {
@@ -788,8 +745,8 @@ public abstract class Connection implements IConferenceable {
*/
private final Set<Listener> mListeners = Collections.newSetFromMap(
new ConcurrentHashMap<Listener, Boolean>(8, 0.9f, 1));
- private final List<IConferenceable> mConferenceables = new ArrayList<>();
- private final List<IConferenceable> mUnmodifiableConferenceables =
+ private final List<Conferenceable> mConferenceables = new ArrayList<>();
+ private final List<Conferenceable> mUnmodifiableConferenceables =
Collections.unmodifiableList(mConferenceables);
private int mState = STATE_NEW;
@@ -807,7 +764,6 @@ public abstract class Connection implements IConferenceable {
private DisconnectCause mDisconnectCause;
private Conference mConference;
private ConnectionService mConnectionService;
- private int mCallSubstate;
/**
* Create a new Connection.
@@ -866,21 +822,6 @@ public abstract class Connection implements IConferenceable {
}
/**
- * Returns the call substate of the call.
- * Valid values: {@link Connection#SUBSTATE_NONE},
- * {@link Connection#SUBSTATE_AUDIO_CONNECTED_SUSPENDED},
- * {@link Connection#SUBSTATE_VIDEO_CONNECTED_SUSPENDED},
- * {@link Connection#SUBSTATE_AVP_RETRY},
- * {@link Connection#SUBSTATE_MEDIA_PAUSED}.
- *
- * @param callSubstate The new call substate.
- * @hide
- */
- public final int getCallSubstate() {
- return mCallSubstate;
- }
-
- /**
* @return The audio state of the connection, describing how its audio is currently
* being routed by the system. This is {@code null} if this Connection
* does not directly know about its audio state.
@@ -1054,25 +995,6 @@ public abstract class Connection implements IConferenceable {
}
/**
- * Set the call substate for the connection.
- * Valid values: {@link Connection#SUBSTATE_NONE},
- * {@link Connection#SUBSTATE_AUDIO_CONNECTED_SUSPENDED},
- * {@link Connection#SUBSTATE_VIDEO_CONNECTED_SUSPENDED},
- * {@link Connection#SUBSTATE_AVP_RETRY},
- * {@link Connection#SUBSTATE_MEDIA_PAUSED}.
- *
- * @param callSubstate The new call substate.
- * @hide
- */
- public final void setCallSubstate(int callSubstate) {
- Log.d(this, "setCallSubstate %d", callSubstate);
- mCallSubstate = callSubstate;
- for (Listener l : mListeners) {
- l.onCallSubstateChanged(this, mCallSubstate);
- }
- }
-
- /**
* Sets state to active (e.g., an ongoing connection where two or more parties can actively
* communicate).
*/
@@ -1175,14 +1097,11 @@ public abstract class Connection implements IConferenceable {
/**
* Informs listeners that this {@code Connection} has processed a character in the post-dial
* started state. This is done when (a) the {@code Connection} is issuing a DTMF sequence;
- * (b) it has encountered a "wait" character; and (c) it wishes to signal Telecom to play
- * the corresponding DTMF tone locally.
+ * and (b) it wishes to signal Telecom to play the corresponding DTMF tone locally.
*
* @param nextChar The DTMF character that was just processed by the {@code Connection}.
- *
- * @hide
*/
- public final void setNextPostDialWaitChar(char nextChar) {
+ public final void setNextPostDialChar(char nextChar) {
checkImmutable();
for (Listener l : mListeners) {
l.onPostDialChar(this, nextChar);
@@ -1280,9 +1199,9 @@ public abstract class Connection implements IConferenceable {
*
* @param conferenceables The conferenceables.
*/
- public final void setConferenceables(List<IConferenceable> conferenceables) {
+ public final void setConferenceables(List<Conferenceable> conferenceables) {
clearConferenceableList();
- for (IConferenceable c : conferenceables) {
+ for (Conferenceable c : conferenceables) {
// If statement checks for duplicates in input. It makes it N^2 but we're dealing with a
// small amount of items here.
if (!mConferenceables.contains(c)) {
@@ -1302,7 +1221,7 @@ public abstract class Connection implements IConferenceable {
/**
* Returns the connections or conferences with which this connection can be conferenced.
*/
- public final List<IConferenceable> getConferenceables() {
+ public final List<Conferenceable> getConferenceables() {
return mUnmodifiableConferenceables;
}
@@ -1567,7 +1486,7 @@ public abstract class Connection implements IConferenceable {
}
private final void clearConferenceableList() {
- for (IConferenceable c : mConferenceables) {
+ for (Conferenceable c : mConferenceables) {
if (c instanceof Connection) {
Connection connection = (Connection) c;
connection.removeConnectionListener(mConnectionDeathListener);