/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/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/Support4Demos/src/com/example/android/supportv4/content/ |
D | SharingSupportProvider.java | 45 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/ |
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/NotePad/src/com/example/android/notepad/ |
D | NotePadProvider.java | 252 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 …]
|
/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/browseable/ActionBarCompat-ShareActionProvider/src/com.example.android.actionbarcompat.shareactionprovider/content/ |
D | AssetProvider.java | 44 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/ |
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/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 | 248 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 …]
|
D | ShareContent.java | 51 Uri uri = b.build(); in onCreate() 53 intent.putExtra(Intent.EXTRA_STREAM, uri); in onCreate() 54 intent.setClipData(ClipData.newUri(getContentResolver(), "image", uri)); in onCreate()
|
D | PickContact.java | 90 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/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/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()
|
D | SmsMessageReceiver.java | 45 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/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/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/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/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/Support4Demos/src/com/example/android/supportv4/app/ |
D | LoaderThrottleSupport.java | 212 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 …]
|
/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/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/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/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/VoicemailProviderDemo/src/com/example/android/voicemail/common/core/ |
D | VoicemailImpl.java | 45 Uri uri, in VoicemailImpl() argument 54 mUri = uri; in VoicemailImpl() 137 public Builder setUri(Uri uri) { in setUri() argument 138 mBuilderUri = uri; in setUri()
|