/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/ |
D | UriUtils.java | 59 public static boolean isEmpty(@Nullable Uri uri) { in isEmpty() argument 60 return (uri == null || TextUtils.isEmpty(uri.toString())); in isEmpty() 111 Uri uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + SCHEME_DELIMITER in getAndroidResourceUri() local 113 return uri; in getAndroidResourceUri() 119 public static boolean isAndroidResourceUri(Uri uri) { in isAndroidResourceUri() argument 120 return ContentResolver.SCHEME_ANDROID_RESOURCE.equals(uri.getScheme()); in isAndroidResourceUri() 128 Uri uri = Uri.parse(SCHEME_ACCOUNT_IMAGE + SCHEME_DELIMITER + accountName); in getAccountImageUri() local 129 return uri; in getAccountImageUri() 139 Uri uri = Uri.parse(SCHEME_ACCOUNT_IMAGE + SCHEME_DELIMITER + accountName); in getAccountImageUri() local 141 uri = uri.buildUpon().appendQueryParameter(ACCOUNT_IMAGE_CHANGE_NOTIFY_URI, in getAccountImageUri() [all …]
|
/packages/providers/ContactsProvider/tests2/src/com/android/providers/contacts/tests2/ |
D | AllUriTest.java | 294 private String[] getColumns(Uri uri) { in getColumns() argument 295 try (Cursor c = mResolver.query(uri, in getColumns() 305 private void checkQueryExecutable(Uri uri, in checkQueryExecutable() argument 309 try (Cursor c = mResolver.query(uri, projection, selection, in checkQueryExecutable() 314 addFailure("Query failed: URI=" + uri + " Message=" + th.getMessage(), th); in checkQueryExecutable() 318 try (Cursor c = mResolver.query(uri, projection, selection, in checkQueryExecutable() 323 addFailure("Query with cancel failed: URI=" + uri + " Message=" + th.getMessage(), th); in checkQueryExecutable() 328 uri.buildUpon().appendQueryParameter( in checkQueryExecutable() 334 addFailure("Query with limit failed: URI=" + uri + " Message=" + th.getMessage(), th); in checkQueryExecutable() 340 uri.buildUpon() in checkQueryExecutable() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | VoicemailProviderTest.java | 111 Uri uri = mResolver.insert(voicemailUri(), getTestVoicemailValues()); in testInsert() local 114 assertStoredValues(uri, getTestVoicemailValues()); in testInsert() 115 assertSelection(uri, getTestVoicemailValues(), Voicemails._ID, ContentUris.parseId(uri)); in testInsert() 118 assertLastModified(uri, 1000); in testInsert() 124 Uri uri = mResolver.insert(voicemailUri(), values); in testInsertReadMessageIsNotNew() local 132 Cursor c = mResolver.query(uri, projection, Voicemails.NEW + "=0", null, in testInsertReadMessageIsNotNew() 157 Uri uri = insertVoicemail(); in testFileContent() local 158 OutputStream out = mResolver.openOutputStream(uri); in testFileContent() 163 InputStream in = mResolver.openInputStream(uri); in testFileContent() 175 Uri uri = insertVoicemail(); in testUpdate() local [all …]
|
/packages/apps/Contacts/tests/src/com/android/contacts/test/mocks/ |
D | MockContentProvider.java | 71 public Query(Uri uri) { in Query() argument 72 mUri = uri; in Query() 136 public boolean equals(Uri uri, String[] projection, String selection, in equals() argument 139 if (mMatcher != null && mMatcher.match(uri) == UriMatcher.NO_MATCH) { in equals() 142 } else if (!uri.equals(mUri)) { in equals() 211 public TypeQuery(Uri uri, String type) { in TypeQuery() argument 212 mUri = uri; in TypeQuery() 229 public boolean equals(Uri uri) { in equals() argument 230 return getUri().equals(uri); in equals() 249 public Insert(Uri uri, ContentValues contentValues, Uri resultUri) { in Insert() argument [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | MessagingContentProvider.java | 106 final Uri uri = Uri.parse(CONTENT_AUTHORITY); in notifyEverythingChanged() local 109 cr.notifyChange(uri, null); in notifyEverythingChanged() 128 final Uri uri = buildConversationParticipantsUri(conversationId); in notifyParticipantsChanged() local 130 cr.notifyChange(uri, null); in notifyParticipantsChanged() 182 final Uri uri = buildConversationMessagesUri(conversationId); in notifyMessagesChanged() local 185 cr.notifyChange(uri, null); in notifyMessagesChanged() 202 final Uri uri = buildConversationMetadataUri(conversationId); in notifyConversationMetadataChanged() local 204 cr.notifyChange(uri, null); in notifyConversationMetadataChanged() 261 public Cursor query(final Uri uri, final String[] projection, String selection, in query() argument 275 final int match = sURIMatcher.match(uri); in query() [all …]
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | AvatarUriUtil.java | 135 final Uri uri = avatarUris.get(i); in joinAvatarUriToGroup() local 136 Assert.notNull(uri); in joinAvatarUriToGroup() 137 Assert.isTrue(UriUtil.isLocalResourceUri(uri) || AvatarUriUtil.isAvatarUri(uri)); in joinAvatarUriToGroup() 138 builder.appendQueryParameter(PARAM_PARTICIPANT, uri.toString()); in joinAvatarUriToGroup() 267 public static boolean isAvatarUri(@NonNull final Uri uri) { in isAvatarUri() argument 268 Assert.notNull(uri); in isAvatarUri() 269 return uri != null && TextUtils.equals(SCHEME, uri.getScheme()) && in isAvatarUri() 270 TextUtils.equals(AUTHORITY, uri.getAuthority()); in isAvatarUri() 273 public static String getAvatarType(@NonNull final Uri uri) { in getAvatarType() argument 274 Assert.notNull(uri); in getAvatarType() [all …]
|
D | UriUtil.java | 72 public static String getFilePathFromUri(final Uri uri) { in getFilePathFromUri() argument 73 if (!isFileUri(uri)) { in getFilePathFromUri() 76 return uri.getPath(); in getFilePathFromUri() 82 public static boolean isLocalResourceUri(final Uri uri) { in isLocalResourceUri() argument 83 final String scheme = uri.getScheme(); in isLocalResourceUri() 92 public static boolean isBugleAppResource(final Uri uri) { in isBugleAppResource() argument 93 final String scheme = uri.getScheme(); in isBugleAppResource() 97 public static boolean isFileUri(final Uri uri) { in isFileUri() argument 98 return uri != null && TextUtils.equals(uri.getScheme(), ContentResolver.SCHEME_FILE); in isFileUri() 115 public static boolean isLocalUri(@NonNull final Uri uri) { in isLocalUri() argument [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | VoicemailContentProvider.java | 122 protected int enforceReadPermissionInner(Uri uri, String callingPkg, in enforceReadPermissionInner() argument 128 return super.enforceReadPermissionInner(uri, callingPkg, featureId, callerToken); in enforceReadPermissionInner() 133 protected int enforceWritePermissionInner(Uri uri, String callingPkg, in enforceWritePermissionInner() argument 139 return super.enforceWritePermissionInner(uri, callingPkg, featureId, callerToken); in enforceWritePermissionInner() 168 public String getType(Uri uri) { in getType() argument 171 uriData = UriData.createUriData(uri); in getType() 180 public Uri insert(Uri uri, ContentValues values) { in insert() argument 182 Log.v(TAG, "insert: uri=" + uri + " values=[" + values + "]" + in insert() 186 UriData uriData = checkPermissionsAndCreateUriDataForWrite(uri, values); in insert() 191 public int bulkInsert(@NonNull Uri uri, @NonNull ContentValues[] values) { in bulkInsert() argument [all …]
|
D | CallLogProvider.java | 282 public int bulkInsert(Uri uri, ContentValues[] values) { in bulkInsert() argument 289 return super.bulkInsert(uri, values); in bulkInsert() 297 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 304 return queryInternal(uri, projection, selection, selectionArgs, sortOrder); in query() 310 private Cursor queryInternal(Uri uri, String[] projection, String selection, in queryInternal() argument 313 Log.v(TAG, "query: uri=" + uri + " projection=" + Arrays.toString(projection) + in queryInternal() 320 queryForTesting(uri); in queryInternal() 329 checkVoicemailPermissionAndAddRestriction(uri, selectionBuilder, true /*isQuery*/); in queryInternal() 332 final int match = sURIMatcher.match(uri); in queryInternal() 339 parseCallIdFromUri(uri))); in queryInternal() [all …]
|
D | ContactMetadataProvider.java | 119 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 125 Log.v(TAG, "query: uri=" + uri + " projection=" + Arrays.toString(projection) + in query() 131 String limit = getLimit(uri); in query() 135 final int match = sURIMatcher.match(uri); in query() 144 ContentUris.parseId(uri))); in query() 152 throw new IllegalArgumentException("Unknown URL " + uri); in query() 161 public String getType(Uri uri) { in getType() argument 162 int match = sURIMatcher.match(uri); in getType() 171 throw new IllegalArgumentException("Unknown URI: " + uri); in getType() 179 public Uri insert(Uri uri, ContentValues values) { in insert() argument [all …]
|
/packages/apps/Bluetooth/lib/mapapi/com/android/bluetooth/mapapi/ |
D | BluetoothMapEmailProvider.java | 127 void readDataFromPipe(ParcelFileDescriptor input, Uri uri, String mimeType, Bundle opts, in readDataFromPipe() argument 137 public void readDataFromPipe(ParcelFileDescriptor input, Uri uri, String mimeType, in readDataFromPipe() argument 139 Log.v(TAG, "readDataFromPipe(): uri=" + uri.toString()); in readDataFromPipe() 143 long messageId = Long.valueOf(uri.getLastPathSegment()); in readDataFromPipe() 144 long accountId = Long.valueOf(getAccountId(uri)); in readDataFromPipe() 183 public void writeDataToPipe(ParcelFileDescriptor output, Uri uri, String mimeType, in writeDataToPipe() argument 186 Log.d(TAG, "writeDataToPipe(): uri=" + uri.toString() + " - getLastPathSegment() = " in writeDataToPipe() 187 + uri.getLastPathSegment()); in writeDataToPipe() 197 List<String> segments = uri.getPathSegments(); in writeDataToPipe() 199 long accountId = Long.parseLong(getAccountId(uri)); in writeDataToPipe() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/data/ |
D | PhotoProvider.java | 63 void notifyChange(Uri uri, boolean syncToNetwork); in notifyChange() argument 272 public int deleteInTransaction(Uri uri, String selection, String[] selectionArgs, in deleteInTransaction() argument 274 int match = matchUri(uri); in deleteInTransaction() 276 selectionArgs = addIdToSelectionArgs(match, uri, selectionArgs); in deleteInTransaction() 277 return deleteCascade(uri, match, selection, selectionArgs); in deleteInTransaction() 281 public String getType(Uri uri) { in getType() argument 282 Cursor cursor = query(uri, PROJECTION_MIME_TYPE, null, null, null); in getType() 292 public Uri insertInTransaction(Uri uri, ContentValues values, boolean callerIsSyncAdapter) { in insertInTransaction() argument 293 int match = matchUri(uri); in insertInTransaction() 295 String table = getTableFromMatch(match, uri); in insertInTransaction() [all …]
|
D | SQLiteContentProvider.java | 76 public abstract Uri insertInTransaction(Uri uri, ContentValues values, in insertInTransaction() argument 83 public abstract int updateInTransaction(Uri uri, ContentValues values, String selection, in updateInTransaction() argument 90 public abstract int deleteInTransaction(Uri uri, String selection, String[] selectionArgs, in deleteInTransaction() argument 97 protected void postNotifyUri(Uri uri) { in postNotifyUri() argument 99 mChangedUris.add(uri); in postNotifyUri() 103 public boolean isCallerSyncAdapter(Uri uri) { in isCallerSyncAdapter() argument 116 public Uri insert(Uri uri, ContentValues values) { in insert() argument 118 boolean callerIsSyncAdapter = isCallerSyncAdapter(uri); in insert() 124 result = insertInTransaction(uri, values, callerIsSyncAdapter); in insert() 132 result = insertInTransaction(uri, values, callerIsSyncAdapter); in insert() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/dictionarypack/ |
D | DictionaryProvider.java | 166 private static int matchUri(final Uri uri) { in matchUri() argument 168 final String protocolVersionArg = uri.getQueryParameter(QUERY_PARAMETER_PROTOCOL_VERSION); in matchUri() 171 case 1: return sUriMatcherV1.match(uri); in matchUri() 172 case 2: return sUriMatcherV2.match(uri); in matchUri() 177 private static String getClientId(final Uri uri) { in getClientId() argument 179 final String protocolVersionArg = uri.getQueryParameter(QUERY_PARAMETER_PROTOCOL_VERSION); in getClientId() 183 case 2: return uri.getPathSegments().get(0); in getClientId() 197 public String getType(final Uri uri) { in getType() argument 198 PrivateLog.log("Asked for type of : " + uri); in getType() 199 final int match = matchUri(uri); in getType() [all …]
|
/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/ |
D | DelegatorTest.java | 70 final Uri uri = createAudio(); in testPushAllowed() local 72 assertEquals(InstrumentationRegistry.getTargetContext().getPackageName(), getOwner(uri)); in testPushAllowed() 76 mResolver.update(uri, values, null); in testPushAllowed() 78 assertEquals(PERMISSIONLESS_APP, getOwner(uri)); in testPushAllowed() 86 final Uri uri = createAudio(); in testOrphanedAllowed() local 87 clearOwner(uri); in testOrphanedAllowed() 89 assertEquals(null, getOwner(uri)); in testOrphanedAllowed() 93 mResolver.update(uri, values, null); in testOrphanedAllowed() 95 assertEquals(PERMISSIONLESS_APP, getOwner(uri)); in testOrphanedAllowed() 103 final Uri uri = createAudio(); in testPullBlocked() local [all …]
|
/packages/apps/Camera2/src/com/android/camera/session/ |
D | CaptureSessionManagerImpl.java | 69 public void notifyTaskQueued(final Uri uri) { in notifyTaskQueued() argument 75 listener.onSessionQueued(uri); in notifyTaskQueued() 87 public void notifyTaskDone(final Uri uri) { in notifyTaskDone() argument 93 listener.onSessionDone(uri); in notifyTaskDone() 96 finalizeSession(uri); in notifyTaskDone() 106 public void notifyTaskFailed(final Uri uri, final int failureMessageId, in notifyTaskFailed() argument 113 listener.onSessionFailed(uri, failureMessageId, removeFromFilmstrip); in notifyTaskFailed() 116 finalizeSession(uri); in notifyTaskFailed() 122 public void notifyTaskCanceled(final Uri uri) { in notifyTaskCanceled() argument 128 listener.onSessionCanceled(uri); in notifyTaskCanceled() [all …]
|
/packages/apps/Messaging/tests/src/com/android/messaging/ |
D | FakeContentProvider.java | 39 private final String uri; field in FakeContentProvider.ContentOverride 45 ContentOverride(final String uri, final String where, final String args, in ContentOverride() argument 47 this.uri = uri; in ContentOverride() 54 boolean match(final String uri, final String where, final String[] args) { in match() argument 55 if (!this.uri.equals(uri) || !TextUtils.equals(this.where, where)) { in match() 73 public FakeContentProvider(final Context context, final Uri uri, final boolean canDelegate) { in FakeContentProvider() argument 75 mUri = uri; in FakeContentProvider() 83 providerInfo.authority = uri.getAuthority(); in FakeContentProvider() 88 public void addOverrideData(final Uri uri, final String where, final String args, in addOverrideData() argument 90 mOverrides.add(new ContentOverride(uri.toString(), where, args, columns, data)); in addOverrideData() [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaProvider.java | 333 final Uri uri = MediaStore.Files.getContentUri(volumeName); in updateVolumes() local 334 final StorageVolume volume = mStorageManager.getStorageVolume(uri); in updateVolumes() 519 Uri uri = intent.getData(); 520 String pkg = uri != null ? uri.getSchemeSpecificPart() : null; 543 private final void updateQuotaTypeForUri(@NonNull Uri uri, int mediaType) { in updateQuotaTypeForUri() argument 547 file = queryForDataFile(uri, null); in updateQuotaTypeForUri() 658 acceptWithExpansion((uri) -> { 659 getContext().revokeUriPermission(uri, ~0); 1223 public Uri canonicalize(Uri uri) { in canonicalize() argument 1225 final int match = matchUri(uri, allowHidden); in canonicalize() [all …]
|
/packages/services/Car/tests/BugReportApp/src/com/android/car/bugreport/ |
D | BugStorageProvider.java | 222 @NonNull Uri uri, in query() 227 return query(uri, projection, selection, selectionArgs, sortOrder, null); in query() 233 @NonNull Uri uri, in query() 241 switch (mUriMatcher.match(uri)) { in query() 254 selectionArgs = new String[]{ uri.getLastPathSegment() }; in query() 257 throw new IllegalArgumentException("Unknown URL " + uri); in query() 262 cursor.setNotificationUri(getContext().getContentResolver(), uri); in query() local 268 public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) { in insert() argument 274 switch (mUriMatcher.match(uri)) { in insert() 279 throw new IllegalArgumentException("unknown uri" + uri); in insert() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/phonelookup/database/ |
D | PhoneLookupHistoryContentProvider.java | 92 @NonNull Uri uri, in query() 100 @UriType int uriType = uriType(uri); in query() 107 Uri.decode(uri.getQueryParameter(PhoneLookupHistory.NUMBER_QUERY_PARAM)))); in query() 120 throw new IllegalArgumentException("Unknown uri: " + uri); in query() 126 public String getType(@NonNull Uri uri) { in getType() argument 132 public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) { in insert() argument 137 @UriType int uriType = uriType(uri); in insert() 146 Uri.decode(uri.getQueryParameter(PhoneLookupHistory.NUMBER_QUERY_PARAM)); in insert() 160 throw new IllegalArgumentException("Unknown uri: " + uri); in insert() 182 @NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) { in delete() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/ |
D | BluetoothOppUtility.java | 76 public static boolean isBluetoothShareUri(Uri uri) { in isBluetoothShareUri() argument 77 return uri.toString().startsWith(BluetoothShare.CONTENT_URI.toString()); in isBluetoothShareUri() 80 public static BluetoothOppTransferInfo queryRecord(Context context, Uri uri) { in queryRecord() argument 82 Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); in queryRecord() 91 Log.v(TAG, "BluetoothOppManager Error: not got data from db for uri:" + uri); in queryRecord() 182 Long timeStamp, Uri uri) { in openReceivedFile() argument 188 if (!isBluetoothShareUri(uri)) { in openReceivedFile() 194 Cursor metadataCursor = context.getContentResolver().query(uri, new String[]{ in openReceivedFile() 221 Log.d(TAG, "This uri will be deleted: " + uri); in openReceivedFile() 223 context.getContentResolver().delete(uri, null, null); in openReceivedFile() [all …]
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | MmsProvider.java | 93 public Cursor query(Uri uri, String[] projection, in query() argument 106 int match = sURLMatcher.match(uri); in query() 108 Log.v(TAG, "Query uri=" + uri + ", match=" + match); in query() 129 qb.appendWhere(Mms._ID + "=" + uri.getPathSegments().get(0)); in query() 136 qb.appendWhere(Mms._ID + "=" + uri.getPathSegments().get(1)); in query() 145 qb.appendWhere(Part.MSG_ID + "=" + uri.getPathSegments().get(0)); in query() 149 qb.appendWhere(Part._ID + "=" + uri.getPathSegments().get(1)); in query() 153 qb.appendWhere(Addr.MSG_ID + "=" + uri.getPathSegments().get(0)); in query() 199 qb.appendWhere("T.id1 = " + uri.getLastPathSegment()); in query() 210 qb.appendWhere(pduTable + "._id = " + uri.getLastPathSegment()); in query() [all …]
|
/packages/apps/DeskClock/src/com/android/deskclock/provider/ |
D | ClockProvider.java | 148 public Cursor query(@NonNull Uri uri, String[] projectionIn, String selection, in query() argument 154 int match = sURIMatcher.match(uri); in query() 162 qb.appendWhere(uri.getLastPathSegment()); in query() 170 qb.appendWhere(uri.getLastPathSegment()); in query() 178 throw new IllegalArgumentException("Unknown URI " + uri); in query() 186 ret.setNotificationUri(getContext().getContentResolver(), uri); in query() local 193 public String getType(@NonNull Uri uri) { in getType() argument 194 int match = sURIMatcher.match(uri); in getType() 210 public int update(@NonNull Uri uri, ContentValues values, String where, String[] whereArgs) { in update() argument 214 switch (sURIMatcher.match(uri)) { in update() [all …]
|
/packages/apps/TV/src/com/android/tv/util/ |
D | TvProviderUtils.java | 68 public static synchronized boolean checkSeriesIdColumn(Context context, Uri uri) { in checkSeriesIdColumn() argument 76 return (Utils.isRecordedProgramsUri(uri) in checkSeriesIdColumn() 77 && checkRecordedProgramTableSeriesIdColumn(context, uri)) in checkSeriesIdColumn() 78 || (Utils.isProgramsUri(uri) && checkProgramTableSeriesIdColumn(context, uri)); in checkSeriesIdColumn() 82 private static synchronized boolean checkProgramTableSeriesIdColumn(Context context, Uri uri) { in checkProgramTableSeriesIdColumn() argument 84 if (getExistingColumns(context, uri).contains(EXTRA_PROGRAM_COLUMN_SERIES_ID)) { in checkProgramTableSeriesIdColumn() 86 } else if (addColumnToTable(context, uri, EXTRA_PROGRAM_COLUMN_SERIES_ID)) { in checkProgramTableSeriesIdColumn() 95 Context context, Uri uri) { in checkRecordedProgramTableSeriesIdColumn() argument 97 if (getExistingColumns(context, uri).contains(EXTRA_PROGRAM_COLUMN_SERIES_ID)) { in checkRecordedProgramTableSeriesIdColumn() 99 } else if (addColumnToTable(context, uri, EXTRA_PROGRAM_COLUMN_SERIES_ID)) { in checkRecordedProgramTableSeriesIdColumn() [all …]
|
/packages/apps/Camera2/src/com/android/camera/ |
D | Storage.java | 157 Uri uri = null; in addImageToMediaStore() local 159 uri = resolver.insert(Images.Media.EXTERNAL_CONTENT_URI, values); in addImageToMediaStore() 168 return uri; in addImageToMediaStore() 206 Uri uri = generateUniquePlaceholderUri(); in addPlaceholder() local 207 replacePlaceholder(uri, placeholder); in addPlaceholder() 208 return uri; in addPlaceholder() 214 public static void removePlaceholder(Uri uri) { in removePlaceholder() argument 215 sSessionsToSizes.remove(uri); in removePlaceholder() 216 sSessionsToPlaceholderBitmap.remove(uri); in removePlaceholder() 217 sSessionsToPlaceholderVersions.remove(uri); in removePlaceholder() [all …]
|