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

Commit fa733a62 authored by Toshikazu Saito's avatar Toshikazu Saito Committed by Takahiro Aizawa
Browse files

Revert "MediaStore.Audio.Media.getContentUriForPath() returns unexpected content"

This reverts commit 66eb5899.
This is reverted because SECONDARY_STORAGE is no longer used.

Test: build since this just removes unused part.
Bug: 79123178

Change-Id: I1748e8e1ac49bf5709908d85e3c0d26b43608500
parent 7bd18423
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -1444,18 +1444,6 @@ public final class MediaStore {
        }

        public static final class Media implements AudioColumns {

            private static final String[] EXTERNAL_PATHS;

            static {
                String secondary_storage = System.getenv("SECONDARY_STORAGE");
                if (secondary_storage != null) {
                    EXTERNAL_PATHS = secondary_storage.split(":");
                } else {
                    EXTERNAL_PATHS = new String[0];
                }
            }

            /**
             * Get the content:// style URI for the audio media table on the
             * given volume.
@@ -1469,12 +1457,6 @@ public final class MediaStore {
            }

            public static Uri getContentUriForPath(String path) {
                for (String ep : EXTERNAL_PATHS) {
                    if (path.startsWith(ep)) {
                        return EXTERNAL_CONTENT_URI;
                    }
                }

                return (path.startsWith(Environment.getExternalStorageDirectory().getPath()) ?
                        EXTERNAL_CONTENT_URI : INTERNAL_CONTENT_URI);
            }