Searched refs:suggestion (Results 1 - 25 of 27) sorted by relevance

12

/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
H A DSuggestionNonFormatter.java30 public CharSequence formatSuggestion(String query, String suggestion) { argument
31 return suggestion;
H A DListSuggestionCursorNoDuplicates.java40 public boolean add(Suggestion suggestion) { argument
41 String key = SuggestionUtils.getSuggestionKey(suggestion);
43 return super.add(suggestion);
H A DSuggestionUtils.java34 public static Intent getSuggestionIntent(SuggestionCursor suggestion, Bundle appSearchData) { argument
35 String action = suggestion.getSuggestionIntentAction();
37 String data = suggestion.getSuggestionIntentDataString();
38 String query = suggestion.getSuggestionQuery();
39 String userQuery = suggestion.getUserQuery();
40 String extraData = suggestion.getSuggestionIntentExtraData();
62 intent.setComponent(suggestion.getSuggestionIntentComponent());
67 * Gets a unique key that identifies a suggestion. This is used to avoid
70 public static String getSuggestionKey(Suggestion suggestion) { argument
71 String action = makeKeyComponent(suggestion
[all...]
H A DListSuggestionCursor.java50 for (Suggestion suggestion : suggestions) {
51 add(suggestion);
61 * Adds a suggestion from another suggestion cursor.
63 * @return {@code true} if the suggestion was added.
65 public boolean add(Suggestion suggestion) { argument
66 mSuggestions.add(new Entry(suggestion));
96 public void replaceRow(Suggestion suggestion) { argument
97 mSuggestions.set(mPos, new Entry(suggestion));
161 * This class exists purely to cache the suggestion extra
[all...]
H A DLevenshteinSuggestionFormatter.java40 public Spanned formatSuggestion(String query, String suggestion) { argument
41 if (DBG) Log.d(TAG, "formatSuggestion('" + query + "', '" + suggestion + "')");
44 final Token[] suggestionTokens = tokenize(suggestion);
51 final SpannableString str = new SpannableString(suggestion);
76 * @param target List of target tokens (i.e. suggestion)
H A DSuggestionFormatter.java23 * suggestion which were not a part of the query.
34 * Formats a suggestion for display in the UI.
37 * @param suggestion the suggestion
38 * @return Formatted suggestion text.
40 public abstract CharSequence formatSuggestion(String query, String suggestion); argument
H A DSearchActivity.java269 // Close all open suggestion cursors. The query will be redone in onResume()
385 Log.w(TAG, "Invalid suggestion position " + position + ", count = " + count);
400 // Since the intents for suggestions specified by suggestion providers,
407 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id);
408 if (suggestion == null) return false;
410 if (DBG) Log.d(TAG, "Launching suggestion " + id);
413 // Log suggestion click
414 getLogger().logSuggestionClick(id, suggestion.getCursor(),
418 launchSuggestion(suggestion.getCursor(), suggestion
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
H A DAutoCorrectionUtils.java34 final SuggestedWordInfo suggestion, final String consideredWord,
36 if (null != suggestion) {
38 if (suggestion.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) {
41 final int autoCorrectionSuggestionScore = suggestion.mScore;
42 // TODO: when the normalized score of the first suggestion is nearly equals to
43 // the normalized score of the second suggestion, behave less aggressive.
45 consideredWord, suggestion.mWord, autoCorrectionSuggestionScore);
47 Log.d(TAG, "Normalized " + consideredWord + "," + suggestion + ","
55 return !shouldBlockAutoCorrectionBySafetyNet(consideredWord, suggestion.mWord);
64 final String suggestion) {
33 suggestionExceedsAutoCorrectionThreshold( final SuggestedWordInfo suggestion, final String consideredWord, final float autoCorrectionThreshold) argument
63 shouldBlockAutoCorrectionBySafetyNet(final String typedWord, final String suggestion) argument
[all...]
H A DDistracterFilterCheckingExactMatchesAndSuggestions.java62 // If the score of the top suggestion exceeds this value, the tested word (e.g.,
269 private static boolean suggestionExceedsDistracterThreshold(final SuggestedWordInfo suggestion, argument
271 if (suggestion == null) {
274 final int suggestionScore = suggestion.mScore;
276 consideredWord, suggestion.mWord, suggestionScore);
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
H A DDefaultSuggestionViewFactory.java64 public View getView(SuggestionCursor suggestion, String userQuery, argument
67 if (factory.canCreateView(suggestion)) {
68 return factory.getView(suggestion, userQuery, convertView, parent);
71 return mDefaultFactory.getView(suggestion, userQuery, convertView, parent);
75 public String getViewType(Suggestion suggestion) { argument
77 if (factory.canCreateView(suggestion)) {
78 return factory.getViewType(suggestion);
81 return mDefaultFactory.getViewType(suggestion);
85 public boolean canCreateView(Suggestion suggestion) { argument
H A DSuggestionViewFactory.java28 * Factory interface for suggestion views.
37 * View types must be unique across all suggestion view factories.
42 * Returns the view type to be used for displaying the given suggestion. This MUST correspond to
45 String getViewType(Suggestion suggestion); argument
48 * Gets a view corresponding to the current suggestion in the given cursor.
54 * @return A View corresponding to the data within this suggestion.
56 View getView(SuggestionCursor suggestion, String userQuery, View convertView, ViewGroup parent); argument
59 * Checks whether this factory can create views for the given suggestion.
61 boolean canCreateView(Suggestion suggestion); argument
H A DSuggestionView.java26 * Set the view's contents based on the given suggestion.
28 void bindAsSuggestion(Suggestion suggestion, String userQuery); argument
H A DWebSearchSuggestionView.java58 public void bindAsSuggestion(Suggestion suggestion, String userQuery) { argument
59 super.bindAsSuggestion(suggestion, userQuery);
62 suggestion.getSuggestionText1());
64 setIsHistorySuggestion(suggestion.isHistorySuggestion());
97 public boolean canCreateView(Suggestion suggestion) { argument
98 return suggestion.isWebSearchSuggestion();
H A DSuggestionViewInflater.java62 public View getView(SuggestionCursor suggestion, String userQuery, argument
71 ((SuggestionView) convertView).bindAsSuggestion(suggestion, userQuery);
75 public String getViewType(Suggestion suggestion) { argument
79 public boolean canCreateView(Suggestion suggestion) { argument
H A DDefaultSuggestionView.java87 public void bindAsSuggestion(Suggestion suggestion, String userQuery) { argument
88 super.bindAsSuggestion(suggestion, userQuery);
90 CharSequence text1 = formatText(suggestion.getSuggestionText1(), suggestion);
91 CharSequence text2 = suggestion.getSuggestionText2Url();
95 text2 = formatText(suggestion.getSuggestionText2(), suggestion);
109 mAsyncIcon1.set(suggestion.getSuggestionSource(), suggestion.getSuggestionIcon1());
110 mAsyncIcon2.set(suggestion
127 formatText(String str, Suggestion suggestion) argument
[all...]
H A DBaseSuggestionView.java31 * Base class for suggestion views.
64 public void bindAsSuggestion(Suggestion suggestion, String userQuery) { argument
74 protected boolean isFromHistory(Suggestion suggestion) { argument
75 return suggestion.isSuggestionShortcut() || suggestion.isHistorySuggestion();
H A DSuggestionsAdapterBase.java131 private String suggestionViewType(Suggestion suggestion) { argument
132 String viewType = mViewFactory.getViewType(suggestion);
/packages/apps/Contacts/src/com/android/contacts/editor/
H A DAggregationSuggestionView.java41 * A view that contains a name, picture and other data for a contact aggregation suggestion.
82 public void bindSuggestion(Suggestion suggestion) { argument
83 mContactId = suggestion.contactId;
84 mLookupKey = suggestion.lookupKey;
85 mRawContacts = suggestion.rawContacts;
87 if (suggestion.photo != null) {
89 suggestion.photo, 0, suggestion.photo.length));
96 name.setText(suggestion.name);
100 if (suggestion
[all...]
H A DAggregationSuggestionEngine.java380 Suggestion suggestion = null;
386 suggestion = new Suggestion();
387 suggestion.contactId = contactId;
388 suggestion.name = mDataCursor.getString(DataQuery.DISPLAY_NAME);
389 suggestion.lookupKey = mDataCursor.getString(DataQuery.LOOKUP_KEY);
390 suggestion.rawContacts = Lists.newArrayList();
391 list.add(suggestion);
396 if (!containsRawContact(suggestion, rawContactId)) {
402 suggestion.rawContacts.add(rawContact);
410 && (superprimary != 0 || suggestion
437 containsRawContact(Suggestion suggestion, long rawContactId) argument
[all...]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
H A DGlobalSearchSupport.java254 SearchSuggestion suggestion = new SearchSuggestion();
255 suggestion.filter = filter;
258 suggestion.contactId = c.getLong(0);
259 suggestion.lookupKey = c.getString(1);
260 suggestion.photoUri = c.getString(2);
261 suggestion.text1 = c.getString(3);
262 suggestion.presence = c.isNull(4) ? -1 : c.getInt(4);
263 suggestion.lastAccessTime = c.getString(5);
265 suggestion.text2 = shortenSnippet(c.getString(6));
267 cursor.addRow(suggestion
[all...]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
H A DAndroidWordLevelSpellCheckerSession.java291 Log.i(TAG, "Spell checking results for " + text + " with suggestion limit "
297 for (String suggestion : result.mSuggestions) {
298 Log.i(TAG, suggestion);
350 final String suggestion;
352 suggestion = suggestedWordInfo.mWord.toUpperCase(locale);
354 suggestion = StringUtils.capitalizeFirstCodePoint(
357 suggestion = suggestedWordInfo.mWord;
359 suggestions.add(suggestion);
374 Log.i(TAG, "Best suggestion : " + bestSuggestion + ", score " + bestScore);
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
H A DLevenshteinFormatterTest.java151 private void verifyFormatSuggestion(String query, String suggestion, SpanFormat... spans) { argument
152 Spanned s = mFormatter.formatSuggestion(query, suggestion);
163 verifyFormatSuggestion("", "suggestion",
164 new SpanFormat(0, "suggestion", mSuggestedStyle));
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/
H A DInputLogic.java121 * @param suggestionStripViewAccessor an object to access the suggestion strip view.
277 * A suggestion was picked from the suggestion strip.
279 * @param suggestionInfo the suggestion info.
291 final String suggestion = suggestionInfo.mWord;
292 // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput
293 if (suggestion.length() == 1 && suggestedWords.isPunctuationSuggestions()) {
308 if (SpaceState.PHANTOM == mSpaceState && suggestion.length() > 0
312 final int firstChar = Character.codePointAt(suggestion, 0);
321 // however need to reset the suggestion stri
1338 performAdditionToUserHistoryDictionary(final SettingsValues settingsValues, final String suggestion, final PrevWordsInfo prevWordsInfo) argument
[all...]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
H A DInputTestsBase.java348 protected void pickSuggestionManually(final String suggestion) { argument
349 mLatinIME.pickSuggestionManually(new SuggestedWordInfo(suggestion, 1,
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
H A DDictionaryFacilitator.java407 public void addToUserHistory(final String suggestion, final boolean wasAutoCapitalized, argument
411 final String[] words = suggestion.split(Constants.WORD_SEPARATOR);
489 // TODO: Revise the way to fusion suggestion results.
655 + "The dictionary is not being used for suggestion or cannot be dumped.");

Completed in 482 milliseconds

12