Java Code Examples for android.os.Environment#buildExternalStorageAppFilesDirs()

The following examples show how to use android.os.Environment#buildExternalStorageAppFilesDirs() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        if (mExternalFilesDirs == null) {
            mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        }

        // Splice in requested type, if any
        File[] dirs = mExternalFilesDirs;
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }

        // Create dirs if needed
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 2
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        if (mExternalFilesDirs == null) {
            mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        }

        // Splice in requested type, if any
        File[] dirs = mExternalFilesDirs;
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }

        // Create dirs if needed
        return ensureDirsExistOrFilter(dirs);
    }
}
 
Example 3
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        if (mExternalFilesDirs == null) {
            mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        }

        // Splice in requested type, if any
        File[] dirs = mExternalFilesDirs;
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }

        // Create dirs if needed
        return ensureDirsExistOrFilter(dirs);
    }
}
 
Example 4
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        if (mExternalFilesDirs == null) {
            mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        }

        // Splice in requested type, if any
        File[] dirs = mExternalFilesDirs;
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }

        // Create dirs if needed
        return ensureDirsExistOrFilter(dirs);
    }
}
 
Example 5
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        if (mExternalFilesDirs == null) {
            mExternalFilesDirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        }

        // Splice in requested type, if any
        File[] dirs = mExternalFilesDirs;
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }

        // Create dirs if needed
        return ensureDirsExistOrFilter(dirs);
    }
}
 
Example 6
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 7
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 8
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 9
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 10
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 11
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}
 
Example 12
Source Project: android_9.0.0_r45   File: ContextImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public File[] getExternalFilesDirs(String type) {
    synchronized (mSync) {
        File[] dirs = Environment.buildExternalStorageAppFilesDirs(getPackageName());
        if (type != null) {
            dirs = Environment.buildPaths(dirs, type);
        }
        return ensureExternalDirsExistOrFilter(dirs);
    }
}