• 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.server.telecom;
18 
19 import android.os.Bundle;
20 import android.telecom.CallEndpoint;
21 
22 import java.util.Set;
23 
24 /**
25  * android.telecom.Call backed Services (i.e. ConnectionService, TransactionalService, etc.) that
26  * have callbacks that can be executed before the service is set (within the Call object) should
27  * implement this interface in order for clients to receive the callback.
28  *
29  * It has been shown that clients can miss important callback information (e.g. available audio
30  * endpoints) if the service is null within the call at the time the callback is sent.  This is a
31  * way to eliminate the timing issue and for clients to receive all callbacks.
32  */
33 public interface CallSourceService {
onMuteStateChanged(Call activeCall, boolean isMuted)34     void onMuteStateChanged(Call activeCall, boolean isMuted);
35 
onCallEndpointChanged(Call activeCall, CallEndpoint callEndpoint)36     void onCallEndpointChanged(Call activeCall, CallEndpoint callEndpoint);
37 
onAvailableCallEndpointsChanged(Call activeCall, Set<CallEndpoint> availableCallEndpoints)38     void onAvailableCallEndpointsChanged(Call activeCall, Set<CallEndpoint> availableCallEndpoints);
39 
onVideoStateChanged(Call activeCall, int videoState)40     void onVideoStateChanged(Call activeCall, int videoState);
41 
sendCallEvent(Call activeCall, String event, Bundle extras)42     void sendCallEvent(Call activeCall, String event, Bundle extras);
43 }
44