• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.ecm;
18 
19 import android.annotation.FlaggedApi;
20 import android.annotation.NonNull;
21 import android.annotation.SystemApi;
22 import android.annotation.TargetApi;
23 import android.os.Build;
24 import android.permission.flags.Flags;
25 import android.telecom.Call;
26 
27 /**
28  * @hide
29  *
30  * In-process API for the Enhanced Confirmation Service
31  */
32 @FlaggedApi(Flags.FLAG_ENHANCED_CONFIRMATION_IN_CALL_APIS_ENABLED)
33 @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
34 @TargetApi(Build.VERSION_CODES.BAKLAVA)
35 public interface EnhancedConfirmationManagerLocal {
36     /**
37      * Inform the enhanced confirmation service of an ongoing call.
38      *
39      * @param call The call to potentially track
40      * @throws IllegalStateException if called on the main thread
41      */
addOngoingCall(@onNull Call call)42     void addOngoingCall(@NonNull Call call);
43 
44     /**
45      * Inform the enhanced confirmation service that a call has ended
46      *
47      * @param callId The ID of the call to stop tracking
48      * @throws IllegalStateException if called on the main thread
49      *
50      */
removeOngoingCall(@onNull String callId)51     void removeOngoingCall(@NonNull String callId);
52 
53     /**
54      * Informs the enhanced confirmation service it should clear out any ongoing calls
55      * @throws IllegalStateException if called on the main thread
56      */
clearOngoingCalls()57     void clearOngoingCalls();
58 }
59