Home | History | Annotate | Download | only in quicksearchbox

Lines Matching defs:promoted

40             int maxPromoted, ListSuggestionCursor promoted) {
41 promoteSuggestions(suggestions.getCorpusResults(), maxPromoted, promoted);
46 ListSuggestionCursor promoted) {
56 promoteTopSuggestions(highRankingSuggestions, promoted, maxPromoted);
58 // Then try to fill promoted list with the remaining high-ranking suggestions,
60 promoteEquallyFromEachCorpus(highRankingSuggestions, promoted, maxPromoted);
61 promoteEquallyFromEachCorpus(lowRankingSuggestions, promoted, maxPromoted);
63 if (DBG) Log.d(TAG, "Returning " + promoted.toString());
69 * The corpora will appear in the promoted list in the order they are listed
73 ListSuggestionCursor promoted, int maxPromoted) {
75 int slotsLeft = getSlotsLeft(promoted, maxPromoted);
77 int slotsToFill = Math.min(getSlotsAboveKeyboard() - promoted.getCount(), slotsLeft);
81 roundRobin(highRankingSuggestions, slotsToFill, stripeSize, promoted);
89 * The corpora will appear in the promoted list in the order they are listed
93 ListSuggestionCursor promoted, int maxPromoted) {
95 int slotsLeft = getSlotsLeft(promoted, maxPromoted);
106 roundRobin(suggestions, slotsLeft, stripeSize, promoted);
109 slotsLeft = getSlotsLeft(promoted, maxPromoted);
110 roundRobin(suggestions, slotsLeft, slotsLeft, promoted);
148 private int getSlotsLeft(ListSuggestionCursor promoted, int maxPromoted) {
150 // may get filtered out automatically in the list of promoted items.
151 return Math.max(0, maxPromoted - promoted.getCount());
165 * @param promoted the list to which promoted suggestions are added.
166 * @return the number of suggestions actually promoted.
169 ListSuggestionCursor promoted) {
175 count += promote(result, stripeSize, promoted);
185 * Copies suggestions from a SuggestionCursor to the list of promoted suggestions.
189 * @param promoted the list to which to add the suggestions
192 private int promote(SuggestionCursor cursor, int count, ListSuggestionCursor promoted) {
199 if (promoted.add(new SuggestionPosition(cursor))) {
200 // Added successfully (wasn't already promoted).