CleanCacheService: reduce logcat noise, check if file exists before rm
This commit is contained in:
parent
8a0abdd841
commit
833d3f40fd
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user