/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...] |
/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...] |
/frameworks/base/core/java/android/service/settings/suggestions/ |
SuggestionService.java | 28 * This is the base class for implementing suggestion service. A suggestion service is responsible 29 * to provide a collection of {@link Suggestion}s for the current user when queried. 43 public List<Suggestion> getSuggestions() { 51 public void dismissSuggestion(Suggestion suggestion) { 55 onSuggestionDismissed(suggestion); 59 public void launchSuggestion(Suggestion suggestion) { 63 onSuggestionLaunched(suggestion); [all...] |
/packages/apps/Dialer/java/com/android/dialer/preferredsim/suggestion/stub/ |
StubSimSuggestionModule.java | 17 package com.android.dialer.preferredsim.suggestion.stub; 19 import com.android.dialer.preferredsim.suggestion.SuggestionProvider; 24 /** Stub module for {@link com.android.dialer.preferredsim.suggestion.SimSuggestionComponent} */
|
StubSuggestionProvider.java | 17 package com.android.dialer.preferredsim.suggestion.stub; 23 import com.android.dialer.preferredsim.suggestion.SuggestionProvider; 35 public Optional<Suggestion> getSuggestion(Context context, String number) {
|
/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...] |
/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/Car/Settings/src/com/android/car/settings/suggestions/ |
SettingsSuggestionsController.java | 25 import android.service.settings.suggestions.Suggestion; 49 LoaderManager.LoaderCallbacks<List<Suggestion>> { 98 public Loader<List<Suggestion>> onCreateLoader(int id, @Nullable Bundle args) { 108 @NonNull Loader<List<Suggestion>> loader, 109 List<Suggestion> suggestionList) { 115 for (final Suggestion suggestion : suggestionList) { 116 LOG.v("Suggestion ID: " + suggestion.getId()); 117 Drawable itemIcon = mIconCache.getIcon(suggestion.getIcon()) [all...] |
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/suggestions/ |
SuggestionService.java | 19 import android.service.settings.suggestions.Suggestion; 32 public List<Suggestion> onGetSuggestions() { 34 final List<Suggestion> list = FeatureFactory.get(this) 39 for (Suggestion suggestion : list) { 40 ids.add(suggestion.getId()); 50 public void onSuggestionDismissed(Suggestion suggestion) { 52 final String id = suggestion.getId(); 53 Log.d(TAG, "dismissing suggestion " + id) [all...] |
/frameworks/base/core/tests/coretests/src/android/service/settings/suggestions/ |
MockSuggestionService.java | 37 public List<Suggestion> onGetSuggestions() { 38 final List<Suggestion> data = new ArrayList<>(); 40 data.add(new Suggestion.Builder("test") 48 public void onSuggestionDismissed(Suggestion suggestion) { 53 public void onSuggestionLaunched(Suggestion suggestion) {
|
SuggestionTest.java | 56 final Suggestion suggestion = new Suggestion.Builder(TEST_ID) local 63 assertThat(suggestion.getId()).isEqualTo(TEST_ID); 64 assertThat(suggestion.getTitle()).isEqualTo(TEST_TITLE); 65 assertThat(suggestion.getSummary()).isEqualTo(TEST_SUMMARY); 66 assertThat(suggestion.getIcon()).isEqualTo(mIcon); 67 assertThat(suggestion.getFlags()).isEqualTo(0); 68 assertThat(suggestion.getPendingIntent()).isEqualTo(mTestIntent); 73 new Suggestion.Builder(null [all...] |
/packages/apps/Settings/src/com/android/settings/dashboard/suggestions/ |
SuggestionAdapter.java | 25 import android.service.settings.suggestions.Suggestion; 70 private List<Suggestion> mSuggestions; 74 * Called when the close button of the suggestion card is clicked. 76 void onSuggestionClosed(Suggestion suggestion); 112 final Suggestion suggestion = mSuggestions.get(position); local 113 final String id = suggestion.getId(); 120 final Icon icon = suggestion.getIcon(); 122 if (drawable != null && (suggestion.getFlags() & Suggestion.FLAG_ICON_TINTABLE) != 0) 179 final Suggestion suggestion = getSuggestion(position); local [all...] |
SuggestionFeatureProvider.java | 22 import android.service.settings.suggestions.Suggestion; 35 * Whether or not the whole suggestion feature is enabled. 45 * Returns true if smart suggestion should be used instead of xml based SuggestionParser. 49 /** Return true if the suggestion has already been completed and does not need to be shown */ 50 boolean isSuggestionComplete(Context context, @NonNull ComponentName suggestion); 63 * Dismisses a suggestion. 66 Suggestion suggestion); 69 * Returns common tagged data for suggestion logging.
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/suggestions/ |
SuggestionController.java | 26 import android.service.settings.suggestions.Suggestion; 34 * A controller class to access suggestion data. 101 public List<Suggestion> getSuggestions() { 116 public void dismissSuggestions(Suggestion suggestion) { 118 Log.w(TAG, "SuggestionController not ready, cannot dismiss " + suggestion.getId()); 122 mRemoteService.dismissSuggestion(suggestion); 128 public void launchSuggestion(Suggestion suggestion) { 130 Log.w(TAG, "SuggestionController not ready, cannot launch " + suggestion.getId()) [all...] |
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...] |