Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 788f9d38 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Helper methods for constructing MediaStore Uris."

parents f3535d1c f9ebfc9a
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -1380,6 +1380,11 @@ public final class MediaStore {
                    .appendPath("downloads").build();
        }

        /** @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.
             */