• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2010 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 package com.android.quicksearchbox;
17 
18 import android.content.Intent;
19 import android.view.Menu;
20 
21 /**
22  * Mock implementation of {@link SearchSettings}.
23  */
24 public class MockSearchSettings implements SearchSettings {
25 
addMenuItems(Menu menu, boolean showDisabled)26     public void addMenuItems(Menu menu, boolean showDisabled) {
27     }
28 
broadcastSettingsChanged()29     public void broadcastSettingsChanged() {
30     }
31 
getSearchableItemsIntent()32     public Intent getSearchableItemsIntent() {
33         return null;
34     }
35 
getShowWebSuggestions()36     public boolean getShowWebSuggestions() {
37         return true;
38     }
39 
isCorpusEnabled(Corpus corpus)40     public boolean isCorpusEnabled(Corpus corpus) {
41         return true;
42     }
43 
upgradeSettingsIfNeeded()44     public void upgradeSettingsIfNeeded() {
45     }
46 
resetVoiceSearchHintFirstSeenTime()47     public void resetVoiceSearchHintFirstSeenTime() {
48     }
49 
haveVoiceSearchHintsExpired(int currentVoiceSearchVersion)50     public boolean haveVoiceSearchHintsExpired(int currentVoiceSearchVersion) {
51         return false;
52     }
53 
getNextVoiceSearchHintIndex(int size)54     public int getNextVoiceSearchHintIndex(int size) {
55         return 0;
56     }
57 
getSearchSettingsIntent()58     public Intent getSearchSettingsIntent() {
59         return null;
60     }
61 
allowWebSearchShortcuts()62     public boolean allowWebSearchShortcuts() {
63         return true;
64     }
65 
shouldUseGoogleCom()66     public boolean shouldUseGoogleCom() {
67         return true;
68     }
69 
setUseGoogleCom(boolean useGoogleCom)70     public void setUseGoogleCom(boolean useGoogleCom) {
71         // Do nothing.
72     }
73 
getSearchBaseDomainApplyTime()74     public long getSearchBaseDomainApplyTime() {
75         return -1L;
76     }
77 
getSearchBaseDomain()78     public String getSearchBaseDomain() {
79         return "www.google.com";
80     }
81 
setSearchBaseDomain(String searchBaseUrl)82     public void setSearchBaseDomain(String searchBaseUrl) {
83         // Do nothing.
84     }
85 
86 }
87