/packages/apps/UnifiedEmail/src/com/android/mail/providers/ |
D | SuggestionsProvider.java | 66 public Cursor query(String query) { in query() method in SuggestionsProvider 74 if (query != null) { in query() 76 String[] tokens = TextUtils.split(query, in query() 80 query = tokens[tokens.length - 1]; in query() 91 query = query.trim(); in query() 96 final Cursor c = super.query(query); in query() 101 if (query.length() >= MIN_QUERY_LENGTH_FOR_CONTACTS) { in query() 102 cursors.add(new ContactsCursor().query(query)); in query() 126 public ContactsCursor query(String query) { in query() argument 128 ContactsContract.CommonDataKinds.Email.CONTENT_FILTER_URI, Uri.encode(query)); in query() [all …]
|
/packages/apps/Dialer/src/com/android/dialer/dialpad/ |
D | SmartDialNameMatcher.java | 56 public SmartDialNameMatcher(String query) { in SmartDialNameMatcher() argument 57 this(query, LATIN_SMART_DIAL_MAP); in SmartDialNameMatcher() 60 public SmartDialNameMatcher(String query, SmartDialMap map) { in SmartDialNameMatcher() argument 61 mQuery = query; in SmartDialNameMatcher() 126 public SmartDialMatchPosition matchesNumber(String phoneNumber, String query, boolean useNanp) { in matchesNumber() argument 132 SmartDialMatchPosition matchPos = matchesNumberWithOffset(phoneNumber, query, 0); in matchesNumber() 141 matchPos = matchesNumberWithOffset(phoneNumber, query, in matchesNumber() 145 matchPos = matchesNumberWithOffset(phoneNumber, query, in matchesNumber() 177 public SmartDialMatchPosition matchesNumber(String phoneNumber, String query) { in matchesNumber() argument 178 return matchesNumber(phoneNumber, query, true); in matchesNumber() [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/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 …]
|
D | ContactDirectoryManagerTest.java | 81 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() method in ContactDirectoryManagerTest.MockContactDirectoryProvider 176 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testScanAllProviders() 214 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageInstalled() 232 cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageInstalled() 274 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageUninstalled() 283 cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageUninstalled() 320 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageReplaced() 332 cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageReplaced() 378 Cursor cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageRenamed() 397 cursor = mResolver.query(Directory.CONTENT_URI, null, null, null, null); in testPackageRenamed() [all …]
|
D | BaseContactsProvider2Test.java | 561 return mResolver.query(ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId), in queryRawContact() 566 return mResolver.query(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in queryContact() 571 return mResolver.query(ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId), in queryContact() 659 Cursor c = mResolver.query(uri, projection, Data.MIMETYPE + "='" in assertStructuredName() 672 Cursor c = mResolver.query(Groups.CONTENT_URI, null, null, null, null); in assertSingleGroup() 685 Cursor c = mResolver.query(ContactsContract.Data.CONTENT_URI, null, null, null, null); in assertSingleGroupMembership() 742 Cursor c = mResolver.query(ContentUris.withAppendedId(Data.CONTENT_URI, dataId), in assertSuperPrimary() 813 Cursor c = mResolver.query(uri, new String[]{"dirty"}, null, null, null); in assertDirty() 821 Cursor c = mResolver.query(uri, new String[]{"version"}, null, null, null); in getVersion() 887 Cursor c = mResolver.query(uri, new String[] { column }, selection, selectionArgs, null); in getStoredValue() [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 …]
|
D | SuggestionsProviderImpl.java | 61 public Suggestions getSuggestions(String query, Source sourceToQuery) { in getSuggestions() argument 62 if (DBG) Log.d(TAG, "getSuggestions(" + query + ")"); in getSuggestions() 63 final Suggestions suggestions = new Suggestions(query, sourceToQuery); in getSuggestions() 64 Log.i(TAG, "chars:" + query.length() + ",source:" + sourceToQuery); in getSuggestions() 67 if (shouldDisplayResults(query)) { in getSuggestions() 75 QueryTask.startQuery(query, maxResults, sourceToQuery, mQueryExecutor, in getSuggestions() 81 private boolean shouldDisplayResults(String query) { in shouldDisplayResults() argument 82 if (query.length() == 0 && !mConfig.showSuggestionsForZeroQuery()) { in shouldDisplayResults()
|
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/ |
D | CalendarProvider2Test.java | 277 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() 293 Cursor cursor = mResolver.query(mEventsUri, null, null, null, null); in execute() 1236 Cursor cursor = mResolver.query(mEventsUri, new String[] { Events._ID }, in deleteMatchingEvents() 1267 Cursor cursor = mResolver.query(mEventsUri, projection, in updateMatchingEvents() 1331 Cursor cursor = mResolver.query(mEventsUri, projection, in updateMatchingEventsStatusOnly() 1398 Cursor c = mResolver.query(uri, new String[] {Events.EVENT_COLOR}, null, null, null); in testInsertUpdateDeleteColor() 1414 c = mResolver.query(uri, new String[] {Events.EVENT_COLOR}, null, null, null); in testInsertUpdateDeleteColor() 1435 Cursor cursor = mResolver.query(Colors.CONTENT_URI, new String[] {Colors.COLOR_KEY}, in testInsertUpdateDeleteColor() 1444 cursor = mResolver.query(Colors.CONTENT_URI, new String[] {Colors.COLOR_KEY}, in testInsertUpdateDeleteColor() 1460 Cursor cursor = mResolver.query(Colors.CONTENT_URI, projection, Colors.COLOR_KEY in checkColor() [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/Browser/tests/src/com/android/browser/ |
D | BrowserProviderTests.java | 97 String query = "\u30ae\u30e3\u30e9\u30ea\u30fc"; in testPartialTitleJapanese() local 98 assertInsertQuery("http://www.example.com/sdaga", title, query); in testPartialTitleJapanese() 104 String query = "\u30ad\u30e3\u30e9\u30ea\u30fc"; in testSoundmarkTitleJapanese() local 105 assertInsertQuery("http://www.example.com/sdaga", title, query); in testSoundmarkTitleJapanese() 112 private void assertInsertQuery(String url, String title, String query) { in assertInsertQuery() argument 114 assertQueryReturns(url, title, query); in assertInsertQuery() 117 private void assertQueryReturns(String url, String title, String query) { in assertQueryReturns() argument 118 Cursor c = getBookmarksSuggest(query); in assertQueryReturns() 120 assertTrue(title + " not matched by " + query, c.getCount() > 0); in assertQueryReturns() 121 assertTrue("More than one result for " + query, c.getCount() == 1); in assertQueryReturns() [all …]
|
/packages/apps/UnifiedEmail/src/com/android/mail/ |
D | SenderInfoLoader.java | 130 StringBuilder query = new StringBuilder() in loadContactPhotos() local 133 appendQuestionMarks(query, emailsList); in loadContactPhotos() 134 query.append(')'); in loadContactPhotos() 143 cursor = resolver.query(Data.CONTENT_URI, DATA_COLS, in loadContactPhotos() 144 query.toString(), toStringArray(emailsList), sortOrder); in loadContactPhotos() 189 query.setLength(0); in loadContactPhotos() 190 query.append(Photo._ID).append(" IN ("); in loadContactPhotos() 191 appendQuestionMarks(query, photoIdsAsStrings); in loadContactPhotos() 192 query.append(')'); in loadContactPhotos() 196 cursor = resolver.query(Data.CONTENT_URI, PHOTO_COLS, in loadContactPhotos() [all …]
|
/packages/apps/Settings/src/com/android/settings/dashboard/ |
D | SearchResultsSummary.java | 284 public boolean onQueryTextSubmit(String query) { in onQueryTextSubmit() argument 285 mQuery = getFilteredQueryString(query); in onQueryTextSubmit() 294 public boolean onQueryTextChange(String query) { in onQueryTextChange() argument 295 final String newQuery = getFilteredQueryString(query); in onQueryTextChange() 354 private String getFilteredQueryString(CharSequence query) { in getFilteredQueryString() argument 355 if (query == null) { in getFilteredQueryString() 359 for (int n = 0; n < query.length(); n++) { in getFilteredQueryString() 360 char c = query.charAt(n); in getFilteredQueryString() 402 public String query; field in SearchResultsSummary.SuggestionItem 404 public SuggestionItem(String query) { in SuggestionItem() argument [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | BugleDatabaseOperations.java | 296 cursor = dbWrapper.query(DatabaseHelper.CONVERSATIONS_TABLE, in getThreadId() 331 cursor = db.query(DatabaseHelper.PARTICIPANTS_TABLE, in isBlockedParticipant() 539 final Cursor cursor = dbWrapper.query( in getConversationMaxTimestamp() 699 cursor = dbWrapper.query(DatabaseHelper.PARTICIPANTS_TABLE, in addConversationSelfIdToContentValues() 725 cursor = dbWrapper.query(DatabaseHelper.MESSAGES_TABLE, in updateConversationDraftSnippetAndPreviewInTransaction() 873 cursor = dbWrapper.query(DatabaseHelper.CONVERSATIONS_TABLE, in getConversationSelfId() 922 cursor = dbWrapper.query(DatabaseHelper.CONVERSATIONS_TABLE, in getSmsServiceCenterForConversation() 946 cursor = dbWrapper.query(DatabaseHelper.PARTICIPANTS_TABLE, in getExistingParticipant() 983 cursor = dbWrapper.query(DatabaseHelper.PARTICIPANTS_TABLE, in getParticipantsForConversation() 1020 cursor = dbWrapper.query(DatabaseHelper.PARTS_TABLE, in readMessagePartData() [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/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaDocumentsProvider.java | 242 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryDocument() 251 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryDocument() 263 cursor = resolver.query(Video.Media.EXTERNAL_CONTENT_URI, in queryDocument() 272 cursor = resolver.query(Video.Media.EXTERNAL_CONTENT_URI, in queryDocument() 284 cursor = resolver.query(Artists.EXTERNAL_CONTENT_URI, in queryDocument() 293 cursor = resolver.query(Albums.EXTERNAL_CONTENT_URI, in queryDocument() 302 cursor = resolver.query(Audio.Media.EXTERNAL_CONTENT_URI, in queryDocument() 331 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryChildDocuments() 345 cursor = resolver.query(Images.Media.EXTERNAL_CONTENT_URI, in queryChildDocuments() 354 cursor = resolver.query(Video.Media.EXTERNAL_CONTENT_URI, in queryChildDocuments() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/ |
D | SearchActivity.java | 153 String query; in onCreate() local 155 query = icicle.getString(BUNDLE_KEY_RESTORE_SEARCH_QUERY); in onCreate() 157 query = intent.getStringExtra(SearchManager.QUERY); in onCreate() 159 if ("TARDIS".equalsIgnoreCase(query)) { in onCreate() 162 initFragments(millis, query); in onCreate() 173 private void initFragments(long timeMillis, String query) { in initFragments() argument 184 search(query, t); in initFragments() 222 searchEventInfo.query = searchQuery; in search() 311 String query = intent.getStringExtra(SearchManager.QUERY); in handleIntent() local 312 search(query, null); in handleIntent() [all …]
|
/packages/apps/ContactsCommon/TestCommon/src/com/android/contacts/common/test/mocks/ |
D | MockContentProvider.java | 239 Query query = new Query(contentUri); in expectQuery() local 240 mExpectedQueries.add(query); in expectQuery() 241 return query; in expectQuery() 249 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() method in MockContentProvider 253 Query query = iterator.next(); in query() local 254 if (query.equals(uri, projection, selection, selectionArgs, sortOrder)) { in query() 255 query.mExecuted = true; in query() 256 if (!query.mAnyNumberOfTimes) { in query() 259 return query.getResult(projection); in query() 333 for (Query query : mExpectedQueries) { in verify() [all …]
|
/packages/apps/Settings/src/com/android/settings/search/ |
D | Index.java | 234 public Cursor search(String query) { in search() argument 238 final String primarySql = buildSearchSQL(query, MATCH_COLUMNS_PRIMARY, true); in search() 244 buildSearchSQL(query, MATCH_COLUMNS_SECONDARY, false)); in search() 255 public Cursor getSuggestions(String query) { in getSuggestions() argument 256 final String sql = buildSuggestionsSQL(query); in getSuggestions() 261 private String buildSuggestionsSQL(String query) { in buildSuggestionsSQL() argument 269 if (TextUtils.isEmpty(query)) { in buildSuggestionsSQL() 276 sb.append(query); in buildSuggestionsSQL() 287 public long addSavedQuery(String query){ in addSavedQuery() argument 289 task.execute(query); in addSavedQuery() [all …]
|
/packages/apps/Dialer/tests/src/com/android/dialer/dialpad/ |
D | SmartDialNameMatcherTest.java | 235 private void checkMatchesNumber(String number, String query, boolean expectedMatches, in checkMatchesNumber() argument 237 checkMatchesNumber(number, query, expectedMatches, false, matchStart, matchEnd); in checkMatchesNumber() 240 private void checkMatchesNumber(String number, String query, boolean expectedMatches, in checkMatchesNumber() argument 242 final SmartDialNameMatcher matcher = new SmartDialNameMatcher(query); in checkMatchesNumber() 243 final SmartDialMatchPosition pos = matcher.matchesNumber(number, query, matchNanp); in checkMatchesNumber() 251 private void checkMatches(String displayName, String query, boolean expectedMatches, in checkMatches() argument 253 final SmartDialNameMatcher matcher = new SmartDialNameMatcher(query); in checkMatches() 257 displayName, query, matchPositions); in checkMatches() 258 Log.d(TAG, "query=" + query + " text=" + displayName in checkMatches()
|
/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/ContactsCommon/src/com/android/contacts/common/util/ |
D | SearchUtil.java | 173 public static String cleanStartAndEndOfSearchQuery(String query) { in cleanStartAndEndOfSearchQuery() argument 175 while (start < query.length()) { in cleanStartAndEndOfSearchQuery() 176 int codePoint = query.codePointAt(start); in cleanStartAndEndOfSearchQuery() 183 if (start == query.length()) { in cleanStartAndEndOfSearchQuery() 188 int end = query.length() - 1; in cleanStartAndEndOfSearchQuery() 190 if (Character.isLowSurrogate(query.charAt(end))) { in cleanStartAndEndOfSearchQuery() 194 int codePoint = query.codePointAt(end); in cleanStartAndEndOfSearchQuery() 202 return query.substring(start, end + 1); in cleanStartAndEndOfSearchQuery()
|
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ |
D | MaterialSearchViewController.java | 264 public void onQueryTextChanged(String query) { in onQueryTextChanged() argument 265 mSearchSuggestionList.setQuery(query); in onQueryTextChanged() 279 public void onSearchPerformed(String query) { in onSearchPerformed() argument 280 query = query.trim(); in onSearchPerformed() 281 if (!TextUtils.isEmpty(query)) { in onSearchPerformed() 283 mController.executeSearch(query); in onSearchPerformed() 304 public void saveRecentQuery(String query) { in saveRecentQuery() argument 305 new SaveRecentQueryTask().execute(query); in saveRecentQuery()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | MetadataDbHelper.java | 360 final Cursor cursor = defaultDb.query(MetadataDbHelper.CLIENT_TABLE_NAME, in getMetadataUriAsString() 419 final Cursor cursor = defaultDb.query(CLIENT_TABLE_NAME, in getLastUpdateDateForClient() 445 final Cursor cursor = defaultDb.query(CLIENT_TABLE_NAME, in getMetadataDownloadIdAndStartDateForURI() 459 final Cursor cursor = defaultDb.query(CLIENT_TABLE_NAME, in getOldestUpdateTime() 611 final Cursor cursor = db.query(METADATA_TABLE_NAME, in getContentValuesByPendingId() 641 final Cursor cursor = db.query(METADATA_TABLE_NAME, in getInstalledOrDeletingWordListContentValuesByWordListId() 677 final Cursor cursor = defaultDb.query(CLIENT_TABLE_NAME, CLIENT_TABLE_COLUMNS, in getDownloadRecordsForDownloadId() 712 final Cursor cursor = db.query(METADATA_TABLE_NAME, in getContentValuesByWordListId() 744 final Cursor cursor = db.query(METADATA_TABLE_NAME, in getContentValuesOfLatestAvailableWordlistById() 778 final Cursor results = getDb(context, clientId).query(METADATA_TABLE_NAME, in queryInstalledOrDeletingOrAvailableDictionaryMetadata() [all …]
|