Home
last modified time | relevance | path

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

123

/development/samples/training/threadsample/src/com/example/android/threadsample/
DDataProvider.java242 Uri uri, in query() argument
250 switch (sUriMatcher.match(uri)) { in query()
261 returnCursor.setNotificationUri(getContext().getContentResolver(), uri); in query() local
280 throw new IllegalArgumentException("Query -- Invalid URI:" + uri); in query()
293 public String getType(Uri uri) { in getType() argument
295 return sMimeTypes.get(sUriMatcher.match(uri)); in getType()
306 public Uri insert(Uri uri, ContentValues values) { in insert() argument
309 switch (sUriMatcher.match(uri)) { in insert()
326 getContext().getContentResolver().notifyChange(uri, null); in insert()
327 return Uri.withAppendedPath(uri, Long.toString(id)); in insert()
[all …]
/development/samples/SearchableDictionary/src/com/example/android/searchabledict/
DDictionaryProvider.java89 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
93 switch (sURIMatcher.match(uri)) { in query()
97 "selectionArgs must be provided for the Uri: " + uri); in query()
103 "selectionArgs must be provided for the Uri: " + uri); in query()
107 return getWord(uri); in query()
109 return refreshShortcut(uri); in query()
111 throw new IllegalArgumentException("Unknown Uri: " + uri); in query()
138 private Cursor getWord(Uri uri) { in getWord() argument
139 String rowId = uri.getLastPathSegment(); in getWord()
147 private Cursor refreshShortcut(Uri uri) { in refreshShortcut() argument
[all …]
/development/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()
/development/samples/browseable/BasicSyncAdapter/src/com.example.android.basicsyncadapter/provider/
DFeedProvider.java73 public String getType(Uri uri) { in getType() argument
74 final int match = sUriMatcher.match(uri); in getType()
81 throw new UnsupportedOperationException("Unknown uri: " + uri); in getType()
92 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
96 int uriMatch = sUriMatcher.match(uri); in query()
100 String id = uri.getLastPathSegment(); in query()
111 c.setNotificationUri(ctx.getContentResolver(), uri); in query() local
114 throw new UnsupportedOperationException("Unknown uri: " + uri); in query()
122 public Uri insert(Uri uri, ContentValues values) { in insert() argument
125 final int match = sUriMatcher.match(uri); in insert()
[all …]
/development/samples/NotePad/src/com/example/android/notepad/
DNotePadProvider.java252 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
262 switch (sUriMatcher.match(uri)) { in query()
278 uri.getPathSegments().get(NotePad.Notes.NOTE_ID_PATH_POSITION)); in query()
288 throw new IllegalArgumentException("Unknown URI " + uri); in query()
320 c.setNotificationUri(getContext().getContentResolver(), uri); in query() local
333 public String getType(Uri uri) { in getType() argument
338 switch (sUriMatcher.match(uri)) { in getType()
351 throw new IllegalArgumentException("Unknown URI " + uri); in getType()
374 public String[] getStreamTypes(Uri uri, String mimeTypeFilter) { in getStreamTypes() argument
378 switch (sUriMatcher.match(uri)) { in getStreamTypes()
[all …]
DNotesList.java201 Uri uri = ContentUris.withAppendedId(getIntent().getData(), getSelectedItemId()); in onPrepareOptionsMenu() local
208 specifics[0] = new Intent(Intent.ACTION_EDIT, uri); in onPrepareOptionsMenu()
214 Intent intent = new Intent(null, uri); in onPrepareOptionsMenu()
449 Uri uri = ContentUris.withAppendedId(getIntent().getData(), id); in onListItemClick() local
459 setResult(RESULT_OK, new Intent().setData(uri)); in onListItemClick()
464 startActivity(new Intent(Intent.ACTION_EDIT, uri)); in onListItemClick()
/development/samples/browseable/ActionBarCompat-ShareActionProvider/src/com.example.android.actionbarcompat.shareactionprovider/content/
DAssetProvider.java44 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
50 public String getType(Uri uri) { in getType() argument
56 public Uri insert(Uri uri, ContentValues values) { in insert() argument
62 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
69 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
75 public AssetFileDescriptor openAssetFile(Uri uri, String mode) throws FileNotFoundException { in openAssetFile() argument
77 final String assetName = uri.getLastPathSegment(); in openAssetFile()
90 return super.openAssetFile(uri, mode); in openAssetFile()
/development/samples/SampleSyncAdapter/src/com/example/android/samplesync/platform/
DContactOperations.java243 public ContactOperations updateServerId(long serverId, Uri uri) { in updateServerId() argument
246 addUpdateOp(uri); in updateServerId()
257 public ContactOperations updateEmail(String email, String existingEmail, Uri uri) { in updateEmail() argument
261 addUpdateOp(uri); in updateEmail()
279 public ContactOperations updateName(Uri uri, in updateName() argument
301 addUpdateOp(uri); in updateName()
306 public ContactOperations updateDirtyFlag(boolean isDirty, Uri uri) { in updateDirtyFlag() argument
310 addUpdateOp(uri); in updateDirtyFlag()
322 public ContactOperations updatePhone(String existingNumber, String phone, Uri uri) { in updatePhone() argument
326 addUpdateOp(uri); in updatePhone()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/content/
DFileProvider.java48 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
78 result[i] = uri.getPath(); in query()
90 public Uri insert(Uri uri, ContentValues values) { in insert() argument
96 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
102 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
108 public String getType(Uri uri) { in getType() argument
114 public AssetFileDescriptor openAssetFile(Uri uri, String mode) throws FileNotFoundException { in openAssetFile() argument
117 InputStream is = getContext().getAssets().open(uri.getPath()); in openAssetFile()
120 openPipeHelper(uri, null, null, is, this), 0, in openAssetFile()
123 FileNotFoundException fnf = new FileNotFoundException("Unable to open " + uri); in openAssetFile()
[all …]
DDocumentsSample.java248 final Uri uri = data != null ? data.getData() : null; in onActivityResult() local
249 if (uri != null) { in onActivityResult()
250 log("isDocumentUri=" + DocumentsContract.isDocumentUri(this, uri)); in onActivityResult()
258 cr.takePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION); in onActivityResult()
264 is = cr.openInputStream(uri); in onActivityResult()
273 cr.takePersistableUriPermission(uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION); in onActivityResult()
279 os = cr.openOutputStream(uri); in onActivityResult()
289 Uri doc = DocumentsContract.buildDocumentUriUsingTree(uri, in onActivityResult()
290 DocumentsContract.getTreeDocumentId(uri)); in onActivityResult()
291 Uri child = DocumentsContract.buildChildDocumentsUriUsingTree(uri, in onActivityResult()
[all …]
DPickContact.java90 Uri uri = data.getData(); in onActivityResult() local
91 if (uri != null) { in onActivityResult()
94 c = getContentResolver().query(uri, new String[] { BaseColumns._ID }, in onActivityResult()
101 String txt = mPendingResult.mMsg + ":\n" + uri + "\nid: " + id; in onActivityResult()
/development/samples/ApiDemos/src/com/example/android/apis/os/
DMmsFileProvider.java44 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
51 public Uri insert(Uri uri, ContentValues values) { in insert() argument
57 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
63 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
69 public String getType(Uri uri) { in getType() argument
75 public ParcelFileDescriptor openFile(Uri uri, String fileMode) throws FileNotFoundException { in openFile() argument
76 File file = new File(getContext().getCacheDir(), uri.getPath()); in openFile()
DSmsMessageReceiver.java45 Uri uri; in onReceive() local
51 uri = Uri.withAppendedPath( in onReceive()
57 Cursor cursor = context.getContentResolver().query(uri, projection, null, null, null); in onReceive()
/development/samples/browseable/StorageClient/src/com.example.android.storageclient/
DStorageClientFragment.java99 Uri uri = null; in onActivityResult() local
101 uri = resultData.getData(); in onActivityResult()
102 Log.i(TAG, "Uri: " + uri.toString()); in onActivityResult()
103 showImage(uri); in onActivityResult()
114 public void showImage(Uri uri) { in showImage() argument
116 if (uri != null) { in showImage()
120 ImageDialogFragment imageDialog = new ImageDialogFragment(uri); in showImage()
131 public void dumpImageMetaData(Uri uri) { in dumpImageMetaData() argument
138 .query(uri, null, null, null, null, null); in dumpImageMetaData()
180 public ImageDialogFragment(Uri uri) { in ImageDialogFragment() argument
[all …]
/development/samples/MySampleRss/src/com/example/codelab/rssexample/
DRssContentProvider.java122 public String getType(Uri uri) { in getType() argument
123 switch (URI_MATCHER.match(uri)){ in getType()
134 public Cursor query(Uri uri, String[] projection, String selection, in query() argument
148 if((URI_MATCHER.match(uri)) == SPECIFIC_MESSAGE){ in query()
149 qBuilder.appendWhere("_id=" + uri.getPathLeafId()); in query()
165 c.setNotificationUri(getContext().getContentResolver(), uri); in query() local
170 public int update(Uri uri, ContentValues values, String whereClause) { in update() argument
175 getContext().getContentResolver().notifyUpdate(uri, null); in update()
194 public int delete(Uri uri, String where) { in delete() argument
196 int rowCount = mDb.delete(DATABASE_TABLE_NAME, ID + " = " + uri.getPathLeafId()); in delete()
[all …]
/development/samples/ApiDemos/src/com/example/android/apis/app/
DLoaderThrottle.java211 public Cursor query(Uri uri, String[] projection, String selection, in query() argument
218 switch (mUriMatcher.match(uri)) { in query()
229 new String[] { uri.getLastPathSegment() }); in query()
233 throw new IllegalArgumentException("Unknown URI " + uri); in query()
246 c.setNotificationUri(getContext().getContentResolver(), uri); in query() local
254 public String getType(Uri uri) { in getType() argument
255 switch (mUriMatcher.match(uri)) { in getType()
261 throw new IllegalArgumentException("Unknown URI " + uri); in getType()
269 public Uri insert(Uri uri, ContentValues initialValues) { in insert() argument
270 if (mUriMatcher.match(uri) != MAIN) { in insert()
[all …]
/development/samples/WeatherListWidget/src/com/example/android/weatherlistwidget/
DWeatherDataProvider.java88 public synchronized Cursor query(Uri uri, String[] projection, String selection, in query() argument
90 assert(uri.getPathSegments().isEmpty()); in query()
104 public String getType(Uri uri) { in getType() argument
109 public Uri insert(Uri uri, ContentValues values) { in insert() argument
115 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
121 public synchronized int update(Uri uri, ContentValues values, String selection, in update() argument
123 assert(uri.getPathSegments().size() == 1); in update()
127 final int index = Integer.parseInt(uri.getPathSegments().get(0)); in update()
136 getContext().getContentResolver().notifyChange(uri, null); in update()
/development/samples/Support4Demos/src/com/example/android/supportv4/app/
DLoaderThrottleSupport.java212 public Cursor query(Uri uri, String[] projection, String selection, in query() argument
219 switch (mUriMatcher.match(uri)) { in query()
230 new String[] { uri.getLastPathSegment() }); in query()
234 throw new IllegalArgumentException("Unknown URI " + uri); in query()
247 c.setNotificationUri(getContext().getContentResolver(), uri); in query() local
255 public String getType(Uri uri) { in getType() argument
256 switch (mUriMatcher.match(uri)) { in getType()
262 throw new IllegalArgumentException("Unknown URI " + uri); in getType()
270 public Uri insert(Uri uri, ContentValues initialValues) { in insert() argument
271 if (mUriMatcher.match(uri) != MAIN) { in insert()
[all …]
DSharingReceiverSupport.java69 Uri uri = intentReader.getStream(i); in onCreate() local
70 txt.append("Share included stream " + i + ": " + uri + "\n"); in onCreate()
73 getContentResolver().openInputStream(uri))); in onCreate()
/development/samples/XmlAdapters/src/com/example/android/xmladapters/
DXmlDocumentProvider.java173 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument
179 final String url = uri.getQueryParameter("url"); in query()
183 final String resource = uri.getQueryParameter("resource"); in query()
197 Log.w(LOG_TAG, "I/O error while parsing XML " + uri, e); in query()
199 Log.w(LOG_TAG, "Error while parsing XML " + uri, e); in query()
304 public String getType(Uri uri) { in getType() argument
312 public Uri insert(Uri uri, ContentValues values) { in insert() argument
320 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument
328 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
/development/samples/browseable/DataLayer/Wearable/src/com.example.android.wearable.datalayer/
DDataLayerListenerService.java77 Uri uri = event.getDataItem().getUri(); in onDataChanged() local
78 String path = uri.getPath(); in onDataChanged()
82 String nodeId = uri.getHost(); in onDataChanged()
84 byte[] payload = uri.toString().getBytes(); in onDataChanged()
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/core/
DVoicemailImpl.java45 Uri uri, in VoicemailImpl() argument
54 mUri = uri; in VoicemailImpl()
137 public Builder setUri(Uri uri) { in setUri() argument
138 mBuilderUri = uri; in setUri()
DVoicemailProviderHelper.java85 public Voicemail findVoicemailByUri(Uri uri); in findVoicemailByUri() argument
99 public int update(Uri uri, Voicemail voicemail); in update() argument
DVoicemailProviderHelpers.java110 public int update(Uri uri, Voicemail voicemail) { in update() argument
112 logger.d("Updating voicemail: " + voicemail + " for uri: " + uri); in update()
114 return mContentResolver.update(uri, values, null, null); in update()
179 public Voicemail findVoicemailByUri(Uri uri) { in findVoicemailByUri() argument
182 cursor = mContentResolver.query(uri, FULL_PROJECTION, null, null, null); in findVoicemailByUri()
184 logger.w("Expected 1 voicemail matching uri " + uri + ", got " + cursor.getCount()); in findVoicemailByUri()
190 if (voicemail.getUri().equals(uri)) { in findVoicemailByUri()
193 logger.w("Queried uri: " + uri + " do not represent a unique voicemail record."); in findVoicemailByUri()
/development/apps/Development/src/com/android/development/
DDataList.java97 Uri uri = null; in onListItemClick() local
100 uri = Uri.withAppendedPath(getIntent().getData(), mCursor.getString(idCol)); in onListItemClick()
102 Intent intent = new Intent(Intent.ACTION_VIEW, uri); in onListItemClick()

123