/packages/apps/Dialer/java/com/android/dialer/common/database/ |
D | Selection.java | 70 private final String selection; field in Selection 73 private Selection(@NonNull String selection, @NonNull String[] selectionArgs) { in Selection() argument 74 this.selection = selection; in Selection() 80 return selection; in getSelection() 89 return selection.isEmpty(); in isEmpty() 113 public static Selection fromString(@Nullable String selection, @Nullable String... args) { in fromString() argument 114 return new Builder(selection, args == null ? Collections.emptyList() : Arrays.asList(args)) in fromString() 119 public static Selection fromString(@Nullable String selection, Collection<String> args) { in fromString() argument 120 return new Builder(selection, args).build(); in fromString() 125 public static Selection not(@NonNull Selection selection) { in not() argument [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/ |
D | DragStartListenerTest.java | 26 import androidx.recyclerview.selection.MutableSelection; 27 import androidx.recyclerview.selection.Selection; 91 (Selection<String> selection) -> { in setUp() 129 Selection<String> selection = mListener.getSelectionToBeCopied("1234", in testDragStart_nonSelectedItem() local 131 assertTrue(selection.size() == 1); in testDragStart_nonSelectedItem() 132 assertTrue(selection.contains("1234")); in testDragStart_nonSelectedItem() 137 MutableSelection<String> selection = new MutableSelection<>(); in testDragStart_selectedItem() local 138 selection.add("1234"); in testDragStart_selectedItem() 139 selection.add("5678"); in testDragStart_selectedItem() 140 mSelectionMgr.replaceSelection(selection); in testDragStart_selectedItem() [all …]
|
/packages/apps/Calendar/src/com/android/calendar/alerts/ |
D | DismissAlarmsService.java | 74 String selection; in onHandleIntent() local 79 selection = CalendarAlerts.STATE + "=" + CalendarAlerts.STATE_FIRED + " AND " + in onHandleIntent() 83 selection = buildMultipleEventsQuery(eventIds); in onHandleIntent() 89 selection = CalendarAlerts.STATE + "=" + CalendarAlerts.STATE_FIRED; in onHandleIntent() 97 resolver.update(uri, values, selection, null); in onHandleIntent() 117 StringBuilder selection = new StringBuilder(); in buildMultipleEventsQuery() local 118 selection.append(CalendarAlerts.STATE); in buildMultipleEventsQuery() 119 selection.append("="); in buildMultipleEventsQuery() 120 selection.append(CalendarAlerts.STATE_FIRED); in buildMultipleEventsQuery() 122 selection.append(" AND ("); in buildMultipleEventsQuery() [all …]
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | MmsSmsProvider.java | 325 String selection, String[] selectionArgs, String sortOrder) { in query() argument 338 SqlQueryChecker.checkQueryParametersForSubqueries(projection, selection, sortOrder); in query() 350 cursor = getCompleteConversations(projection, selection, sortOrder, smsTable, in query() 358 selection = concatSelections( in query() 359 selection, Threads.TYPE + "=" + threadType); in query() 362 projection, selection, selectionArgs, sortOrder); in query() 365 projection, selection, sortOrder, smsTable, pduTable); in query() 370 selection, sortOrder, smsTable, pduTable); in query() 374 uri.getPathSegments().get(1), projection, selection, in query() 379 uri.getPathSegments().get(1), projection, selection, in query() [all …]
|
D | CarrierProvider.java | 61 public Cursor query(Uri uri, String[] projectionIn, String selection, in query() argument 67 + " selection=" + selection in query() 74 Cursor c = qb.query(db, projectionIn, selection, selectionArgs, null, null, sortOrder); in query() 92 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 96 + " selection={" + selection + "}" in delete() 97 + " selection=" + selection in delete() 101 selection, selectionArgs); in delete() 107 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 113 + " selection=" + selection in update() 117 values, selection, selectionArgs); in update()
|
/packages/apps/Contacts/tests/src/com/android/contacts/test/mocks/ |
D | MockContentProvider.java | 95 public Query withSelection(String selection, String... selectionArgs) { in withSelection() argument 96 mSelection = selection; in withSelection() 136 public boolean equals(Uri uri, String[] projection, String selection, in equals() argument 150 if (!mAnySelection && !Objects.equals(selection, mSelection)) { in equals() 329 public Delete withSelection(String selection, @Nullable String[] selectionArgs) { in withSelection() argument 330 mSelection = Preconditions.checkNotNull(selection); in withSelection() 368 private boolean equals(Uri uri, String selection, String[] selectionArgs) { in equals() argument 369 return mUri.equals(uri) && Objects.equals(mSelection, selection) in equals() 393 @Nullable String selection, in Update() argument 397 mSelection = selection; in Update() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/files/ |
D | ActionHandler.java | 38 import androidx.recyclerview.selection.ItemDetailsLookup.ItemDetails; 39 import androidx.recyclerview.selection.MutableSelection; 40 import androidx.recyclerview.selection.Selection; 141 Selection<String> selection = getStableSelection(); in openSelectedInNewWindow() local 142 if (selection.isEmpty()) { in openSelectedInNewWindow() 146 assert(selection.size() == 1); in openSelectedInNewWindow() 147 DocumentInfo doc = mModel.getDocument(selection.iterator().next()); in openSelectedInNewWindow() 231 final MutableSelection<String> selection = this.getStableSelection(); in getSelectedOrFocused() local 232 if (selection.isEmpty()) { in getSelectedOrFocused() 235 selection.add(focusModelId); in getSelectedOrFocused() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/data/ |
D | PhotoProvider.java | 272 public int deleteInTransaction(Uri uri, String selection, String[] selectionArgs, in deleteInTransaction() argument 275 selection = addIdToSelection(match, selection); in deleteInTransaction() 277 return deleteCascade(uri, match, selection, selectionArgs); in deleteInTransaction() 308 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 310 return query(uri, projection, selection, selectionArgs, sortOrder, null); in query() 314 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 318 selection = addIdToSelection(match, selection); in query() 321 … Cursor c = query(table, projection, selection, selectionArgs, sortOrder, cancellationSignal); in query() 329 public int updateInTransaction(Uri uri, ContentValues values, String selection, in updateInTransaction() argument 337 selection = addIdToSelection(match, selection); in updateInTransaction() [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | SQLiteQueryBuilder.java | 460 final String selection = queryArgs.getString(QUERY_ARG_SQL_SELECTION); in query() local 466 return query(helper, projectionIn, selection, selectionArgs, groupBy, having, sortOrder, in query() 471 String selection, String[] selectionArgs, String groupBy, in query() argument 474 return query(db, projectionIn, selection, selectionArgs, groupBy, in query() 515 String selection, String[] selectionArgs, String groupBy, in query() argument 523 projectionIn, selection, groupBy, having, in query() 530 enforceStrictGrammar(selection, groupBy, having, sortOrder, limit); in query() 532 if (isStrict() && hasUserWhere(selection)) { in query() 549 final String wrappedSql = buildQuery(projectionIn, wrap(selection), groupBy, in query() 615 @Nullable String selection, @Nullable String[] selectionArgs) { [all …]
|
D | DatabaseUtils.java | 69 public static @Nullable String bindSelection(@Nullable String selection, in bindSelection() argument 71 if (selection == null) return null; in bindSelection() 73 if ((selectionArgs == null) || (selectionArgs.length == 0)) return selection; in bindSelection() 75 if (selection.indexOf('?') == -1) return selection; in bindSelection() 83 final int len = selection.length(); in bindSelection() 86 char c = selection.charAt(i++); in bindSelection() 96 c = selection.charAt(i); in bindSelection() 103 argIndex = Integer.parseInt(selection.substring(start, i)) - 1; in bindSelection() 370 String selection = origSelection.substring(0, index); in recoverAbusiveSelection() local 374 selection = maybeBalance(selection); in recoverAbusiveSelection() [all …]
|
/packages/services/Mtp/src/com/android/mtp/ |
D | Mapper.java | 190 final String selection; in startAddingDocuments() local 193 selection = COLUMN_PARENT_DOCUMENT_ID + " = ?"; in startAddingDocuments() 196 selection = COLUMN_PARENT_DOCUMENT_ID + " IS NULL"; in startAddingDocuments() 212 selection + " AND " + COLUMN_ROW_STATE + " = ?", in startAddingDocuments() 242 String selection, in putDocuments() argument 262 queryCandidate(selection, args, mappingKeys, values)) { in putDocuments() 319 final String selection; in stopAddingDocuments() local 322 selection = COLUMN_PARENT_DOCUMENT_ID + " = ?"; in stopAddingDocuments() 325 selection = COLUMN_PARENT_DOCUMENT_ID + " IS NULL"; in stopAddingDocuments() 345 COLUMN_ROW_STATE + " = ? AND " + selection, in stopAddingDocuments() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/blocking/ |
D | FilteredNumberProvider.java | 64 Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { in query() argument 78 final Cursor c = qb.query(db, projection, selection, selectionArgs, null, null, null); in query() 123 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 130 selection = getSelectionWithId(selection, ContentUris.parseId(uri)); in delete() 136 db.delete(DialerDatabaseHelper.Tables.FILTERED_NUMBER_TABLE, selection, selectionArgs); in delete() 144 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 151 selection = getSelectionWithId(selection, ContentUris.parseId(uri)); in update() 158 DialerDatabaseHelper.Tables.FILTERED_NUMBER_TABLE, values, selection, selectionArgs); in update() 165 private String getSelectionWithId(String selection, long id) { in getSelectionWithId() argument 166 if (TextUtils.isEmpty(selection)) { in getSelectionWithId() [all …]
|
/packages/providers/BlockedNumberProvider/src/com/android/providers/blockednumber/ |
D | BlockedNumberProvider.java | 184 public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, in update() argument 193 public int delete(@NonNull Uri uri, @Nullable String selection, in delete() argument 201 numRows = deleteBlockedNumber(selection, selectionArgs); in delete() 204 numRows = deleteBlockedNumberWithId(ContentUris.parseId(uri), selection); in delete() 217 private int deleteBlockedNumberWithId(long id, String selection) { in deleteBlockedNumberWithId() argument 218 throwForNonEmptySelection(selection); in deleteBlockedNumberWithId() 226 private int deleteBlockedNumber(String selection, String[] selectionArgs) { in deleteBlockedNumber() argument 230 if (!TextUtils.isEmpty(selection)) { in deleteBlockedNumber() 232 Utils.wrapSelectionWithParens(selection), in deleteBlockedNumber() 238 selection, selectionArgs); in deleteBlockedNumber() [all …]
|
/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/query/ |
D | DatabaseResultTask.java | 175 final String[] selection = buildSingleWordSelection(query, matchColumns.length); in firstWordQuery() local 177 return query(whereClause, selection, baseRank); in firstWordQuery() 191 final String[] selection = buildSingleWordSelection(query, matchColumns.length); in secondaryWordQuery() local 193 return query(whereClause, selection, baseRank); in secondaryWordQuery() 206 final String[] selection = buildAnyWordSelection(matchColumns.length * 2); in anyWordQuery() local 208 return query(whereClause, selection, baseRank); in anyWordQuery() 219 private Set<SearchResult> query(String whereClause, String[] selection, int baseRank) { in query() argument 224 selection, null, null, null)) { in query() argument 277 String[] selection = new String[size]; in buildSingleWordSelection() local 280 selection[i] = query; in buildSingleWordSelection() [all …]
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarProvider2.java | 869 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 879 return queryInternal(uri, projection, selection, selectionArgs, sortOrder, callingUid); in query() 943 private String appendPrimaryOnlyToSelection(String selection) { in appendPrimaryOnlyToSelection() argument 944 return TextUtils.isEmpty(selection) in appendPrimaryOnlyToSelection() 946 : selection + " AND (" + SELECTION_PRIMARY_CALENDAR + ")"; in appendPrimaryOnlyToSelection() 956 String selection, String[] selectionArgs, String sortOrder, in queryWorkProfileProvider() argument 976 selection = appendPrimaryOnlyToSelection(selection); in queryWorkProfileProvider() 979 selection, selectionArgs, sortOrder); in queryWorkProfileProvider() 983 private Cursor queryInternal(Uri uri, String[] projection, String selection, in queryInternal() argument 1005 return mDbHelper.getSyncState().query(db, projection, selection, selectionArgs, in queryInternal() [all …]
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | DownloadStorageProvider.java | 856 String selection, String[] selectionArgs, CancellationSignal signal) in queryForSingleItem() argument 859 ContentResolver.createSqlQueryBundle(selection, selectionArgs, null), signal); in queryForSingleItem() 969 final StringBuilder selection = new StringBuilder(); in buildSearchSelection() local 973 if (selection.length() > 0) { in buildSearchSelection() 974 selection.append(" AND "); in buildSearchSelection() 976 selection.append(DownloadColumns.DATA + " NOT IN ("); in buildSearchSelection() 977 selection.append(TextUtils.join(",", Collections.nCopies(filePaths.size(), "?"))); in buildSearchSelection() 978 selection.append(")"); in buildSearchSelection() 983 if (selection.length() > 0) { in buildSearchSelection() 984 selection.append(" AND "); in buildSearchSelection() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | DatabaseWrapper.java | 198 final String[] projection, final String selection, in explainQueryPlan() argument 207 selection, in explainQueryPlan() 245 final String selection, final String[] selectionArgs, final String groupBy, in query() argument 250 explainQueryPlan(qb, mDatabase, projection, selection, selectionArgs, in query() 259 final Cursor cursor = mDatabase.query(searchTable, projection, selection, selectionArgs, in query() 265 searchTable, selection, cursor.getCount())); in query() 271 final String selection, final String[] selectionArgs, final String groupBy, in query() argument 274 searchTable, columns, selection, selectionArgs, in query() 279 final String[] projection, final String selection, final String[] queryArgs, in query() argument 282 explainQueryPlan(qb, mDatabase, projection, selection, queryArgs, in query() [all …]
|
/packages/services/Car/tests/BugReportApp/src/com/android/car/bugreport/ |
D | BugStorageProvider.java | 246 @Nullable String selection, in query() argument 249 return query(uri, projection, selection, selectionArgs, sortOrder, null); in query() 257 @Nullable String selection, in query() argument 271 if (selection != null || selectionArgs != null) { in query() 275 selection = COLUMN_ID + "=?"; in query() 282 Cursor cursor = db.query(false, table, null, selection, selectionArgs, null, null, in query() 330 @NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) { in delete() argument 335 if (selection != null || selectionArgs != null) { in delete() 345 if (selection != null || selectionArgs != null) { in delete() 349 selection = COLUMN_ID + " = ?"; in delete() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/calllog/database/ |
D | AnnotatedCallLogContentProvider.java | 88 @Nullable String selection, in query() argument 99 queryBuilder.query(db, projection, selection, selectionArgs, null, null, sortOrder); in query() 109 queryBuilder.query(db, projection, selection, selectionArgs, null, null, sortOrder); in query() 124 queryBuilder.query(db, projection, selection, selectionArgs, null, null, sortOrder); in query() 192 @NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) { in delete() argument 199 Assert.checkArgument(selection == null, "Do not specify selection when deleting by ID"); in delete() 204 selection = getSelectionWithId(id); in delete() 211 int rows = database.delete(AnnotatedCallLog.TABLE, selection, selectionArgs); in delete() 226 @Nullable String selection, in update() argument 237 int rows = database.update(AnnotatedCallLog.TABLE, values, selection, selectionArgs); in update() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/ |
D | MainPanel.java | 53 private void selection(int position, boolean value) { in selection() method in MainPanel 155 selection(mCurrentSelected, false); in loadCategoryLookPanel() 160 selection(mCurrentSelected, true); in loadCategoryLookPanel() 168 selection(mCurrentSelected, false); in loadCategoryBorderPanel() 173 selection(mCurrentSelected, true); in loadCategoryBorderPanel() 184 selection(mCurrentSelected, false); in loadCategoryGeometryPanel() 189 selection(mCurrentSelected, true); in loadCategoryGeometryPanel() 197 selection(mCurrentSelected, false); in loadCategoryFiltersPanel() 202 selection(mCurrentSelected, true); in loadCategoryFiltersPanel() 212 selection(mCurrentSelected, false); in loadCategoryVersionsPanel() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/ |
D | DragStartListener.java | 27 import androidx.recyclerview.selection.MutableSelection; 28 import androidx.recyclerview.selection.Selection; 29 import androidx.recyclerview.selection.SelectionTracker; 122 Selection<String> selection = getSelectionToBeCopied(modelId, event); in startDrag() local 124 final List<DocumentInfo> srcs = mDocsConverter.apply(selection); in startDrag() 149 MutableSelection<String> selection = new MutableSelection<>(); in getSelectionToBeCopied() local 159 mSelectionMgr.copySelection(selection); in getSelectionToBeCopied() 161 selection.add(modelId); in getSelectionToBeCopied() 164 return selection; in getSelectionToBeCopied()
|
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/ |
D | CellBroadcastProvider.java | 173 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 181 + " selection = " + selection in query() 200 CELL_BROADCASTS_TABLE_NAME, projection, selection, selectionArgs, in query() 205 return qb.query(getReadableDatabase(), projection, selection, selectionArgs, null, in query() 258 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 264 + " selection = " + selection in delete() 271 selection, selectionArgs); in delete() 279 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 286 + " selection = " + selection in update() 296 selection, in update() [all …]
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | MenuManager.java | 62 public void updateActionMenu(Menu menu, SelectionDetails selection) { in updateActionMenu() argument 63 updateOpenWith(menu.findItem(R.id.action_menu_open_with), selection); in updateActionMenu() local 64 updateDelete(menu.findItem(R.id.action_menu_delete), selection); in updateActionMenu() local 65 updateShare(menu.findItem(R.id.action_menu_share), selection); in updateActionMenu() local 66 updateRename(menu.findItem(R.id.action_menu_rename), selection); in updateActionMenu() local 67 updateSelect(menu.findItem(R.id.action_menu_select), selection); in updateActionMenu() local 68 updateSelectAll(menu.findItem(R.id.action_menu_select_all), selection); in updateActionMenu() local 69 updateDeselectAll(menu.findItem(R.id.action_menu_deselect_all), selection); in updateActionMenu() local 70 updateMoveTo(menu.findItem(R.id.action_menu_move_to), selection); in updateActionMenu() local 71 updateCopyTo(menu.findItem(R.id.action_menu_copy_to), selection); in updateActionMenu() local [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | ContactsProvider2.java | 2211 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 2224 mContactsHelper.validateSql(getCallingPackage(), selection); in update() local 2228 updates = mProfileProvider.update(uri, values, selection, selectionArgs); in update() 2232 updates = super.update(uri, values, selection, selectionArgs); in update() 2243 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 2255 mContactsHelper.validateSql(getCallingPackage(), selection); in delete() local 2259 deletes = mProfileProvider.delete(uri, selection, selectionArgs); in delete() 2263 deletes = super.delete(uri, selection, selectionArgs); in delete() 2965 private Long findGroupByRawContactId(String selection, long rawContactId) { in findGroupByRawContactId() argument 2968 PROJECTION_GROUP_ID, selection, in findGroupByRawContactId() [all …]
|
/packages/modules/adb/tools/ |
D | adb_usbreset.cpp | 69 std::variant<std::monostate, AllDevices, SingleDevice, Serial> selection; in main() local 81 SetOption(&selection, AllDevices{}); in main() 83 SetOption(&selection, Serial{optarg}); in main() 85 SetOption(&selection, Serial{optarg}); in main() 91 if (std::get_if<std::monostate>(&selection)) { in main() 94 SetOption(&selection, Serial{env}); in main() 158 if (auto s = std::get_if<Serial>(&selection)) { in main() 170 } else if (std::get_if<SingleDevice>(&selection) && selected_devices.size() != 1) { in main()
|