HomeSort by relevance Sort by last modified time
    Searched refs:suggestion (Results 1 - 25 of 52) sorted by null

1 2 3

  /packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
SuggestionNonFormatter.java 30 public CharSequence formatSuggestion(String query, String suggestion) {
31 return suggestion;
ListSuggestionCursorNoDuplicates.java 40 public boolean add(Suggestion suggestion) {
41 String key = SuggestionUtils.getSuggestionKey(suggestion);
43 return super.add(suggestion);
SuggestionUtils.java 34 public static Intent getSuggestionIntent(SuggestionCursor suggestion, Bundle appSearchData) {
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) {
    [all...]
ShortcutsProvider.java 175 SuggestionData suggestion = new SuggestionData(source); local
176 suggestion.setFormat(format);
177 suggestion.setText1(text1);
178 suggestion.setText2(text2);
179 suggestion.setText2Url(text2Url);
180 suggestion.setIcon1(icon1);
181 suggestion.setIcon2(icon2);
182 suggestion.setShortcutId(shortcutId);
183 suggestion.setSpinnerWhileRefreshing(spinnerWhileRefreshing);
184 suggestion.setIntentAction(intentAction)
    [all...]
ListSuggestionCursor.java 48 public ListSuggestionCursor(String userQuery, Suggestion...suggestions) {
50 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) {
66 mSuggestions.add(new Entry(suggestion));
    [all...]
SearchActivity.java 339 // Close all open suggestion cursors. The query will be redone in onResume()
473 Log.w(TAG, "Invalid suggestion position " + position + ", count = " + count);
493 // Since the intents for suggestions specified by suggestion providers,
500 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); local
501 if (suggestion == null) return false;
503 if (DBG) Log.d(TAG, "Launching suggestion " + id);
506 // Log suggestion click
507 getLogger().logSuggestionClick(id, suggestion.getCursor(), getCurrentIncludedCorpora(),
511 getShortcutRepository().reportClick(suggestion.getCursor(), suggestion.getPosition())
527 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); local
546 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); local
573 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); local
589 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); local
    [all...]
