Merge pull request #3776 from k9mail/externalfilesdir

More clearly use getExternalFilesDir in ExternalStorageProvider
This commit is contained in:
cketti 2018-12-01 16:41:54 +01:00 committed by GitHub
commit c9f3d57071
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,11 +330,6 @@ public class StorageManager {
private final CoreResourceProvider resourceProvider;
/**
* Root of the denoted storage.
*/
private File mRoot;
/**
* Chosen base directory.
*/
@ -352,9 +347,7 @@ public class StorageManager {
@Override
public void init(Context context) {
mRoot = Environment.getExternalStorageDirectory();
mApplicationDirectory = new File(new File(new File(new File(mRoot, "Android"), "data"),
context.getPackageName()), "files");
mApplicationDirectory = context.getExternalFilesDir(null);
}
@Override
@ -384,7 +377,7 @@ public class StorageManager {
@Override
public File getRoot(Context context) {
return mRoot;
return Environment.getExternalStorageDirectory();
}
}