CallControl & CallEventCallback should use CallEndpoint routing
CallControl
- add requestCallEndpointChange API call
CallEventCallback
- remove onCallAudioStateChanged
- add onCallEndpointChanged
- add onAvailableCallEndpointsChanged
- add onMuteStateChanged
bug: 262912490
Test: cts
Change-Id: Ia6231ee02d8b09c3e0384abf45072023a0a76a48
diff --git a/telecomm/java/android/telecom/CallEventCallback.java b/telecomm/java/android/telecom/CallEventCallback.java
index fd7e101..806febd 100644
--- a/telecomm/java/android/telecom/CallEventCallback.java
+++ b/telecomm/java/android/telecom/CallEventCallback.java
@@ -19,6 +19,7 @@
import android.annotation.NonNull;
+import java.util.List;
import java.util.function.Consumer;
/**
@@ -95,13 +96,6 @@
void onDisconnect(@NonNull Consumer<Boolean> wasCompleted);
/**
- * update the client on the new {@link CallAudioState}
- *
- * @param callAudioState that is currently being used
- */
- void onCallAudioStateChanged(@NonNull CallAudioState callAudioState);
-
- /**
* Telecom is informing the client to set the call in streaming.
*
* @param wasCompleted The {@link Consumer} to be completed. If the client can stream the
@@ -118,4 +112,26 @@
* @param reason Code to indicate the reason of this failure
*/
void onCallStreamingFailed(@CallStreamingService.StreamingFailedReason int reason);
+
+ /**
+ * Telecom is informing the client the current {@link CallEndpoint} changed.
+ *
+ * @param newCallEndpoint The new {@link CallEndpoint} through which call media flows
+ * (i.e. speaker, bluetooth, etc.).
+ */
+ void onCallEndpointChanged(@NonNull CallEndpoint newCallEndpoint);
+
+ /**
+ * Telecom is informing the client that the available {@link CallEndpoint}s have changed.
+ *
+ * @param availableEndpoints The set of available {@link CallEndpoint}s reported by Telecom.
+ */
+ void onAvailableCallEndpointsChanged(@NonNull List<CallEndpoint> availableEndpoints);
+
+ /**
+ * Called when the mute state changes.
+ *
+ * @param isMuted The current mute state.
+ */
+ void onMuteStateChanged(boolean isMuted);
}