/packages/apps/Dialer/java/com/android/dialer/searchfragment/common/ |
D | QueryFilteringUtil.java | 66 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 …]
|
D | QueryBoldingUtil.java | 59 @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/modules/Wifi/framework/java/android/net/wifi/p2p/nsd/ |
D | WifiP2pServiceRequest.java | 78 protected WifiP2pServiceRequest(int protocolType, String query) { in WifiP2pServiceRequest() argument 79 validateQuery(query); in WifiP2pServiceRequest() 82 mQuery = query; in WifiP2pServiceRequest() 83 if (query != null) { in WifiP2pServiceRequest() 84 mLength = query.length()/2 + 2; in WifiP2pServiceRequest() 99 int transId, String query) { in WifiP2pServiceRequest() argument 103 mQuery = query; in WifiP2pServiceRequest() 159 private void validateQuery(String query) { in validateQuery() argument 160 if (query == null) { in validateQuery() 165 if (query.length()%2 == 1) { in validateQuery() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/smartdial/util/ |
D | SmartDialNameMatcher.java | 42 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/SettingsIntelligence/src/com/android/settings/intelligence/search/ |
D | SearchFeatureProviderImpl.java | 30 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/apps/QuickSearchBox/benchmarks/src/com/android/quicksearchbox/benchmarks/ |
D | SourceLatency.java | 90 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/TV/src/com/android/tv/search/ |
D | TvProviderSearch.java | 81 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 …]
|
D | DataManagerSearch.java | 71 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/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | GlobalSearchSupportTest.java | 64 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/modules/DnsResolver/tests/ |
D | resolv_tls_unit_test.cpp | 124 bytevec make_echo(uint16_t id, const Slice query) { in make_echo() argument 125 bytevec response(query.size() + 2); in make_echo() 129 memcpy(response.data() + 2, query.base(), query.size()); in make_echo() 137 bool query(uint16_t id, const Slice query) override { in query() argument 139 std::thread(&IDnsTlsSocketObserver::onResponse, mObserver, make_echo(id, query)).detach(); in query() 153 auto r = transport.query(makeSlice(QUERY)).get(); in TEST_F() 164 bool query(uint16_t id, const Slice query ATTRIBUTE_UNUSED) override { in query() function in android::net::FakeSocketId 190 std::future<DnsTlsTransport::Result> f = transport.query(makeSlice(QUERY)); in TEST_F() 212 results.push_back(transport.query(makeSlice(QUERY))); in TEST_F() 236 bool query(uint16_t id, const Slice query) override { in query() argument [all …]
|
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/ |
D | MockSource.java | 42 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/Car/SettingsIntelligence/src/com/android/settings/intelligence/search/car/ |
D | CarSearchFeatureProviderImpl.java | 33 import com.android.settings.intelligence.search.query.DatabaseResultTask; 34 import com.android.settings.intelligence.search.query.InstalledAppResultTask; 35 import com.android.settings.intelligence.search.query.SearchQueryTask; 58 public SearchResultLoader getSearchResultLoader(Context context, String query) { in getSearchResultLoader() argument 59 return new SearchResultLoader(context, cleanQuery(query)); in getSearchResultLoader() 63 public List<SearchQueryTask> getSearchQueryTasks(Context context, String query) { in getSearchQueryTasks() argument 65 String cleanQuery = cleanQuery(query); in getSearchQueryTasks() 111 public void searchResultClicked(Context context, String query, SearchResult searchResult) { in searchResultClicked() argument 129 public FutureTask<List<Pair<String, Float>>> getRankerTask(Context context, String query) { in getRankerTask() argument 154 private String cleanQuery(String query) { in cleanQuery() argument [all …]
|
/packages/apps/UniversalMediaPlayer/java/com/android/pump/db/ |
D | VideoStore.java | 120 Cursor cursor = mContentResolver.query(contentUri, projection, null, null, sortOrder); in load() 154 Query query = Query.parse(Uri.fromFile(file)); in load() local 155 if (query.isMovie()) { in load() 157 if (query.hasYear()) { in load() 158 movie = new Movie(id, mimeType, query.getName(), query.getYear()); in load() 160 movie = new Movie(id, mimeType, query.getName()); in load() 163 } else if (query.isEpisode()) { in load() 166 if (s.getTitle().equals(query.getName()) in load() 167 && s.hasYear() == query.hasYear() in load() 168 && (!s.hasYear() || s.getYear() == query.getYear())) { in load() [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ |
D | SearchActivity.java | 194 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/SettingsIntelligence/src/com/android/settings/intelligence/search/query/ |
D | DatabaseResultTask.java | 17 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/modules/DnsResolver/ |
D | DnsTlsQueryMap.h | 45 const std::vector<uint8_t> query; member 54 QueryFuture(Query query, std::future<Result> result) in QueryFuture() 55 : query(query), result(std::move(result)) {} in QueryFuture() 56 Query query; member 63 std::unique_ptr<QueryFuture> recordQuery(const netdutils::Slice query); 91 QueryPromise(Query query) : query(query) {} in QueryPromise() 92 Query query; member
|
D | DnsTlsTransport.cpp | 99 std::span<const uint8_t> query) { in sendUdpQuery() argument 118 if (send(fd, query.data(), query.size(), 0) != query.size()) { in sendUdpQuery() 153 std::future<DnsTlsTransport::Result> DnsTlsTransport::query(const netdutils::Slice query) { in query() argument 156 auto record = mQueries.recordQuery(query); in query() 167 sendQuery(record->query); in query() 180 const bool sent = mSocket->query(q.newId, netdutils::drop(netdutils::makeSlice(q.query), 2)); in sendQuery() 281 const std::vector<uint8_t> query = makeDnsQuery(); in validate() local 286 auto r = transport.query(netdutils::makeSlice(query)).get(); in validate() 325 auto result = sendUdpQuery(server.addr().ip(), mark, query); in validate() 343 auto r = transport.query(netdutils::makeSlice(query)).get(); in validate()
|
D | README-DoT.md | 1 # 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 …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/google/ |
D | AbstractGoogleSource.java | 58 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()
|
D | GoogleSuggestClient.java | 83 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() argument 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/services/Telephony/tests/src/com/android/phone/ |
D | SimPhonebookProviderTest.java | 123 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, null, null, in query_entityFiles_returnsCursorWithCorrectProjection() 131 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, new String[0], null, in query_entityFiles_returnsCursorWithCorrectProjection() 137 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, new String[]{ in query_entityFiles_returnsCursorWithCorrectProjection() 144 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, new String[]{ in query_entityFiles_returnsCursorWithCorrectProjection() 156 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, projection, null, null)) { in query_entityFiles_returnsCursorWithCorrectProjection() 164 mResolver.query(ElementaryFiles.CONTENT_URI, new String[]{"invalid_column"}, null, in query_entityFiles_unrecognizedColumn_throwsIllegalArgumentException() 173 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, null, null, null)) { in query_entityFiles_noSim_returnsEmptyCursor() 198 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, projection, null, null)) { in query_entityFiles_multiSim_returnsCursorWithRowForEachSimEf() 217 try (Cursor cursor = mResolver.query(ElementaryFiles.CONTENT_URI, null, null, null)) { in query_entityFiles_simWithZeroSizes_returnsEmptyCursor() 228 try (Cursor cursor = mResolver.query(ElementaryFiles.getItemUri(1, EF_ADN), null, null, in query_entityFilesItem_nullProjection_returnsCursorWithCorrectProjection() [all …]
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | QueryParameterUtils.java | 36 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/ |
D | SearchActionViewHolder.java | 74 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/ |
D | SearchContactsCursorLoader.java | 42 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/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | UriTest.java | 390 String path, String query, String fragment) { in testHierarchical() argument 399 if (query != null) { in testHierarchical() 400 sb.append('?').append(query); in testHierarchical() 418 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical() 420 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical() 427 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical() 429 uriString, ssp, uri, scheme, authority, path, query, fragment); in testHierarchical() 439 .encodedQuery(query) in testHierarchical() 444 uriString, ssp, built, scheme, authority, path, query, fragment); in testHierarchical() 446 uriString, ssp, built, scheme, authority, path, query, fragment); in testHierarchical() [all …]
|