1 /* 2 * Copyright (C) 2016 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.dialer.enrichedcall.stub; 18 19 import android.support.annotation.MainThread; 20 import android.support.annotation.NonNull; 21 import android.support.annotation.Nullable; 22 import com.android.dialer.calldetails.CallDetailsEntries; 23 import com.android.dialer.calldetails.CallDetailsEntries.CallDetailsEntry; 24 import com.android.dialer.common.Assert; 25 import com.android.dialer.enrichedcall.EnrichedCallCapabilities; 26 import com.android.dialer.enrichedcall.EnrichedCallManager; 27 import com.android.dialer.enrichedcall.Session; 28 import com.android.dialer.enrichedcall.historyquery.proto.HistoryResult; 29 import com.android.dialer.enrichedcall.videoshare.VideoShareListener; 30 import com.android.dialer.multimedia.MultimediaData; 31 import java.util.List; 32 import java.util.Map; 33 34 /** Stub implementation of {@link EnrichedCallManager}. */ 35 public final class EnrichedCallManagerStub implements EnrichedCallManager { 36 37 @Override registerCapabilitiesListener(@onNull CapabilitiesListener listener)38 public void registerCapabilitiesListener(@NonNull CapabilitiesListener listener) {} 39 40 @Override requestCapabilities(@onNull String number)41 public void requestCapabilities(@NonNull String number) {} 42 43 @Override unregisterCapabilitiesListener(@onNull CapabilitiesListener listener)44 public void unregisterCapabilitiesListener(@NonNull CapabilitiesListener listener) {} 45 46 @Override getCapabilities(@onNull String number)47 public EnrichedCallCapabilities getCapabilities(@NonNull String number) { 48 return null; 49 } 50 51 @Override clearCachedData()52 public void clearCachedData() {} 53 54 @Override startCallComposerSession(@onNull String number)55 public long startCallComposerSession(@NonNull String number) { 56 return Session.NO_SESSION_ID; 57 } 58 59 @Override sendCallComposerData(long sessionId, @NonNull MultimediaData data)60 public void sendCallComposerData(long sessionId, @NonNull MultimediaData data) {} 61 62 @Override endCallComposerSession(long sessionId)63 public void endCallComposerSession(long sessionId) {} 64 65 @Override sendPostCallNote(@onNull String number, @NonNull String message)66 public void sendPostCallNote(@NonNull String number, @NonNull String message) {} 67 68 @Override onCapabilitiesReceived( @onNull String number, @NonNull EnrichedCallCapabilities capabilities)69 public void onCapabilitiesReceived( 70 @NonNull String number, @NonNull EnrichedCallCapabilities capabilities) {} 71 72 @Override registerStateChangedListener(@onNull StateChangedListener listener)73 public void registerStateChangedListener(@NonNull StateChangedListener listener) {} 74 75 @Nullable 76 @Override getSession( @onNull String uniqueCallId, @NonNull String number, @Nullable Filter filter)77 public Session getSession( 78 @NonNull String uniqueCallId, @NonNull String number, @Nullable Filter filter) { 79 return null; 80 } 81 82 @Nullable 83 @Override getSession(long sessionId)84 public Session getSession(long sessionId) { 85 return null; 86 } 87 88 @NonNull 89 @Override createIncomingCallComposerFilter()90 public Filter createIncomingCallComposerFilter() { 91 return session -> false; 92 } 93 94 @NonNull 95 @Override createOutgoingCallComposerFilter()96 public Filter createOutgoingCallComposerFilter() { 97 return session -> false; 98 } 99 100 @Nullable 101 @Override 102 @MainThread getAllHistoricalData( @onNull String number, @NonNull CallDetailsEntries entries)103 public Map<CallDetailsEntry, List<HistoryResult>> getAllHistoricalData( 104 @NonNull String number, @NonNull CallDetailsEntries entries) { 105 Assert.isMainThread(); 106 return null; 107 } 108 109 @MainThread 110 @Override requestAllHistoricalData( @onNull String number, @NonNull CallDetailsEntries entries)111 public void requestAllHistoricalData( 112 @NonNull String number, @NonNull CallDetailsEntries entries) { 113 Assert.isMainThread(); 114 } 115 116 @Override unregisterStateChangedListener(@onNull StateChangedListener listener)117 public void unregisterStateChangedListener(@NonNull StateChangedListener listener) {} 118 119 @Override onSessionStatusUpdate(long sessionId, @NonNull String number, int state)120 public void onSessionStatusUpdate(long sessionId, @NonNull String number, int state) {} 121 122 @Override onMessageUpdate(long sessionId, @NonNull String messageId, int state)123 public void onMessageUpdate(long sessionId, @NonNull String messageId, int state) {} 124 125 @Override onIncomingCallComposerData(long sessionId, @NonNull MultimediaData multimediaData)126 public void onIncomingCallComposerData(long sessionId, @NonNull MultimediaData multimediaData) {} 127 128 @Override onIncomingPostCallData(long sessionId, @NonNull MultimediaData multimediaData)129 public void onIncomingPostCallData(long sessionId, @NonNull MultimediaData multimediaData) {} 130 131 @Override registerVideoShareListener(@onNull VideoShareListener listener)132 public void registerVideoShareListener(@NonNull VideoShareListener listener) {} 133 134 @Override unregisterVideoShareListener(@onNull VideoShareListener listener)135 public void unregisterVideoShareListener(@NonNull VideoShareListener listener) {} 136 137 @Override onIncomingVideoShareInvite(long sessionId, @NonNull String number)138 public boolean onIncomingVideoShareInvite(long sessionId, @NonNull String number) { 139 return false; 140 } 141 142 @Override startVideoShareSession(String number)143 public long startVideoShareSession(String number) { 144 return Session.NO_SESSION_ID; 145 } 146 147 @Override acceptVideoShareSession(long sessionId)148 public boolean acceptVideoShareSession(long sessionId) { 149 return false; 150 } 151 152 @Override getVideoShareInviteSessionId(@onNull String number)153 public long getVideoShareInviteSessionId(@NonNull String number) { 154 return Session.NO_SESSION_ID; 155 } 156 157 @Override endVideoShareSession(long sessionId)158 public void endVideoShareSession(long sessionId) {} 159 } 160