Home
last modified time | relevance | path

Searched refs:suggestion (Results 1 – 25 of 68) sorted by relevance

123

/packages/apps/Car/Settings/src/com/android/car/settings/suggestions/
DSuggestionsPreferenceController.java163 for (Suggestion suggestion : suggestions) { in updateSuggestionPreferences()
164 if (oldSuggestion.getId().equals(suggestion.getId())) { in updateSuggestionPreferences()
176 for (Suggestion suggestion : suggestions) { in updateSuggestionPreferences()
178 getSuggestionPreferenceKey(suggestion)); in updateSuggestionPreferences()
181 suggestion, /* callback= */ this); in updateSuggestionPreferences()
184 ((SuggestionPreference) curPref).updateSuggestion(suggestion); in updateSuggestionPreferences()
199 Suggestion suggestion = preference.getSuggestion(); in launchSuggestion() local
201 if (suggestion.getPendingIntent() != null) { in launchSuggestion()
202 suggestion.getPendingIntent().send(); in launchSuggestion()
203 mSuggestionController.launchSuggestion(suggestion); in launchSuggestion()
[all …]
DSuggestionPreference.java51 public SuggestionPreference(Context context, Suggestion suggestion, Callback callback) { in SuggestionPreference() argument
55 setKey(SUGGESTION_PREFERENCE_KEY + suggestion.getId()); in SuggestionPreference()
56 updateSuggestion(suggestion); in SuggestionPreference()
74 public void updateSuggestion(Suggestion suggestion) { in updateSuggestion() argument
75 if (mSuggestion != null && !Objects.equals(mSuggestion.getId(), suggestion.getId())) { in updateSuggestion()
79 mSuggestion = suggestion; in updateSuggestion()
80 setIcon((suggestion.getIcon() != null) ? suggestion.getIcon().loadDrawable(getContext()) in updateSuggestion()
82 setTitle(suggestion.getTitle()); in updateSuggestion()
83 setSummary(suggestion.getSummary()); in updateSuggestion()
/packages/apps/Contacts/src/com/android/contacts/editor/
DAggregationSuggestionView.java61 public void bindSuggestion(Suggestion suggestion) { in bindSuggestion() argument
62 mSuggestion = suggestion; in bindSuggestion()
65 suggestion.name, String.valueOf(suggestion.rawContactId), /* isCircular = */ false); in bindSuggestion()
69 suggestion.photoId, in bindSuggestion()
75 name.setText(suggestion.name); in bindSuggestion()
79 if (suggestion.nickname != null) { in bindSuggestion()
80 dataText = suggestion.nickname; in bindSuggestion()
81 } else if (suggestion.emailAddress != null) { in bindSuggestion()
82 dataText = suggestion.emailAddress; in bindSuggestion()
83 } else if (suggestion.phoneNumber != null) { in bindSuggestion()
[all …]
DAggregationSuggestionEngine.java382 Suggestion suggestion = null; in getSuggestions() local
388 suggestion = new Suggestion(); in getSuggestions()
389 suggestion.rawContactId = rawContactId; in getSuggestions()
390 suggestion.contactId = mDataCursor.getLong(DataQuery.CONTACT_ID); in getSuggestions()
391 suggestion.contactLookupKey = mDataCursor.getString(DataQuery.LOOKUP_KEY); in getSuggestions()
398 list.add(suggestion); in getSuggestions()
408 && (superprimary != 0 || suggestion.phoneNumber == null)) { in getSuggestions()
409 suggestion.phoneNumber = data; in getSuggestions()
415 && (superprimary != 0 || suggestion.emailAddress == null)) { in getSuggestions()
416 suggestion.emailAddress = data; in getSuggestions()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
DDefaultSuggestionView.java87 public void bindAsSuggestion(Suggestion suggestion, String userQuery) { in bindAsSuggestion() argument
88 super.bindAsSuggestion(suggestion, userQuery); in bindAsSuggestion()
90 CharSequence text1 = formatText(suggestion.getSuggestionText1(), suggestion); in bindAsSuggestion()
91 CharSequence text2 = suggestion.getSuggestionText2Url(); in bindAsSuggestion()
95 text2 = formatText(suggestion.getSuggestionText2(), suggestion); in bindAsSuggestion()
109 mAsyncIcon1.set(suggestion.getSuggestionSource(), suggestion.getSuggestionIcon1()); in bindAsSuggestion()
110 mAsyncIcon2.set(suggestion.getSuggestionSource(), suggestion.getSuggestionIcon2()); in bindAsSuggestion()
114 userQuery + ",fromHistory=" + isFromHistory(suggestion)); in bindAsSuggestion()
127 private CharSequence formatText(String str, Suggestion suggestion) { in formatText() argument
128 boolean isHtml = "html".equals(suggestion.getSuggestionFormat()); in formatText()
[all …]
DDefaultSuggestionViewFactory.java64 public View getView(SuggestionCursor suggestion, String userQuery, in getView() argument
67 if (factory.canCreateView(suggestion)) { in getView()
68 return factory.getView(suggestion, userQuery, convertView, parent); in getView()
71 return mDefaultFactory.getView(suggestion, userQuery, convertView, parent); in getView()
75 public String getViewType(Suggestion suggestion) { in getViewType() argument
77 if (factory.canCreateView(suggestion)) { in getViewType()
78 return factory.getViewType(suggestion); in getViewType()
81 return mDefaultFactory.getViewType(suggestion); in getViewType()
85 public boolean canCreateView(Suggestion suggestion) { in canCreateView() argument
DWebSearchSuggestionView.java58 public void bindAsSuggestion(Suggestion suggestion, String userQuery) { in bindAsSuggestion() argument
59 super.bindAsSuggestion(suggestion, userQuery); in bindAsSuggestion()
62 suggestion.getSuggestionText1()); in bindAsSuggestion()
64 setIsHistorySuggestion(suggestion.isHistorySuggestion()); in bindAsSuggestion()
97 public boolean canCreateView(Suggestion suggestion) { in canCreateView() argument
98 return suggestion.isWebSearchSuggestion(); in canCreateView()
DSuggestionViewInflater.java62 public View getView(SuggestionCursor suggestion, String userQuery, in getView() argument
71 ((SuggestionView) convertView).bindAsSuggestion(suggestion, userQuery); in getView()
75 public String getViewType(Suggestion suggestion) { in getViewType() argument
79 public boolean canCreateView(Suggestion suggestion) { in canCreateView() argument
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DSuggestionUtils.java34 public static Intent getSuggestionIntent(SuggestionCursor suggestion, Bundle appSearchData) { in getSuggestionIntent() argument
35 String action = suggestion.getSuggestionIntentAction(); in getSuggestionIntent()
37 String data = suggestion.getSuggestionIntentDataString(); in getSuggestionIntent()
38 String query = suggestion.getSuggestionQuery(); in getSuggestionIntent()
39 String userQuery = suggestion.getUserQuery(); in getSuggestionIntent()
40 String extraData = suggestion.getSuggestionIntentExtraData(); in getSuggestionIntent()
62 intent.setComponent(suggestion.getSuggestionIntentComponent()); in getSuggestionIntent()
70 public static String getSuggestionKey(Suggestion suggestion) { in getSuggestionKey() argument
71 String action = makeKeyComponent(suggestion.getSuggestionIntentAction()); in getSuggestionKey()
72 String data = makeKeyComponent(normalizeUrl(suggestion.getSuggestionIntentDataString())); in getSuggestionKey()
[all …]
DListSuggestionCursor.java50 for (Suggestion suggestion : suggestions) { in ListSuggestionCursor()
51 add(suggestion); in ListSuggestionCursor()
65 public boolean add(Suggestion suggestion) { in add() argument
66 mSuggestions.add(new Entry(suggestion)); in add()
96 public void replaceRow(Suggestion suggestion) { in replaceRow() argument
97 mSuggestions.set(mPos, new Entry(suggestion)); in replaceRow()
DSearchActivity.java411 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); in launchSuggestion() local
412 if (suggestion == null) return false; in launchSuggestion()
418 getLogger().logSuggestionClick(id, suggestion.getCursor(), in launchSuggestion()
422 launchSuggestion(suggestion.getCursor(), suggestion.getPosition()); in launchSuggestion()
435 SuggestionPosition suggestion = getCurrentSuggestions(adapter, id); in refineSuggestion() local
436 if (suggestion == null) { in refineSuggestion()
439 String query = suggestion.getSuggestionQuery(); in refineSuggestion()
445 getLogger().logSuggestionClick(id, suggestion.getCursor(), in refineSuggestion()
DEventLogTags.logtags26 # User clicked on a suggestion
27 # @param id Suggestion ID; a 0-based index of the clicked suggestion if the suggestion list is flat;
29 # @param A pipe-separated list of suggestion log names.
30 # TODO: define format of suggestion log names
59 # The latency of a suggestion query to a specific corpus.
/packages/apps/Dialer/java/com/android/dialer/preferredsim/impl/
DPreferredAccountWorkerImpl.java56 import com.android.dialer.preferredsim.suggestion.SimSuggestionComponent;
57 import com.android.dialer.preferredsim.suggestion.SuggestionProvider;
58 import com.android.dialer.preferredsim.suggestion.SuggestionProvider.Suggestion;
121 Optional<Suggestion> suggestion = in doInBackground() local
125 if (suggestion.isPresent() && suggestion.get().shouldAutoSelect) { in doInBackground()
126 return useSuggestedSim(suggestion.get(), candidates, dataId.orNull()); in doInBackground()
131 createDialogOptionsBuilder(candidates, dataId.orNull(), suggestion.orNull())); in doInBackground()
132 if (suggestion.isPresent()) { in doInBackground()
133 resultBuilder.setSuggestion(suggestion.get()); in doInBackground()
171 Suggestion suggestion, List<PhoneAccountHandle> candidates, @Nullable String dataId) { in useSuggestedSim() argument
[all …]
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DAutoCorrectionUtils.java32 public static boolean suggestionExceedsThreshold(final SuggestedWordInfo suggestion, in suggestionExceedsThreshold() argument
34 if (null != suggestion) { in suggestionExceedsThreshold()
36 if (suggestion.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) { in suggestionExceedsThreshold()
40 if (!suggestion.isAprapreateForAutoCorrection()) { in suggestionExceedsThreshold()
43 final int autoCorrectionSuggestionScore = suggestion.mScore; in suggestionExceedsThreshold()
47 consideredWord, suggestion.mWord, autoCorrectionSuggestionScore); in suggestionExceedsThreshold()
49 Log.d(TAG, "Normalized " + consideredWord + "," + suggestion + "," in suggestionExceedsThreshold()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DGlobalSearchSupport.java255 SearchSuggestion suggestion = new SearchSuggestion(); in addSearchSuggestionsBasedOnFilter() local
256 suggestion.filter = filter; in addSearchSuggestionsBasedOnFilter()
259 suggestion.contactId = c.getLong(0); in addSearchSuggestionsBasedOnFilter()
260 suggestion.lookupKey = c.getString(1); in addSearchSuggestionsBasedOnFilter()
261 suggestion.photoUri = c.getString(2); in addSearchSuggestionsBasedOnFilter()
262 suggestion.text1 = c.getString(3); in addSearchSuggestionsBasedOnFilter()
263 suggestion.presence = c.isNull(4) ? -1 : c.getInt(4); in addSearchSuggestionsBasedOnFilter()
264 suggestion.lastAccessTime = c.getString(5); in addSearchSuggestionsBasedOnFilter()
266 suggestion.text2 = shortenSnippet(c.getString(6)); in addSearchSuggestionsBasedOnFilter()
268 cursor.addRow(suggestion.asList(projection)); in addSearchSuggestionsBasedOnFilter()
[all …]
/packages/apps/Dialer/java/com/android/dialer/preferredsim/
DPreferredAccountRecorder.java31 import com.android.dialer.preferredsim.suggestion.SimSuggestionComponent;
32 import com.android.dialer.preferredsim.suggestion.SuggestionProvider.Suggestion;
38 @Nullable private final Suggestion suggestion; field in PreferredAccountRecorder
42 @Nullable String number, @Nullable Suggestion suggestion, @Nullable String dataId) { in PreferredAccountRecorder() argument
44 this.suggestion = suggestion; in PreferredAccountRecorder()
55 if (suggestion != null) { in record()
56 if (suggestion.phoneAccountHandle.equals(selectedAccountHandle)) { in record()
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/suggestions/
DSuggestionService.java39 for (Suggestion suggestion : list) { in onGetSuggestions()
40 ids.add(suggestion.getId()); in onGetSuggestions()
50 public void onSuggestionDismissed(Suggestion suggestion) { in onSuggestionDismissed() argument
52 final String id = suggestion.getId(); in onSuggestionDismissed()
64 public void onSuggestionLaunched(Suggestion suggestion) { in onSuggestionLaunched() argument
66 final String id = suggestion.getId(); in onSuggestionLaunched()
DSuggestionParser.java121 Suggestion suggestion = mAddCache.get(id); in readSuggestions() local
122 if (suggestion == null) { in readSuggestions()
123 suggestion = candidate.toSuggestion(); in readSuggestions()
124 mAddCache.put(id, suggestion); in readSuggestions()
126 if (!suggestions.contains(suggestion)) { in readSuggestions()
127 suggestions.add(suggestion); in readSuggestions()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
DMainFragment.java365 for (Suggestion suggestion : suggestions) { in updateSuggestionList()
366 if (pref.getId().equals(suggestion.getId())) { in updateSuggestionList()
377 for (Suggestion suggestion : suggestions) { in updateSuggestionList()
379 SuggestionPreference.SUGGESTION_PREFERENCE_KEY + suggestion.getId()); in updateSuggestionList()
382 suggestion, this.getPreferenceManager().getContext(), in updateSuggestionList()
384 newSuggPref.setIcon(mIconCache.getIcon(suggestion.getIcon())); in updateSuggestionList()
385 newSuggPref.setTitle(suggestion.getTitle()); in updateSuggestionList()
386 newSuggPref.setSummary(suggestion.getSummary()); in updateSuggestionList()
391 curPref.setIcon(mIconCache.getIcon(suggestion.getIcon())); in updateSuggestionList()
392 curPref.setTitle(suggestion.getTitle()); in updateSuggestionList()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardController.java139 for (Suggestion suggestion : suggestions) { in loadSuggestions()
142 if (suggestion.getIcon() != null) { in loadSuggestions()
143 cardBuilder.setIconDrawable(suggestion.getIcon().loadDrawable(mContext)); in loadSuggestions()
146 .setPendingIntent(suggestion.getPendingIntent()) in loadSuggestions()
147 .setName(suggestion.getId()) in loadSuggestions()
148 .setTitleText(suggestion.getTitle().toString()) in loadSuggestions()
149 .setSummaryText(suggestion.getSummary().toString()) in loadSuggestions()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardController.java139 for (Suggestion suggestion : suggestions) { in loadSuggestions()
142 if (suggestion.getIcon() != null) { in loadSuggestions()
143 cardBuilder.setIconDrawable(suggestion.getIcon().loadDrawable(mContext)); in loadSuggestions()
146 .setPendingIntent(suggestion.getPendingIntent()) in loadSuggestions()
147 .setName(suggestion.getId()) in loadSuggestions()
148 .setTitleText(suggestion.getTitle().toString()) in loadSuggestions()
149 .setSummaryText(suggestion.getSummary().toString()) in loadSuggestions()
/packages/apps/Dialer/java/com/android/dialer/preferredsim/suggestion/
DSuggestionProvider.java17 package com.android.dialer.preferredsim.suggestion;
85 Context context, PhoneAccountHandle phoneAccountHandle, @Nullable Suggestion suggestion) { in getHint() argument
86 if (suggestion == null) { in getHint()
89 if (!phoneAccountHandle.equals(suggestion.phoneAccountHandle)) { in getHint()
92 switch (suggestion.reason) { in getHint()
99 LogUtil.w("CallingAccountSelector.getHint", "unhandled reason " + suggestion.reason); in getHint()
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DMaterialSearchSuggestionsList.java105 mController.onSearchPerformed(mSuggestions.get(position).suggestion); in onItemClick()
132 final String suggestion = c.getString(textIndex); in doInBackground() local
134 result.add(new SuggestionItem(suggestion, iconUri)); in doInBackground()
160 final String suggestion; field in MaterialSearchSuggestionsList.SuggestionItem
164 suggestion = s; in SuggestionItem()
212 text.setText(item.suggestion); in getView()
214 item.suggestion)); in getView()
/packages/apps/SettingsIntelligence/proto/
Dsettings_intelligence_log.proto16 // Gets suggestion list
19 // Dismisses a suggestion
22 // Launches a suggestion
81 // The type of suggestion event.
84 // The name/id of the suggestion in this event.
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/
DAndroidWordLevelSpellCheckerSession.java296 for (String suggestion : result.mSuggestions) { in onGetSuggestionsInternal()
298 builder.append(suggestion); in onGetSuggestionsInternal()
347 final String suggestion; in getResult() local
349 suggestion = suggestedWordInfo.mWord.toUpperCase(locale); in getResult()
351 suggestion = StringUtils.capitalizeFirstCodePoint( in getResult()
354 suggestion = suggestedWordInfo.mWord; in getResult()
356 suggestions.add(suggestion); in getResult()

123