/packages/apps/Settings/src/com/android/settings/dashboard/ |
D | DashboardAdapter.java | 48 import com.android.settings.dashboard.suggestions.SuggestionAdapter; 49 import com.android.settings.dashboard.suggestions.SuggestionDismissController; 50 import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider; 51 import com.android.settings.dashboard.suggestions.SuggestionLogHelper; 56 import com.android.settingslib.suggestions.SuggestionParser; 115 List<Tile> suggestions = null; in DashboardAdapter() local 131 suggestions = savedInstanceState.getParcelableArrayList(STATE_SUGGESTION_LIST); in DashboardAdapter() 143 .setSuggestions(suggestions) in DashboardAdapter() 154 List<Tile> suggestions) { in setCategoriesAndSuggestions() argument 155 tintIcons(category, suggestions); in setCategoriesAndSuggestions() [all …]
|
D | DashboardSummary.java | 39 import com.android.settings.dashboard.suggestions.SuggestionDismissController; 40 import com.android.settings.dashboard.suggestions.SuggestionFeatureProvider; 41 import com.android.settings.dashboard.suggestions.SuggestionsChecks; 49 import com.android.settingslib.suggestions.SuggestionList; 50 import com.android.settingslib.suggestions.SuggestionParser; 276 final List<Tile> suggestions = sl.getSuggestions(); in doInBackground() local 279 List<String> suggestionIds = new ArrayList<>(suggestions.size()); in doInBackground() 280 for (Tile suggestion : suggestions) { in doInBackground() 285 mSuggestionFeatureProvider.rankSuggestions(suggestions, suggestionIds); in doInBackground() 287 for (int i = 0; i < suggestions.size(); i++) { in doInBackground() [all …]
|
D | DashboardData.java | 221 final List<Tile> suggestions = getSuggestionsToShow(mSuggestions); in buildItemsData() local 223 hasSuggestions ? sizeOf(mSuggestions) - sizeOf(suggestions) : 0; in buildItemsData() 244 addToItemList(suggestions, R.layout.suggestion_condition_container, in buildItemsData() 245 STABLE_ID_SUGGESTION_CONTAINER, sizeOf(suggestions) > 0); in buildItemsData() 301 private List<Tile> getSuggestionsToShow(List<Tile> suggestions) { in getSuggestionsToShow() argument 302 if (suggestions == null || mSuggestionConditionMode == HEADER_MODE_COLLAPSED) { in getSuggestionsToShow() 306 || suggestions.size() <= DEFAULT_SUGGESTION_COUNT) { in getSuggestionsToShow() 307 return suggestions; in getSuggestionsToShow() 309 return suggestions.subList(0, DEFAULT_SUGGESTION_COUNT); in getSuggestionsToShow() 345 public Builder setSuggestions(List<Tile> suggestions) { in setSuggestions() argument [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/ |
D | DelayingSuggestionsAdapter.java | 52 public void setSuggestions(Suggestions suggestions) { in setSuggestions() argument 53 if (suggestions == null) { in setSuggestions() 58 if (shouldPublish(suggestions)) { in setSuggestions() 59 if (DBG) Log.d(TAG, "Publishing suggestions immediately: " + suggestions); in setSuggestions() 60 mDelayedAdapter.setSuggestions(suggestions); in setSuggestions() 64 if (DBG) Log.d(TAG, "Delaying suggestions publishing: " + suggestions); in setSuggestions() 65 setPendingSuggestions(suggestions); in setSuggestions() 72 private boolean shouldPublish(Suggestions suggestions) { in shouldPublish() argument 73 if (suggestions.isDone()) return true; in shouldPublish() 74 SuggestionCursor cursor = suggestions.getResult(); in shouldPublish() [all …]
|
D | SuggestionsAdapterBase.java | 85 public void setSuggestions(Suggestions suggestions) { in setSuggestions() argument 86 if (mSuggestions == suggestions) { in setSuggestions() 90 if (suggestions != null) { in setSuggestions() 91 suggestions.release(); in setSuggestions() 103 mSuggestions = suggestions; in setSuggestions() 151 protected View getView(SuggestionCursor suggestions, int position, long suggestionId, in getView() argument 153 suggestions.moveTo(position); in getView() 154 View v = mViewFactory.getView(suggestions, suggestions.getUserQuery(), convertView, parent); in getView()
|
D | SearchActivityView.java | 95 mSuggestionsView = (SuggestionsView) findViewById(R.id.suggestions); in onFinishInflate() 201 public void setSuggestions(Suggestions suggestions) { in setSuggestions() argument 202 suggestions.acquire(); in setSuggestions() 203 mSuggestionsAdapter.setSuggestions(suggestions); in setSuggestions() 342 Suggestions suggestions = mSuggestionsAdapter.getSuggestions(); in updateInputMethodSuggestions() 343 if (suggestions == null) return; in updateInputMethodSuggestions() 344 CompletionInfo[] completions = webSuggestionsToCompletions(suggestions); in updateInputMethodSuggestions() 349 private CompletionInfo[] webSuggestionsToCompletions(Suggestions suggestions) { in webSuggestionsToCompletions() argument 350 SourceResult cursor = suggestions.getWebResult(); in webSuggestionsToCompletions()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | RichInputConnectionAndTextRangeTests.java | 307 SuggestionSpan[] suggestions; in helpTestGetSuggestionSpansAtWord() local 310 suggestions = r.getSuggestionSpansAtWord(); in helpTestGetSuggestionSpansAtWord() 311 assertEquals(suggestions.length, 1); in helpTestGetSuggestionSpansAtWord() 312 MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1); in helpTestGetSuggestionSpansAtWord() 322 suggestions = r.getSuggestionSpansAtWord(); in helpTestGetSuggestionSpansAtWord() 323 assertEquals(suggestions.length, 2); in helpTestGetSuggestionSpansAtWord() 324 MoreAsserts.assertEquals(suggestions[0].getSuggestions(), SUGGESTIONS1); in helpTestGetSuggestionSpansAtWord() 325 MoreAsserts.assertEquals(suggestions[1].getSuggestions(), SUGGESTIONS2); in helpTestGetSuggestionSpansAtWord() 335 suggestions = r.getSuggestionSpansAtWord(); in helpTestGetSuggestionSpansAtWord() 336 assertEquals(suggestions.length, 1); in helpTestGetSuggestionSpansAtWord() [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | SearchActivity.java | 370 Suggestions suggestions = mSearchActivityView.getSuggestions(); in getCurrentSuggestions() local 371 if (suggestions == null) { in getCurrentSuggestions() 374 return suggestions.getResult(); in getCurrentSuggestions() 382 SuggestionCursor suggestions = pos.getCursor(); in getCurrentSuggestions() local 384 if (suggestions == null) { in getCurrentSuggestions() 387 int count = suggestions.getCount(); in getCurrentSuggestions() 392 suggestions.moveTo(position); in getCurrentSuggestions() 427 protected void launchSuggestion(SuggestionCursor suggestions, int position) { in launchSuggestion() argument 428 suggestions.moveTo(position); in launchSuggestion() 429 Intent intent = SuggestionUtils.getSuggestionIntent(suggestions, mAppSearchData); in launchSuggestion() [all …]
|
D | SuggestionsProviderImpl.java | 63 final Suggestions suggestions = new Suggestions(query, sourceToQuery); in getSuggestions() local 68 receiver = new SuggestionCursorReceiver(suggestions); in getSuggestions() 71 suggestions.done(); in getSuggestions() 78 return suggestions; in getSuggestions() 95 public SuggestionCursorReceiver(Suggestions suggestions) { in SuggestionCursorReceiver() argument 96 mSuggestions = suggestions; in SuggestionCursorReceiver()
|
D | EventLogTags.logtags | 32 # the list of suggestions shown. 40 71002 qsb_click (id|2),(suggestions|3),(queried_sources|3),(num_chars|1),(click_type|1) 55 # @param suggestions The suggestions shown when the user left QSB. See qsb_click above. 57 71005 qsb_exit (suggestions|3),(num_chars|1)
|
D | EventLogLogger.java | 70 String suggestions = getSuggestions(suggestionCursor); in logSuggestionClick() local 72 EventLogTags.writeQsbClick(id, suggestions, null, numChars, in logSuggestionClick() 88 String suggestions = getSuggestions(suggestionCursor); in logExit() local 89 EventLogTags.writeQsbExit(suggestions, numChars); in logExit()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/ |
D | DashboardAdapterTest.java | 51 import com.android.settings.dashboard.suggestions.SuggestionAdapter; 421 final List<Tile> suggestions = makeSuggestions("pkg1", "pkg2", "pkg3"); in testSuggestionDismissed_notOnlySuggestion_updateSuggestionOnly() local 422 adapter.setCategoriesAndSuggestions(null /* category */, suggestions); in testSuggestionDismissed_notOnlySuggestion_updateSuggestionOnly() 439 final Tile suggestionToRemove = suggestions.get(1); in testSuggestionDismissed_notOnlySuggestion_updateSuggestionOnly() 443 assertThat(suggestions.size()).isEqualTo(2); in testSuggestionDismissed_notOnlySuggestion_updateSuggestionOnly() 444 assertThat(suggestions.contains(suggestionToRemove)).isFalse(); in testSuggestionDismissed_notOnlySuggestion_updateSuggestionOnly() 455 final List<Tile> suggestions = in testSuggestionDismissed_moreThanTwoSuggestions_defaultMode_shouldNotCrash() local 459 adapter.setCategoriesAndSuggestions(null /* category */, suggestions); in testSuggestionDismissed_moreThanTwoSuggestions_defaultMode_shouldNotCrash() 464 adapter.onSuggestionDismissed(suggestions.get(1)); in testSuggestionDismissed_moreThanTwoSuggestions_defaultMode_shouldNotCrash() 468 adapter.setCategoriesAndSuggestions(null /* category */, suggestions); in testSuggestionDismissed_moreThanTwoSuggestions_defaultMode_shouldNotCrash() [all …]
|
D | DashboardDataTest.java | 76 final List<Tile> suggestions = new ArrayList<>(); in SetUp() local 78 suggestions.add(mTestSuggestion); in SetUp() 101 .setSuggestions(suggestions) in SetUp() 108 .setSuggestions(suggestions) in SetUp() 229 final List<Tile> suggestions = new ArrayList<>(); in testDiffUtil_RemoveOneSuggestion_causeItemRemoveAndChange() local 231 suggestions.add(mTestSuggestion); in testDiffUtil_RemoveOneSuggestion_causeItemRemoveAndChange() 236 .setSuggestions(suggestions) in testDiffUtil_RemoveOneSuggestion_causeItemRemoveAndChange()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/ |
D | AndroidWordLevelSpellCheckerSession.java | 67 public SuggestionsParams(String[] suggestions, int flags) { in SuggestionsParams() argument 68 mSuggestions = suggestions; in SuggestionsParams() 87 final String query, final String[] suggestions, final int flags) { in putSuggestionsToCache() argument 88 if (suggestions == null || TextUtils.isEmpty(query)) { in putSuggestionsToCache() 93 new SuggestionsParams(suggestions, flags)); in putSuggestionsToCache() 345 final ArrayList<String> suggestions = new ArrayList<>(); in getResult() local 356 suggestions.add(suggestion); in getResult() 358 StringUtils.removeDupes(suggestions); in getResult() 362 suggestions.subList(0, Math.min(suggestions.size(), suggestionsLimit)); in getResult() 367 final String bestSuggestion = suggestions.get(0); in getResult()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/ |
D | SuggestionFeatureProviderImplTest.java | 17 package com.android.settings.dashboard.suggestions; 59 import com.android.settingslib.suggestions.SuggestionParser; 386 final List<Tile> suggestions = new ArrayList<>(); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() local 387 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() 388 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() 389 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() 390 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() 391 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() 392 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() 393 suggestions.add(new Tile()); in filterExclusiveSuggestions_shouldOnlyKeepFirst3() [all …]
|
D | SuggestionAdapterTest.java | 16 package com.android.settings.dashboard.suggestions; 188 private void setupSuggestions(Context context, List<Tile> suggestions) { in setupSuggestions() argument 189 mSuggestionAdapter = new SuggestionAdapter(context, suggestions, new ArrayList<>()); in setupSuggestions() 196 final List<Tile> suggestions = new ArrayList<>(); in makeSuggestions() local 201 suggestions.add(suggestion); in makeSuggestions() 204 return suggestions; in makeSuggestions()
|
/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/ |
D | SuggestionFeatureProviderImpl.java | 17 package com.android.settings.dashboard.suggestions; 47 import com.android.settingslib.suggestions.SuggestionParser; 115 public void rankSuggestions(final List<Tile> suggestions, List<String> suggestionIds) { in rankSuggestions() argument 116 mSuggestionRanker.rankSuggestions(suggestions, suggestionIds); in rankSuggestions() 120 public void filterExclusiveSuggestions(List<Tile> suggestions) { in filterExclusiveSuggestions() argument 121 if (suggestions == null) { in filterExclusiveSuggestions() 124 for (int i = suggestions.size() - 1; i >= EXCLUSIVE_SUGGESTION_MAX_COUNT; i--) { in filterExclusiveSuggestions() 126 suggestions.remove(i); in filterExclusiveSuggestions()
|
D | SuggestionFeatureProvider.java | 17 package com.android.settings.dashboard.suggestions; 25 import com.android.settingslib.suggestions.SuggestionParser; 56 void rankSuggestions(final List<Tile> suggestions, List<String> suggestionIds); in rankSuggestions() argument 61 void filterExclusiveSuggestions(List<Tile> suggestions); in filterExclusiveSuggestions() argument
|
D | SuggestionRanker.java | 16 package com.android.settings.dashboard.suggestions; 62 public void rankSuggestions(final List<Tile> suggestions, List<String> suggestionIds) { in rankSuggestions() argument 66 relevanceMetrics.put(suggestions.get(i), in rankSuggestions() 69 Collections.sort(suggestions, suggestionComparator); in rankSuggestions()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/spellcheck/ |
D | AndroidSpellCheckerServiceTest.java | 37 final String[] suggestions = span.getSuggestions(); in testSpellchecker() local 40 assertTrue(suggestions.length >= 2); in testSpellchecker() 42 assertEquals("Test basic spell checking", "this", suggestions[0]); in testSpellchecker() 71 final String[] suggestions = span.getSuggestions(); in testSpellcheckWithPeriods() local 74 suggestions[0]); in testSpellcheckWithPeriods()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | Suggest.java | 139 @Nonnull final ArrayList<SuggestedWordInfo> suggestions) { in getWhitelistedWordInfoOrNull() 140 if (suggestions.isEmpty()) { in getWhitelistedWordInfoOrNull() 143 final SuggestedWordInfo firstSuggestedWordInfo = suggestions.get(0); in getWhitelistedWordInfoOrNull() 349 final String typedWord, final ArrayList<SuggestedWordInfo> suggestions) { in getSuggestionsInfoListWithDebugInfo() argument 350 final SuggestedWordInfo typedWordInfo = suggestions.get(0); in getSuggestionsInfoListWithDebugInfo() 352 final int suggestionsSize = suggestions.size(); in getSuggestionsInfoListWithDebugInfo() 358 final SuggestedWordInfo cur = suggestions.get(i + 1); in getSuggestionsInfoListWithDebugInfo()
|
D | DictionaryCollection.java | 71 ArrayList<SuggestedWordInfo> suggestions = dictionaries.get(0).getSuggestions(composedData, in getSuggestions() 74 if (null == suggestions) suggestions = new ArrayList<>(); in getSuggestions() 80 if (null != sugg) suggestions.addAll(sugg); in getSuggestions() 82 return suggestions; in getSuggestions()
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/ |
D | GoogleSuggestClient.java | 125 JSONArray suggestions = results.getJSONArray(1); in query() local 127 if (DBG) Log.d(LOG_TAG, "Got " + suggestions.length() + " results"); in query() 128 return new GoogleSuggestCursor(this, query, suggestions, popularity); in query() 172 JSONArray suggestions, JSONArray popularity) { in GoogleSuggestCursor() argument 174 mSuggestions = suggestions; in GoogleSuggestCursor()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/compat/ |
D | SuggestionSpanUtilsTest.java | 222 final String[] suggestions = new String[] {"Quality", "Speed", "Price"}; in testFindFirstLocaleFromSuggestionSpans() local 223 final SuggestionSpan nullLocaleSpan = new SuggestionSpan((Locale)null, suggestions, 0); in testFindFirstLocaleFromSuggestionSpans() 224 final SuggestionSpan emptyLocaleSpan = new SuggestionSpan(new Locale(""), suggestions, 0); in testFindFirstLocaleFromSuggestionSpans() 225 final SuggestionSpan enUsLocaleSpan = new SuggestionSpan(Locale.US, suggestions, 0); in testFindFirstLocaleFromSuggestionSpans() 226 final SuggestionSpan jaJpLocaleSpan = new SuggestionSpan(Locale.JAPAN, suggestions, 0); in testFindFirstLocaleFromSuggestionSpans()
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | SuggestionCursorUtil.java | 34 public static void assertNoSuggestions(SuggestionCursor suggestions) { in assertNoSuggestions() argument 35 assertNoSuggestions("", suggestions); in assertNoSuggestions() 38 public static void assertNoSuggestions(String message, SuggestionCursor suggestions) { in assertNoSuggestions() argument 39 assertNotNull(suggestions); in assertNoSuggestions() 40 assertEquals(message, 0, suggestions.getCount()); in assertNoSuggestions()
|