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

1 2 3 4 5 6 7 8

  /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...]
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...]
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/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
AutoCorrectionUtils.java 32 public static boolean suggestionExceedsThreshold(final SuggestedWordInfo suggestion,
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/QuickSearchBox/src/com/android/quicksearchbox/ui/
DefaultSuggestionViewFactory.java 22 import com.android.quicksearchbox.Suggestion;
30 * Suggestion view factory for Google suggestions.
64 public View getView(SuggestionCursor suggestion, String userQuery,
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) {
77 if (factory.canCreateView(suggestion)) {
78 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) {
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.
64 public void bindAsSuggestion(Suggestion suggestion, String userQuery) {
74 protected boolean isFromHistory(Suggestion suggestion) {
75 return suggestion.isSuggestionShortcut() || suggestion.isHistorySuggestion();
  /packages/apps/Contacts/src/com/android/contacts/editor/
AggregationSuggestionView.java 31 import com.android.contacts.editor.AggregationSuggestionEngine.Suggestion;
34 * A view that contains a name, picture and other data for a contact aggregation suggestion.
47 private Suggestion mSuggestion;
61 public void bindSuggestion(Suggestion suggestion) {
62 mSuggestion = suggestion;
65 suggestion.name, String.valueOf(suggestion.rawContactId), /* isCircular = */ false);
69 suggestion.photoId,
75 name.setText(suggestion.name)
    [all...]
AggregationSuggestionEngine.java 60 public static final class Suggestion {
72 return MoreObjects.toStringHelper(Suggestion.class)
378 public List<Suggestion> getSuggestions() {
379 final ArrayList<Suggestion> list = Lists.newArrayList();
382 Suggestion suggestion = null; local
388 suggestion = new Suggestion();
389 suggestion.rawContactId = rawContactId;
390 suggestion.contactId = mDataCursor.getLong(DataQuery.CONTACT_ID)
    [all...]
  /external/autotest/client/profilers/powertop/src/
suggestions.c 40 struct suggestion;
42 struct suggestion { struct
43 struct suggestion *next;
55 static struct suggestion *suggestions;
63 struct suggestion *ptr;
66 struct suggestion *next;
82 struct suggestion *new;
87 new = malloc(sizeof(struct suggestion));
90 memset(new, 0, sizeof(struct suggestion));
105 struct suggestion *ptr
    [all...]
  /packages/apps/Settings/src/com/android/settings/dashboard/suggestions/
SuggestionFeatureProvider.java 33 * Whether or not the whole suggestion feature is enabled.
38 * Returns true if smart suggestion should be used instead of xml based SuggestionParser.
42 /** Return true if the suggestion has already been completed and does not need to be shown */
43 boolean isSuggestionCompleted(Context context, @NonNull ComponentName suggestion);
53 * @param suggestions List of suggestion Tiles
54 * @param suggestionIds List of suggestion ids corresponding to the suggestion tiles.
64 * Dismisses a suggestion.
66 void dismissSuggestion(Context context, SuggestionParser parser, Tile suggestion);
69 * Returns an identifier for the suggestion
    [all...]
SuggestionAdapter.java 68 final Tile suggestion = (Tile) mSuggestions.get(position); local
70 mContext, suggestion);
71 // This is for cases when a suggestion is dismissed and the next one comes to view
78 if (suggestion.remoteViews != null) {
81 itemView.addView(suggestion.remoteViews.apply(itemView.getContext(), itemView));
83 holder.icon.setImageDrawable(mCache.getIcon(suggestion.icon));
84 holder.title.setText(suggestion.title);
85 if (!TextUtils.isEmpty(suggestion.summary)) {
86 holder.summary.setText(suggestion.summary);
108 ((SettingsActivity) mContext).startSuggestion(suggestion.intent)
119 Tile suggestion = getSuggestion(position); local
    [all...]
SuggestionDismissController.java 33 * Returns suggestion tile data from the callback
38 * Called when a suggestion is dismissed.
40 void onSuggestionDismissed(Tile suggestion);
71 // Only return swipe direction for suggestion tiles. All other types are not swipeable.
82 final Tile suggestion = mCallback.getSuggestionForPosition(viewHolder.getAdapterPosition()); local
83 mSuggestionFeatureProvider.dismissSuggestion(mContext, mSuggestionParser, suggestion);
84 mCallback.onSuggestionDismissed(suggestion);
SuggestionFeatureProviderImpl.java 125 Log.d(TAG, "Removing exclusive suggestion");
131 public void dismissSuggestion(Context context, SuggestionParser parser, Tile suggestion) {
132 if (parser == null || suggestion == null || context == null) {
140 getSuggestionIdentifier(context, suggestion),
142 if (!parser.dismissSuggestion(suggestion)) {
146 suggestion.intent.getComponent(),
152 public String getSuggestionIdentifier(Context context, Tile suggestion) {
153 if (suggestion.intent == null || suggestion.intent.getComponent() == null
157 String packageName = suggestion.intent.getComponent().getPackageName()
    [all...]
  /frameworks/base/packages/SettingsLib/src/com/android/settingslib/suggestions/
SuggestionParser.java 57 // If defined, only returns this suggestion if the feature is supported.
142 // Read suggestion and force isSmartSuggestion to be false so the rule defined
143 // from each suggestion itself is used.
162 * Dismisses a suggestion, returns true if the suggestion has no more dismisses left and should
165 public boolean dismissSuggestion(Tile suggestion) {
166 final String keyBase = suggestion.intent.getComponent().flattenToShortString();
217 private boolean isAvailable(Tile suggestion) {
218 final String featuresRequired = suggestion.metaData.getString(META_DATA_REQUIRE_FEATURE);
225 Log.i(TAG, suggestion.title + " requires unavailable feature " + feature)
    [all...]
  /frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/suggestions/
SuggestionParserTest.java 189 final Tile suggestion = new Tile(); local
190 suggestion.metaData = new Bundle();
191 suggestion.metaData.putString(SuggestionParser.META_DATA_DISMISS_CONTROL, "1,2,3");
192 suggestion.intent = new Intent().setComponent(new ComponentName("pkg", "cls"));
194 // Dismiss suggestion when smart suggestion is not enabled.
195 mSuggestionParser.dismissSuggestion(suggestion);
197 assertThat(mSuggestionParser.isDismissed(suggestion, true /* isSmartSuggestionEnabled */))
207 final Tile suggestion = mSuggestionsBeforeDismiss.get(0); local
208 if (mSuggestionParser.dismissSuggestion(suggestion)) {
    [all...]
  /packages/providers/ContactsProvider/src/com/android/providers/contacts/
GlobalSearchSupport.java 255 SearchSuggestion suggestion = new SearchSuggestion(); local
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.asList(projection))
    [all...]
  /packages/apps/UnifiedEmail/src/com/android/mail/ui/
MaterialSearchSuggestionsList.java 105 mController.onSearchPerformed(mSuggestions.get(position).suggestion);
132 final String suggestion = c.getString(textIndex); local
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));

Completed in 1082 milliseconds

1 2 3 4 5 6 7 8