Searched refs:query (Results 1 - 25 of 466) sorted by relevance

1234567891011>>

/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
H A DSuggestionCursorProvider.java21 * Interface for objects that can produce a SuggestionCursor given a query.
34 * @param query The user query.
38 C getSuggestions(String query, int queryLimit); argument
H A DSuggestionsProvider.java20 * Provides a set of suggestion results for a query..
26 * Gets suggestions for a query.
28 * @param query The query.
29 * @param source The source to query. Must be non-null.
31 Suggestions getSuggestions(String query, Source source); argument
H A DSuggestionNonFormatter.java30 public CharSequence formatSuggestion(String query, String suggestion) { argument
H A DSuggestionsProviderImpl.java30 * The provider will only handle a single query at a time. If a new query comes
61 public Suggestions getSuggestions(String query, Source sourceToQuery) { argument
62 if (DBG) Log.d(TAG, "getSuggestions(" + query + ")");
63 final Suggestions suggestions = new Suggestions(query, sourceToQuery);
64 Log.i(TAG, "chars:" + query.length() + ",source:" + sourceToQuery);
67 if (shouldDisplayResults(query)) {
75 QueryTask.startQuery(query, maxResults, sourceToQuery, mQueryExecutor,
81 private boolean shouldDisplayResults(String query) { argument
82 if (query
[all...]
H A DQueryTask.java41 * Creates a new query task.
43 * @param query Query to run.
47 * get called on. If null, the method is called on the query thread.
50 public QueryTask(String query, int queryLimit, SuggestionCursorProvider<C> provider, argument
52 mQuery = query;
76 public static <C extends SuggestionCursor> void startQuery(String query, argument
82 QueryTask<C> task = new QueryTask<C>(query, maxResults, provider, handler,
H A DLevenshteinSuggestionFormatter.java40 public Spanned formatSuggestion(String query, String suggestion) { argument
41 if (DBG) Log.d(TAG, "formatSuggestion('" + query + "', '" + suggestion + "')");
42 query = normalizeQuery(query);
43 final Token[] queryTokens = tokenize(query);
68 private String normalizeQuery(String query) { argument
69 return query.toLowerCase();
75 * @param source List of source tokens (i.e. user query)
H A DSuggestionUtils.java38 String query = suggestion.getSuggestionQuery();
52 if (query != null) {
53 intent.putExtra(SearchManager.QUERY, query);
73 String query = makeKeyComponent(normalizeUrl(suggestion.getSuggestionQuery()));
76 int size = action.length() + 2 + data.length() + query.length();
82 .append(query)
/packages/apps/QuickSearchBox/benchmarks/src/com/android/quicksearchbox/benchmarks/
H A DApplicationsLatency.java51 for (String query : queries) {
52 checkSource("APPS", APPS_COMPONENT, query);
H A DContactsLatency.java50 for (String query : queries) {
51 checkSource("CONTACTS", CONTACTS_COMPONENT, query);
H A DSourceLatency.java90 String query, long delay) {
93 int length = query.length();
95 final String prefix = query.substring(0, end);
133 public long checkSource(String src, ComponentName componentName, String query) { argument
135 return checkSourceInternal(src, searchable, query);
138 private long checkSourceInternal(String src, SearchableInfo searchable, String query) { argument
142 cursor = getSuggestions(searchable, query);
147 + " for '" + query + "'");
150 + " for '" + query + "'");
160 public Cursor getSuggestions(SearchableInfo searchable, String query) { argument
89 checkSourceConcurrent(final String src, final ComponentName componentName, String query, long delay) argument
164 getSuggestions(SearchableInfo searchable, String query, int limit) argument
214 checkLiveSource(String src, ComponentName componentName, String query) argument
225 LiveSourceCheck(String src, ComponentName componentName, String query) argument
[all...]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/
H A DGoogleSource.java30 * Called by QSB to get web suggestions for a query.
32 SourceResult queryInternal(String query); argument
35 * Called by external apps to get web suggestions for a query.
37 SourceResult queryExternal(String query); argument
H A DAbstractGoogleSource.java55 * Called by QSB to get web suggestions for a query.
58 public abstract SourceResult queryInternal(String query); argument
61 * Called by external apps to get web suggestions for a query.
64 public abstract SourceResult queryExternal(String query); argument
102 public SourceResult getSuggestions(String query, int queryLimit) { argument
103 return emptyIfNull(queryInternal(query), query);
106 public SourceResult getSuggestionsExternal(String query) { argument
107 return emptyIfNull(queryExternal(query), query);
110 emptyIfNull(SourceResult result, String query) argument
[all...]
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
H A DQueryParameterUtils.java36 String query = uri.getEncodedQuery();
37 if (query == null) {
41 int queryLength = query.length();
47 index = query.indexOf(parameter, index);
58 if (query.charAt(index) == '=') {
64 int ampIndex = query.indexOf('&', index);
66 value = query.substring(index);
68 value = query.substring(index, ampIndex);
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
H A DSuggestionsProvider.java64 * Minimum length of query before we start showing contacts suggestions.
81 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, method in class:SuggestionsProvider
83 String query = selectionArgs[0];
91 if (query != null) {
92 // Tokenize the query.
93 String[] tokens = TextUtils.split(query,
95 // There are multiple tokens, so query on the last token only.
97 query = tokens[tokens.length - 1];
108 query = query
139 query(String query) argument
[all...]
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
H A DMockSource.java42 public SuggestionData createSuggestion(String query) {
44 .setText1(query)
46 .setSuggestionQuery(query);
120 public SourceResult getSuggestions(String query, int queryLimit) { argument
121 if (query.length() == 0) {
124 ListSuggestionCursor cursor = new ListSuggestionCursor(query);
125 cursor.add(createSuggestion(query + "_1"));
126 cursor.add(createSuggestion(query + "_2"));
127 return new Result(query, cursor);
130 public SuggestionData createSuggestion(String query) { argument
173 createSearchIntent(String query, Bundle appData) argument
[all...]
/packages/apps/Browser/src/com/android/browser/search/
H A DSearchEngine.java43 public void startSearch(Context context, String query, Bundle appData, String extraData); argument
48 public Cursor getSuggestions(Context context, String query); argument
61 * Checks whether this search engine should be sent zero char query.
/packages/apps/QuickSearchBox/tests/naughty/src/com/android/quicksearchbox/tests/naughty/
H A DCrashingSuggestionProvider.java48 public Cursor query(Uri uri, String[] projectionIn, String selection, method in class:CrashingSuggestionProvider
50 Log.d(TAG, "query(" + uri + ")");
53 String query = null;
55 query = path.get(path.size()-1);
58 if ("crash".equals(query)) {
61 } else if ("exit".equals(query)) {
66 if ("icon".equals(query)) {
79 } else if ("icon2".equals(query)) {
H A DHangingSuggestionProvider.java43 public Cursor query(Uri uri, String[] projectionIn, String selection, method in class:HangingSuggestionProvider
45 Log.d(TAG, "query(" + uri + ")");
48 String query = null;
50 query = path.get(path.size()-1);
53 if ("hang".equals(query)) {
58 if ("icon".equals(query)) {
71 } else if ("icon2".equals(query)) {
/packages/apps/Browser/tests/src/com/android/browser/
H A DBrowserProviderTests.java97 String query = "\u30ae\u30e3\u30e9\u30ea\u30fc";
98 assertInsertQuery("http://www.example.com/sdaga", title, query);
104 String query = "\u30ad\u30e3\u30e9\u30ea\u30fc";
105 assertInsertQuery("http://www.example.com/sdaga", title, query);
112 private void assertInsertQuery(String url, String title, String query) { argument
114 assertQueryReturns(url, title, query);
117 private void assertQueryReturns(String url, String title, String query) { argument
118 Cursor c = getBookmarksSuggest(query);
120 assertTrue(title + " not matched by " + query, c.getCount() > 0);
121 assertTrue("More than one result for " + query,
137 getBookmarksSuggest(String query) argument
[all...]
/packages/apps/Dialer/src/com/android/dialer/dialpad/
H A DSmartDialNameMatcher.java31 * a contact's display name matches a numeric query. The boolean variable
56 public SmartDialNameMatcher(String query) { argument
57 this(query, LATIN_SMART_DIAL_MAP);
60 public SmartDialNameMatcher(String query, SmartDialMap map) { argument
61 mQuery = query;
117 * Matches a phone number against a query. Let the test application overwrite the NANP setting.
120 * @param query - Normalized query (only contains numbers from 0-9)
122 * @return {@literal null} if the number and the query don't match, a valid
126 public SmartDialMatchPosition matchesNumber(String phoneNumber, String query, boolea argument
177 matchesNumber(String phoneNumber, String query) argument
191 matchesNumberWithOffset(String phoneNumber, String query, int offset) argument
257 matchesCombination(String displayName, String query, ArrayList<SmartDialMatchPosition> matchList) argument
419 setQuery(String query) argument
[all...]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/testutil/
H A DDeletedContactUtil.java40 Cursor cursor = resolver.query(uri, projection, null, null, null);
51 Cursor cursor = resolver.query(URI, projection, null, null, null);
64 public static List<String[]> query(ContentResolver resolver, String[] projection) { method in class:DeletedContactUtil
65 Cursor cursor = resolver.query(URI, projection, null, null, null);
78 Cursor cursor = resolver.query(URI, projection, selection, args, null);
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/
H A DDownloadManagerWrapper.java81 public Cursor query(final Query query) { argument
84 return mDownloadManager.query(query);
89 Log.e(TAG, "Can't query the download manager", e);
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
H A DGlobalSearchSupportTest.java64 Cursor c = mResolver.query(searchUri, null, null, null, null);
72 new SuggestionTesterBuilder(contact).query("D").expectIcon1Uri(true).expectedText1(
79 new SuggestionTesterBuilder(contact).query("foo@ac").expectIcon1Uri(true).expectedIcon2(
87 new SuggestionTesterBuilder(contact).query("D").expectedText1("Deer Dough").expectedText2(
94 new SuggestionTesterBuilder(contact).query("L").expectedText1("Deer Dough").expectedText2(
101 new SuggestionTesterBuilder(contact).query("G").expectedText1("Deer Dough").expectedText2(
108 new SuggestionTesterBuilder(contact).query("S").expectIcon1Uri(false).expectedText1(
117 new SuggestionTesterBuilder(contact).query("1800").expectIcon1Uri(true).expectedText1(
129 private final String query; field in class:GlobalSearchSupportTest.SuggestionTester
141 query
296 private String query; field in class:GlobalSearchSupportTest.SuggestionTesterBuilder
321 public SuggestionTesterBuilder query(String value) { method in class:GlobalSearchSupportTest.SuggestionTesterBuilder
[all...]
/packages/apps/Dialer/tests/src/com/android/dialer/dialpad/
H A DSmartDialNameMatcherTest.java235 private void checkMatchesNumber(String number, String query, boolean expectedMatches, argument
237 checkMatchesNumber(number, query, expectedMatches, false, matchStart, matchEnd);
240 private void checkMatchesNumber(String number, String query, boolean expectedMatches, argument
242 final SmartDialNameMatcher matcher = new SmartDialNameMatcher(query);
243 final SmartDialMatchPosition pos = matcher.matchesNumber(number, query, matchNanp);
251 private void checkMatches(String displayName, String query, boolean expectedMatches, argument
253 final SmartDialNameMatcher matcher = new SmartDialNameMatcher(query);
257 displayName, query, matchPositions);
258 Log.d(TAG, "query=" + query
[all...]
/packages/apps/UnifiedEmail/src/com/android/mail/
H A DSenderInfoLoader.java66 * Limit the query params to avoid hitting the maximum of 99. We choose a number smaller than
67 * 99 since the contacts provider may wrap our query in its own and insert more params.
120 Trace.beginSection("build first query");
128 // Build first query
129 StringBuilder query = new StringBuilder()
132 appendQuestionMarks(query, emailsList);
133 query.append(')');
141 Trace.beginSection("query 1");
142 cursor = resolver.query(Data.CONTENT_URI, DATA_COLS,
143 query
270 appendQuestionMarks(StringBuilder query, Iterable<?> items) argument
[all...]

Completed in 641 milliseconds

1234567891011>>