mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-03 05:34:51 +00:00
Cleanup
This commit is contained in:
parent
e7e731e04a
commit
bac28a9b05
3 changed files with 1 additions and 18 deletions
|
@ -1730,7 +1730,6 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|||
files.addAll(Helper.listFiles(context.getCacheDir(), MIN_FILE_SIZE));
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
files.addAll(Helper.listFiles(context.getDataDir(), MIN_FILE_SIZE));
|
||||
files.addAll(Helper.listFiles(Helper.getExternalFilesDir(context), MIN_FILE_SIZE));
|
||||
|
||||
Collections.sort(files, new Comparator<File>() {
|
||||
@Override
|
||||
|
|
|
@ -2655,18 +2655,6 @@ public class Helper {
|
|||
return dir;
|
||||
}
|
||||
|
||||
static File getExternalFilesDir(Context context) {
|
||||
return getExternalFilesDir(context, null);
|
||||
}
|
||||
|
||||
static File getExternalFilesDir(Context context, String type) {
|
||||
File[] dirs = ContextCompat.getExternalFilesDirs(context, type);
|
||||
if (dirs == null || dirs.length == 0)
|
||||
return context.getExternalFilesDir(type);
|
||||
else
|
||||
return dirs[0];
|
||||
}
|
||||
|
||||
static String sanitizeFilename(String name) {
|
||||
if (name == null)
|
||||
return null;
|
||||
|
|
|
@ -3464,11 +3464,7 @@ public class Log {
|
|||
if (ai != null)
|
||||
size += write(os, String.format("Source: %s\r\n public: %s\r\n",
|
||||
ai.sourceDir, ai.publicSourceDir));
|
||||
File external = Helper.getExternalFilesDir(context);
|
||||
boolean emulated = (external != null && Environment.isExternalStorageEmulated(external));
|
||||
size += write(os, String.format("Files: %s\r\n external: %s\r\n emulated: %b\r\n storage: %s\r\n",
|
||||
context.getFilesDir(), external, emulated,
|
||||
Environment.getExternalStorageDirectory()));
|
||||
size += write(os, String.format("Files: %s\r\n", context.getFilesDir()));
|
||||
|
||||
size += write(os, String.format("Cache: %s\r\n external: %s\n",
|
||||
context.getCacheDir(), context.getExternalCacheDir()));
|
||||
|
|
Loading…
Reference in a new issue