/development/samples/training/threadsample/src/com/example/android/threadsample/ |
D | DataProvider.java | 242 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/NotePad/src/com/example/android/notepad/ |
D | NotePadProvider.java | 226 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 236 switch (sUriMatcher.match(uri)) { in query() 252 uri.getPathSegments().get(NotePad.Notes.NOTE_ID_PATH_POSITION)); in query() 257 throw new IllegalArgumentException("Unknown URI " + uri); in query() 289 c.setNotificationUri(getContext().getContentResolver(), uri); in query() local 302 public String getType(Uri uri) { in getType() argument 307 switch (sUriMatcher.match(uri)) { in getType() 319 throw new IllegalArgumentException("Unknown URI " + uri); in getType() 342 public String[] getStreamTypes(Uri uri, String mimeTypeFilter) { in getStreamTypes() argument 346 switch (sUriMatcher.match(uri)) { in getStreamTypes() [all …]
|
/development/samples/browseable/BasicSyncAdapter/src/com.example.android.basicsyncadapter/provider/ |
D | FeedProvider.java | 73 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/SearchableDictionary/src/com/example/android/searchabledict/ |
D | DictionaryProvider.java | 89 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/SampleSyncAdapter/src/com/example/android/samplesync/platform/ |
D | ContactOperations.java | 243 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/app/ |
D | LoaderThrottle.java | 211 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/ApiDemos/src/com/example/android/apis/content/ |
D | FileProvider.java | 48 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 ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { in openFile() argument 117 String path = uri.getPath(); in openFile() 120 throw new FileNotFoundException("Unable to open " + uri); in openFile() 125 return new ParcelFileDescriptor(openPipeHelper(uri, null, null, in openFile() [all …]
|
D | DocumentsSample.java | 284 final Uri uri = data != null ? data.getData() : null; in onActivityResult() local 285 if (uri != null) { in onActivityResult() 286 log("isDocumentUri=" + DocumentsContract.isDocumentUri(this, uri)); in onActivityResult() 294 cr.takePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION); in onActivityResult() 300 is = cr.openInputStream(uri); in onActivityResult() 309 cr.takePersistableUriPermission(uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION); in onActivityResult() 315 os = cr.openOutputStream(uri); in onActivityResult() 325 cr.takePersistableUriPermission(uri, Intent.FLAG_GRANT_READ_URI_PERMISSION); in onActivityResult() 330 Uri doc = DocumentsContract.buildDocumentUriUsingTree(uri, in onActivityResult() 331 DocumentsContract.getTreeDocumentId(uri)); in onActivityResult() [all …]
|
/development/samples/browseable/ShareActionProvider/src/com.example.android.shareactionprovider/content/ |
D | AssetProvider.java | 46 public int delete(@NonNull Uri uri, String selection, String[] selectionArgs) { in delete() argument 52 public String getType(@NonNull Uri uri) { in getType() argument 58 public Uri insert(@NonNull Uri uri, ContentValues values) { in insert() argument 64 public Cursor query(@NonNull Uri uri, String[] projection, String selection, in query() argument 72 public int update(@NonNull Uri uri, ContentValues values, String selection, in update() argument 79 public AssetFileDescriptor openAssetFile(@NonNull Uri uri, @NonNull String mode) in openAssetFile() argument 82 final String assetName = uri.getLastPathSegment(); in openAssetFile() 93 return super.openAssetFile(uri, mode); in openAssetFile() 99 return super.openAssetFile(uri, mode); in openAssetFile()
|
/development/samples/browseable/BeamLargeFiles/src/com.example.android.common/assetprovider/ |
D | AssetProvider.java | 60 public String getType(Uri uri){ in getType() argument 66 String path = uri.getPath(); in getType() 74 return guessContentTypeFromName(uri.toString()); in getType() 79 public AssetFileDescriptor openAssetFile (Uri uri, String mode) in openAssetFile() argument 92 String path = uri.getPath(); in openAssetFile() 119 public Cursor query(Uri uri, String[] projection, String selection, in query() argument 127 public Uri insert(Uri uri, ContentValues contentValues) { in insert() argument 132 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 137 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument
|
/development/samples/ReceiveShareDemo/src/com/example/android/receiveshare/ |
D | ReceiveShare.java | 36 Uri uri = intent.getParcelableExtra(Intent.EXTRA_STREAM); in getShareUri() local 37 if (uri == null) { in getShareUri() 40 uri = clip.getItemAt(0).getUri(); in getShareUri() 43 return uri; in getShareUri() 59 Uri uri = getShareUri(intent); in buildShareInfo() local 60 if (uri != null) { in buildShareInfo() 61 sb.append("Uri: "); sb.append(uri.toString()); sb.append("\n"); in buildShareInfo() 64 uri, "r"); in buildShareInfo() 91 final Uri uri = getShareUri(getIntent()); in onCreate() local 92 if (uri != null) { in onCreate() [all …]
|
/development/samples/MySampleRss/src/com/example/codelab/rssexample/ |
D | RssContentProvider.java | 122 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/browseable/StorageClient/src/com.example.android.storageclient/ |
D | StorageClientFragment.java | 99 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() 122 fragmentArguments.putParcelable("URI", uri); in showImage() 147 private Bitmap getBitmapFromUri(Uri uri) { in getBitmapFromUri() argument 151 getActivity().getContentResolver().openFileDescriptor(uri, "r"); in getBitmapFromUri() 218 public void dumpImageMetaData(Uri uri) { in dumpImageMetaData() argument [all …]
|
/development/samples/WeatherListWidget/src/com/example/android/weatherlistwidget/ |
D | WeatherDataProvider.java | 88 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/ApiDemos/src/com/example/android/apis/os/ |
D | MmsFileProvider.java | 44 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()
|
/development/samples/browseable/AppShortcuts/src/com.example.android.appshortcuts/ |
D | ShortcutHelper.java | 164 final Uri uri = Uri.parse(urlAsString); in createShortcutForUrl() local 165 b.setIntent(new Intent(Intent.ACTION_VIEW, uri)); in createShortcutForUrl() 167 setSiteInformation(b, uri); in createShortcutForUrl() 173 private ShortcutInfo.Builder setSiteInformation(ShortcutInfo.Builder b, Uri uri) { in setSiteInformation() argument 176 b.setShortLabel(uri.getHost()); in setSiteInformation() 177 b.setLongLabel(uri.toString()); in setSiteInformation() 179 Bitmap bmp = fetchFavicon(uri); in setSiteInformation() 224 private Bitmap fetchFavicon(Uri uri) { in fetchFavicon() argument 225 final Uri iconUri = uri.buildUpon().path("favicon.ico").build(); in fetchFavicon()
|
/development/samples/browseable/DirectorySelection/src/com.example.android.directoryselection/ |
D | DirectorySelectionFragment.java | 150 void updateDirectoryEntries(Uri uri) { in updateDirectoryEntries() argument 152 Uri docUri = DocumentsContract.buildDocumentUriUsingTree(uri, in updateDirectoryEntries() 153 DocumentsContract.getTreeDocumentId(uri)); in updateDirectoryEntries() 154 Uri childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree(uri, in updateDirectoryEntries() 155 DocumentsContract.getTreeDocumentId(uri)); in updateDirectoryEntries() 163 mCurrentDirectoryUri = uri; in updateDirectoryEntries() 197 void createDirectory(Uri uri, String directoryName) { in createDirectory() argument 199 Uri docUri = DocumentsContract.buildDocumentUriUsingTree(uri, in createDirectory() 200 DocumentsContract.getTreeDocumentId(uri)); in createDirectory()
|
/development/samples/browseable/DragAndDropAcrossApps/DragSource/src/com.example.android/dragsource/ |
D | ImageDragListener.java | 87 Uri uri = item.getUri(); in processDrop() local 88 if (uri == null) { in processDrop() 91 return setImageUri(view, event, uri); in processDrop() 97 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in setImageUri() argument 101 ((ImageView) view).setImageURI(uri); in setImageUri()
|
/development/samples/browseable/DragAndDropAcrossApps/DropTarget/src/com.example.android/droptarget/ |
D | ImageDragListener.java | 79 Uri uri = item.getUri(); in processDrop() local 80 if (uri == null) { in processDrop() 83 return setImageUri(view, event, uri); in processDrop() 89 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in setImageUri() argument 93 ((ImageView) view).setImageURI(uri); in setImageUri()
|
D | DropTargetFragment.java | 107 protected boolean setImageUri(View view, DragEvent event, Uri uri) { in setImageUri() argument 111 Log.d(TAG, "Setting image source to: " + uri.toString()); in setImageUri() 112 mImageUri = uri; in setImageUri() 114 if (ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) { in setImageUri() 126 final boolean result = super.setImageUri(view, event, uri); in setImageUri() 144 return super.setImageUri(view, event, uri); in setImageUri()
|
/development/samples/ApiDemos/src/com/example/android/apis/media/ |
D | VideoViewDemo.java | 46 private void initPlayer(Uri uri) { in initPlayer() argument 47 mVideoView.setVideoURI(uri); in initPlayer() 63 Uri uri = item.getUri(); 64 if (uri == null) { 70 initPlayer(uri);
|
/development/samples/ShortcutSample/src/com/example/android/shortcutsample/ |
D | ShortcutHelper.java | 167 final Uri uri = Uri.parse(urlAsString); in createShortcutForUrl() local 168 b.setIntent(new Intent(Intent.ACTION_VIEW, uri)); in createShortcutForUrl() 170 setSiteInformation(b, uri); in createShortcutForUrl() 176 private ShortcutInfo.Builder setSiteInformation(ShortcutInfo.Builder b, Uri uri) { in setSiteInformation() argument 179 b.setShortLabel(uri.getHost()); in setSiteInformation() 180 b.setLongLabel(uri.toString()); in setSiteInformation() 182 Bitmap bmp = fetchFavicon(uri); in setSiteInformation() 237 private Bitmap fetchFavicon(Uri uri) { in fetchFavicon() argument 238 final Uri iconUri = uri.buildUpon().path("favicon.ico").build(); in fetchFavicon()
|
/development/samples/XmlAdapters/src/com/example/android/xmladapters/ |
D | XmlDocumentProvider.java | 173 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/ |
D | DataLayerListenerService.java | 71 Uri uri = event.getDataItem().getUri(); in onDataChanged() local 72 String path = uri.getPath(); in onDataChanged() 76 String nodeId = uri.getHost(); in onDataChanged() 78 byte[] payload = uri.toString().getBytes(); in onDataChanged()
|
/development/samples/VoicemailProviderDemo/src/com/example/android/voicemail/common/core/ |
D | VoicemailProviderHelpers.java | 110 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()
|