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

Commit 81e8c429 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge ab62e68d on remote branch

Change-Id: Id84c1a8b50900d412617c74b371f8ab451d3885a
parents f596217a ab62e68d
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -177,7 +177,12 @@ public class Environment {

        /** {@hide} */
        public File getSecondaryStorageDirectory() {
            /* If switch to guest account
             * The secondary storage will not be added into externalForApp
             */
            if (mExternalDirsForApp.length > 1)
                return mExternalDirsForApp[1];
            return null;
        }

        @Deprecated
@@ -429,7 +434,9 @@ public class Environment {
    /** {@hide} */
    public static File getSecondaryStorageDirectory() {
        throwIfUserRequired();
        if (sCurrentUser.getExternalDirsForApp().length > 1)
            return sCurrentUser.getExternalDirsForApp()[1];
        return null;
    }

    /** {@hide} */
@@ -756,8 +763,7 @@ public class Environment {
     * @hide
     */
    public static String getSecondaryStorageState() {
        final File externalDir = sCurrentUser.getExternalDirsForApp()[1];
        return getStorageState(externalDir);
        return getStorageState(getSecondaryStorageDirectory());
    }

    /**