1 /* 2 * Copyright (C) 2018 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.stub; 18 19 import android.content.Context; 20 import android.content.Intent; 21 import com.android.dialer.spam.SpamSettings; 22 import javax.inject.Inject; 23 24 /** Default implementation of SpamSettings. */ 25 public class SpamSettingsStub implements SpamSettings { 26 27 @Inject SpamSettingsStub()28 public SpamSettingsStub() {} 29 30 @Override isSpamEnabled()31 public boolean isSpamEnabled() { 32 return false; 33 } 34 35 @Override isSpamNotificationEnabled()36 public boolean isSpamNotificationEnabled() { 37 return false; 38 } 39 40 @Override isSpamBlockingEnabledByFlag()41 public boolean isSpamBlockingEnabledByFlag() { 42 return false; 43 } 44 45 @Override isSpamBlockingControlledByCarrier()46 public boolean isSpamBlockingControlledByCarrier() { 47 return false; 48 } 49 50 @Override isSpamBlockingEnabled()51 public boolean isSpamBlockingEnabled() { 52 return false; 53 } 54 55 @Override isSpamBlockingEnabledByUser()56 public boolean isSpamBlockingEnabledByUser() { 57 return false; 58 } 59 60 @Override isDialogEnabledForSpamNotification()61 public boolean isDialogEnabledForSpamNotification() { 62 return false; 63 } 64 65 @Override isDialogReportSpamCheckedByDefault()66 public boolean isDialogReportSpamCheckedByDefault() { 67 return false; 68 } 69 70 @Override percentOfSpamNotificationsToShow()71 public int percentOfSpamNotificationsToShow() { 72 return 0; 73 } 74 75 @Override percentOfNonSpamNotificationsToShow()76 public int percentOfNonSpamNotificationsToShow() { 77 return 0; 78 } 79 80 @Override modifySpamBlockingSetting(boolean enabled, ModifySettingListener listener)81 public void modifySpamBlockingSetting(boolean enabled, ModifySettingListener listener) { 82 listener.onComplete(false); 83 } 84 85 @Override getSpamBlockingSettingIntent(Context context)86 public Intent getSpamBlockingSettingIntent(Context context) { 87 return new Intent(); 88 } 89 } 90