ShortcutRepositoryImplLog.java 310 private boolean shouldRefresh(Suggestion suggestion) {
311 return mRefresher.shouldRefresh(suggestion.getSuggestionSource(),
312 suggestion.getShortcutId());
416 // original suggestion.
528 private ContentValues makeShortcutRow(Suggestion suggestion) {
529 String intentAction = suggestion.getSuggestionIntentAction();
530 String intentComponent = componentNameToString(suggestion.getSuggestionIntentComponent());
531 String intentData = suggestion.getSuggestionIntentDataString()
    [all...]
LevenshteinSuggestionFormatter.java 28 * Suggestion formatter using the Levenshtein distance (minumum edit distance) to calculate the
40 public Spanned formatSuggestion(String query, String suggestion) {
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)
SuggestionFormatter.java 22 * Suggestion formatter interface. This is used to bold (or otherwise highlight) portions of a
23 * 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);
  /packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
DefaultSuggestionViewFactory.java 18 import com.android.quicksearchbox.Suggestion;
30 * Suggestion view factory for Google suggestions.
63 public View getView(SuggestionCursor suggestion, String userQuery,
66 if (factory.canCreateView(suggestion)) {
67 return factory.getView(suggestion, userQuery, convertView, parent);
70 return mDefaultFactory.getView(suggestion, userQuery, convertView, parent);
73 public String getViewType(Suggestion suggestion) {
75 if (factory.canCreateView(suggestion)) {
76 return factory.getViewType(suggestion);
    [all...]
SuggestionViewFactory.java 19 import com.android.quicksearchbox.Suggestion;
28 * 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);
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);
59 * Checks whether this factory can create views for the given suggestion
    [all...]
SuggestionView.java 19 import com.android.quicksearchbox.Suggestion;
26 * Set the view's contents based on the given suggestion.
28 void bindAsSuggestion(Suggestion suggestion, String userQuery);
WebSearchSuggestionView.java 21 import com.android.quicksearchbox.Suggestion;
58 public void bindAsSuggestion(Suggestion suggestion, String userQuery) {
59 super.bindAsSuggestion(suggestion, userQuery);
62 suggestion.getSuggestionText1());
64 setIsHistorySuggestion(suggestion.isHistorySuggestion());
97 public boolean canCreateView(Suggestion suggestion) {
98 return suggestion.isWebSearchSuggestion();
SuggestionViewInflater.java 19 import com.android.quicksearchbox.Suggestion;
31 * Suggestion view factory that inflates views from XML.
62 public View getView(SuggestionCursor suggestion, String userQuery,
71 ((SuggestionView) convertView).bindAsSuggestion(suggestion, userQuery);
75 public String getViewType(Suggestion suggestion) {
79 public boolean canCreateView(Suggestion suggestion) {
ContactSuggestionView.java 22 import com.android.quicksearchbox.Suggestion;
60 public void bindAsSuggestion(Suggestion suggestion, String userQuery) {
61 super.bindAsSuggestion(suggestion, userQuery);
62 mQuickContact.assignContactUri(Uri.parse(suggestion.getSuggestionIntentDataString()));
78 public boolean canCreateView(Suggestion suggestion) {
79 Source source = suggestion.getSuggestionSource();
DefaultSuggestionView.java 21 import com.android.quicksearchbox.Suggestion;
87 public void bindAsSuggestion(Suggestion suggestion, String userQuery) {
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())
    [all...]
BaseSuggestionView.java 20 import com.android.quicksearchbox.Suggestion;
31 * Base class for suggestion views.
63 public void bindAsSuggestion(Suggestion suggestion, String userQuery) {
65 if (isFromHistory(suggestion)) {
79 protected boolean isFromHistory(Suggestion suggestion) {
80 return suggestion.isSuggestionShortcut() || suggestion.isHistorySuggestion();
  /packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
AutoCorrection.java 84 final SuggestedWordInfo suggestion, final String consideredWord,
86 if (null != suggestion) {
88 if (suggestion.mKind == SuggestedWordInfo.KIND_WHITELIST) return true;
89 final int autoCorrectionSuggestionScore = suggestion.mScore;
90 // TODO: when the normalized score of the first suggestion is nearly equals to
91 // the normalized score of the second suggestion, behave less aggressive.
93 consideredWord, suggestion.mWord, autoCorrectionSuggestionScore);
95 Log.d(TAG, "Normalized " + consideredWord + "," + suggestion + ","
103 return !shouldBlockAutoCorrectionBySafetyNet(consideredWord, suggestion.mWord);
112 final String suggestion) {
    [all...]
  /packages/apps/Contacts/src/com/android/contacts/editor/
AggregationSuggestionView.java 30 import com.android.contacts.editor.AggregationSuggestionEngine.Suggestion;
39 * A view that contains a name, picture and other data for a contact aggregation suggestion.
80 public void bindSuggestion(Suggestion suggestion) {
81 mContactId = suggestion.contactId;
82 mLookupKey = suggestion.lookupKey;
83 mRawContacts = suggestion.rawContacts;
85 if (suggestion.photo != null) {
87 suggestion.photo, 0, suggestion.photo.length))
    [all...]
AggregationSuggestionEngine.java 70 public static final class Suggestion {
373 public List<Suggestion> getSuggestions() {
374 ArrayList<Suggestion> list = Lists.newArrayList();
376 Suggestion suggestion = null; local
382 suggestion = new Suggestion();
383 suggestion.contactId = contactId;
384 suggestion.name = mDataCursor.getString(DataQuery.DISPLAY_NAME);
385 suggestion.lookupKey = mDataCursor.getString(DataQuery.LOOKUP_KEY)
    [all...]
  /external/chromium/chrome/browser/extensions/
extension_omnibox_api.cc 27 "Suggestion descriptionStyles must be in increasing non-overlapping order.";
29 "Suggestion descriptionStyles contains an offset longer than the"
46 // Returns the suggestion object set by the extension via the
118 ExtensionOmniboxSuggestion& suggestion = suggestions.suggestions[i]; local
123 kSuggestionContent, &suggestion.content));
125 kSuggestionDescription, &suggestion.description));
131 EXTENSION_FUNCTION_VALIDATE(suggestion.ReadStylesFromValue(*styles));
133 suggestion.description_styles.clear();
134 suggestion.description_styles.push_back(
148 ExtensionOmniboxSuggestion suggestion; local
238 const ExtensionOmniboxSuggestion* suggestion = local
    [all...]
  /packages/providers/ContactsProvider/src/com/android/providers/contacts/
GlobalSearchSupport.java 254 SearchSuggestion suggestion = new SearchSuggestion(); local
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.asList(projection))
    [all...]
  /packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
AndroidWordLevelSpellCheckerSession.java 306 for (final SuggestedWordInfo suggestion : suggestions) {
307 final String suggestionStr = suggestion.mWord;
309 suggestionStr.length(), suggestion.mScore);
324 Log.i(TAG, "Spell checking results for " + text + " with suggestion limit "
330 for (String suggestion : result.mSuggestions) {
331 Log.i(TAG, suggestion);
  /development/samples/SoftKeyboard/src/com/example/android/softkeyboard/
CandidateView.java 182 String suggestion = mSuggestions.get(i); local
183 float textWidth = paint.measureText(suggestion);
206 canvas.drawText(suggestion, x + X_GAP, y, paint);
  /external/chromium/chrome/browser/autocomplete/
keyword_provider.cc 462 // It's possible to change the default suggestion while not in an editing
493 const ExtensionOmniboxSuggestion& suggestion = local
497 // and subtract 1 for each subsequent suggestion from the extension.
504 suggestion.content, first_relevance - (i + 1)));
507 match->contents.assign(suggestion.description);
508 match->contents_class = suggestion.description_styles;

Completed in 388 milliseconds

1 2 3