Home
last modified time | relevance | path

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

12345678910>>...22

/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java40 Uri uri = builder.build(); in testToStringWithPathOnly() local
41 assertEquals("//foo", uri.toString()); in testToStringWithPathOnly()
170 Uri uri = Uri.parse("http://localhost:42"); in testAuthorityParsing() local
171 assertEquals("localhost", uri.getHost()); in testAuthorityParsing()
172 assertEquals(42, uri.getPort()); in testAuthorityParsing()
174 uri = Uri.parse("http://bob@localhost:42"); in testAuthorityParsing()
175 assertEquals("bob", uri.getUserInfo()); in testAuthorityParsing()
176 assertEquals("localhost", uri.getHost()); in testAuthorityParsing()
177 assertEquals(42, uri.getPort()); in testAuthorityParsing()
179 uri = Uri.parse("http://bob%20lee@localhost:42"); in testAuthorityParsing()
[all …]
/frameworks/base/core/java/android/content/
DContentProvider.java227 public Cursor query(String callingPkg, Uri uri, @Nullable String[] projection, in query() argument
229 uri = validateIncomingUri(uri); in query()
230 uri = maybeGetUriWithoutUserId(uri); in query()
231 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in query()
250 uri, projection, queryArgs, in query()
268 uri, projection, queryArgs, in query()
279 public String getType(Uri uri) { in getType() argument
281 uri = validateIncomingUri(uri); in getType()
282 uri = maybeGetUriWithoutUserId(uri); in getType()
285 return mInterface.getType(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.java833 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri,
836 return query(uri, projection, selection, selectionArgs, sortOrder, null);
875 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri,
880 return query(uri, projection, queryArgs, cancellationSignal);
915 public final @Nullable Cursor query(final @RequiresPermission.Read @NonNull Uri uri,
918 Preconditions.checkNotNull(uri, "uri");
922 return mWrapped.query(uri, projection, queryArgs, cancellationSignal);
928 IContentProvider unstableProvider = acquireUnstableProvider(uri);
944 qCursor = unstableProvider.query(mPackageName, uri, projection,
951 stableProvider = acquireProvider(uri);
[all …]
DContentProviderResult.java30 public final Uri uri; field in ContentProviderResult
35 public ContentProviderResult(Uri uri) { in ContentProviderResult() argument
36 this(Preconditions.checkNotNull(uri), null, null); in ContentProviderResult()
49 public ContentProviderResult(Uri uri, Integer count, String failure) { in ContentProviderResult() argument
50 this.uri = uri; in ContentProviderResult()
57 uri = Uri.CREATOR.createFromParcel(source); in ContentProviderResult()
59 uri = null; in ContentProviderResult()
75 uri = ContentProvider.maybeAddUserId(cpr.uri, userId); in ContentProviderResult()
82 if (uri != null) { in writeToParcel()
84 uri.writeToParcel(dest, flags); in writeToParcel()
[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 args, in refresh() argument
59 public @Nullable Uri insert(@NonNull Uri uri, @Nullable ContentValues initialValues) in insert() argument
62 public int bulkInsert(@NonNull Uri uri, @NonNull ContentValues[] initialValues) in bulkInsert() argument
65 public int delete(@NonNull Uri uri, @Nullable String selection, in delete() argument
68 public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, in update() argument
[all …]
DSearchRecentSuggestionsProvider.java227 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
230 final int length = uri.getPathSegments().size(); in delete()
235 final String base = uri.getPathSegments().get(0); in delete()
242 getContext().getContentResolver().notifyChange(uri, null); in delete()
251 public String getType(Uri uri) { in getType() argument
252 if (mUriMatcher.match(uri) == URI_MATCH_SUGGEST) { in getType()
255 int length = uri.getPathSegments().size(); in getType()
257 String base = uri.getPathSegments().get(0); in getType()
274 public Uri insert(Uri uri, ContentValues values) { in insert() argument
277 int length = uri.getPathSegments().size(); in insert()
[all …]
/frameworks/base/services/core/java/com/android/server/uri/
DGrantUri.java17 package com.android.server.uri;
29 public final Uri uri; field in GrantUri
32 public GrantUri(int sourceUserId, Uri uri, boolean prefix) { in GrantUri() argument
34 this.uri = uri; in GrantUri()
42 hashCode = 31 * hashCode + uri.hashCode(); in hashCode()
51 return uri.equals(other.uri) && (sourceUserId == other.sourceUserId) in equals()
59 String result = uri.toString() + " [user " + sourceUserId + "]"; in toString()
65 String result = uri.toSafeString() + " [user " + sourceUserId + "]"; in toSafeString()
72 proto.write(GrantUriProto.URI, uri.toString()); in writeToProto()
77 public static GrantUri resolve(int defaultSourceUserHandle, Uri uri) { in resolve() argument
[all …]
/frameworks/base/services/core/java/com/android/server/slice/
DSliceManagerService.java148 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/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/core/java/android/app/slice/
DSliceManager.java132 public void pinSlice(@NonNull Uri uri, @NonNull Set<SliceSpec> specs) { in pinSlice() argument
134 mService.pinSlice(mContext.getPackageName(), uri, in pinSlice() local
146 public void pinSlice(@NonNull Uri uri, @NonNull List<SliceSpec> specs) { in pinSlice() argument
147 pinSlice(uri, new ArraySet<>(specs)); in pinSlice()
164 public void unpinSlice(@NonNull Uri uri) { in unpinSlice() argument
166 mService.unpinSlice(mContext.getPackageName(), uri, mToken); in unpinSlice() local
190 public @NonNull Set<SliceSpec> getPinnedSpecs(Uri uri) { in getPinnedSpecs() argument
192 return new ArraySet<>(Arrays.asList(mService.getPinnedSpecs(uri, in getPinnedSpecs()
222 public @NonNull Collection<Uri> getSliceDescendants(@NonNull Uri uri) { in getSliceDescendants() argument
224 try (ContentProviderClient provider = resolver.acquireUnstableContentProviderClient(uri)) { in getSliceDescendants()
[all …]
DSliceProvider.java270 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/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()
DElement.java32 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/cmds/content/src/com/android/commands/content/
DContent.java196 Uri uri = null; in parseInsertCommand() local
201 uri = Uri.parse(argumentValueRequired(argument)); in parseInsertCommand()
210 if (uri == null) { in parseInsertCommand()
218 return new InsertCommand(uri, userId, values); in parseInsertCommand()
222 Uri uri = null; in parseDeleteCommand() local
227 uri = Uri.parse(argumentValueRequired(argument)); in parseDeleteCommand()
236 if (uri == null) { in parseDeleteCommand()
240 return new DeleteCommand(uri, userId, where); in parseDeleteCommand()
244 Uri uri = null; in parseUpdateCommand() local
250 uri = Uri.parse(argumentValueRequired(argument)); in parseUpdateCommand()
[all …]
/frameworks/base/core/java/android/database/
DContentObserver.java131 public void onChange(boolean selfChange, Uri uri) { in onChange() argument
146 public void onChange(boolean selfChange, Uri uri, int userId) { in onChange() argument
147 onChange(selfChange, uri); in onChange()
179 public final void dispatchChange(boolean selfChange, Uri uri) { in dispatchChange() argument
180 dispatchChange(selfChange, uri, UserHandle.getCallingUserId()); in dispatchChange()
196 private void dispatchChange(boolean selfChange, Uri uri, int userId) { in dispatchChange() argument
198 onChange(selfChange, uri, userId); in dispatchChange()
200 mHandler.post(new NotificationRunnable(selfChange, uri, userId)); in dispatchChange()
210 public NotificationRunnable(boolean selfChange, Uri uri, int userId) { in NotificationRunnable() argument
212 mUri = uri; in NotificationRunnable()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DSliceBroadcastRelayHandler.java53 Uri uri = intent.getParcelableExtra(SliceBroadcastRelay.EXTRA_URI); in handleIntent() local
57 if (DEBUG) Log.d(TAG, "Register " + uri + " " + receiverClass + " " + filter); in handleIntent()
58 getOrCreateRelay(uri).register(mContext, receiverClass, filter); in handleIntent()
60 Uri uri = intent.getParcelableExtra(SliceBroadcastRelay.EXTRA_URI); in handleIntent() local
61 if (DEBUG) Log.d(TAG, "Unregister " + uri); in handleIntent()
62 BroadcastRelay relay = getAndRemoveRelay(uri); in handleIntent()
69 private BroadcastRelay getOrCreateRelay(Uri uri) { in getOrCreateRelay() argument
70 BroadcastRelay ret = mRelays.get(uri); in getOrCreateRelay()
72 ret = new BroadcastRelay(uri); in getOrCreateRelay()
73 mRelays.put(uri, ret); in getOrCreateRelay()
[all …]
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DTestContentResolver.java36 public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { in notifyChange() argument
37 getPhaser(uri).arrive(); in notifyChange()
41 void waitForNotification(Uri uri, int count) throws InterruptedException, TimeoutException { in waitForNotification() argument
42 Assert.assertEquals(count, getPhaser(uri).awaitAdvanceInterruptibly( in waitForNotification()
46 int getChangeCount(Uri uri) { in getChangeCount() argument
47 if (mPhasers.containsKey(uri)) { in getChangeCount()
48 return mPhasers.get(uri).getPhase(); in getChangeCount()
54 private synchronized Phaser getPhaser(Uri uri) { in getPhaser() argument
55 Phaser phaser = mPhasers.get(uri); in getPhaser()
58 mPhasers.put(uri, phaser); in getPhaser()
/frameworks/base/tests/testables/src/android/testing/
DTestableContext.java383 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 …]
DTestablePermissions.java47 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/
DDocumentsProvider.java864 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 …]
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 …]
/frameworks/base/telephony/java/android/telephony/mbms/
DFileInfo.java32 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/drm/java/android/drm/
DDrmManagerClient.java413 public ContentValues getConstraints(Uri uri, int action) { in getConstraints() argument
414 if (null == uri || Uri.EMPTY == uri) { in getConstraints()
417 return getConstraints(convertUriToPath(uri), action); in getConstraints()
428 public ContentValues getMetadata(Uri uri) { in getMetadata() argument
429 if (null == uri || Uri.EMPTY == uri) { in getMetadata()
432 return getMetadata(convertUriToPath(uri)); in getMetadata()
499 public boolean canHandle(Uri uri, String mimeType) { in canHandle() argument
500 if ((null == uri || Uri.EMPTY == uri) && (null == mimeType || mimeType.equals(""))) { in canHandle()
503 return canHandle(convertUriToPath(uri), mimeType); in canHandle()
588 public int getDrmObjectType(Uri uri, String mimeType) { in getDrmObjectType() argument
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/
DRingtonePlayer.java82 public Client(IBinder token, Uri uri, UserHandle user, AudioAttributes aa) { in Client() argument
83 this(token, uri, user, aa, null); in Client()
86 Client(IBinder token, Uri uri, UserHandle user, AudioAttributes aa, in Client() argument
92 mRingtone.setUri(uri, volumeShaperConfig); in Client()
107 public void play(IBinder token, Uri uri, AudioAttributes aa, float volume, boolean looping)
109 playWithVolumeShaping(token, uri, aa, volume, looping, null);
112 public void playWithVolumeShaping(IBinder token, Uri uri, AudioAttributes aa, float volume,
116 Log.d(TAG, "play(token=" + token + ", uri=" + uri + ", uid="
124 client = new Client(token, uri, user, aa, volumeShaperConfig);
175 public void playAsync(Uri uri, UserHandle user, boolean looping, AudioAttributes aa) {
[all …]

12345678910>>...22