From a39871ef5e9bf6703f18af0725484b06f5c78216 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Mon, 29 Sep 2014 13:44:04 -0700 Subject: Use VMRuntime.isBootClassPathOnDisk Bug: 17679443 Change-Id: If53c236058a7237d735c2344a715cf0a36301f9b --- services/usage/java/com/android/server/usage/UsageStatsDatabase.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'services/usage/java') diff --git a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java index 972c929..cfa4436 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsDatabase.java +++ b/services/usage/java/com/android/server/usage/UsageStatsDatabase.java @@ -382,6 +382,10 @@ class UsageStatsDatabase { File[] files = dir.listFiles(); if (files != null) { for (File f : files) { + String path = f.getPath(); + if (path.endsWith(".bak")) { + f = new File(path.substring(0, path.length() - 4)); + } long beginTime = Long.parseLong(f.getName()); if (beginTime < expiryTime) { new AtomicFile(f).delete(); -- cgit v1.1