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 upgradeSettingsIfNeeded()32 public void upgradeSettingsIfNeeded() { 33 } 34 resetVoiceSearchHintFirstSeenTime()35 public void resetVoiceSearchHintFirstSeenTime() { 36 } 37 haveVoiceSearchHintsExpired(int currentVoiceSearchVersion)38 public boolean haveVoiceSearchHintsExpired(int currentVoiceSearchVersion) { 39 return false; 40 } 41 getNextVoiceSearchHintIndex(int size)42 public int getNextVoiceSearchHintIndex(int size) { 43 return 0; 44 } 45 shouldUseGoogleCom()46 public boolean shouldUseGoogleCom() { 47 return true; 48 } 49 setUseGoogleCom(boolean useGoogleCom)50 public void setUseGoogleCom(boolean useGoogleCom) { 51 // Do nothing. 52 } 53 getSearchBaseDomainApplyTime()54 public long getSearchBaseDomainApplyTime() { 55 return -1L; 56 } 57 getSearchBaseDomain()58 public String getSearchBaseDomain() { 59 return "www.google.com"; 60 } 61 setSearchBaseDomain(String searchBaseUrl)62 public void setSearchBaseDomain(String searchBaseUrl) { 63 // Do nothing. 64 } 65 66 } 67