Home
last modified time | relevance | path

Searched refs:query (Results 1 – 25 of 717) sorted by relevance

12345678910>>...29

/packages/apps/Dialer/java/com/android/dialer/searchfragment/common/
DQueryFilteringUtil.java66 public static boolean nameMatchesT9Query(String query, String name, Context context) { in nameMatchesT9Query() argument
67 if (!T9_PATTERN.matcher(query).matches()) { in nameMatchesT9Query()
71 query = digitsOnly(query); in nameMatchesT9Query()
72 if (getIndexOfT9Substring(query, name, context) != -1) { in nameMatchesT9Query()
81 for (int i = 0; i < names.length && queryIndex < query.length(); i++) { in nameMatchesT9Query()
86 if (getDigit(names[i].charAt(0), context) == query.charAt(queryIndex)) { in nameMatchesT9Query()
91 return queryIndex == query.length(); in nameMatchesT9Query()
106 public static int getIndexOfT9Substring(String query, String name, Context context) { in getIndexOfT9Substring() argument
107 query = digitsOnly(query); in getIndexOfT9Substring()
110 if (t9NameDigitsOnly.startsWith(query)) { in getIndexOfT9Substring()
[all …]
DQueryBoldingUtil.java59 @Nullable String query, @NonNull String name, @NonNull Context context) { in getNameWithQueryBolded()
60 if (TextUtils.isEmpty(query)) { in getNameWithQueryBolded()
64 if (!QueryFilteringUtil.nameMatchesT9Query(query, name, context)) { in getNameWithQueryBolded()
65 Pattern pattern = Pattern.compile("(^|\\s)" + Pattern.quote(query.toLowerCase())); in getNameWithQueryBolded()
69 return getBoldedString(name, matcher.start(), query.length()); in getNameWithQueryBolded()
76 int indexOfT9Match = QueryFilteringUtil.getIndexOfT9Substring(query, name, context); in getNameWithQueryBolded()
79 int numBolded = query.length(); in getNameWithQueryBolded()
90 return getNameWithInitialsBolded(query, name, context); in getNameWithQueryBolded()
95 String query, String name, Context context) { in getNameWithInitialsBolded() argument
101 while (++nameIndex < name.length() && initialsBolded < query.length()) { in getNameWithInitialsBolded()
[all …]
/packages/apps/Dialer/java/com/android/dialer/smartdial/util/
DSmartDialNameMatcher.java42 private String query; field in SmartDialNameMatcher
47 public SmartDialNameMatcher(String query) { in SmartDialNameMatcher() argument
48 this.query = query; in SmartDialNameMatcher()
113 public SmartDialMatchPosition matchesNumber(Context context, String phoneNumber, String query) { in matchesNumber() argument
122 matchesNumberWithOffset(context, phoneNumber, query, /* offset = */ 0); in matchesNumber()
129 context, phoneNumber, query, phoneNumberTokens.countryCodeOffset); in matchesNumber()
133 matchesNumberWithOffset(context, phoneNumber, query, phoneNumberTokens.nanpCodeOffset); in matchesNumber()
151 return matchesNumber(context, phoneNumber, query); in matchesNumber()
165 Context context, String phoneNumber, String query, int offset) { in matchesNumberWithOffset() argument
166 if (TextUtils.isEmpty(phoneNumber) || TextUtils.isEmpty(query)) { in matchesNumberWithOffset()
[all …]
/packages/apps/TV/src/com/android/tv/search/
DTvProviderSearch.java81 public List<SearchResult> search(String query, int limit, int action) { in search() argument
90 results.addAll(searchChannels(query, channelsFound, limit)); in search()
92 results.addAll(searchInputs(query, limit)); in search()
95 results.addAll(searchChannels(query, channelsFound, limit)); in search()
103 results.addAll(searchInputs(query, limit)); in search()
113 query, in search()
150 String query, in insertSelectionArgumentStrings() argument
156 selectionArgs[pos] = query; in insertSelectionArgumentStrings()
159 String selectionArg = "%" + query + "%"; in insertSelectionArgumentStrings()
169 private List<SearchResult> searchChannels(String query, Set<Long> channels, int limit) { in searchChannels() argument
[all …]
DDataManagerSearch.java71 public List<SearchResult> search(final String query, final int limit, final int action) { in search() argument
74 .submit(() -> searchFromDataManagers(query, limit, action)); in search()
82 Log.w(TAG, "Error searching for " + query, e); in search()
88 private List<SearchResult> searchFromDataManagers(String query, int limit, int action) { in searchFromDataManagers() argument
98 if (DEBUG) Log.d(TAG, "Searching channels: '" + query + "'"); in searchFromDataManagers()
102 query = query.toLowerCase(); in searchFromDataManagers()
103 if (TextUtils.isDigitsOnly(query)) { in searchFromDataManagers()
108 if (contains(channel.getDisplayNumber(), query)) { in searchFromDataManagers()
131 if (contains(channel.getDisplayName(), query) in searchFromDataManagers()
132 || contains(channel.getDescription(), query)) { in searchFromDataManagers()
[all …]
/packages/modules/DnsResolver/
Dresolv_tls_unit_test.cpp119 bytevec make_echo(uint16_t id, const Slice query) { in make_echo() argument
120 bytevec response(query.size() + 2); in make_echo()
124 memcpy(response.data() + 2, query.base(), query.size()); in make_echo()
132 bool query(uint16_t id, const Slice query) override { in query() argument
134 std::thread(&IDnsTlsSocketObserver::onResponse, mObserver, make_echo(id, query)).detach(); in query()
147 auto r = transport.query(makeSlice(QUERY)).get(); in TEST_F()
158 bool query(uint16_t id, const Slice query ATTRIBUTE_UNUSED) override { in query() function in android::net::FakeSocketId
183 std::future<DnsTlsTransport::Result> f = transport.query(makeSlice(QUERY)); in TEST_F()
205 results.push_back(transport.query(makeSlice(QUERY))); in TEST_F()
223 bool query(uint16_t id, const Slice query) override { in query() argument
[all …]
DREADME-DoT.md1 # DNS-over-TLS query forwarder design
5 The DNS-over-TLS query forwarder consists of five classes:
12 `DnsTlsDispatcher` is a singleton class whose `query` method is the DnsTls's
15 network. `DnsTlsDispatcher` also blocks each query thread, waiting on a
18 `DnsTlsTransport` sends each query over a `DnsTlsSocket`, opening a
25 `DnsTlsQueryMap` handles ID renumbering and query-response pairing.
31 state to indicate whether there is an outstanding query.
46 query or response. However, DnsProxyListener does create a thread for each query.
52 The query method writes a struct (containing a pointer to the query) to the pipe
55 instead, any queueing happens by blocking the query thread until the
[all …]
DDnsTlsQueryMap.h43 const std::vector<uint8_t> query; member
52 QueryFuture(Query query, std::future<Result> result) in QueryFuture()
53 : query(query), result(std::move(result)) {} in QueryFuture()
54 Query query; member
61 std::unique_ptr<QueryFuture> recordQuery(const netdutils::Slice query);
88 QueryPromise(Query query) : query(query) {} in QueryPromise()
89 Query query; member
DDnsTlsTransport.cpp36 std::future<DnsTlsTransport::Result> DnsTlsTransport::query(const netdutils::Slice query) { in query() argument
39 auto record = mQueries.recordQuery(query); in query()
50 sendQuery(record->query); in query()
63 const bool sent = mSocket->query(q.newId, netdutils::drop(netdutils::makeSlice(q.query), 2)); in sendQuery()
170 uint8_t query[] = { in validate() local
186 const int qlen = std::size(query); in validate()
191 auto r = transport.query(netdutils::Slice(query, qlen)).get(); in validate()
/packages/apps/QuickSearchBox/benchmarks/src/com/android/quicksearchbox/benchmarks/
DSourceLatency.java90 String query, long delay) { in checkSourceConcurrent() argument
93 int length = query.length(); in checkSourceConcurrent()
95 final String prefix = query.substring(0, end); in checkSourceConcurrent()
133 public long checkSource(String src, ComponentName componentName, String query) { in checkSource() argument
135 return checkSourceInternal(src, searchable, query); in checkSource()
138 private long checkSourceInternal(String src, SearchableInfo searchable, String query) { in checkSourceInternal() argument
142 cursor = getSuggestions(searchable, query); in checkSourceInternal()
147 + " for '" + query + "'"); in checkSourceInternal()
150 + " for '" + query + "'"); in checkSourceInternal()
160 public Cursor getSuggestions(SearchableInfo searchable, String query) { in getSuggestions() argument
[all …]
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/
DSearchFeatureProviderImpl.java30 import com.android.settings.intelligence.search.query.AccessibilityServiceResultTask;
31 import com.android.settings.intelligence.search.query.DatabaseResultTask;
32 import com.android.settings.intelligence.search.query.InputDeviceResultTask;
33 import com.android.settings.intelligence.search.query.InstalledAppResultTask;
34 import com.android.settings.intelligence.search.query.SearchQueryTask;
57 public SearchResultLoader getSearchResultLoader(Context context, String query) { in getSearchResultLoader() argument
58 return new SearchResultLoader(context, cleanQuery(query)); in getSearchResultLoader()
62 public List<SearchQueryTask> getSearchQueryTasks(Context context, String query) { in getSearchQueryTasks() argument
64 final String cleanQuery = cleanQuery(query); in getSearchQueryTasks()
111 public void searchResultClicked(Context context, String query, SearchResult searchResult) { in searchResultClicked() argument
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DGlobalSearchSupportTest.java64 Cursor c = mResolver.query(searchUri, null, null, null, null); in testSearchSuggestionsNotInDefaultDirectory()
72 new SuggestionTesterBuilder(contact).query("D").expectIcon1Uri(true).expectedText1( in testSearchSuggestionsByNameWithPhoto()
79 new SuggestionTesterBuilder(contact).query("foo@ac").expectIcon1Uri(true).expectedIcon2( in testSearchSuggestionsByEmailWithPhoto()
87 new SuggestionTesterBuilder(contact).query("D").expectedText1("Deer Dough").expectedText2( in testSearchSuggestionsByName()
94 new SuggestionTesterBuilder(contact).query("L").expectedText1("Deer Dough").expectedText2( in testSearchByNickname()
101 new SuggestionTesterBuilder(contact).query("G").expectedText1("Deer Dough").expectedText2( in testSearchByCompany()
108 new SuggestionTesterBuilder(contact).query("S").expectIcon1Uri(false).expectedText1( in testSearchByTitleWithCompany()
117 new SuggestionTesterBuilder(contact).query("1800").expectIcon1Uri(true).expectedText1( in testSearchSuggestionsByPhoneNumberOnNonPhone()
129 private final String query; field in GlobalSearchSupportTest.SuggestionTester
141 query = builder.query; in SuggestionTester()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DSearchActivity.java194 String query = savedInstanceState.getString(INSTANCE_KEY_QUERY); in restoreInstanceState()
195 setQuery(query, false); in restoreInstanceState()
210 String query = intent.getStringExtra(SearchManager.QUERY); in setupFromIntent() local
214 setQuery(query, selectAll); in setupFromIntent()
323 protected void setQuery(String query, boolean selectAll) { in setQuery() argument
324 mSearchActivityView.setQuery(query, selectAll); in setQuery()
331 String query = CharMatcher.whitespace().trimAndCollapseFrom(getQuery(), ' '); in onSearchClicked() local
332 if (DBG) Log.d(TAG, "Search clicked, query=" + query); in onSearchClicked()
335 if (TextUtils.getTrimmedLength(query) == 0) return false; in onSearchClicked()
340 getLogger().logSearch(method, query.length()); in onSearchClicked()
[all …]
/packages/apps/UniversalMediaPlayer/java/com/android/pump/db/
DVideoStore.java119 Cursor cursor = mContentResolver.query(contentUri, projection, null, null, sortOrder); in load()
153 Query query = Query.parse(Uri.fromFile(file)); in load() local
154 if (query.isMovie()) { in load()
156 if (query.hasYear()) { in load()
157 movie = new Movie(id, mimeType, query.getName(), query.getYear()); in load()
159 movie = new Movie(id, mimeType, query.getName()); in load()
162 } else if (query.isEpisode()) { in load()
165 if (s.getTitle().equals(query.getName()) in load()
166 && s.hasYear() == query.hasYear() in load()
167 && (!s.hasYear() || s.getYear() == query.getYear())) { in load()
[all …]
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DMockSource.java42 public SuggestionData createSuggestion(String query) {
44 .setText1(query)
46 .setSuggestionQuery(query);
120 public SourceResult getSuggestions(String query, int queryLimit) { in getSuggestions() argument
121 if (query.length() == 0) { in getSuggestions()
124 ListSuggestionCursor cursor = new ListSuggestionCursor(query); in getSuggestions()
125 cursor.add(createSuggestion(query + "_1")); in getSuggestions()
126 cursor.add(createSuggestion(query + "_2")); in getSuggestions()
127 return new Result(query, cursor); in getSuggestions()
130 public SuggestionData createSuggestion(String query) { in createSuggestion() argument
[all …]
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/query/
DDatabaseResultTask.java17 package com.android.settings.intelligence.search.query;
101 String query) { in newTask() argument
102 return new SearchQueryTask(new DatabaseResultTask(context, siteMapManager, query)); in newTask()
125 protected List<? extends SearchResult> query() { in query() method in DatabaseResultTask
174 final String query = mQuery + "%"; in firstWordQuery() local
175 final String[] selection = buildSingleWordSelection(query, matchColumns.length); in firstWordQuery()
177 return query(whereClause, selection, baseRank); in firstWordQuery()
190 final String query = "% " + mQuery + "%"; in secondaryWordQuery() local
191 final String[] selection = buildSingleWordSelection(query, matchColumns.length); in secondaryWordQuery()
193 return query(whereClause, selection, baseRank); in secondaryWordQuery()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/
DAbstractGoogleSource.java58 public abstract SourceResult queryInternal(String query); in queryInternal() argument
64 public abstract SourceResult queryExternal(String query); in queryExternal() argument
102 public SourceResult getSuggestions(String query, int queryLimit) { in getSuggestions() argument
103 return emptyIfNull(queryInternal(query), query); in getSuggestions()
106 public SourceResult getSuggestionsExternal(String query) { in getSuggestionsExternal() argument
107 return emptyIfNull(queryExternal(query), query); in getSuggestionsExternal()
110 private SourceResult emptyIfNull(SourceResult result, String query) { in emptyIfNull() argument
111 return result == null ? new CursorBackedSourceResult(this, query) : result; in emptyIfNull()
DGoogleSuggestClient.java83 public SourceResult queryInternal(String query) { in queryInternal() argument
84 return query(query); in queryInternal()
88 public SourceResult queryExternal(String query) { in queryExternal() argument
89 return query(query); in queryExternal()
96 private SourceResult query(String query) { in query() method in GoogleSuggestClient
97 if (TextUtils.isEmpty(query)) { in query()
105 String encodedQuery = URLEncoder.encode(query, "UTF-8"); in query()
128 return new GoogleSuggestCursor(this, query, suggestions, popularity); in query()
/packages/apps/Launcher3/src/com/android/launcher3/allapps/search/
DDefaultAppSearchAlgorithm.java48 public void doSearch(final String query, in doSearch() argument
50 final ArrayList<ComponentKey> result = getTitleMatchResult(query); in doSearch()
55 callback.onSearchResult(query, result); in doSearch()
60 private ArrayList<ComponentKey> getTitleMatchResult(String query) { in getTitleMatchResult() argument
63 final String queryTextLower = query.toLowerCase(); in getTitleMatchResult()
74 public static boolean matches(AppInfo info, String query, StringMatcher matcher) { in matches() argument
75 int queryLength = query.length(); in matches()
95 matcher.matches(query, title.substring(i, i + queryLength))) { in matches()
165 public boolean matches(String query, String target) { in matches() argument
166 switch (mCollator.compare(query, target)) { in matches()
[all …]
/packages/providers/CalendarProvider/src/com/android/providers/calendar/
DQueryParameterUtils.java36 String query = uri.getEncodedQuery(); in getQueryParameter() local
37 if (query == null) { in getQueryParameter()
41 int queryLength = query.length(); in getQueryParameter()
47 index = query.indexOf(parameter, index); in getQueryParameter()
58 if (query.charAt(index) == '=') { in getQueryParameter()
64 int ampIndex = query.indexOf('&', index); in getQueryParameter()
66 value = query.substring(index); in getQueryParameter()
68 value = query.substring(index, ampIndex); in getQueryParameter()
/packages/apps/Dialer/java/com/android/dialer/searchfragment/list/
DSearchActionViewHolder.java74 private String query; field in SearchActionViewHolder
85 void setAction(@Action int action, int position, String query) { in setAction() argument
88 this.query = query; in setAction()
107 actionText.setText(context.getString(R.string.search_shortcut_make_voice_call, query)); in setAction()
127 Intent intent = IntentUtil.getAddToExistingContactIntent(query); in onClick()
134 intent = IntentUtil.getNewContactIntent(query); in onClick()
139 listener.placeVideoCall(query, position); in onClick()
143 intent = IntentUtil.getSendSmsIntent(query); in onClick()
148 listener.placeVoiceCall(query, position); in onClick()
/packages/apps/Dialer/java/com/android/dialer/searchfragment/cp2/
DSearchContactsCursorLoader.java42 private final String query; field in SearchContactsCursorLoader
47 Context context, @Nullable String query, boolean isRegularSearch) { in SearchContactsCursorLoader() argument
50 buildUri(query), in SearchContactsCursorLoader()
55 this.query = TextUtils.isEmpty(query) ? "" : query; in SearchContactsCursorLoader()
81 private static Uri buildUri(String query) { in buildUri() argument
82 return Phone.CONTENT_FILTER_URI.buildUpon().appendPath(query).build(); in buildUri()
100 loader.configureQuery(query); in dialpadSearchLoadInBackground()
129 public boolean updateQuery(@Nullable String query) { in updateQuery() argument
199 public boolean updateQuery(@NonNull String query) { in updateQuery() argument
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java313 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute()
329 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute()
1340 Cursor cursor = mResolver.query(mEventsUri, new String[] { Events._ID }, in deleteMatchingEvents()
1371 Cursor cursor = mResolver.query(mEventsUri, projection, in updateMatchingEvents()
1435 Cursor cursor = mResolver.query(mEventsUri, projection, in updateMatchingEventsStatusOnly()
1502 Cursor c = mResolver.query(uri, new String[] {Events.EVENT_COLOR}, null, null, null); in testInsertUpdateDeleteColor()
1518 c = mResolver.query(uri, new String[] {Events.EVENT_COLOR}, null, null, null); in testInsertUpdateDeleteColor()
1539 Cursor cursor = mResolver.query(Colors.CONTENT_URI, new String[] {Colors.COLOR_KEY}, in testInsertUpdateDeleteColor()
1548 cursor = mResolver.query(Colors.CONTENT_URI, new String[] {Colors.COLOR_KEY}, in testInsertUpdateDeleteColor()
1564 Cursor cursor = mResolver.query(Colors.CONTENT_URI, projection, Colors.COLOR_KEY in checkColor()
[all …]
/packages/apps/UniversalMediaPlayer/java/com/android/pump/provider/
DWikidata.java45 public static void search(@NonNull Query query) throws IOException { in search() argument
46 search(query, 1); in search()
49 public static void search(@NonNull Query query, int maxResults) throws IOException { in search() argument
50 Clog.i(TAG, "search(" + query + ", " + maxResults + ")"); in search()
51 getContentForResults(getSearchResults(getQueryString(query), maxResults)); in search()
54 private static String getQueryString(Query query) { in getQueryString() argument
56 builder.append(query.getName()); in getQueryString()
57 if (query.hasYear()) { in getQueryString()
59 builder.append(query.getYear()); in getQueryString()
61 if (query.isEpisode()) { in getQueryString()
[all …]
/packages/modules/DnsResolver/tests/
Dgolddata.proto145 // The unit test files a DNS query by the predefined |config|. Expect that the resolver sends the
146 // query packet as the predefined packet in |packet_mapping.query|. When the DNS responser receives
147 // the query packet, it returns the corresponding response packet from |packet_mapping.response|.
152 // The configuration of various DNS query calls.
154 // The arguments used to send a DNS query by call type CALL_GETADDRINFO.
163 // The arguments used to send a DNS query by call type CALL_GETHOSTBYNAME.
188 bytes query = 1; field
192 // Configs used to send a DNS query via a DNS query API.
195 // Expected return values from DNS query API.
198 // Used to build the packet mapping (query, response) in DNS responser. See also

12345678910>>...29