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