Home
last modified time | relevance | path

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

12345678910>>...29

/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java42 Uri uri = builder.build(); in testToStringWithPathOnly() local
43 assertEquals("//foo", uri.toString()); in testToStringWithPathOnly()
93 Uri uri = new Uri.Builder() in testSchemeSanitization() local
96 assertEquals("httphttpsevil.com:/te:st/", uri.getScheme()); in testSchemeSanitization()
97 assertEquals("httphttpsevil.com:/te:st/://google.com/one/way", uri.toString()); in testSchemeSanitization()
200 Uri uri = Uri.parse("http://localhost:42"); in testAuthorityParsing() local
201 assertEquals("localhost", uri.getHost()); in testAuthorityParsing()
202 assertEquals(42, uri.getPort()); in testAuthorityParsing()
204 uri = Uri.parse("http://bob@localhost:42"); in testAuthorityParsing()
205 assertEquals("bob", uri.getUserInfo()); in testAuthorityParsing()
[all …]
/frameworks/base/core/java/android/content/
DContentProvider.java251 public Cursor query(@NonNull AttributionSource attributionSource, Uri uri, in query() argument
254 uri = validateIncomingUri(uri); in query()
255 uri = maybeGetUriWithoutUserId(uri); in query()
256 if (enforceReadPermission(attributionSource, uri) in query()
277 uri, projection, queryArgs, in query()
291 traceBegin(TRACE_TAG_ACTIVITY_MANAGER, "query: ", uri.getAuthority()); in query()
296 uri, projection, queryArgs, in query()
307 public String getType(AttributionSource attributionSource, Uri uri) { in getType() argument
308 uri = validateIncomingUri(uri); in getType()
309 uri = maybeGetUriWithoutUserId(uri); in getType()
[all …]
DLoggingContentInterface.java92 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 …]
DContentResolver.java1114 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri,
1117 return query(uri, projection, selection, selectionArgs, sortOrder, null);
1156 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri,
1161 return query(uri, projection, queryArgs, cancellationSignal);
1200 public final @Nullable Cursor query(final @RequiresPermission.Read @NonNull Uri uri,
1203 Objects.requireNonNull(uri, "uri");
1207 return mWrapped.query(uri, projection, queryArgs, cancellationSignal);
1213 IContentProvider unstableProvider = acquireUnstableProvider(uri);
1229 qCursor = unstableProvider.query(mContext.getAttributionSource(), uri, projection,
1236 stableProvider = acquireProvider(uri);
[all …]
DContentInterface.java43 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 …]
DContentProviderResult.java36 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/core/tests/coretests/src/android/content/
DFakeProviderRemote.java33 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()
71 public Uri uncanonicalize(Uri uri) { in uncanonicalize() argument
[all …]
DContentProviderOperationTest.java48 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/services/core/java/com/android/server/uri/
DGrantUri.java17 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/packages/PackageInstaller/src/com/android/packageinstaller/wear/
DWearPackageIconProvider.java57 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/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotificationSettingsController.java72 public void onChange(boolean selfChange, Uri uri) { in NotificationSettingsController()
74 super.onChange(selfChange, uri); in NotificationSettingsController()
76 if (mListeners.containsKey(uri)) { in NotificationSettingsController()
78 String value = getCurrentSettingValue(uri, userId); in NotificationSettingsController()
79 for (Listener listener : mListeners.get(uri)) { in NotificationSettingsController()
80 mMainHandler.post(() -> listener.onSettingChanged(uri, userId, value)); in NotificationSettingsController()
96 for (Uri uri : mListeners.keySet()) { in NotificationSettingsController()
98 uri, false, mContentObserver, newUser); in NotificationSettingsController()
118 public void addCallback(@NonNull Uri uri, @NonNull Listener listener) { in addCallback() argument
119 if (uri == null || listener == null) { in addCallback()
[all …]
DNotificationInlineImageResolver.java124 Drawable resolveImage(Uri uri) { in resolveImage() argument
126 return LocalImageResolver.resolveImage(uri, mContext, mMaxImageWidth, mMaxImageHeight); in resolveImage()
130 Log.d(TAG, "resolveImage: Can't load image from " + uri, ex); in resolveImage()
144 public Drawable loadImage(Uri uri) { in loadImage() argument
145 return hasCache() ? loadImageFromCache(uri, MAX_UI_THREAD_TIMEOUT_MS) : resolveImage(uri); in loadImage()
148 private Drawable loadImageFromCache(Uri uri, long timeoutMs) { in loadImageFromCache() argument
150 if (!mImageCache.hasEntry(uri)) { in loadImageFromCache()
151 mImageCache.preload((uri)); in loadImageFromCache()
153 return mImageCache.get(uri, timeoutMs); in loadImageFromCache()
168 wantedSet.forEach(uri -> { in preloadImages()
[all …]
/frameworks/base/services/core/java/com/android/server/slice/
DSliceManagerService.java152 Uri uri = state.getUri(); in getPinnedSlices() local
153 int userId = ContentProvider.getUserIdFromUri(uri, callingUser); in getPinnedSlices()
155 ret.add(ContentProvider.getUriWithoutUserId(uri)); in getPinnedSlices()
164 public void pinSlice(String pkg, Uri uri, SliceSpec[] specs, IBinder token) in pinSlice() argument
167 enforceAccess(pkg, uri); in pinSlice()
169 uri = maybeAddUserId(uri, user); in pinSlice()
170 String slicePkg = getProviderPkg(uri, user); in pinSlice()
171 getOrCreatePinnedSlice(uri, slicePkg).pin(pkg, specs, token); in pinSlice()
183 public void unpinSlice(String pkg, Uri uri, IBinder token) throws RemoteException { in unpinSlice() argument
185 enforceAccess(pkg, uri); in unpinSlice()
[all …]
/frameworks/base/sax/java/android/sax/
DChildren.java30 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()
/frameworks/base/test-mock/src/android/test/mock/
DMockContentProvider.java90 Uri uri, RemoteCallback callback) throws RemoteException { in getTypeAsync() argument
91 MockContentProvider.this.getTypeAsync(uri, callback); in getTypeAsync()
95 public void getTypeAnonymousAsync(Uri uri, RemoteCallback callback) throws RemoteException { in getTypeAnonymousAsync() argument
96 MockContentProvider.this.getTypeAnonymousAsync(uri, callback); in getTypeAnonymousAsync()
162 public Uri canonicalize(@NonNull AttributionSource attributionSource, Uri uri) in canonicalize() argument
164 return MockContentProvider.this.canonicalize(uri); in canonicalize()
168 public void canonicalizeAsync(@NonNull AttributionSource attributionSource, Uri uri, in canonicalizeAsync() argument
170 MockContentProvider.this.canonicalizeAsync(uri, callback); in canonicalizeAsync()
174 public Uri uncanonicalize(@NonNull AttributionSource attributionSource, Uri uri) in uncanonicalize() argument
176 return MockContentProvider.this.uncanonicalize(uri); in uncanonicalize()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/screenshot/
DActionIntentCreator.kt32 fun createShare(uri: Uri): Intent = createShare(uri, subject = null, text = null) in createShare()
35 fun createShareWithSubject(uri: Uri, subject: String): Intent = in createShare()
36 createShare(uri, subject = subject) in createShare()
39 fun createShareWithText(uri: Uri, extraText: String): Intent = in createShare()
40 createShare(uri, text = extraText) in createShare()
43 val uri = uriWithoutUserId(rawUri) in createShare() constant
49 setDataAndType(uri, "image/png") in createShare()
50 putExtra(Intent.EXTRA_STREAM, uri) in createShare()
57 ClipData.Item(uri) in createShare()
77 val uri = uriWithoutUserId(rawUri) in createEdit() constant
[all …]
/frameworks/base/cmds/content/src/com/android/commands/content/
DContent.java202 Uri uri = null; in parseInsertCommand() local
208 uri = Uri.parse(argumentValueRequired(argument)); in parseInsertCommand()
219 if (uri == null) { in parseInsertCommand()
227 return new InsertCommand(uri, userId, values, extras); in parseInsertCommand()
231 Uri uri = null; in parseDeleteCommand() local
236 uri = Uri.parse(argumentValueRequired(argument)); in parseDeleteCommand()
248 if (uri == null) { in parseDeleteCommand()
252 return new DeleteCommand(uri, userId, extras); in parseDeleteCommand()
256 Uri uri = null; in parseUpdateCommand() local
262 uri = Uri.parse(argumentValueRequired(argument)); in parseUpdateCommand()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
DActionIntentCreatorTest.kt39 val uri = Uri.parse("content://fake") in testCreateShare() constant
41 val output = ActionIntentCreator.createShare(uri) in testCreateShare()
55 assertThatIntent(wrappedIntent).hasData(uri) in testCreateShare()
59 assertThatIntent(wrappedIntent).extras().parcelable<Uri>(Intent.EXTRA_STREAM).isEqualTo(uri) in testCreateShare()
64 val uri = Uri.parse("content://555@fake") in testCreateShare_embeddedUserIdRemoved() constant
66 val output = ActionIntentCreator.createShare(uri) in testCreateShare_embeddedUserIdRemoved()
74 val uri = Uri.parse("content://fake") in testCreateShareWithSubject() constant
77 val output = ActionIntentCreator.createShareWithSubject(uri, subject) in testCreateShareWithSubject()
89 assertThatIntent(wrappedIntent).hasData(uri) in testCreateShareWithSubject()
93 assertThatIntent(wrappedIntent).extras().parcelable<Uri>(Intent.EXTRA_STREAM).isEqualTo(uri) in testCreateShareWithSubject()
[all …]
/frameworks/base/core/java/android/app/slice/
DSliceManager.java139 public void pinSlice(@NonNull Uri uri, @NonNull Set<SliceSpec> specs) { in pinSlice() argument
141 mService.pinSlice(mContext.getPackageName(), uri, in pinSlice() local
162 public void unpinSlice(@NonNull Uri uri) { in unpinSlice() argument
164 mService.unpinSlice(mContext.getPackageName(), uri, mToken); in unpinSlice() local
188 public @NonNull Set<SliceSpec> getPinnedSpecs(Uri uri) { in getPinnedSpecs() argument
190 return new ArraySet<>(Arrays.asList(mService.getPinnedSpecs(uri, in getPinnedSpecs()
220 public @NonNull Collection<Uri> getSliceDescendants(@NonNull Uri uri) { in getSliceDescendants() argument
222 try (ContentProviderClient provider = resolver.acquireUnstableContentProviderClient(uri)) { in getSliceDescendants()
224 Log.w(TAG, TextUtils.formatSimple("Unknown URI: %s", uri)); in getSliceDescendants()
227 extras.putParcelable(SliceProvider.EXTRA_BIND_URI, uri); in getSliceDescendants()
[all …]
/frameworks/base/telephony/java/android/telephony/mbms/
DFileInfo.java31 private final Uri uri; field in FileInfo
52 public FileInfo(Uri uri, String mimeType) { in FileInfo() argument
53 this.uri = uri; in FileInfo()
58 uri = in.readParcelable(null, android.net.Uri.class); in FileInfo()
64 dest.writeParcelable(uri, flags); in writeToParcel()
78 return uri; in getUri()
98 return Objects.equals(uri, fileInfo.uri) && in equals()
104 return Objects.hash(uri, mimeType); in hashCode()
/frameworks/base/core/java/android/provider/
DSyncStateContract.java73 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 …]
DDocumentsProvider.java242 private Uri validateIncomingNullableUri(@Nullable Uri uri) { in validateIncomingNullableUri() argument
243 return uri == null ? null : validateIncomingUri(uri); in validateIncomingNullableUri()
875 public final Cursor query(Uri uri, String[] projection, String selection, in query() argument
893 public Cursor query(Uri uri, String[] projection, String selection, in query() argument
911 Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal) { in query() argument
913 switch (mMatcher.match(uri)) { in query()
918 getRootId(uri), projection, queryArgs, cancellationSignal); in query()
920 return querySearchDocuments(getRootId(uri), projection, queryArgs); in query()
923 enforceTree(uri); in query()
924 return queryDocument(getDocumentId(uri), projection); in query()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/uri/
DUriGrantsManagerServiceTest.java17 package com.android.server.uri;
21 import static com.android.server.uri.UriGrantsMockContext.FLAG_PERSISTABLE;
22 import static com.android.server.uri.UriGrantsMockContext.FLAG_PREFIX;
23 import static com.android.server.uri.UriGrantsMockContext.FLAG_READ;
24 import static com.android.server.uri.UriGrantsMockContext.PKG_CAMERA;
25 import static com.android.server.uri.UriGrantsMockContext.PKG_COMPLEX;
26 import static com.android.server.uri.UriGrantsMockContext.PKG_FORCE;
27 import static com.android.server.uri.UriGrantsMockContext.PKG_SOCIAL;
28 import static com.android.server.uri.UriGrantsMockContext.UID_PRIMARY_CAMERA;
29 import static com.android.server.uri.UriGrantsMockContext.UID_PRIMARY_COMPLEX;
[all …]
/frameworks/av/media/libdatasource/
DDataSourceFactory.cpp48 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()
84 if (mediaHTTP->connect(uri, &nonCacheSpecificHeaders) != OK) { in CreateFromURI()
97 } else if (!strncasecmp("data:", uri, 5)) { in CreateFromURI()
98 source = DataURISource::Create(uri); in CreateFromURI()
101 source = CreateFileSource(uri); in CreateFromURI()
130 sp<DataSource> DataSourceFactory::CreateFileSource(const char *uri) { in CreateFileSource() argument
131 return new FileSource(uri); in CreateFileSource()
/frameworks/base/tests/testables/src/android/testing/
DTestableContext.java454 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) { in checkCallingOrSelfUriPermission() argument
455 if (mTestablePermissions != null && mTestablePermissions.wantsCall(uri)) { in checkCallingOrSelfUriPermission()
456 return mTestablePermissions.check(uri, modeFlags); in checkCallingOrSelfUriPermission()
458 return super.checkCallingOrSelfUriPermission(uri, modeFlags); in checkCallingOrSelfUriPermission()
462 public int checkCallingUriPermission(Uri uri, int modeFlags) { in checkCallingUriPermission() argument
463 if (mTestablePermissions != null && mTestablePermissions.wantsCall(uri)) { in checkCallingUriPermission()
464 return mTestablePermissions.check(uri, modeFlags); in checkCallingUriPermission()
466 return super.checkCallingUriPermission(uri, modeFlags); in checkCallingUriPermission()
470 public void enforceCallingOrSelfUriPermission(Uri uri, int modeFlags, String message) { in enforceCallingOrSelfUriPermission() argument
471 if (mTestablePermissions != null && mTestablePermissions.wantsCall(uri)) { in enforceCallingOrSelfUriPermission()
[all …]

12345678910>>...29