/cts/tests/tests/content/src/android/content/cts/ |
AvailableIntentsTest.java | 26 import android.net.Uri; 75 Uri uri = Uri.parse(NORMAL_URL); local 76 Intent intent = new Intent(Intent.ACTION_VIEW, uri); 85 Uri uri = Uri.parse(SECURE_URL); local 86 Intent intent = new Intent(Intent.ACTION_VIEW, uri); 95 Uri uri = Uri.parse(NORMAL_URL) local 106 Uri uri = Uri.parse(SECURE_URL); local 129 Uri uri = Uri.parse("tel:2125551212"); local 141 Uri uri = Uri.parse("tel:(212)5551212"); local 153 Uri uri = Uri.parse("voicemail:"); local [all...] |
DummyProvider.java | 26 import android.net.Uri; 49 public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY); 50 public static final Uri CONTENT_URI_MOCK_OPERATION = Uri.withAppendedPath(CONTENT_URI, 93 * @see android.content.ContentProvider#insert(android.net.Uri, 97 public Uri insert(Uri uri, ContentValues values) { 98 String tbName = getTableName(uri); 123 c.setNotificationUri(getContext().getContentResolver(), uri); local [all...] |
TestPagingContentProvider.java | 25 import android.net.Uri; 41 static final Uri PAGED_DATA_URI = Uri.parse("content://" + AUTHORITY + "/paged/"); 42 static final Uri UNPAGED_DATA_URI = Uri.parse("content://" + AUTHORITY + "/un-paged/"); 67 public Cursor query(Uri uri, String[] ignored, Bundle queryArgs, 82 if (PAGED_DATA_URI.equals(uri)) { 84 } else if (UNPAGED_DATA_URI.equals(uri)) { 89 throw new IllegalArgumentException("Unsupported URI: " + uri) 92 cursor.setNotificationUri(getContext().getContentResolver(), uri); local [all...] |
/cts/tests/tests/media/src/android/media/cts/ |
RingtoneTest.java | 25 import android.net.Uri; 39 private Uri mDefaultRingUri; 145 Uri uri = RingtoneManager.getValidRingtoneUri(mContext); local 146 assertNotNull("ringtone was unexpectedly null", uri); 147 RingtoneManager.setActualDefaultRingtoneUri(mContext, RingtoneManager.TYPE_RINGTONE, uri); 151 assertTrue("couldn't play ringtone " + uri, mRingtone.isPlaying());
|
/cts/tests/tests/os/src/android/os/cts/ |
StrictModeTest.java | 23 import android.net.Uri; 116 final Uri badUri = Uri.fromFile(new File("/sdcard/meow.jpg")); 124 final Uri goodUri = Uri.parse("content://com.example/foobar"); 139 final Uri uri = Uri.parse("content://com.example/foobar"); local 140 assertViolation(uri + " exposed beyond app", () -> { 143 intent.setDataAndType(uri, "image/jpeg") [all...] |
/cts/tests/tests/provider/src/android/provider/cts/ |
MediaStoreAudioTestHelper.java | 21 import android.net.Uri; 52 public Uri insertToInternal(ContentResolver contentResolver) { 53 Uri uri = contentResolver.insert(Media.INTERNAL_CONTENT_URI, getContentValues(true)); local 54 Assert.assertNotNull(uri); 55 return uri; 58 public Uri insertToExternal(ContentResolver contentResolver) { 59 Uri uri = contentResolver.insert(Media.EXTERNAL_CONTENT_URI, getContentValues(false)); local 60 Assert.assertNotNull(uri); [all...] |
MediaStore_Audio_AlbumsTest.java | 25 import android.net.Uri; 75 Uri audioAlbumsUri = isInternal? Albums.INTERNAL_CONTENT_URI : Albums.EXTERNAL_CONTENT_URI; 85 Uri audioMediaUri = isInternal ? audio1.insertToInternal(mContentResolver) 142 Uri filterUri = audioAlbumsUri.buildUpon() 167 Uri uri = null; local 178 uri = mContentResolver.insert(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, v); 180 uri.buildUpon().appendPath("albumart").build(), "r"); 184 Cursor c = mContentResolver.query(uri, null, null, null, null); 189 Uri albumart = Uri.parse("content://media/external/audio/albumart/" + aid) [all...] |
MediaStore_Audio_ArtistsTest.java | 23 import android.net.Uri; 64 Uri artistsUri = isInternal ? Artists.INTERNAL_CONTENT_URI : Artists.EXTERNAL_CONTENT_URI; 73 Uri uri = isInternal ? Audio1.getInstance().insertToInternal(mContentResolver) local 111 Uri filterUri = artistsUri.buildUpon() 125 mContentResolver.delete(uri, null, null);
|
MediaStore_Audio_GenresTest.java | 24 import android.net.Uri; 66 Uri uri = mContentResolver.insert(Genres.EXTERNAL_CONTENT_URI, values); local 67 assertNotNull(uri); 71 Cursor c = mContentResolver.query(uri, null, null, null, null); 81 assertEquals(1, mContentResolver.update(uri, values, null, null)); 82 c = mContentResolver.query(uri, null, null, null, null); 87 assertEquals(1, mContentResolver.delete(uri, null, null)); 95 Uri uri = mContentResolver.insert(Genres.INTERNAL_CONTENT_URI, values) local [all...] |
MediaStore_Audio_MediaTest.java | 23 import android.net.Uri; 82 Uri mediaUri = isInternal ? Media.INTERNAL_CONTENT_URI : Media.EXTERNAL_CONTENT_URI; 83 Uri uri = mContentResolver.insert(mediaUri, values); local 84 assertNotNull(uri); 91 Cursor c = mContentResolver.query(uri, null, null, null, null); 132 int result = mContentResolver.update(uri, values, null, null); 134 c = mContentResolver.query(uri, null, null, null, null); 166 Uri baseUri = isInternal ? Media.INTERNAL_CONTENT_URI : Media.EXTERNAL_CONTENT_URI; 167 Uri filterUri = baseUri.buildUpon( [all...] |
MediaStore_Video_MediaTest.java | 26 import android.net.Uri; 108 Uri uri = mContentResolver.insert(Media.EXTERNAL_CONTENT_URI, values); local 109 assertNotNull(uri); 113 Cursor c = mContentResolver.query(uri, null, null, null, null); 165 assertEquals(1, mContentResolver.update(uri, values, null, null)); 167 c = mContentResolver.query(uri, null, null, null, null); 196 assertEquals(1, mContentResolver.delete(uri, null, null)); 202 Uri videoUri = insertVideo(context); 211 Uri.Builder builder = videoUri.buildUpon() [all...] |
Settings_SecureTest.java | 22 import android.net.Uri; 151 Uri uri = Secure.getUriFor(name); local 152 assertNotNull(uri); 153 assertEquals(Uri.withAppendedPath(Secure.CONTENT_URI, name), uri); local 182 Uri settingUri =
|
Settings_SystemTest.java | 23 import android.net.Uri; 166 Uri uri = System.getUriFor(name); local 167 assertNotNull(uri); 168 assertEquals(Uri.withAppendedPath(System.CONTENT_URI, name), uri); local
|
/cts/tests/tests/provider/src/android/provider/cts/contacts/ |
ContactsContract_AggregationSuggestionsTest.java | 23 import android.net.Uri; 62 Uri uri = AggregationSuggestions.builder() local 67 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); 84 Uri uri = AggregationSuggestions.builder() local 89 Cursor cursor = mResolver.query(uri, TEST_PROJECTION, null, null, null); 105 Uri uri = AggregationSuggestions.builder() local 111 uri, new String[] { Contacts._ID, Contacts.DISPLAY_NAME }, null, null, null) 121 Uri uri = AggregationSuggestions.builder() local 142 Uri uri = AggregationSuggestions.builder() local 195 Uri uri = new AggregationSuggestions.Builder().setContactId(12).setLimit(7).build(); local 201 Uri uri = new AggregationSuggestions.Builder() local [all...] |
ContactsContract_AllUriTest.java | 22 import android.net.Uri; 240 private static Uri getUri(String[] path) { 241 return Uri.parse(path[0]); 271 private String[] getColumns(Uri uri) { 272 try (Cursor c = mResolver.query(uri, 282 private void checkQueryExecutable(Uri uri, 286 try (Cursor c = mResolver.query(uri, projection, selection, 291 addFailure("Query failed: URI=" + uri + " Message=" + th.getMessage(), th) 351 final Uri uri = getUri(path); local 366 final Uri uri = getUri(path); local 432 final Uri uri = getUri(path); local 491 final Uri uri = getUri(path); local 508 final Uri uri = getUri(path); local 588 final Uri uri = getUri(path); local 627 final Uri uri = getUri(path); local 670 final Uri uri = getUri(path); local [all...] |
ContactsContract_ContactCountsTest.java | 25 import android.net.Uri; 74 final Uri uri = Contacts.CONTENT_URI.buildUpon() local 76 final Cursor cursor = mResolver.query(uri, TEST_PROJECTION,
|
ContactsContract_PhoneLookup.java | 22 import android.net.Uri; 130 final Uri uri = PhoneLookup.CONTENT_FILTER_URI.buildUpon() local 133 assertCursorStoredValuesWithContactsFilter(uri, ids /*, empty */); 141 final Uri uri = PhoneLookup.CONTENT_FILTER_URI.buildUpon() local 150 assertCursorStoredValuesWithContactsFilter(uri, ids, expected); 158 final Uri uri = PhoneLookup.CONTENT_FILTER_URI.buildUpon() local 167 assertCursorStoredValuesWithContactsFilter(uri, ids, expected) 172 final Uri uri = PhoneLookup.CONTENT_FILTER_URI.buildUpon() local 190 final Uri uri = PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.buildUpon() local 201 final Uri uri = PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.buildUpon() local 218 final Uri uri = PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.buildUpon() local 232 final Uri uri = PhoneLookup.ENTERPRISE_CONTENT_FILTER_URI.buildUpon() local [all...] |
ContactsContract_PinnedPositionsTest.java | 26 import android.net.Uri; 360 * @param uri base URI that the provided ID will be appended onto, in order to creating the 361 * resulting URI 367 private int updateItemForContact(Uri uri, long id, String... extras) { 368 Uri itemUri = ContentUris.withAppendedId(uri, id); 377 * @param uri URI to perform the update fo 389 final Uri uri = Uri.withAppendedPath(Contacts.CONTENT_URI, String.valueOf(id)); local [all...] |
ContactsContract_StatusUpdatesTest.java | 24 import android.net.Uri; 62 assertNotNull(results[0].uri); 63 assertNotNull(results[1].uri); 65 dataId = ContentUris.parseId(results[1].uri); 69 Uri uri = insertStatusUpdate(dataId, StatusUpdates.DO_NOT_DISTURB, null, null); local 70 assertPresence(uri, StatusUpdates.DO_NOT_DISTURB); 71 assertStatus(uri, null); 72 assertHasTimestamp(uri, false); 73 assertRowCount(uri, 1) [all...] |
/cts/tests/tests/widget/src/android/widget/cts/ |
ImageSwitcherTest.java | 30 import android.net.Uri; 131 Uri uri = Uri.parse(imagefile.getPath()); local 132 mImageSwitcher.setImageURI(uri); 143 uri = Uri.parse(imagefile.getPath()); 144 mImageSwitcher.setImageURI(uri);
|
TabHost_TabSpecTest.java | 32 import android.net.Uri; 193 // The scheme of uri string must be "ctstest" to launch MockURLSpanTestActivity 194 Uri uri = Uri.parse("ctstest://tabhost_tabspec/test"); local 195 final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
/developers/build/prebuilts/gradle/BasicSyncAdapter/Application/src/main/java/com/example/android/basicsyncadapter/ |
SyncAdapter.java | 29 import android.net.Uri; 222 Uri uri = FeedContract.Entry.CONTENT_URI; // Get all entries local 223 Cursor c = contentResolver.query(uri, PROJECTION, null, null, null); 245 Uri existingUri = FeedContract.Entry.CONTENT_URI.buildUpon() 263 Uri deleteUri = FeedContract.Entry.CONTENT_URI.buildUpon() 286 FeedContract.Entry.CONTENT_URI, // URI where data was modified
|
/developers/build/prebuilts/gradle/BasicSyncAdapter/Application/src/main/java/com/example/android/basicsyncadapter/provider/ |
FeedProvider.java | 26 import android.net.Uri; 38 // The constants below represent individual URI routes, as IDs. Every URI pattern recognized by 42 // When a incoming URI is run through sUriMatcher, it will be tested against the defined 43 // URI patterns, and the corresponding route ID will be returned. 45 * URI ID for route: /entries 50 * URI ID for route: /entries/{ID} 70 * Determine the mime type for entries returned by a given URI. 73 public String getType(Uri uri) { 111 c.setNotificationUri(ctx.getContentResolver(), uri); local [all...] |
/developers/build/prebuilts/gradle/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/ |
QuizListenerService.java | 36 import android.net.Uri; 152 Uri uri = event.getDataItem().getUri(); local 153 // URI's are of the form "/question/0", "/question/1" etc. 155 int notificationId = Integer.parseInt(uri.getLastPathSegment());
|
/developers/build/prebuilts/gradle/StorageClient/Application/src/main/java/com/example/android/storageclient/ |
StorageClientFragment.java | 25 import android.net.Uri; 97 // Instead, a URI to that document will be contained in the return intent 98 // provided to this method as a parameter. Pull that uri using "resultData.getData()" 99 Uri uri = null; local 101 uri = resultData.getData(); 102 Log.i(TAG, "Uri: " + uri.toString()); 103 showImage(uri); 110 * Given the URI of an image, shows it on the screen using a DialogFragment [all...] |