1 /* 2 * Copyright (C) 2022 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.server.appsearch.contactsindexer; 18 19 /** 20 * Contacts Indexer configuration for testing. 21 * 22 * <p>It simply returns default values. 23 */ 24 public class TestContactsIndexerConfig implements ContactsIndexerConfig { 25 @Override isContactsIndexerEnabled()26 public boolean isContactsIndexerEnabled() { 27 return DEFAULT_CONTACTS_INDEXER_ENABLED; 28 } 29 30 @Override getContactsFirstRunIndexingLimit()31 public int getContactsFirstRunIndexingLimit() { 32 return DEFAULT_CONTACTS_FIRST_RUN_INDEXING_LIMIT; 33 } 34 35 @Override getContactsFullUpdateIntervalMillis()36 public long getContactsFullUpdateIntervalMillis() { 37 return DEFAULT_CONTACTS_FULL_UPDATE_INTERVAL_MILLIS; 38 } 39 40 @Override getContactsFullUpdateLimit()41 public int getContactsFullUpdateLimit() { 42 return DEFAULT_CONTACTS_FULL_UPDATE_INDEXING_LIMIT; 43 } 44 45 @Override getContactsDeltaUpdateLimit()46 public int getContactsDeltaUpdateLimit() { 47 return DEFAULT_CONTACTS_DELTA_UPDATE_INDEXING_LIMIT; 48 } 49 50 @Override shouldIndexFirstMiddleAndLastNames()51 public boolean shouldIndexFirstMiddleAndLastNames() { 52 return DEFAULT_CONTACTS_INDEX_FIRST_MIDDLE_AND_LAST_NAMES; 53 } 54 } 55