1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*/
package com.android.dialer.enrichedcall.stub;
import android.support.annotation.MainThread;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.android.dialer.calldetails.CallDetailsEntries;
import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry;
import com.android.dialer.common.Assert;
import com.android.dialer.enrichedcall.EnrichedCallCapabilities;
import com.android.dialer.enrichedcall.EnrichedCallManager;
import com.android.dialer.enrichedcall.Session;
import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult;
import com.android.dialer.enrichedcall.videoshare.VideoShareListener;
import com.android.dialer.multimedia.MultimediaData;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/** Stub implementation of {@link EnrichedCallManager}. */
public final class EnrichedCallManagerStub implements EnrichedCallManager {
@Override
public void registerCapabilitiesListener(@NonNull CapabilitiesListener listener) {}
@Override
public void requestCapabilities(@NonNull String number) {}
@Override
public void unregisterCapabilitiesListener(@NonNull CapabilitiesListener listener) {}
@Override
public EnrichedCallCapabilities getCapabilities(@NonNull String number) {
return null;
}
@Override
public void clearCachedData() {}
@Override
public long startCallComposerSession(@NonNull String number) {
return Session.NO_SESSION_ID;
}
@Override
public void sendCallComposerData(long sessionId, @NonNull MultimediaData data) {}
@Override
public void endCallComposerSession(long sessionId) {}
@Override
public void sendPostCallNote(@NonNull String number, @NonNull String message) {}
@Override
public void onCapabilitiesReceived(
@NonNull String number, @NonNull EnrichedCallCapabilities capabilities) {}
@Override
public void registerStateChangedListener(@NonNull StateChangedListener listener) {}
@Nullable
@Override
public Session getSession(
@NonNull String uniqueCallId, @NonNull String number, @Nullable Filter filter) {
return null;
}
@Nullable
@Override
public Session getSession(long sessionId) {
return null;
}
@MainThread
@NonNull
@Override
public List<String> getAllSessionsForDisplay() {
Assert.isMainThread();
return Collections.emptyList();
}
@NonNull
@Override
public Filter createIncomingCallComposerFilter() {
return session -> false;
}
@NonNull
@Override
public Filter createOutgoingCallComposerFilter() {
return session -> false;
}
@Nullable
@Override
@MainThread
public Map<CallDetailsEntry, List<HistoryResult>> getAllHistoricalData(
@NonNull String number, @NonNull CallDetailsEntries entries) {
Assert.isMainThread();
return null;
}
@MainThread
@Override
public void requestAllHistoricalData(
@NonNull String number, @NonNull CallDetailsEntries entries) {
Assert.isMainThread();
}
@Override
public void unregisterStateChangedListener(@NonNull StateChangedListener listener) {}
@Override
public void onSessionStatusUpdate(long sessionId, @NonNull String number, int state) {}
@Override
public void onMessageUpdate(long sessionId, @NonNull String messageId, int state) {}
@Override
public void onIncomingCallComposerData(long sessionId, @NonNull MultimediaData multimediaData) {}
@Override
public void onIncomingPostCallData(long sessionId, @NonNull MultimediaData multimediaData) {}
@Override
public void registerVideoShareListener(@NonNull VideoShareListener listener) {}
@Override
public void unregisterVideoShareListener(@NonNull VideoShareListener listener) {}
@Override
public boolean onIncomingVideoShareInvite(long sessionId, @NonNull String number) {
return false;
}
@Override
public long startVideoShareSession(String number) {
return Session.NO_SESSION_ID;
}
@Override
public boolean acceptVideoShareSession(long sessionId) {
return false;
}
@Override
public long getVideoShareInviteSessionId(@NonNull String number) {
return Session.NO_SESSION_ID;
}
@Override
public void endVideoShareSession(long sessionId) {}
}
|