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

Commit f73738b7 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

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



Change-Id: I8a433de9188c32214b1f8d6a4490dfe731d68c40
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent d5948d23
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;
            }
        }
    }