From e086d088a9fea31d50ecc8356986117cdaa77f59 Mon Sep 17 00:00:00 2001 From: Grace Jia Date: Thu, 28 Oct 2021 17:04:29 -0700 Subject: Add API for cross device calling. Test: CTS test Change-Id: I1a3aa6c1ae6d445a2f3b55e5f0d11918da5bed33 --- .../internal/telecom/ICallEndpointCallback.aidl | 29 ++++++++++++++++++ .../internal/telecom/ICallEndpointSession.aidl | 34 ++++++++++++++++++++++ .../internal/telecom/IConnectionService.aidl | 1 + .../android/internal/telecom/IInCallAdapter.aidl | 5 ++++ .../android/internal/telecom/IInCallService.aidl | 14 ++++++++- .../android/internal/telecom/ITelecomService.aidl | 16 ++++++++++ 6 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 telecomm/java/com/android/internal/telecom/ICallEndpointCallback.aidl create mode 100644 telecomm/java/com/android/internal/telecom/ICallEndpointSession.aidl (limited to 'telecomm/java/com') diff --git a/telecomm/java/com/android/internal/telecom/ICallEndpointCallback.aidl b/telecomm/java/com/android/internal/telecom/ICallEndpointCallback.aidl new file mode 100644 index 000000000000..dc1cc0f5a3c9 --- /dev/null +++ b/telecomm/java/com/android/internal/telecom/ICallEndpointCallback.aidl @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.telecom; + +/** + * Internal remote CallEndpointCallback interface for Telecom framework to report event related to + * the endpoint session. + * + * {@hide} + */ +oneway interface ICallEndpointCallback { + void onCallEndpointSessionActivationTimeout(); + + void onCallEndpointSessionDeactivated(); +} \ No newline at end of file diff --git a/telecomm/java/com/android/internal/telecom/ICallEndpointSession.aidl b/telecomm/java/com/android/internal/telecom/ICallEndpointSession.aidl new file mode 100644 index 000000000000..1c1c29a22f29 --- /dev/null +++ b/telecomm/java/com/android/internal/telecom/ICallEndpointSession.aidl @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.internal.telecom; + +/** + * Internal remote CallEndpointSession interface for streaming app to update the status of the + * endpoint. + * + * @see android.telecom.CallEndpointSession + * + * {@hide} + */ + +oneway interface ICallEndpointSession { + void setCallEndpointSessionActivated(); + + void setCallEndpointSessionActivationFailed(int reason); + + void setCallEndpointSessionDeactivated(); +} \ No newline at end of file diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl index d72f8aa82ddb..986871fd0377 100644 --- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl +++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl @@ -20,6 +20,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.ParcelFileDescriptor; import android.telecom.CallAudioState; +import android.telecom.CallEndpoint; import android.telecom.Connection; import android.telecom.ConnectionRequest; import android.telecom.Logging.Session; diff --git a/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl index edf1cf4cdb18..ecca835a45b2 100755 --- a/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl +++ b/telecomm/java/com/android/internal/telecom/IInCallAdapter.aidl @@ -18,6 +18,7 @@ package com.android.internal.telecom; import android.net.Uri; import android.os.Bundle; +import android.telecom.CallEndpoint; import android.telecom.PhoneAccountHandle; /** @@ -95,4 +96,8 @@ oneway interface IInCallAdapter { void handoverTo(String callId, in PhoneAccountHandle destAcct, int videoState, in Bundle extras); + + void pushCall(String callId, in CallEndpoint endpoint); + + void answerCallViaEndpoint(String callId, in CallEndpoint endpoint, int videoState); } diff --git a/telecomm/java/com/android/internal/telecom/IInCallService.aidl b/telecomm/java/com/android/internal/telecom/IInCallService.aidl index b9563fa7bb18..93d9f282560f 100644 --- a/telecomm/java/com/android/internal/telecom/IInCallService.aidl +++ b/telecomm/java/com/android/internal/telecom/IInCallService.aidl @@ -19,9 +19,12 @@ package com.android.internal.telecom; import android.app.PendingIntent; import android.os.Bundle; import android.telecom.CallAudioState; +import android.telecom.CallEndpoint; import android.telecom.ParcelableCall; import com.android.internal.telecom.IInCallAdapter; +import com.android.internal.telecom.ICallEndpointCallback; +import com.android.internal.telecom.ICallEndpointSession; /** * Internal remote interface for in-call services. @@ -30,9 +33,12 @@ import com.android.internal.telecom.IInCallAdapter; * * {@hide} */ -oneway interface IInCallService { +interface IInCallService { void setInCallAdapter(in IInCallAdapter inCallAdapter); + ICallEndpointCallback requestCallEndpointActivation(in CallEndpoint callEndpoint, + in ICallEndpointSession callEndpointSession); + void addCall(in ParcelableCall call); void updateCall(in ParcelableCall call); @@ -58,4 +64,10 @@ oneway interface IInCallService { void onHandoverFailed(String callId, int error); void onHandoverComplete(String callId); + + void onCallPullFailed(String callId, int reason); + + void onCallPushFailed(String callId, in CallEndpoint endpoint, int reason); + + void onAnswerFailed(String callId, in CallEndpoint endpoint, int reason); } diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl index a75f79caeee0..38f578313ac8 100644 --- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl +++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl @@ -18,6 +18,7 @@ package com.android.internal.telecom; import android.content.ComponentName; import android.content.Intent; +import android.telecom.CallEndpoint; import android.telecom.TelecomAnalytics; import android.telecom.PhoneAccountHandle; import android.net.Uri; @@ -366,4 +367,19 @@ interface ITelecomService { * @see TelecomServiceImpl#setTestCallDiagnosticService */ void setTestCallDiagnosticService(in String packageName); + + /** + * @see TelecomServiceImpl#registerCallEndpoints(in List, in String); + */ + void registerCallEndpoints(in List endpoints, in String packageName); + + /** + * @see TelecomServiceImpl#unregisterCallEndpoints(in List, String); + */ + void unregisterCallEndpoints(in List endpoints, in String packageName); + + /** + * @see TelecomServiceImpl#getCallEndpoints(in String packageName); + */ + List getCallEndpoints(in String packageName); } -- cgit v1.2.3-59-g8ed1b