/packages/modules/StatsD/statsd/tests/e2e/ |
D | RestrictedEventMetric_e2e_test.cpp | 152 std::stringstream query; in TEST_F() local 153 query << "SELECT * FROM metric_" << dbutils::reformatMetricId(restrictedMetricId); in TEST_F() 154 processor->querySql(query.str(), /*minSqlClientVersion=*/0, in TEST_F() 204 std::stringstream query; in TEST_F() local 205 query << "SELECT * FROM metric_" << dbutils::reformatMetricId(restrictedMetricId); in TEST_F() 206 processor->querySql(query.str(), /*minSqlClientVersion=*/0, in TEST_F() 250 std::stringstream query; in TEST_F() local 251 query << "SELECT * FROM metric_" << dbutils::reformatMetricId(restrictedMetricId); in TEST_F() 252 processor->querySql(query.str(), /*minSqlClientVersion=*/0, in TEST_F() 296 std::stringstream query; in TEST_F() local [all …]
|
/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/QuickSearchBox/src/com/android/quicksearchbox/ |
D | SearchActivity.kt | 175 val query: String? = savedInstanceState.getString(INSTANCE_KEY_QUERY) in restoreInstanceState() constant 176 setQuery(query, false) in restoreInstanceState() 184 outState.putString(INSTANCE_KEY_QUERY, query) in onSaveInstanceState() 190 val query: String? = intent.getStringExtra(SearchManager.QUERY) in setupFromIntent() constant 193 setQuery(query, selectAll) in setupFromIntent() 239 logger?.logExit(currentSuggestions, query!!.length) in onStop() 292 protected val query: String? constant in com.android.quicksearchbox.SearchActivity 293 get() = mSearchActivityView?.query 295 protected fun setQuery(query: String?, selectAll: Boolean) { in setQuery() 296 mSearchActivityView?.setQuery(query, selectAll) in setQuery() [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/modules/StatsD/statsd/tests/metrics/ |
D | RestrictedEventMetricProducer_test.cpp | 31 stringstream query; in metricTableExist() local 32 query << "SELECT * FROM metric_" << metricId; in metricTableExist() 37 return dbutils::query(configKey, query.str(), rows, columnTypes, columnNames, err); in metricTableExist() 72 stringstream query; in TEST_F() local 73 query << "SELECT * FROM metric_" << metricId1; in TEST_F() 78 dbutils::query(configKey, query.str(), rows, columnTypes, columnNames, err); in TEST_F() 113 stringstream query; in TEST_F() local 114 query << "SELECT * FROM metric_" << metricId2; in TEST_F() 119 EXPECT_TRUE(dbutils::query(configKey, query.str(), rows, columnTypes, columnNames, err)); in TEST_F() 150 std::stringstream query; in TEST_F() local [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/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/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/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/modules/DnsResolver/tests/ |
D | resolv_tls_unit_test.cpp | 101 bytevec make_echo(uint16_t id, const Slice query) { in make_echo() argument 102 bytevec response(query.size() + 2); in make_echo() 106 memcpy(response.data() + 2, query.base(), query.size()); in make_echo() 114 bool query(uint16_t id, const Slice query) override { in query() function in android::net::FakeSocketEcho 116 std::thread(&IDnsTlsSocketObserver::onResponse, mObserver, make_echo(id, query)).detach(); in query() 130 auto r = transport.query(makeSlice(QUERY)).get(); in TEST_F() 141 bool query(uint16_t id, const Slice query ATTRIBUTE_UNUSED) override { in query() function in android::net::FakeSocketId 167 std::future<DnsTlsTransport::Result> f = transport.query(makeSlice(QUERY)); in TEST_F() 189 results.push_back(transport.query(makeSlice(QUERY))); in TEST_F() 213 bool query(uint16_t id, const Slice query) override { in query() function in android::net::FakeSocketDelay [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 | 97 std::span<const uint8_t> query) { in sendUdpQuery() argument 116 if (send(fd, query.data(), query.size(), 0) != query.size()) { in sendUdpQuery() 151 std::future<DnsTlsTransport::Result> DnsTlsTransport::query(const netdutils::Slice query) { in query() function in android::net::DnsTlsTransport 154 auto record = mQueries.recordQuery(query); in query() 165 sendQuery(record->query); in query() 178 const bool sent = mSocket->query(q.newId, netdutils::drop(netdutils::makeSlice(q.query), 2)); in sendQuery() 279 const std::vector<uint8_t> query = makeDnsQuery(); in validate() local 284 auto r = transport.query(netdutils::makeSlice(query)).get(); in validate() 323 auto result = sendUdpQuery(server.addr().ip(), mark, query); in validate() 341 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/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/google/ |
D | AbstractGoogleSource.kt | 44 @Override abstract override fun queryInternal(query: String?): SourceResult? in refreshShortcut() 47 @Override abstract override fun queryExternal(query: String?): SourceResult? in refreshShortcut() 79 override fun getSuggestions(query: String?, queryLimit: Int): SourceResult? { in getSuggestions() 80 return emptyIfNull(queryInternal(query), query) in getSuggestions() 83 fun getSuggestionsExternal(query: String?): SourceResult { in getSuggestionsExternal() 84 return emptyIfNull(queryExternal(query), query) in getSuggestionsExternal() 87 private fun emptyIfNull(result: SourceResult?, query: String?): SourceResult { in emptyIfNull() 88 return if (result == null) CursorBackedSourceResult(this, query) else result in emptyIfNull()
|
/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/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/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/storage/ |
D | MetadataDatabase.java | 293 Cursor cursor = database.query("SELECT * FROM metadata"); 312 Cursor cursor = database.query("SELECT * FROM metadata"); 338 Cursor cursor = database.query("SELECT * FROM metadata"); 355 Cursor cursor = database.query("SELECT * FROM metadata"); 373 Cursor cursor = database.query("SELECT * FROM metadata"); 392 Cursor cursor = database.query("SELECT * FROM metadata"); 411 Cursor cursor = database.query("SELECT * FROM metadata"); 429 Cursor cursor = database.query("SELECT * FROM metadata"); 447 Cursor cursor = database.query("SELECT * FROM metadata"); 466 Cursor cursor = database.query("SELECT * FROM metadata"); [all …]
|
/packages/providers/TelephonyProvider/tests/src/com/android/providers/telephony/ |
D | TelephonyDatabaseHelperTest.java | 80 Cursor cursor = db.query("carriers", null, null, null, null, null, null); in databaseHelperOnUpgrade_hasApnSetIdField() 95 Cursor cursor = db.query("carriers", null, null, null, null, null, null); in databaseHelperOnUpgrade_hasCarrierIdField() 108 Cursor cursor = db.query("simInfo", null, null, null, null, null, null); in databaseHelperOnUpgrade_hasCountryIsoField() 121 Cursor cursor = db.query("siminfo", null, null, null, null, null, null); in databaseHelperOnUpgrade_hasProfileClassField() 134 Cursor cursor = db.query("siminfo", null, null, null, null, null, null); in databaseHelperOnUpgrade_hasPortIndexField() 148 Cursor cursor = db.query("carriers", null, null, null, null, null, null); in databaseHelperOnUpgrade_hasSkip464XlatField() 164 Cursor cursor = db.query("carriers", null, null, null, null, null, null); in databaseHelperOnUpgrade_columnsMatchNewlyCreatedDb() 168 cursor = db.query("carriers_full", null, null, null, null, null, null); in databaseHelperOnUpgrade_columnsMatchNewlyCreatedDb() 178 cursor = db.query("siminfo", null, null, null, null, null, null); in databaseHelperOnUpgrade_columnsMatchNewlyCreatedDb() 182 cursor = db.query("siminfo_full", null, null, null, null, null, null); in databaseHelperOnUpgrade_columnsMatchNewlyCreatedDb() [all …]
|
/packages/modules/DnsResolver/doh/network/ |
D | driver.rs | 120 Command::Query(query) => { in drive() 121 if let Err(e) = self.send_query(query).await { in drive() 153 match self.connection.query(dns_request, expiry).await { in force_probe() 180 async fn send_query(&mut self, query: Query) -> Result<()> { in send_query() 184 if query.response.is_closed() { in send_query() 195 let request = encoding::dns_request(&query.query, &self.info.url)?; in send_query() 196 let stream_fut = self.connection.query(request, Some(query.expiry)).await?; in send_query() 204 query.response.send(Response::Error { error: QueryError::ConnectionError }); in send_query() 210 query.response.send(Response::Error { error: QueryError::Reset(err) }) in send_query() 212 query.response.send(Response::Success { answer: stream.data }) in send_query()
|