Searched refs:suggestion (Results 1 - 25 of 35) 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.java32 public static boolean suggestionExceedsThreshold(final SuggestedWordInfo suggestion, argument
34 if (null != suggestion) {
36 if (suggestion.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) {
39 // TODO: return suggestion.isAprapreateForAutoCorrection();
40 if (!suggestion.isAprapreateForAutoCorrection()) {
43 final int autoCorrectionSuggestionScore = suggestion.mScore;
44 // TODO: when the normalized score of the first suggestion is nearly equals to
45 // the normalized score of the second suggestion, behave less aggressive.
47 consideredWord, suggestion.mWord, autoCorrectionSuggestionScore);
49 Log.d(TAG, "Normalized " + consideredWord + "," + suggestion
[all...]
/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/
H A DSuggestionFeatureProviderImpl.java65 public void dismissSuggestion(Context context, SuggestionParser parser, Tile suggestion) { argument
66 if (parser == null || suggestion == null || context == null) {
71 getSuggestionIdentifier(context, suggestion));
74 if (!parser.dismissSuggestion(suggestion, isSmartSuggestionEnabled)) {
78 suggestion.intent.getComponent(),
81 parser.markCategoryDone(suggestion.category);
85 public String getSuggestionIdentifier(Context context, Tile suggestion) { argument
86 if (suggestion.intent == null || suggestion.intent.getComponent() == null) {
89 String packageName = suggestion
[all...]
H A DSuggestionFeatureProvider.java30 * Returns true if smart suggestion should be used instead of xml based SuggestionParser.
34 /** Return true if className is the name of a class of one of your newly added suggestion. */
37 /** Return true if the suggestion has already been completed and does not need to be shown */
43 * @param suggestions List of suggestion Tiles
44 * @param suggestionIds List of suggestion ids corresponding to the suggestion tiles.
49 * Dismisses a suggestion.
51 void dismissSuggestion(Context context, SuggestionParser parser, Tile suggestion); argument
54 * Returns an identifier for the suggestion
56 String getSuggestionIdentifier(Context context, Tile suggestion); argument
[all...]
H A DSuggestionDismissController.java33 * Returns suggestion tile data from the callback
38 * Called when a suggestion is dismissed.
40 void onSuggestionDismissed(Tile suggestion); argument
69 // Only return swipe direction for suggestion tiles. All other types are not swipeable.
80 final Tile suggestion = mCallback.getSuggestionForPosition(viewHolder.getAdapterPosition());
81 mSuggestionFeatureProvider.dismissSuggestion(mContext, mSuggestionParser, suggestion);
82 mCallback.onSuggestionDismissed(suggestion);
/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();
/packages/apps/Contacts/src/com/android/contacts/editor/
H A DAggregationSuggestionView.java34 * A view that contains a name, picture and other data for a contact aggregation suggestion.
61 public void bindSuggestion(Suggestion suggestion) { argument
62 mSuggestion = suggestion;
65 suggestion.name, String.valueOf(suggestion.rawContactId), /* isCircular = */ false);
69 suggestion.photoId,
75 name.setText(suggestion.name);
79 if (suggestion.nickname != null) {
80 dataText = suggestion.nickname;
81 } else if (suggestion
[all...]
H A DAggregationSuggestionEngine.java382 Suggestion suggestion = null;
388 suggestion = new Suggestion();
389 suggestion.rawContactId = rawContactId;
390 suggestion.contactId = mDataCursor.getLong(DataQuery.CONTACT_ID);
391 suggestion.contactLookupKey = mDataCursor.getString(DataQuery.LOOKUP_KEY);
398 list.add(suggestion);
408 && (superprimary != 0 || suggestion.phoneNumber == null)) {
409 suggestion.phoneNumber = data;
415 && (superprimary != 0 || suggestion.emailAddress == null)) {
416 suggestion
[all...]
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/
H A DSuggestionFeatureProviderImplTest.java86 final Tile suggestion = new Tile();
87 suggestion.intent = new Intent()
89 assertThat(mProvider.getSuggestionIdentifier(RuntimeEnvironment.application, suggestion))
95 final Tile suggestion = new Tile();
96 suggestion.intent = new Intent()
98 assertThat(mProvider.getSuggestionIdentifier(mContext, suggestion))
104 final Tile suggestion = new Tile();
105 suggestion.intent = new Intent();
106 assertThat(mProvider.getSuggestionIdentifier(mContext, suggestion))
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
H A DGlobalSearchSupport.java255 SearchSuggestion suggestion = new SearchSuggestion();
256 suggestion.filter = filter;
259 suggestion.contactId = c.getLong(0);
260 suggestion.lookupKey = c.getString(1);
261 suggestion.photoUri = c.getString(2);
262 suggestion.text1 = c.getString(3);
263 suggestion.presence = c.isNull(4) ? -1 : c.getInt(4);
264 suggestion.lastAccessTime = c.getString(5);
266 suggestion.text2 = shortenSnippet(c.getString(6));
268 cursor.addRow(suggestion
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
H A DMaterialSearchSuggestionsList.java105 mController.onSearchPerformed(mSuggestions.get(position).suggestion);
132 final String suggestion = c.getString(textIndex);
134 result.add(new SuggestionItem(suggestion, iconUri));
160 final String suggestion; field in class:MaterialSearchSuggestionsList.SuggestionItem
164 suggestion = s;
212 text.setText(item.suggestion);
214 item.suggestion));
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
H A DAndroidWordLevelSpellCheckerSession.java296 for (String suggestion : result.mSuggestions) {
298 builder.append(suggestion);
347 final String suggestion;
349 suggestion = suggestedWordInfo.mWord.toUpperCase(locale);
351 suggestion = StringUtils.capitalizeFirstCodePoint(
354 suggestion = suggestedWordInfo.mWord;
356 suggestions.add(suggestion);
/packages/apps/Settings/src/com/android/settings/dashboard/
H A DDashboardAdapter.java176 for (Tile suggestion : shownSuggestions) {
178 mContext, suggestion);
240 final Tile suggestion = (Tile) mDashboardData.getItemEntityByPosition(position);
242 mContext, suggestion);
243 // This is for cases when a suggestion is dismissed and the next one comes to view
249 onBindTile(holder, suggestion);
253 ((SettingsActivity) mContext).startSuggestion(suggestion.intent);
285 for (Tile suggestion : mDashboardData.getSuggestions()) {
287 mContext, suggestion);
341 public void onSuggestionDismissed(Tile suggestion) { argument
[all...]

Completed in 703 milliseconds

12