summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Sharkey <jsharkey@google.com> 2019-03-23 19:31:56 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-03-23 19:31:56 +0000
commit788f9d384786fb8d97c85a3661e4856aa9280474 (patch)
tree3d001992b1709b9c23b05edaf9ce39a194e6265d
parentf3535d1c5720d9deafc94a1354292298cb517f89 (diff)
parentf9ebfc9af0968fff10bd5536bc7b54d26446777d (diff)
Merge "Helper methods for constructing MediaStore Uris."
-rw-r--r--core/java/android/provider/MediaStore.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java
index 368ba3c1de30..20d3c9139bbe 100644
--- a/core/java/android/provider/MediaStore.java
+++ b/core/java/android/provider/MediaStore.java
@@ -1381,6 +1381,11 @@ public final class MediaStore {
}
/** @hide */
+ public static @NonNull Uri getContentUri(@NonNull String volumeName, long id) {
+ return ContentUris.withAppendedId(getContentUri(volumeName), id);
+ }
+
+ /** @hide */
public static @NonNull Uri getContentUriForPath(@NonNull String path) {
return getContentUri(getVolumeName(new File(path)));
}
@@ -1752,6 +1757,11 @@ public final class MediaStore {
.appendPath("media").build();
}
+ /** @hide */
+ public static @NonNull Uri getContentUri(@NonNull String volumeName, long id) {
+ return ContentUris.withAppendedId(getContentUri(volumeName), id);
+ }
+
/**
* The content:// style URI for the internal storage.
*/
@@ -2240,6 +2250,11 @@ public final class MediaStore {
.appendPath("media").build();
}
+ /** @hide */
+ public static @NonNull Uri getContentUri(@NonNull String volumeName, long id) {
+ return ContentUris.withAppendedId(getContentUri(volumeName), id);
+ }
+
/**
* Get the content:// style URI for the given audio media file.
*
@@ -3018,6 +3033,11 @@ public final class MediaStore {
.appendPath("media").build();
}
+ /** @hide */
+ public static @NonNull Uri getContentUri(@NonNull String volumeName, long id) {
+ return ContentUris.withAppendedId(getContentUri(volumeName), id);
+ }
+
/**
* The content:// style URI for the internal storage.
*/