Add relative APIs for InCallService that can support self-managed

connections that want to expose itself.

Add PhoneAccount#EXTRA_ADD_SELF_MANAGED_CALLS_TO_INCALLSERVICE and
Connection#onInCallServiceTrackingChanged.

Bug: 161144815
Test: CtsTelecomTestCases
Change-Id: I0a42ea79a1cd46aa9df3399c4fa2e9396321778a
This commit is contained in:
Grace Jia
2021-01-19 14:58:01 -08:00
parent 283c206e2a
commit e99fde9678
5 changed files with 121 additions and 4 deletions

View File

@@ -3013,6 +3013,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.