Home
last modified time | relevance | path

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

12345678910>>...19

/frameworks/base/core/tests/coretests/src/android/net/
DUriTest.java39 Uri uri = builder.build(); in testToStringWithPathOnly() local
40 assertEquals("//foo", uri.toString()); in testToStringWithPathOnly()
169 Uri uri = Uri.parse("http://localhost:42"); in testAuthorityParsing() local
170 assertEquals("localhost", uri.getHost()); in testAuthorityParsing()
171 assertEquals(42, uri.getPort()); in testAuthorityParsing()
173 uri = Uri.parse("http://bob@localhost:42"); in testAuthorityParsing()
174 assertEquals("bob", uri.getUserInfo()); in testAuthorityParsing()
175 assertEquals("localhost", uri.getHost()); in testAuthorityParsing()
176 assertEquals(42, uri.getPort()); in testAuthorityParsing()
178 uri = Uri.parse("http://bob%20lee@localhost:42"); in testAuthorityParsing()
[all …]
/frameworks/base/core/java/android/content/
DContentProvider.java210 public Cursor query(String callingPkg, Uri uri, @Nullable String[] projection, in query() argument
212 uri = validateIncomingUri(uri); in query()
213 uri = maybeGetUriWithoutUserId(uri); in query()
214 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in query()
230 uri, projection, queryArgs, in query()
242 uri, projection, queryArgs, in query()
250 public String getType(Uri uri) { in getType() argument
251 uri = validateIncomingUri(uri); in getType()
252 uri = maybeGetUriWithoutUserId(uri); in getType()
253 return ContentProvider.this.getType(uri); in getType()
[all …]
DContentProviderResult.java29 public final Uri uri; field in ContentProviderResult
32 public ContentProviderResult(Uri uri) { in ContentProviderResult() argument
33 if (uri == null) throw new IllegalArgumentException("uri must not be null"); in ContentProviderResult()
34 this.uri = uri; in ContentProviderResult()
40 this.uri = null; in ContentProviderResult()
47 uri = null; in ContentProviderResult()
50 uri = Uri.CREATOR.createFromParcel(source); in ContentProviderResult()
56 uri = ContentProvider.maybeAddUserId(cpr.uri, userId); in ContentProviderResult()
61 if (uri == null) { in writeToParcel()
66 uri.writeToParcel(dest, 0); in writeToParcel()
[all …]
DContentResolver.java659 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri, in query() argument
662 return query(uri, projection, selection, selectionArgs, sortOrder, null); in query()
699 public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri, in query() argument
704 return query(uri, projection, queryArgs, cancellationSignal); in query()
734 public final @Nullable Cursor query(final @RequiresPermission.Read @NonNull Uri uri, in query() argument
737 Preconditions.checkNotNull(uri, "uri"); in query()
738 IContentProvider unstableProvider = acquireUnstableProvider(uri); in query()
754 qCursor = unstableProvider.query(mPackageName, uri, projection, in query()
761 stableProvider = acquireProvider(uri); in query()
766 mPackageName, uri, projection, queryArgs, remoteCancellationSignal); in query()
[all …]
DSearchRecentSuggestionsProvider.java225 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
228 final int length = uri.getPathSegments().size(); in delete()
233 final String base = uri.getPathSegments().get(0); in delete()
240 getContext().getContentResolver().notifyChange(uri, null); in delete()
249 public String getType(Uri uri) { in getType() argument
250 if (mUriMatcher.match(uri) == URI_MATCH_SUGGEST) { in getType()
253 int length = uri.getPathSegments().size(); in getType()
255 String base = uri.getPathSegments().get(0); in getType()
272 public Uri insert(Uri uri, ContentValues values) { in insert() argument
275 int length = uri.getPathSegments().size(); in insert()
[all …]
DAsyncQueryHandler.java49 public Uri uri; field in AsyncQueryHandler.WorkerArgs
79 cursor = resolver.query(args.uri, args.projection, in handleMessage()
96 args.result = resolver.insert(args.uri, args.values); in handleMessage()
100 args.result = resolver.update(args.uri, args.values, args.selection, in handleMessage()
105 args.result = resolver.delete(args.uri, args.selection, args.selectionArgs); in handleMessage()
164 public void startQuery(int token, Object cookie, Uri uri, in startQuery() argument
173 args.uri = uri; in startQuery()
207 public final void startInsert(int token, Object cookie, Uri uri, in startInsert() argument
215 args.uri = uri; in startInsert()
233 public final void startUpdate(int token, Object cookie, Uri uri, in startUpdate() argument
[all …]
DEntity.java47 public void addSubValue(Uri uri, ContentValues values) { in addSubValue() argument
48 mSubValues.add(new Entity.NamedContentValues(uri, values)); in addSubValue()
52 public final Uri uri; field in Entity.NamedContentValues
55 public NamedContentValues(Uri uri, ContentValues values) { in NamedContentValues() argument
56 this.uri = uri; in NamedContentValues()
65 sb.append("\n ").append(namedValue.uri); in toString()
/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()
DRootElement.java76 public RootElement(String uri, String localName) { in RootElement() argument
77 super(null, uri, localName, 0); in RootElement()
110 public void startElement(String uri, String localName, String qName, in startElement() argument
116 startRoot(uri, localName, attributes); in startElement()
132 Element child = children.get(uri, localName); in startElement()
140 void startRoot(String uri, String localName, Attributes attributes) in startRoot() argument
143 if (root.uri.compareTo(uri) != 0 in startRoot()
147 + Element.toString(uri, localName), locator); in startRoot()
178 public void endElement(String uri, String localName, String qName) in endElement() argument
/frameworks/base/core/java/android/database/
DContentObserver.java129 public void onChange(boolean selfChange, Uri uri) { in onChange() argument
144 public void onChange(boolean selfChange, Uri uri, int userId) { in onChange() argument
145 onChange(selfChange, uri); in onChange()
177 public final void dispatchChange(boolean selfChange, Uri uri) { in dispatchChange() argument
178 dispatchChange(selfChange, uri, UserHandle.getCallingUserId()); in dispatchChange()
194 private void dispatchChange(boolean selfChange, Uri uri, int userId) { in dispatchChange() argument
196 onChange(selfChange, uri, userId); in dispatchChange()
198 mHandler.post(new NotificationRunnable(selfChange, uri, userId)); in dispatchChange()
208 public NotificationRunnable(boolean selfChange, Uri uri, int userId) { in NotificationRunnable() argument
210 mUri = uri; in NotificationRunnable()
[all …]
/frameworks/base/cmds/content/src/com/android/commands/content/
DContent.java195 Uri uri = null; in parseInsertCommand() local
200 uri = Uri.parse(argumentValueRequired(argument)); in parseInsertCommand()
209 if (uri == null) { in parseInsertCommand()
217 return new InsertCommand(uri, userId, values); in parseInsertCommand()
221 Uri uri = null; in parseDeleteCommand() local
226 uri = Uri.parse(argumentValueRequired(argument)); in parseDeleteCommand()
235 if (uri == null) { in parseDeleteCommand()
239 return new DeleteCommand(uri, userId, where); in parseDeleteCommand()
243 Uri uri = null; in parseUpdateCommand() local
249 uri = Uri.parse(argumentValueRequired(argument)); in parseUpdateCommand()
[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/core/java/android/provider/
DDocumentsProvider.java746 public final Cursor query(Uri uri, String[] projection, String selection, in query() argument
764 public Cursor query(Uri uri, String[] projection, String selection, in query() argument
782 Uri uri, String[] projection, Bundle queryArgs, CancellationSignal cancellationSignal) { in query() argument
784 switch (mMatcher.match(uri)) { in query()
788 return queryRecentDocuments(getRootId(uri), projection); in query()
791 getRootId(uri), getSearchDocumentsQuery(uri), projection); in query()
794 enforceTree(uri); in query()
795 return queryDocument(getDocumentId(uri), projection); in query()
798 enforceTree(uri); in query()
799 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 …]
DSearchIndexablesProvider.java106 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
108 switch (mMatcher.match(uri)) { in query()
116 throw new UnsupportedOperationException("Unknown Uri " + uri); in query()
154 public String getType(Uri uri) { in getType() argument
155 switch (mMatcher.match(uri)) { in getType()
163 throw new IllegalArgumentException("Unknown URI " + uri); in getType()
171 public final Uri insert(Uri uri, ContentValues values) { in insert() argument
179 public final int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
188 Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
/frameworks/support/content/tests/java/android/support/content/
DTestContentProvider.java91 Uri uri, @Nullable String[] projection, String selection, String[] selectionArgs, in query() argument
93 return query(uri, projection, null, null); in query()
97 public Cursor query(Uri uri, String[] ignored, Bundle queryArgs, in query() argument
102 int recordCount = getIntValue(RECORD_COUNT, queryArgs, uri, DEFAULT_RECORD_COUNT); in query()
108 switch (uri.getPath()) { in query()
113 cursor = buildPagedResults(uri, queryArgs, recordCount); in query()
116 cursor = buildPagedWindowedResults(uri, queryArgs, recordCount); in query()
119 throw new IllegalArgumentException("Unrecognized path: " + uri.getPath()); in query()
122 cursor.setNotificationUri(getContext().getContentResolver(), uri); in query() local
130 private static int getIntValue(String key, Bundle queryArgs, Uri uri, int defaultValue) { in getIntValue() argument
[all …]
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/content/
DSharingSupportProvider.java45 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
51 public String getType(Uri uri) { in getType() argument
52 if (uri.equals(Uri.withAppendedPath(CONTENT_URI, "foo.txt")) || in getType()
53 uri.equals(Uri.withAppendedPath(CONTENT_URI, "bar.txt"))) { in getType()
60 public Uri insert(Uri uri, ContentValues values) { in insert() argument
65 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
70 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
75 public ParcelFileDescriptor openFile(Uri uri, String mode) { in openFile() argument
76 String path = uri.getPath(); in openFile()
84 Log.e(TAG, "Bad file " + uri); in openFile()
/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/opt/telephony/src/java/com/google/android/mms/util/
DPduCache.java95 synchronized public boolean put(Uri uri, PduCacheEntry entry) { in put() argument
110 Uri finalKey = normalizeKey(uri); in put()
116 setUpdating(uri, false); in put()
120 synchronized public void setUpdating(Uri uri, boolean updating) { in setUpdating() argument
122 mUpdating.add(uri); in setUpdating()
124 mUpdating.remove(uri); in setUpdating()
128 synchronized public boolean isUpdating(Uri uri) { in isUpdating() argument
129 return mUpdating.contains(uri); in isUpdating()
133 synchronized public PduCacheEntry purge(Uri uri) { in purge() argument
134 int match = URI_MATCHER.match(uri); in purge()
[all …]
/frameworks/ex/common/java/com/android/common/content/
DSQLiteContentProvider.java71 protected abstract Uri insertInTransaction(Uri uri, ContentValues values); in insertInTransaction() argument
76 protected abstract int updateInTransaction(Uri uri, ContentValues values, String selection, in updateInTransaction() argument
82 protected abstract int deleteInTransaction(Uri uri, String selection, String[] selectionArgs); in deleteInTransaction() argument
95 public Uri insert(Uri uri, ContentValues values) { in insert() argument
102 result = insertInTransaction(uri, values); in insert()
113 result = insertInTransaction(uri, values); in insert()
122 public int bulkInsert(Uri uri, ContentValues[] values) { in bulkInsert() argument
128 Uri result = insertInTransaction(uri, values[i]); in bulkInsert()
148 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
155 count = updateInTransaction(uri, values, selection, selectionArgs); in update()
[all …]
/frameworks/base/telephony/java/android/telephony/mbms/
DFileInfo.java30 private final Uri uri; field in FileInfo
51 public FileInfo(Uri uri, String mimeType) { in FileInfo() argument
52 this.uri = uri; in FileInfo()
57 uri = in.readParcelable(null); in FileInfo()
63 dest.writeParcelable(uri, flags); in writeToParcel()
77 return uri; in getUri()
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerFunctionalTest.java76 public void doErrorTest(Uri uri, int error) throws Exception { in doErrorTest() argument
77 Request request = new Request(uri); in doErrorTest()
160 Uri uri = getServerUri(DEFAULT_FILENAME); in testDownloadToExternal_fileExists() local
161 Request request = new Request(uri); in testDownloadToExternal_fileExists()
197 Uri uri = getServerUri(DEFAULT_FILENAME); in testDownloadToExternal() local
198 Request request = new Request(uri); in testDownloadToExternal()
228 Uri uri = getServerUri(DEFAULT_FILENAME); in testDownloadToProhibitedDirectory() local
229 Request request = new Request(uri); in testDownloadToProhibitedDirectory()
269 Uri uri = getServerUri(DEFAULT_FILENAME); in testErrorTooManyRedirects() local
274 resp.setHeader("Location", uri.toString()); in testErrorTooManyRedirects()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DDumpHeapProvider.java52 …public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String… in query() argument
57 public String getType(Uri uri) { in getType() argument
62 public Uri insert(Uri uri, ContentValues values) { in insert() argument
67 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
72 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
77 public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { in openFile() argument
79 String path = uri.getEncodedPath(); in openFile()
85 throw new FileNotFoundException("Invalid path for " + uri); in openFile()
/frameworks/base/core/java/android/net/
DPacProxySelector.java59 public List<Proxy> select(URI uri) { in select() argument
74 if (!"http".equalsIgnoreCase(uri.getScheme())) { in select()
75 uri = new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), "/", null, null); in select()
77 urlString = uri.toURL().toString(); in select()
79 urlString = uri.getHost(); in select()
81 urlString = uri.getHost(); in select()
84 response = mProxyService.resolvePacFile(uri.getHost(), urlString); in select()
133 public void connectFailed(URI uri, SocketAddress address, IOException failure) { in connectFailed() argument

12345678910>>...19