1 /*
2  * Copyright (C) 2023 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 android.telecom.cts.apps;
18 
19 import android.os.Bundle;
20 import android.telecom.CallEndpoint;
21 import android.telecom.CallEventCallback;
22 
23 import java.util.List;
24 
25 public class TransactionalCallEvents implements CallEventCallback {
26     private boolean mIsMuted = false;
27     private CallEndpoint mCurrentCallEndpoint;
28     private List<CallEndpoint> mCallEndpoints;
29 
getCurrentCallEndpoint()30     public CallEndpoint getCurrentCallEndpoint() {
31         return mCurrentCallEndpoint;
32     }
33 
getCallEndpoints()34     public List<CallEndpoint> getCallEndpoints() {
35         return mCallEndpoints;
36     }
37 
getIsMuted()38     public boolean getIsMuted() {
39         return mIsMuted;
40     }
41 
42     @Override
onCallEndpointChanged(CallEndpoint newCallEndpoint)43     public void onCallEndpointChanged(CallEndpoint newCallEndpoint) {
44         mCurrentCallEndpoint = newCallEndpoint;
45     }
46 
47     @Override
onAvailableCallEndpointsChanged(List<CallEndpoint> availableEndpoints)48     public void onAvailableCallEndpointsChanged(List<CallEndpoint> availableEndpoints) {
49         mCallEndpoints = availableEndpoints;
50     }
51 
52     @Override
onMuteStateChanged(boolean isMuted)53     public void onMuteStateChanged(boolean isMuted) {
54         mIsMuted = isMuted;
55     }
56 
57     @Override
onCallStreamingFailed(int reason)58     public void onCallStreamingFailed(int reason) {
59 
60     }
61 
62     @Override
onEvent(String event, Bundle extras)63     public void onEvent(String event, Bundle extras) {
64 
65     }
66 }
67