1c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert/*
28b2936607176720172aee068abc5631bdf77e843Bjorn Bringert * Copyright (C) 2010 The Android Open Source Project
3c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert *
4c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * Licensed under the Apache License, Version 2.0 (the "License");
5c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * you may not use this file except in compliance with the License.
6c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * You may obtain a copy of the License at
7c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert *
8c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert *      http://www.apache.org/licenses/LICENSE-2.0
9c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert *
10c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * Unless required by applicable law or agreed to in writing, software
11c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * distributed under the License is distributed on an "AS IS" BASIS,
12c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * See the License for the specific language governing permissions and
14c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert * limitations under the License.
15c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert */
168b2936607176720172aee068abc5631bdf77e843Bjorn Bringertpackage com.android.quicksearchbox;
17c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert
18c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert/**
198b2936607176720172aee068abc5631bdf77e843Bjorn Bringert * Promotes non-web-search shortcuts and suggestions from a single corpus.
20c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert */
218b2936607176720172aee068abc5631bdf77e843Bjorn Bringertpublic class SingleCorpusResultsPromoter extends SingleCorpusPromoter {
22c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert
238b2936607176720172aee068abc5631bdf77e843Bjorn Bringert    public SingleCorpusResultsPromoter(Corpus corpus, int maxShortcuts) {
248b2936607176720172aee068abc5631bdf77e843Bjorn Bringert        super(corpus, maxShortcuts);
258b2936607176720172aee068abc5631bdf77e843Bjorn Bringert    }
26c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert
278b2936607176720172aee068abc5631bdf77e843Bjorn Bringert    protected boolean accept(Suggestion s) {
288b2936607176720172aee068abc5631bdf77e843Bjorn Bringert        return !s.isWebSearchSuggestion() && super.accept(s);
298b2936607176720172aee068abc5631bdf77e843Bjorn Bringert    }
30c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert
31c5a3ecb62318a6be1d1a626a36b52829e989f740Bjorn Bringert}
32