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

Commit 8624e639 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "Add framework resource to specify case sensitivity of the external storage filesystem"

parents 3384e0f6 f73738b7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -80,6 +80,10 @@
         for backward compatibility with apps that require external storage. -->
    <bool name="config_emulateExternalStorage">false</bool>

    <!-- Set to true if external storage is case sensitive.
         Typically external storage is FAT, which is case insensitive. -->
    <bool name="config_caseSensitiveExternalStorage">false</bool>

    <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
         Please don't copy them, copy anything else. -->

+6 −3
Original line number Diff line number Diff line
@@ -1175,9 +1175,12 @@ public class MediaScanner
            mGenreCache = new HashMap<String, Uri>();
            mGenresUri = Genres.getContentUri(volumeName);
            mPlaylistsUri = Playlists.getContentUri(volumeName);
            // assuming external storage is FAT (case insensitive), except on the simulator.
            if ( Process.supportsProcesses()) {
                mCaseInsensitivePaths = true;

            mCaseInsensitivePaths = !mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_caseSensitiveExternalStorage);
            if (!Process.supportsProcesses()) {
                // Simulator uses host file system, so it should be case sensitive.
                mCaseInsensitivePaths = false;
            }
        }
    }