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