/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
H A D | SuggestionNonFormatter.java | 30 public CharSequence formatSuggestion(String query, String suggestion) { argument 31 return suggestion;
|
H A D | ListSuggestionCursorNoDuplicates.java | 40 public boolean add(Suggestion suggestion) { argument 41 String key = SuggestionUtils.getSuggestionKey(suggestion); 43 return super.add(suggestion);
|
H A D | SuggestionUtils.java | 34 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 D | ListSuggestionCursor.java | 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) { 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 D | LevenshteinSuggestionFormatter.java | 40 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 D | SuggestionFormatter.java | 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); argument
|
H A D | SearchActivity.java | 269 // 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 D | AutoCorrectionUtils.java | 34 final SuggestedWordInfo suggestion, final String consideredWord, 36 if (null != suggestion) { 38 if (suggestion.isKindOf(SuggestedWordInfo.KIND_WHITELIST)) { 41 final int autoCorrectionSuggestionScore = suggestion.mScore; 42 // TODO: when the normalized score of the first suggestion is nearly equals to 43 // the normalized score of the second suggestion, behave less aggressive. 45 consideredWord, suggestion.mWord, autoCorrectionSuggestionScore); 47 Log.d(TAG, "Normalized " + consideredWord + "," + suggestion + "," 55 return !shouldBlockAutoCorrectionBySafetyNet(consideredWord, suggestion.mWord); 64 final String suggestion) { 33 suggestionExceedsAutoCorrectionThreshold( final SuggestedWordInfo suggestion, final String consideredWord, final float autoCorrectionThreshold) argument 63 shouldBlockAutoCorrectionBySafetyNet(final String typedWord, final String suggestion) argument [all...] |
H A D | DistracterFilterCheckingExactMatchesAndSuggestions.java | 62 // If the score of the top suggestion exceeds this value, the tested word (e.g., 269 private static boolean suggestionExceedsDistracterThreshold(final SuggestedWordInfo suggestion, argument 271 if (suggestion == null) { 274 final int suggestionScore = suggestion.mScore; 276 consideredWord, suggestion.mWord, suggestionScore);
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/ |
H A D | DefaultSuggestionViewFactory.java | 64 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 D | SuggestionViewFactory.java | 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); 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 D | SuggestionView.java | 26 * Set the view's contents based on the given suggestion. 28 void bindAsSuggestion(Suggestion suggestion, String userQuery); argument
|
H A D | WebSearchSuggestionView.java | 58 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 D | SuggestionViewInflater.java | 62 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 D | DefaultSuggestionView.java | 87 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 D | BaseSuggestionView.java | 31 * 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();
|
H A D | SuggestionsAdapterBase.java | 131 private String suggestionViewType(Suggestion suggestion) { argument 132 String viewType = mViewFactory.getViewType(suggestion);
|
/packages/apps/Contacts/src/com/android/contacts/editor/ |
H A D | AggregationSuggestionView.java | 41 * A view that contains a name, picture and other data for a contact aggregation suggestion. 82 public void bindSuggestion(Suggestion suggestion) { argument 83 mContactId = suggestion.contactId; 84 mLookupKey = suggestion.lookupKey; 85 mRawContacts = suggestion.rawContacts; 87 if (suggestion.photo != null) { 89 suggestion.photo, 0, suggestion.photo.length)); 96 name.setText(suggestion.name); 100 if (suggestion [all...] |
H A D | AggregationSuggestionEngine.java | 380 Suggestion suggestion = null; 386 suggestion = new Suggestion(); 387 suggestion.contactId = contactId; 388 suggestion.name = mDataCursor.getString(DataQuery.DISPLAY_NAME); 389 suggestion.lookupKey = mDataCursor.getString(DataQuery.LOOKUP_KEY); 390 suggestion.rawContacts = Lists.newArrayList(); 391 list.add(suggestion); 396 if (!containsRawContact(suggestion, rawContactId)) { 402 suggestion.rawContacts.add(rawContact); 410 && (superprimary != 0 || suggestion 437 containsRawContact(Suggestion suggestion, long rawContactId) argument [all...] |
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
H A D | GlobalSearchSupport.java | 254 SearchSuggestion suggestion = new SearchSuggestion(); 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 [all...] |
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/spellcheck/ |
H A D | AndroidWordLevelSpellCheckerSession.java | 291 Log.i(TAG, "Spell checking results for " + text + " with suggestion limit " 297 for (String suggestion : result.mSuggestions) { 298 Log.i(TAG, suggestion); 350 final String suggestion; 352 suggestion = suggestedWordInfo.mWord.toUpperCase(locale); 354 suggestion = StringUtils.capitalizeFirstCodePoint( 357 suggestion = suggestedWordInfo.mWord; 359 suggestions.add(suggestion); 374 Log.i(TAG, "Best suggestion : " + bestSuggestion + ", score " + bestScore);
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
H A D | LevenshteinFormatterTest.java | 151 private void verifyFormatSuggestion(String query, String suggestion, SpanFormat... spans) { argument 152 Spanned s = mFormatter.formatSuggestion(query, suggestion); 163 verifyFormatSuggestion("", "suggestion", 164 new SpanFormat(0, "suggestion", mSuggestedStyle));
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/inputlogic/ |
H A D | InputLogic.java | 121 * @param suggestionStripViewAccessor an object to access the suggestion strip view. 277 * A suggestion was picked from the suggestion strip. 279 * @param suggestionInfo the suggestion info. 291 final String suggestion = suggestionInfo.mWord; 292 // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput 293 if (suggestion.length() == 1 && suggestedWords.isPunctuationSuggestions()) { 308 if (SpaceState.PHANTOM == mSpaceState && suggestion.length() > 0 312 final int firstChar = Character.codePointAt(suggestion, 0); 321 // however need to reset the suggestion stri 1338 performAdditionToUserHistoryDictionary(final SettingsValues settingsValues, final String suggestion, final PrevWordsInfo prevWordsInfo) argument [all...] |
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
H A D | InputTestsBase.java | 348 protected void pickSuggestionManually(final String suggestion) { argument 349 mLatinIME.pickSuggestionManually(new SuggestedWordInfo(suggestion, 1,
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
H A D | DictionaryFacilitator.java | 407 public void addToUserHistory(final String suggestion, final boolean wasAutoCapitalized, argument 411 final String[] words = suggestion.split(Constants.WORD_SEPARATOR); 489 // TODO: Revise the way to fusion suggestion results. 655 + "The dictionary is not being used for suggestion or cannot be dumped.");
|