Home
last modified time | relevance | path

Searched refs:uri (Results 1 – 25 of 959) sorted by relevance

12345678910>>...39

/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
DUriUtils.java59 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/
DAllUriTest.java294 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/
DVoicemailProviderTest.java111 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/
DMockContentProvider.java71 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/
DMessagingContentProvider.java106 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/
DAvatarUriUtil.java135 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 …]
DUriUtil.java72 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/
DVoicemailContentProvider.java121 protected int enforceReadPermissionInner(Uri uri, String callingPkg, IBinder callerToken) in enforceReadPermissionInner() argument
127 return super.enforceReadPermissionInner(uri, callingPkg, callerToken); in enforceReadPermissionInner()
132 protected int enforceWritePermissionInner(Uri uri, String callingPkg, IBinder callerToken) in enforceWritePermissionInner() argument
138 return super.enforceWritePermissionInner(uri, callingPkg, callerToken); in enforceWritePermissionInner()
167 public String getType(Uri uri) { in getType() argument
170 uriData = UriData.createUriData(uri); in getType()
179 public Uri insert(Uri uri, ContentValues values) { in insert() argument
181 Log.v(TAG, "insert: uri=" + uri + " values=[" + values + "]" + in insert()
184 UriData uriData = checkPermissionsAndCreateUriDataForWrite(uri, values); in insert()
189 public int bulkInsert(@NonNull Uri uri, @NonNull ContentValues[] values) { in bulkInsert() argument
[all …]
DCallLogProvider.java282 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()
319 queryForTesting(uri); in queryInternal()
328 checkVoicemailPermissionAndAddRestriction(uri, selectionBuilder, true /*isQuery*/); in queryInternal()
331 final int match = sURIMatcher.match(uri); in queryInternal()
338 parseCallIdFromUri(uri))); in queryInternal()
[all …]
DContactMetadataProvider.java119 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/providers/MediaProvider/src/com/android/providers/media/
DMediaProvider.java562 for (Uri uri : uris) { in setTransactionSuccessful()
563 notifyChangeInternal(uri); in setTransactionSuccessful()
579 public void notifyChange(Uri uri) { in notifyChange() argument
580 if (LOCAL_LOGV) Log.v(TAG, "Notifying " + uri); in notifyChange()
583 uris.add(uri); in notifyChange()
586 notifyChangeInternal(uri); in notifyChange()
591 private void notifyChangeInternal(Uri uri) { in notifyChangeInternal() argument
594 mContext.getContentResolver().notifyChange(uri, null); in notifyChangeInternal()
608 public static void acceptWithExpansion(Consumer<Uri> consumer, Uri uri) { in acceptWithExpansion() argument
609 final int match = matchUri(uri, true); in acceptWithExpansion()
[all …]
/packages/apps/Bluetooth/lib/mapapi/com/android/bluetooth/mapapi/
DBluetoothMapEmailProvider.java127 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/
DPhotoProvider.java63 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 …]
DSQLiteContentProvider.java76 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/
DDictionaryProvider.java166 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/apps/Camera2/src/com/android/camera/
DStorage.java165 Uri uri = null; in addImageToMediaStore() local
167 uri = resolver.insert(Media.EXTERNAL_CONTENT_URI, values); in addImageToMediaStore()
168 writeBitmap(uri, exif, bitmap, resolver); in addImageToMediaStore()
176 if (uri != null) { in addImageToMediaStore()
177 resolver.delete(uri, null, null); in addImageToMediaStore()
180 return uri; in addImageToMediaStore()
183 private void writeBitmap(Uri uri, ExifInterface exif, Bitmap bitmap, ContentResolver resolver) in writeBitmap() argument
185 OutputStream os = resolver.openOutputStream(uri); in writeBitmap()
195 resolver.update(uri, publishValues, null, null); in writeBitmap()
196 Log.i(TAG, "Image with uri: " + uri + " was published to the MediaStore"); in writeBitmap()
[all …]
/packages/apps/Camera2/src/com/android/camera/session/
DCaptureSessionManagerImpl.java69 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/services/Car/tests/BugReportApp/src/com/google/android/car/bugreport/
DBugStorageProvider.java221 @NonNull Uri uri, in query()
226 return query(uri, projection, selection, selectionArgs, sortOrder, null); in query()
232 @NonNull Uri uri, in query()
239 switch (mUriMatcher.match(uri)) { in query()
252 selectionArgs = new String[]{ uri.getLastPathSegment() }; in query()
255 throw new IllegalArgumentException("Unknown URL " + uri); in query()
260 cursor.setNotificationUri(getContext().getContentResolver(), uri); in query() local
266 public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) { in insert() argument
271 switch (mUriMatcher.match(uri)) { in insert()
276 throw new IllegalArgumentException("unknown uri" + uri); in insert()
[all …]
/packages/apps/Messaging/tests/src/com/android/messaging/
DFakeContentProvider.java39 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/apps/Dialer/java/com/android/dialer/phonelookup/database/
DPhoneLookupHistoryContentProvider.java92 @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/
DBluetoothOppUtility.java76 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/
DMmsProvider.java92 public Cursor query(Uri uri, String[] projection, in query() argument
105 int match = sURLMatcher.match(uri); in query()
107 Log.v(TAG, "Query uri=" + uri + ", match=" + match); in query()
128 qb.appendWhere(Mms._ID + "=" + uri.getPathSegments().get(0)); in query()
135 qb.appendWhere(Mms._ID + "=" + uri.getPathSegments().get(1)); in query()
144 qb.appendWhere(Part.MSG_ID + "=" + uri.getPathSegments().get(0)); in query()
148 qb.appendWhere(Part._ID + "=" + uri.getPathSegments().get(1)); in query()
152 qb.appendWhere(Addr.MSG_ID + "=" + uri.getPathSegments().get(0)); in query()
198 qb.appendWhere("T.id1 = " + uri.getLastPathSegment()); in query()
209 qb.appendWhere(pduTable + "._id = " + uri.getLastPathSegment()); in query()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/provider/
DClockProvider.java148 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 …]
DClockProvider.kt150 uri: Uri, in query()
160 when (sURIMatcher.match(uri)) { in query()
165 qb.appendWhere(uri.getLastPathSegment()!!) in query()
171 qb.appendWhere(uri.getLastPathSegment()!!) in query()
178 else -> throw IllegalArgumentException("Unknown URI $uri") in query()
185 ret.setNotificationUri(getContext()!!.getContentResolver(), uri) in query()
191 override fun getType(uri: Uri): String { in getType()
192 return when (sURIMatcher.match(uri)) { in getType()
202 uri: Uri, in update()
210 when (sURIMatcher.match(uri)) { in update()
[all …]
/packages/apps/TV/src/com/android/tv/util/
DTvProviderUtils.java68 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 …]

12345678910>>...39