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 17package com.android.dialer.spam; 18 19import com.android.dialer.logging.ContactLookupResult; 20import com.android.dialer.logging.ContactSource; 21import com.android.dialer.logging.ReportingLocation; 22 23/** Default implementation of SpamBindings. */ 24public class SpamBindingsStub implements SpamBindings { 25 26 @Override 27 public boolean isSpamEnabled() { 28 return false; 29 } 30 31 @Override 32 public boolean isSpamNotificationEnabled() { 33 return false; 34 } 35 36 @Override 37 public boolean isDialogEnabledForSpamNotification() { 38 return false; 39 } 40 41 @Override 42 public boolean isDialogReportSpamCheckedByDefault() { 43 return false; 44 } 45 46 @Override 47 public int percentOfSpamNotificationsToShow() { 48 return 0; 49 } 50 51 @Override 52 public int percentOfNonSpamNotificationsToShow() { 53 return 0; 54 } 55 56 @Override 57 public void checkSpamStatus(String number, String countryIso, Listener listener) { 58 listener.onComplete(false); 59 } 60 61 @Override 62 public void checkUserMarkedNonSpamStatus(String number, String countryIso, Listener listener) { 63 listener.onComplete(false); 64 } 65 66 @Override 67 public void checkUserMarkedSpamStatus(String number, String countryIso, Listener listener) { 68 listener.onComplete(false); 69 } 70 71 @Override 72 public void checkGlobalSpamListStatus(String number, String countryIso, Listener listener) { 73 listener.onComplete(false); 74 } 75 76 @Override 77 public boolean checkSpamStatusSynchronous(String number, String countryIso) { 78 return false; 79 } 80 81 @Override 82 public void reportSpamFromAfterCallNotification( 83 String number, 84 String countryIso, 85 int callType, 86 ReportingLocation.Type from, 87 ContactLookupResult.Type contactLookupResultType) {} 88 89 @Override 90 public void reportSpamFromCallHistory( 91 String number, 92 String countryIso, 93 int callType, 94 ReportingLocation.Type from, 95 ContactSource.Type contactSourceType) {} 96 97 @Override 98 public void reportNotSpamFromAfterCallNotification( 99 String number, 100 String countryIso, 101 int callType, 102 ReportingLocation.Type from, 103 ContactLookupResult.Type contactLookupResultType) {} 104 105 @Override 106 public void reportNotSpamFromCallHistory( 107 String number, 108 String countryIso, 109 int callType, 110 ReportingLocation.Type from, 111 ContactSource.Type contactSourceType) {} 112} 113