/developers/samples/android/tv/ChannelsPrograms/Application/src/main/java/com/example/android/tv/channelsprograms/util/ |
D | AppLinkHelper.java | 66 public static AppLinkAction extractAction(Uri uri) { in extractAction() argument 67 if (isPlaybackUri(uri)) { in extractAction() 69 extractChannelId(uri), extractMovieId(uri), extractPosition(uri)); in extractAction() 70 } else if (isBrowseUri(uri)) { in extractAction() 71 return new BrowseAction(extractSubscriptionName(uri)); in extractAction() 73 throw new IllegalArgumentException("No action found for uri " + uri); in extractAction() 82 private static boolean isPlaybackUri(Uri uri) { in isPlaybackUri() argument 83 if (uri.getPathSegments().isEmpty()) { in isPlaybackUri() 86 String option = uri.getPathSegments().get(URI_INDEX_OPTION); in isPlaybackUri() 96 private static boolean isBrowseUri(Uri uri) { in isBrowseUri() argument [all …]
|
/developers/build/prebuilts/gradle/BasicSyncAdapter/Application/src/main/java/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 …]
|
/developers/samples/android/connectivity/sync/BasicSyncAdapter/Application/src/main/java/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 …]
|
/developers/samples/android/content/ShareActionProvider/Application/src/main/java/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()
|
/developers/build/prebuilts/gradle/ShareActionProvider/Application/src/main/java/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()
|
/developers/build/prebuilts/gradle/BeamLargeFiles/Application/src/main/java/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
|
/developers/samples/android/common/src/java/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
|
/developers/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/tvleanback/data/ |
D | VideoContentProvider.java | 70 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 73 switch (URI_MATCHER.match(uri)) { in query() 75 Log.d(TAG, "search suggest: " + selectionArgs[0] + " URI: " + uri); in query() 78 "selectionArgs must be provided for the Uri: " + uri); in query() 82 throw new IllegalArgumentException("Unknown Uri: " + uri); in query() 115 public String getType(Uri uri) { in getType() argument 116 switch (URI_MATCHER.match(uri)) { in getType() 122 throw new IllegalArgumentException("Unknown URL " + uri); in getType() 129 public Uri insert(Uri uri, ContentValues values) { in insert() argument 134 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument [all …]
|
/developers/demos/JustForUs/justforus/src/main/java/com/example/android/justforus/ |
D | AssetProvider.java | 73 public String getType(Uri uri){ in getType() argument 79 String path = uri.getLastPathSegment(); in getType() 87 return guessContentTypeFromName(uri.toString()); in getType() 92 public AssetFileDescriptor openAssetFile (Uri uri, String mode) in openAssetFile() argument 105 String path = uri.getLastPathSegment(); in openAssetFile() 131 public Cursor query(Uri uri, String[] projection, String selection, in query() argument 133 String path = uri.getLastPathSegment(); in query() 154 AssetFileDescriptor afd = openAssetFile(uri, "r"); in query() 170 public Uri insert(Uri uri, ContentValues contentValues) { in insert() argument 175 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument [all …]
|
/developers/samples/android/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/ |
D | WeatherDataProvider.java | 83 public synchronized Cursor query(Uri uri, String[] projection, String selection, in query() argument 85 assert(uri.getPathSegments().isEmpty()); in query() 99 public String getType(Uri uri) { in getType() argument 104 public Uri insert(Uri uri, ContentValues values) { in insert() argument 110 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 116 public synchronized int update(Uri uri, ContentValues values, String selection, in update() argument 118 assert(uri.getPathSegments().size() == 1); in update() 122 final int index = Integer.parseInt(uri.getPathSegments().get(0)); in update() 131 getContext().getContentResolver().notifyChange(uri, null); in update()
|
/developers/samples/android/content/documentsUi/StorageClient/Application/src/main/java/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 …]
|
/developers/build/prebuilts/gradle/StorageClient/Application/src/main/java/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 …]
|
/developers/build/prebuilts/gradle/DragAndDropAcrossApps/DragSource/src/main/java/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()
|
/developers/samples/android/ui/window/DragAndDropAcrossApps/DragSource/src/main/java/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()
|
/developers/build/prebuilts/gradle/DragAndDropAcrossApps/DropTarget/src/main/java/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()
|
/developers/samples/android/ui/window/DragAndDropAcrossApps/DropTarget/src/main/java/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()
|
/developers/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/tvleanback/recommendation/ |
D | RecommendationBuilder.java | 93 public RecommendationBuilder setBackground(String uri) { in setBackground() argument 94 mBackgroundUri = uri; in setBackground() 192 public int delete(Uri uri, String selection, String[] selectionArgs) { in delete() argument 197 public String getType(Uri uri) { in getType() argument 202 public Uri insert(Uri uri, ContentValues values) { in insert() argument 207 public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, in query() argument 213 public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { in update() argument 221 public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { in openFile() argument 222 int backgroundId = Integer.parseInt(uri.getLastPathSegment()); in openFile()
|
/developers/build/prebuilts/gradle/ContentProviderPaging/kotlinApp/app/src/main/kotlin/com.example.android.contentproviderpaging/ |
D | ImageProvider.kt | 48 override fun query(uri: Uri, strings: Array<String>?, s: String?, in query() 53 override fun query(uri: Uri, projection: Array<String>?, queryArgs: Bundle, in query() 55 val match = sUriMatcher.match(uri) in query() 69 uri + ", offset: " + offset + ", limit: " + limit) in query() 115 override fun getType(uri: Uri): String? { in getType() 116 val match = sUriMatcher.match(uri) in getType() 120 else -> throw IllegalArgumentException(String.format("Unknown URI: %s", uri)) in getType() 124 override fun insert(uri: Uri, contentValues: ContentValues?): Uri? { in insert() 128 override fun delete(uri: Uri, s: String?, strings: Array<String>?): Int { in delete() 132 override fun update(uri: Uri, contentValues: ContentValues?, s: String?, in update()
|
/developers/samples/android/content/documentsUi/ContentProviderPaging/kotlinApp/app/src/main/kotlin/com.example.android.contentproviderpaging/ |
D | ImageProvider.kt | 48 override fun query(uri: Uri, strings: Array<String>?, s: String?, in query() 53 override fun query(uri: Uri, projection: Array<String>?, queryArgs: Bundle, in query() 55 val match = sUriMatcher.match(uri) in query() 69 uri + ", offset: " + offset + ", limit: " + limit) in query() 115 override fun getType(uri: Uri): String? { in getType() 116 val match = sUriMatcher.match(uri) in getType() 120 else -> throw IllegalArgumentException(String.format("Unknown URI: %s", uri)) in getType() 124 override fun insert(uri: Uri, contentValues: ContentValues?): Uri? { in insert() 128 override fun delete(uri: Uri, s: String?, strings: Array<String>?): Int { in delete() 132 override fun update(uri: Uri, contentValues: ContentValues?, s: String?, in update()
|
/developers/samples/android/content/documentsUi/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/ |
D | ImageProvider.java | 81 public Cursor query(@NonNull Uri uri, @Nullable String[] strings, @Nullable String s, in query() argument 87 public Cursor query(Uri uri, String[] projection, Bundle queryArgs, in query() argument 89 int match = sUriMatcher.match(uri); in query() 104 uri + ", offset: " + offset + ", limit: " + limit); in query() 140 public String getType(@NonNull Uri uri) { in getType() argument 141 int match = sUriMatcher.match(uri); in getType() 148 throw new IllegalArgumentException(String.format("Unknown URI: %s", uri)); in getType() 154 public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) { in insert() argument 159 public int delete(@NonNull Uri uri, @Nullable String s, @Nullable String[] strings) { in delete() argument 164 public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String s, in update() argument
|
/developers/build/prebuilts/gradle/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/ |
D | ImageProvider.java | 81 public Cursor query(@NonNull Uri uri, @Nullable String[] strings, @Nullable String s, in query() argument 87 public Cursor query(Uri uri, String[] projection, Bundle queryArgs, in query() argument 89 int match = sUriMatcher.match(uri); in query() 104 uri + ", offset: " + offset + ", limit: " + limit); in query() 140 public String getType(@NonNull Uri uri) { in getType() argument 141 int match = sUriMatcher.match(uri); in getType() 148 throw new IllegalArgumentException(String.format("Unknown URI: %s", uri)); in getType() 154 public Uri insert(@NonNull Uri uri, @Nullable ContentValues contentValues) { in insert() argument 159 public int delete(@NonNull Uri uri, @Nullable String s, @Nullable String[] strings) { in delete() argument 164 public int update(@NonNull Uri uri, @Nullable ContentValues contentValues, @Nullable String s, in update() argument
|
/developers/build/prebuilts/androidtv/sample-inputs/app/src/main/java/com/example/android/sampletvinput/ |
D | TvContractUtils.java | 107 Uri uri; in updateChannels() local 109 uri = resolver.insert(TvContract.Channels.CONTENT_URI, values); in updateChannels() 111 uri = TvContract.buildChannelUri(rowId); in updateChannels() 112 resolver.update(uri, values, null, null); in updateChannels() 116 logos.put(TvContract.buildChannelLogoUri(uri), channel.logoUrl); in updateChannels() 132 Uri uri = TvContract.buildChannelsUriForInput(inputId); in getChannelCount() local 137 cursor = resolver.query(uri, projection, null, null, null); in getChannelCount() 155 Uri uri = TvContract.buildChannelsUriForInput(inputId); in buildChannelMap() local 164 cursor = resolver.query(uri, projection, null, null, null); in buildChannelMap() 186 Uri uri = TvContract.buildProgramsUriForChannel(channelUri); in getLastProgramEndTimeMillis() local [all …]
|
/developers/build/prebuilts/gradle/AppShortcuts/app/src/main/java/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()
|