/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/ |
D | CorporaAdapter.java | 65 public void setCurrentCorpus(Corpus corpus) { in setCurrentCorpus() argument 66 mCurrentCorpusName = corpus == null ? null : corpus.getName(); in setCurrentCorpus() 73 for (Corpus corpus : enabledCorpora) { in updateCorpora() 74 if (!corpus.isCorpusHidden()) { in updateCorpora() 75 sorted.add(corpus); in updateCorpora() 118 public int getCorpusPosition(Corpus corpus) { in getCorpusPosition() argument 119 if (corpus == null) { in getCorpusPosition() 124 if (corpus.equals(getItem(i))) { in getCorpusPosition() 128 Log.w(TAG, "Corpus not in adapter: " + corpus); in getCorpusPosition() 137 Corpus corpus = getItem(position); in getView() local [all …]
|
D | SearchActivityViewSinglePane.java | 75 protected void setCorpus(Corpus corpus) { in setCorpus() argument 76 super.setCorpus(corpus); in setCorpus() 80 if (corpus == null) { in setCorpus() 83 sourceIcon = corpus.getCorpusIcon(); in setCorpus() 91 Corpus corpus = getCorpus(); in createSuggestionsPromoter() local 92 if (corpus == null) { in createSuggestionsPromoter() 95 return getQsbApplication().createSingleCorpusPromoter(corpus); in createSuggestionsPromoter() 105 Corpus corpus = getCorpus(); in getSearchCorpus() local 106 return corpus == null ? getWebCorpus() : corpus; in getSearchCorpus()
|
D | SearchActivityView.java | 182 Corpus corpus = getCorpora().getCorpus(sourceName); in getCorpus() 183 if (corpus == null) { in getCorpus() 187 return corpus; in getCorpus() 198 Corpus corpus = getCorpus(corpusName); in setCorpus() local 199 setCorpus(corpus); in setCorpus() 203 protected void setCorpus(Corpus corpus) { in setCorpus() argument 204 mCorpus = corpus; in setCorpus() 207 if (corpus == null || suggestions == null || !suggestions.expectsCorpus(corpus)) { in setCorpus() 213 Corpus corpus = getCorpus(); in getCorpusName() local 214 return corpus == null ? null : corpus.getName(); in getCorpusName() [all …]
|
D | SearchActivityViewTwoPane.java | 260 protected void setCorpus(Corpus corpus) { in setCorpus() argument 261 super.setCorpus(corpus); in setCorpus() 271 Corpus corpus = getCorpus(); in createResultsPromoter() local 272 if (corpus == null) { in createResultsPromoter() 275 return getQsbApplication().createSingleCorpusResultsPromoter(corpus); in createResultsPromoter()
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | MockCorpora.java | 44 public void addCorpus(Corpus corpus) { in addCorpus() argument 45 Corpus oldCorpus = mCorporaByName.put(corpus.getName(), corpus); in addCorpus() 47 Log.d(TAG, "Replaced " + oldCorpus + " with " + corpus); in addCorpus() 56 public void addDefaultCorpus(Corpus corpus) { in addDefaultCorpus() argument 57 mDefaultCorpora.add(corpus); in addDefaultCorpus() 73 for (Corpus corpus : mCorporaByName.values()) { in getCorpusForSource() 74 for (Source corpusSource : corpus.getSources()) { in getCorpusForSource() 76 return corpus; in getCorpusForSource() 92 for (Corpus corpus : mCorporaByName.values()) { in getSource() 93 for (Source source : corpus.getSources()) { in getSource() [all …]
|
D | SuggestionsTest.java | 78 Corpus corpus = MockCorpus.CORPUS_1; in testGetIncludedCorpora() local 80 Collections.singletonList(corpus.getSuggestions("foo", 50, true))); in testGetIncludedCorpora() 83 assertTrue(includedCorpora.contains(corpus)); in testGetIncludedCorpora() 87 Corpus corpus = MockCorpus.CORPUS_1; in testObserverNotified() local 91 Collections.singletonList(corpus.getSuggestions("foo", 50, true))); in testObserverNotified()
|
D | MockLogger.java | 30 public void logStart(int onCreateLatency, int latency, String intentSource, Corpus corpus, in logStart() argument 39 public void logSearch(Corpus corpus, int startMethod, int numChars) { in logSearch() argument 42 public void logVoiceSearch(Corpus corpus) { in logVoiceSearch() argument
|
D | SingleCorpusPromoterTest.java | 60 for (Corpus corpus : mCorpora) { in makeSuggestions() 61 results.add(corpus.getSuggestions(query, 10, false)); in makeSuggestions()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | ShouldQueryStrategy.java | 57 public boolean shouldQueryCorpus(Corpus corpus, String query) { in shouldQueryCorpus() argument 60 && !corpus.isWebCorpus() // always query web, to warm up connection in shouldQueryCorpus() 64 if (query.length() >= corpus.getQueryThreshold()) { in shouldQueryCorpus() 65 if (!corpus.queryAfterZeroResults() && mEmptyCorpora.containsKey(corpus)) { in shouldQueryCorpus() 66 if (DBG) Log.i(TAG, "Not querying " + corpus + ", returned 0 after " in shouldQueryCorpus() 67 + mEmptyCorpora.get(corpus)); in shouldQueryCorpus() 72 if (DBG) Log.d(TAG, "Query too short for corpus " + corpus); in shouldQueryCorpus() 79 public void onZeroResults(Corpus corpus, String query) { in onZeroResults() argument 81 if (mLastQuery.startsWith(query) && !corpus.queryAfterZeroResults() in onZeroResults() 83 if (DBG) Log.d(TAG, corpus + " returned 0 results for '" + query + "'"); in onZeroResults() [all …]
|
D | SearchableCorpora.java | 82 for (Corpus corpus : mEnabledCorpora) { in getCorporaInAll() 83 if (corpus.includeInAll()) { in getCorporaInAll() 84 corpora.add(corpus); in getCorporaInAll() 120 for (Corpus corpus : corpora) { in update() 121 mCorporaByName.put(corpus.getName(), corpus); in update() local 122 for (Source source : corpus.getSources()) { in update() 123 mCorporaBySource.put(source, corpus); in update() 125 if (mSettings.isCorpusEnabled(corpus)) { in update() 126 mEnabledCorpora.add(corpus); in update() 128 if (corpus.isWebCorpus()) { in update() [all …]
|
D | EventLogLogger.java | 60 public void logStart(int onCreateLatency, int latency, String intentSource, Corpus corpus, in logStart() argument 64 String currentCorpus = getCorpusLogName(corpus); in logStart() 79 public void logSearch(Corpus corpus, int startMethod, int numChars) { in logSearch() argument 80 String corpusName = getCorpusLogName(corpus); in logSearch() 84 public void logVoiceSearch(Corpus corpus) { in logVoiceSearch() argument 85 String corpusName = getCorpusLogName(corpus); in logVoiceSearch() 107 private String getCorpusLogName(Corpus corpus) { in getCorpusLogName() argument 108 if (corpus == null) return null; in getCorpusLogName() 109 return corpus.getName(); in getCorpusLogName() 130 for (Corpus corpus : corpora) { in getCorpusLogNames() [all …]
|
D | Config.java | 104 for (String corpus : corpora) { in loadResourceStringSet() 105 if (DBG) Log.d(TAG, "Default corpus: " + corpus); in loadResourceStringSet() 106 defaultCorpora.add(corpus); in loadResourceStringSet() 114 public synchronized boolean isCorpusEnabledByDefault(Corpus corpus) { in isCorpusEnabledByDefault() argument 115 if (DBG) Log.d(TAG, "isCorpusEnabledByDefault(" + corpus.getName() + ")"); in isCorpusEnabledByDefault() 119 if (mDefaultCorpora.contains(corpus.getName())) { in isCorpusEnabledByDefault() 120 if (DBG) Log.d(TAG, "Corpus " + corpus.getName() + " IS default"); in isCorpusEnabledByDefault() 129 for (Source s : corpus.getSources()) { in isCorpusEnabledByDefault() 131 if (DBG) Log.d(TAG, "Suggest URI for " + corpus.getName() + ": " + uri); in isCorpusEnabledByDefault() 133 if (DBG) Log.d(TAG, "Corpus " + corpus.getName() + " IS default"); in isCorpusEnabledByDefault() [all …]
|
D | CorpusSelectionDialog.java | 70 public void show(Corpus corpus) { in show() argument 71 mCorpus = corpus; in show() 181 protected void selectCorpus(Corpus corpus) { in selectCorpus() argument 184 String corpusName = corpus == null ? null : corpus.getName(); in selectCorpus() 191 Corpus corpus = (Corpus) parent.getItemAtPosition(position); in onItemClick() local 192 if (DBG) Log.d(TAG, "Corpus selected: " + corpus); in onItemClick() 193 selectCorpus(corpus); in onItemClick()
|
D | SuggestionsProviderImpl.java | 85 for (Corpus corpus : corpora) { in filterCorpora() 86 if (shouldQueryCorpus(corpus, query)) { in filterCorpora() 87 if (DBG) Log.d(TAG, "should query corpus " + corpus); in filterCorpora() 88 corporaToQuery.add(corpus); in filterCorpora() 90 if (DBG) Log.d(TAG, "should NOT query corpus " + corpus); in filterCorpora() 97 protected boolean shouldQueryCorpus(Corpus corpus, String query) { in shouldQueryCorpus() argument 98 return mShouldQueryStrategy.shouldQueryCorpus(corpus, query); in shouldQueryCorpus() 148 for (Corpus corpus : corpora) { in countDefaultCorpora() 149 if (corpus.isCorpusDefaultEnabled()) { in countDefaultCorpora()
|
D | VoiceSearch.java | 47 public boolean shouldShowVoiceSearch(Corpus corpus) { in shouldShowVoiceSearch() argument 48 return corpusSupportsVoiceSearch(corpus) && isVoiceSearchAvailable(); in shouldShowVoiceSearch() 51 protected boolean corpusSupportsVoiceSearch(Corpus corpus) { in corpusSupportsVoiceSearch() argument 52 return (corpus == null || corpus.voiceSearchEnabled()); in corpusSupportsVoiceSearch()
|
D | DefaultCorpusRanker.java | 127 private int getCorpusScore(Corpus corpus) { in getCorpusScore() argument 129 if (corpus.isWebCorpus()) { in getCorpusScore() 133 return getClickScore(corpus); in getCorpusScore() 136 private int getClickScore(Corpus corpus) { in getClickScore() argument 138 Integer clickScore = mClickScores.get(corpus.getName()); in getClickScore()
|
D | Logger.java | 40 void logStart(int onCreateLatency, int latency, String intentSource, Corpus corpus, in logStart() argument 62 void logSearch(Corpus corpus, int startMethod, int numChars); in logSearch() argument 67 void logVoiceSearch(Corpus corpus); in logVoiceSearch() argument
|
D | RankAwarePromoter.java | 132 Corpus corpus = result.getCorpus(); in partitionSuggestionsByRank() local 133 if (isCorpusHighlyRanked(corpus)) { in partitionSuggestionsByRank() 142 private boolean isCorpusHighlyRanked(Corpus corpus) { in isCorpusHighlyRanked() argument 145 return corpus == null || corpus.isCorpusDefaultEnabled(); in isCorpusHighlyRanked()
|
D | SingleCorpusPromoter.java | 32 public SingleCorpusPromoter(Corpus corpus, int maxShortcuts) { in SingleCorpusPromoter() argument 33 mCorpus = corpus; in SingleCorpusPromoter() 36 for (Source source : corpus.getSources()) { in SingleCorpusPromoter()
|
D | SearchSettingsImpl.java | 116 public static String getCorpusEnabledPreference(Corpus corpus) { in getCorpusEnabledPreference() argument 117 return CORPUS_ENABLED_PREF_PREFIX + corpus.getName(); in getCorpusEnabledPreference() 120 public boolean isCorpusEnabled(Corpus corpus) { in isCorpusEnabled() argument 121 boolean defaultEnabled = corpus.isCorpusDefaultEnabled(); in isCorpusEnabled() 122 String sourceEnabledPref = getCorpusEnabledPreference(corpus); in isCorpusEnabled()
|
D | SingleCorpusResultsPromoter.java | 23 public SingleCorpusResultsPromoter(Corpus corpus, int maxShortcuts) { in SingleCorpusResultsPromoter() argument 24 super(corpus, maxShortcuts); in SingleCorpusResultsPromoter()
|
D | SingleSourceCorpusResult.java | 29 public SingleSourceCorpusResult(Corpus corpus, String userQuery, SuggestionCursor cursor, in SingleSourceCorpusResult() argument 32 mCorpus = corpus; in SingleSourceCorpusResult()
|
D | EventLogTags.logtags | 59 # The latency of a suggestion query to a specific corpus. 60 # @param corpus The corpus that was queried. 63 71006 qsb_latency (corpus|3),(latency|1|3),(num_chars|1)
|
D | SearchableCorpusFactory.java | 104 private void addCorpus(ArrayList<Corpus> corpora, Corpus corpus) { in addCorpus() argument 105 if (corpus != null) corpora.add(corpus); in addCorpus()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/preferences/ |
D | SearchableItemsController.java | 88 for (Corpus corpus : getCorpora().getAllCorpora()) { in populateSourcePreference() 89 if (includeNonAllCorpora || corpus.includeInAll()) { in populateSourcePreference() 90 Preference pref = createCorpusPreference(corpus); in populateSourcePreference() 92 if (DBG) Log.d(TAG, "Adding corpus: " + corpus); in populateSourcePreference() 102 private Preference createCorpusPreference(Corpus corpus) { in createCorpusPreference() argument 104 sourcePref.setKey(SearchSettingsImpl.getCorpusEnabledPreference(corpus)); in createCorpusPreference() 106 if (corpus.isWebCorpus()) { in createCorpusPreference() 109 sourcePref.setDefaultValue(corpus.isCorpusDefaultEnabled()); in createCorpusPreference() 111 CharSequence label = corpus.getLabel(); in createCorpusPreference() 113 CharSequence description = corpus.getSettingsDescription(); in createCorpusPreference() [all …]
|