/frameworks/base/core/tests/coretests/src/android/net/ |
D | UriTest.java | 43 Uri uri = builder.build(); in testToStringWithPathOnly() local 44 assertEquals("//foo", uri.toString()); in testToStringWithPathOnly() 173 Uri uri = Uri.parse("http://localhost:42"); in testAuthorityParsing() local 174 assertEquals("localhost", uri.getHost()); in testAuthorityParsing() 175 assertEquals(42, uri.getPort()); in testAuthorityParsing() 177 uri = Uri.parse("http://bob@localhost:42"); in testAuthorityParsing() 178 assertEquals("bob", uri.getUserInfo()); in testAuthorityParsing() 179 assertEquals("localhost", uri.getHost()); in testAuthorityParsing() 180 assertEquals(42, uri.getPort()); in testAuthorityParsing() 182 uri = Uri.parse("http://bob%20lee@localhost:42"); in testAuthorityParsing() [all …]
|
/frameworks/base/core/java/android/content/ |
D | ContentProvider.java | 234 public Cursor query(String callingPkg, @Nullable String attributionTag, Uri uri, in query() argument 237 uri = validateIncomingUri(uri); in query() 238 uri = maybeGetUriWithoutUserId(uri); in query() 239 if (enforceReadPermission(callingPkg, attributionTag, uri, null) in query() 260 uri, projection, queryArgs, in query() 279 uri, projection, queryArgs, in query() 290 public String getType(Uri uri) { in getType() argument 292 uri = validateIncomingUri(uri); in getType() 293 uri = maybeGetUriWithoutUserId(uri); in getType() 296 return mInterface.getType(uri); in getType() [all …]
|
D | LoggingContentInterface.java | 92 public @Nullable Cursor query(@NonNull Uri uri, @Nullable String[] projection, in query() argument 95 try (Logger l = new Logger("query", uri, projection, queryArgs, cancellationSignal)) { in query() argument 97 return l.setResult(delegate.query(uri, projection, queryArgs, cancellationSignal)); in query() 106 public @Nullable String getType(@NonNull Uri uri) throws RemoteException { in getType() argument 107 try (Logger l = new Logger("getType", uri)) { in getType() argument 109 return l.setResult(delegate.getType(uri)); in getType() 118 public @Nullable String[] getStreamTypes(@NonNull Uri uri, @NonNull String mimeTypeFilter) in getStreamTypes() argument 120 try (Logger l = new Logger("getStreamTypes", uri, mimeTypeFilter)) { in getStreamTypes() argument 122 return l.setResult(delegate.getStreamTypes(uri, mimeTypeFilter)); in getStreamTypes() 131 public @Nullable Uri canonicalize(@NonNull Uri uri) throws RemoteException { in canonicalize() argument [all …]
|
D | ContentResolver.java | 1068 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri, 1071 return query(uri, projection, selection, selectionArgs, sortOrder, null); 1110 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri, 1115 return query(uri, projection, queryArgs, cancellationSignal); 1154 public final @Nullable Cursor query(final @RequiresPermission.Read @NonNull Uri uri, 1157 Objects.requireNonNull(uri, "uri"); 1161 return mWrapped.query(uri, projection, queryArgs, cancellationSignal); 1167 IContentProvider unstableProvider = acquireUnstableProvider(uri); 1183 qCursor = unstableProvider.query(mPackageName, mAttributionTag, uri, projection, 1190 stableProvider = acquireProvider(uri); [all …]
|
D | ContentInterface.java | 43 public @Nullable Cursor query(@NonNull Uri uri, @Nullable String[] projection, in query() argument 47 public @Nullable String getType(@NonNull Uri uri) throws RemoteException; in getType() argument 49 public @Nullable String[] getStreamTypes(@NonNull Uri uri, @NonNull String mimeTypeFilter) in getStreamTypes() argument 52 public @Nullable Uri canonicalize(@NonNull Uri uri) throws RemoteException; in canonicalize() argument 54 public @Nullable Uri uncanonicalize(@NonNull Uri uri) throws RemoteException; in uncanonicalize() argument 56 public boolean refresh(@NonNull Uri uri, @Nullable Bundle extras, in refresh() argument 59 public int checkUriPermission(@NonNull Uri uri, int uid, @Intent.AccessUriMode int modeFlags) in checkUriPermission() argument 62 public @Nullable Uri insert(@NonNull Uri uri, @Nullable ContentValues initialValues, in insert() argument 65 public int bulkInsert(@NonNull Uri uri, @NonNull ContentValues[] initialValues) in bulkInsert() argument 68 public int delete(@NonNull Uri uri, @Nullable Bundle extras) throws RemoteException; in delete() argument [all …]
|
D | ContentProviderResult.java | 36 public final @Nullable Uri uri; field in ContentProviderResult 41 public ContentProviderResult(@NonNull Uri uri) { in ContentProviderResult() argument 42 this(Objects.requireNonNull(uri), null, null, null); in ContentProviderResult() 58 public ContentProviderResult(Uri uri, Integer count, Bundle extras, Throwable exception) { in ContentProviderResult() argument 59 this.uri = uri; in ContentProviderResult() 67 uri = Uri.CREATOR.createFromParcel(source); in ContentProviderResult() 69 uri = null; in ContentProviderResult() 90 uri = ContentProvider.maybeAddUserId(cpr.uri, userId); in ContentProviderResult() 98 if (uri != null) { in writeToParcel() 100 uri.writeToParcel(dest, flags); in writeToParcel() [all …]
|
/frameworks/base/services/core/java/com/android/server/uri/ |
D | GrantUri.java | 17 package com.android.server.uri; 30 public final Uri uri; field in GrantUri 33 public GrantUri(int sourceUserId, Uri uri, int modeFlags) { in GrantUri() argument 35 this.uri = uri; in GrantUri() 43 hashCode = 31 * hashCode + uri.hashCode(); in hashCode() 52 return uri.equals(other.uri) && (sourceUserId == other.sourceUserId) in equals() 60 String result = uri.toString() + " [user " + sourceUserId + "]"; in toString() 66 String result = uri.toSafeString() + " [user " + sourceUserId + "]"; in toSafeString() 73 proto.write(GrantUriProto.URI, uri.toString()); in dumpDebug() 78 public static GrantUri resolve(int defaultSourceUserHandle, Uri uri, int modeFlags) { in resolve() argument [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | FakeProviderRemote.java | 33 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 39 public String getType(Uri uri) { in getType() argument 40 if (uri.getPath() != null && uri.getPath().contains("error")) { in getType() 47 public Uri insert(Uri uri, ContentValues values) { in insert() argument 52 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 57 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 62 public Uri canonicalize(Uri uri) { in canonicalize() argument 63 if (uri.getPath() != null && uri.getPath().contains("error")) { in canonicalize() 66 return new Uri.Builder().scheme(uri.getScheme()).authority(uri.getAuthority()) in canonicalize()
|
D | ContentProviderOperationTest.java | 48 public Uri insert(Uri uri, ContentValues values) { in testInsert() 49 assertEquals(sTestUri1.toString(), uri.toString()); in testInsert() 51 return uri.buildUpon().appendPath("19").build(); in testInsert() 54 assertEquals(sTestUri1.buildUpon().appendPath("19").toString(), result.uri.toString()); in testInsert() 61 public Uri insert(Uri uri, ContentValues values) { in testInsertNoValues() 62 assertEquals(sTestUri1.toString(), uri.toString()); in testInsertNoValues() 64 return uri.buildUpon().appendPath("19").build(); in testInsertNoValues() 67 assertEquals(sTestUri1.buildUpon().appendPath("19").toString(), result.uri.toString()); in testInsertNoValues() 76 public Uri insert(Uri uri, ContentValues values) { in testInsertFailed() 77 assertEquals(sTestUri1.toString(), uri.toString()); in testInsertFailed() [all …]
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/wear/ |
D | WearPackageIconProvider.java | 57 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 63 public String getType(Uri uri) { in getType() argument 64 if (uri == null) { in getType() 68 if (AUTHORITY.equals(uri.getEncodedAuthority())) { in getType() 75 public Uri insert(Uri uri, ContentValues values) { in insert() argument 80 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 81 if (uri == null) { in delete() 85 enforcePermissions(uri); in delete() 87 if (ICON_TYPE.equals(getType(uri))) { in delete() 89 this.getContext().getApplicationContext(), getPackageNameFromUri(uri)); in delete() [all …]
|
/frameworks/base/services/core/java/com/android/server/slice/ |
D | SliceManagerService.java | 148 Uri uri = state.getUri(); in getPinnedSlices() local 149 int userId = ContentProvider.getUserIdFromUri(uri, callingUser); in getPinnedSlices() 151 ret.add(ContentProvider.getUriWithoutUserId(uri)); in getPinnedSlices() 160 public void pinSlice(String pkg, Uri uri, SliceSpec[] specs, IBinder token) in pinSlice() argument 163 enforceAccess(pkg, uri); in pinSlice() 165 uri = maybeAddUserId(uri, user); in pinSlice() 166 String slicePkg = getProviderPkg(uri, user); in pinSlice() 167 getOrCreatePinnedSlice(uri, slicePkg).pin(pkg, specs, token); in pinSlice() 179 public void unpinSlice(String pkg, Uri uri, IBinder token) throws RemoteException { in unpinSlice() argument 181 enforceAccess(pkg, uri); in unpinSlice() [all …]
|
/frameworks/base/sax/java/android/sax/ |
D | Children.java | 30 Element getOrCreate(Element parent, String uri, String localName) { in getOrCreate() argument 31 int hash = uri.hashCode() * 31 + localName.hashCode(); in getOrCreate() 37 current = new Child(parent, uri, localName, parent.depth + 1, hash); in getOrCreate() 45 && current.uri.compareTo(uri) == 0 in getOrCreate() 56 current = new Child(parent, uri, localName, parent.depth + 1, hash); in getOrCreate() 65 Element get(String uri, String localName) { in get() argument 66 int hash = uri.hashCode() * 31 + localName.hashCode(); in get() 75 && current.uri.compareTo(uri) == 0 in get() 91 Child(Element parent, String uri, String localName, int depth, in Child() argument 93 super(parent, uri, localName, depth); in Child()
|
D | Element.java | 32 final String uri; field in Element 46 Element(Element parent, String uri, String localName, int depth) { in Element() argument 48 this.uri = uri; in Element() 64 public Element getChild(String uri, String localName) { in getChild() argument 74 return children.getOrCreate(this, uri, localName); in getChild() 92 public Element requireChild(String uri, String localName) { in requireChild() argument 93 Element child = getChild(uri, localName); in requireChild() 166 return toString(uri, localName); in toString() 169 static String toString(String uri, String localName) { in toString() argument 170 return "'" + (uri.equals("") ? localName : uri + ":" + localName) + "'"; in toString()
|
/frameworks/base/core/java/android/app/slice/ |
D | SliceManager.java | 133 public void pinSlice(@NonNull Uri uri, @NonNull Set<SliceSpec> specs) { in pinSlice() argument 135 mService.pinSlice(mContext.getPackageName(), uri, in pinSlice() local 147 public void pinSlice(@NonNull Uri uri, @NonNull List<SliceSpec> specs) { in pinSlice() argument 148 pinSlice(uri, new ArraySet<>(specs)); in pinSlice() 165 public void unpinSlice(@NonNull Uri uri) { in unpinSlice() argument 167 mService.unpinSlice(mContext.getPackageName(), uri, mToken); in unpinSlice() local 191 public @NonNull Set<SliceSpec> getPinnedSpecs(Uri uri) { in getPinnedSpecs() argument 193 return new ArraySet<>(Arrays.asList(mService.getPinnedSpecs(uri, in getPinnedSpecs() 223 public @NonNull Collection<Uri> getSliceDescendants(@NonNull Uri uri) { in getSliceDescendants() argument 225 try (ContentProviderClient provider = resolver.acquireUnstableContentProviderClient(uri)) { in getSliceDescendants() [all …]
|
D | SliceProvider.java | 270 public @NonNull Collection<Uri> onGetSliceDescendants(@NonNull Uri uri) { in onGetSliceDescendants() argument 310 public final int update(Uri uri, ContentValues values, String selection, in update() argument 312 if (DEBUG) Log.d(TAG, "update " + uri); in update() 317 public final int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 318 if (DEBUG) Log.d(TAG, "delete " + uri); in delete() 323 public final Cursor query(Uri uri, String[] projection, String selection, in query() argument 325 if (DEBUG) Log.d(TAG, "query " + uri); in query() 330 public final Cursor query(Uri uri, String[] projection, String selection, String[] in query() argument 332 if (DEBUG) Log.d(TAG, "query " + uri); in query() 337 public final Cursor query(Uri uri, String[] projection, Bundle queryArgs, in query() argument [all …]
|
/frameworks/base/cmds/content/src/com/android/commands/content/ |
D | Content.java | 201 Uri uri = null; in parseInsertCommand() local 207 uri = Uri.parse(argumentValueRequired(argument)); in parseInsertCommand() 218 if (uri == null) { in parseInsertCommand() 226 return new InsertCommand(uri, userId, values, extras); in parseInsertCommand() 230 Uri uri = null; in parseDeleteCommand() local 235 uri = Uri.parse(argumentValueRequired(argument)); in parseDeleteCommand() 247 if (uri == null) { in parseDeleteCommand() 251 return new DeleteCommand(uri, userId, extras); in parseDeleteCommand() 255 Uri uri = null; in parseUpdateCommand() local 261 uri = Uri.parse(argumentValueRequired(argument)); in parseUpdateCommand() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/uri/ |
D | UriGrantsManagerServiceTest.java | 17 package com.android.server.uri; 19 import static com.android.server.uri.UriGrantsMockContext.FLAG_PERSISTABLE; 20 import static com.android.server.uri.UriGrantsMockContext.FLAG_PREFIX; 21 import static com.android.server.uri.UriGrantsMockContext.FLAG_READ; 22 import static com.android.server.uri.UriGrantsMockContext.PKG_CAMERA; 23 import static com.android.server.uri.UriGrantsMockContext.PKG_COMPLEX; 24 import static com.android.server.uri.UriGrantsMockContext.PKG_FORCE; 25 import static com.android.server.uri.UriGrantsMockContext.PKG_SOCIAL; 26 import static com.android.server.uri.UriGrantsMockContext.UID_PRIMARY_CAMERA; 27 import static com.android.server.uri.UriGrantsMockContext.UID_PRIMARY_COMPLEX; [all …]
|
/frameworks/base/tests/testables/src/android/testing/ |
D | TestableContext.java | 383 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) { in checkCallingOrSelfUriPermission() argument 384 if (mTestablePermissions != null && mTestablePermissions.wantsCall(uri)) { in checkCallingOrSelfUriPermission() 385 return mTestablePermissions.check(uri, modeFlags); in checkCallingOrSelfUriPermission() 387 return super.checkCallingOrSelfUriPermission(uri, modeFlags); in checkCallingOrSelfUriPermission() 391 public int checkCallingUriPermission(Uri uri, int modeFlags) { in checkCallingUriPermission() argument 392 if (mTestablePermissions != null && mTestablePermissions.wantsCall(uri)) { in checkCallingUriPermission() 393 return mTestablePermissions.check(uri, modeFlags); in checkCallingUriPermission() 395 return super.checkCallingUriPermission(uri, modeFlags); in checkCallingUriPermission() 399 public void enforceCallingOrSelfUriPermission(Uri uri, int modeFlags, String message) { in enforceCallingOrSelfUriPermission() argument 400 if (mTestablePermissions != null && mTestablePermissions.wantsCall(uri)) { in enforceCallingOrSelfUriPermission() [all …]
|
D | TestablePermissions.java | 47 public void setPermission(Uri uri, int value) { in setPermission() argument 49 mUris.put(uri, value); in setPermission() 56 boolean wantsCall(Uri uri) { in wantsCall() argument 57 return mUris.containsKey(uri); in wantsCall() 64 int check(Uri uri, int modeFlags) { in check() argument 66 return mUris.get(uri); in check() 75 public void enforce(Uri uri, int modeFlags) { in enforce() argument 76 if (check(uri, modeFlags) != PackageManager.PERMISSION_GRANTED) { in enforce()
|
/frameworks/base/core/java/android/provider/ |
D | DocumentsProvider.java | 864 public final Cursor query(Uri uri, String[] projection, String selection, in query() argument 882 public Cursor query(Uri uri, String[] projection, String selection, in query() argument 900 Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal) { in query() argument 902 switch (mMatcher.match(uri)) { in query() 907 getRootId(uri), projection, queryArgs, cancellationSignal); in query() 909 return querySearchDocuments(getRootId(uri), projection, queryArgs); in query() 912 enforceTree(uri); in query() 913 return queryDocument(getDocumentId(uri), projection); in query() 916 enforceTree(uri); in query() 917 if (DocumentsContract.isManageMode(uri)) { in query() [all …]
|
D | SyncStateContract.java | 73 public static byte[] get(ContentProviderClient provider, Uri uri, in get() argument 75 Cursor c = provider.query(uri, DATA_PROJECTION, SELECT_BY_ACCOUNT, in get() 103 public static void set(ContentProviderClient provider, Uri uri, in set() argument 109 provider.insert(uri, values); in set() 112 public static Uri insert(ContentProviderClient provider, Uri uri, in insert() argument 118 return provider.insert(uri, values); in insert() 121 public static void update(ContentProviderClient provider, Uri uri, byte[] data) in update() argument 125 provider.update(uri, values, null, null); in update() 128 public static Pair<Uri, byte[]> getWithUri(ContentProviderClient provider, Uri uri, in getWithUri() argument 130 Cursor c = provider.query(uri, DATA_PROJECTION, SELECT_BY_ACCOUNT, in getWithUri() [all …]
|
/frameworks/base/telephony/java/android/telephony/mbms/ |
D | FileInfo.java | 32 private final Uri uri; field in FileInfo 54 public FileInfo(Uri uri, String mimeType) { in FileInfo() argument 55 this.uri = uri; in FileInfo() 60 uri = in.readParcelable(null); in FileInfo() 66 dest.writeParcelable(uri, flags); in writeToParcel() 80 return uri; in getUri() 100 return Objects.equals(uri, fileInfo.uri) && in equals() 106 return Objects.hash(uri, mimeType); in hashCode()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationInlineImageResolver.java | 114 protected BitmapDrawable resolveImageInternal(Uri uri) throws IOException { in resolveImageInternal() argument 115 return (BitmapDrawable) LocalImageResolver.resolveImage(uri, mContext); in resolveImageInternal() 125 Drawable resolveImage(Uri uri) throws IOException { in resolveImage() argument 126 BitmapDrawable image = resolveImageInternal(uri); in resolveImage() 128 throw new IOException("resolveImageInternal returned null for uri: " + uri); in resolveImage() 136 public Drawable loadImage(Uri uri) { in loadImage() argument 141 if (!mImageCache.hasEntry(uri)) { in loadImage() 142 mImageCache.preload((uri)); in loadImage() 144 result = mImageCache.get(uri); in loadImage() 146 result = resolveImage(uri); in loadImage() [all …]
|
/frameworks/av/media/libdatasource/ |
D | DataSourceFactory.cpp | 48 const char *uri, in CreateFromURI() argument 57 if (!strncasecmp("file://", uri, 7)) { in CreateFromURI() 58 source = CreateFileSource(uri + 7); in CreateFromURI() 59 } else if (!strncasecmp("http://", uri, 7) || !strncasecmp("https://", uri, 8)) { in CreateFromURI() 81 if (mediaHTTP->connect(uri, &nonCacheSpecificHeaders) != OK) { in CreateFromURI() 94 } else if (!strncasecmp("data:", uri, 5)) { in CreateFromURI() 95 source = DataURISource::Create(uri); in CreateFromURI() 98 source = CreateFileSource(uri); in CreateFromURI() 127 sp<DataSource> DataSourceFactory::CreateFileSource(const char *uri) { in CreateFileSource() argument 128 return new FileSource(uri); in CreateFileSource()
|
/frameworks/base/drm/java/android/drm/ |
D | DrmManagerClient.java | 429 public ContentValues getConstraints(Uri uri, int action) { in getConstraints() argument 430 if (null == uri || Uri.EMPTY == uri) { in getConstraints() 433 return getConstraints(convertUriToPath(uri), action); in getConstraints() 444 public ContentValues getMetadata(Uri uri) { in getMetadata() argument 445 if (null == uri || Uri.EMPTY == uri) { in getMetadata() 448 return getMetadata(convertUriToPath(uri)); in getMetadata() 515 public boolean canHandle(Uri uri, String mimeType) { in canHandle() argument 516 if ((null == uri || Uri.EMPTY == uri) && (null == mimeType || mimeType.equals(""))) { in canHandle() 519 return canHandle(convertUriToPath(uri), mimeType); in canHandle() 604 public int getDrmObjectType(Uri uri, String mimeType) { in getDrmObjectType() argument [all …]
|