CleanCacheService: reduce logcat noise, check if file exists before rm

This commit is contained in:
Hans-Christoph Steiner 2018-02-09 12:28:53 +01:00
parent 8a0abdd841
commit 833d3f40fd

View File

@ -14,6 +14,9 @@ import java.io.File;
@TargetApi(21)
class CleanCacheService21 {
static void deleteIfOld(File file, long olderThan) {
if (file == null || !file.exists()) {
return;
}
try {
StructStat stat = Os.lstat(file.getAbsolutePath());
if ((stat.st_atime * 1000L) < olderThan) {