blob: bfe368560a22fdd5b611631952263132862906d0 [file] [log] [blame]
Thomas Stuart9bfb2432022-09-27 15:02:07 -07001/*
Thomas Stuart6e418b32023-02-06 08:22:08 -08002 * Copyright (C) 2023 The Android Open Source Project
Thomas Stuart9bfb2432022-09-27 15:02:07 -07003 *
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
17package android.telecom;
18
Thomas Stuart9bfb2432022-09-27 15:02:07 -070019import android.annotation.NonNull;
20
Thomas Stuart7aeccde2022-12-21 14:47:21 -080021import java.util.List;
Thomas Stuart9bfb2432022-09-27 15:02:07 -070022
23/**
Thomas Stuart6e418b32023-02-06 08:22:08 -080024 * CallEventCallback relays call updates (that do not require any action) from the Telecom framework
25 * out to the application. This can include operations which the app must implement on a Call due to
26 * the presence of other calls on the device, requests relayed from a Bluetooth device,
27 * or from another calling surface.
Thomas Stuart9bfb2432022-09-27 15:02:07 -070028 */
29public interface CallEventCallback {
30 /**
Thomas Stuart7aeccde2022-12-21 14:47:21 -080031 * Telecom is informing the client the current {@link CallEndpoint} changed.
32 *
33 * @param newCallEndpoint The new {@link CallEndpoint} through which call media flows
Thomas Stuart6e418b32023-02-06 08:22:08 -080034 * (i.e. speaker, bluetooth, etc.).
Thomas Stuart7aeccde2022-12-21 14:47:21 -080035 */
36 void onCallEndpointChanged(@NonNull CallEndpoint newCallEndpoint);
37
38 /**
39 * Telecom is informing the client that the available {@link CallEndpoint}s have changed.
40 *
41 * @param availableEndpoints The set of available {@link CallEndpoint}s reported by Telecom.
42 */
43 void onAvailableCallEndpointsChanged(@NonNull List<CallEndpoint> availableEndpoints);
44
45 /**
46 * Called when the mute state changes.
47 *
48 * @param isMuted The current mute state.
49 */
50 void onMuteStateChanged(boolean isMuted);
Thomas Stuart6e418b32023-02-06 08:22:08 -080051
52 /**
53 * Telecom is informing the client user requested call streaming but the stream can't be
54 * started.
55 *
56 * @param reason Code to indicate the reason of this failure
57 */
58 void onCallStreamingFailed(@CallStreamingService.StreamingFailedReason int reason);
Thomas Stuart9bfb2432022-09-27 15:02:07 -070059}