diff options
author | Brian Carlstrom <bdc@google.com> | 2014-09-29 13:44:04 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2014-09-30 16:49:32 -0700 |
commit | a39871ef5e9bf6703f18af0725484b06f5c78216 (patch) | |
tree | 8bdaac2d5284ebc738e2d1665c4101dabd2f546d /services/usage/java | |
parent | 0a62ab707977d4d6666d1c452ba702442655b6e6 (diff) | |
download | frameworks_base-a39871ef5e9bf6703f18af0725484b06f5c78216.zip frameworks_base-a39871ef5e9bf6703f18af0725484b06f5c78216.tar.gz frameworks_base-a39871ef5e9bf6703f18af0725484b06f5c78216.tar.bz2 |
Use VMRuntime.isBootClassPathOnDisk
Bug: 17679443
Change-Id: If53c236058a7237d735c2344a715cf0a36301f9b
Diffstat (limited to 'services/usage/java')
-rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsDatabase.java | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |