summaryrefslogtreecommitdiff
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.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 724a9e477b95..335a10221d06 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -109,6 +109,20 @@ import java.util.concurrent.ConcurrentHashMap;
*/
public abstract class Connection extends Conferenceable {
+ /**@hide*/
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = "STATE_", value = {
+ STATE_INITIALIZING,
+ STATE_NEW,
+ STATE_RINGING,
+ STATE_DIALING,
+ STATE_ACTIVE,
+ STATE_HOLDING,
+ STATE_DISCONNECTED,
+ STATE_PULLING_CALL
+ })
+ public @interface ConnectionState {}
+
/**
* The connection is initializing. This is generally the first state for a {@code Connection}
* returned by a {@link ConnectionService}.
@@ -2991,6 +3005,26 @@ public abstract class Connection extends Conferenceable {
public void onCallAudioStateChanged(CallAudioState state) {}
/**
+ * Inform this Connection when it will or will not be tracked by an {@link InCallService} which
+ * can provide an InCall UI.
+ * This is primarily intended for use by Connections reported by self-managed
+ * {@link ConnectionService} which typically maintain their own UI.
+ *
+ * @param isUsingAlternativeUi Indicates whether an InCallService that can provide InCall UI is
+ * currently tracking the self-managed call.
+ */
+ public void onUsingAlternativeUi(boolean isUsingAlternativeUi) {}
+
+ /**
+ * Inform this Conenection when it will or will not be tracked by an non-UI
+ * {@link InCallService}.
+ *
+ * @param isTracked Indicates whether an non-UI InCallService is currently tracking the
+ * self-managed call.
+ */
+ public void onTrackedByNonUiService(boolean isTracked) {}
+
+ /**
* Notifies this Connection of an internal state change. This method is called after the
* state is changed.
*