diff options
author | Doug Zongker <dougz@android.com> | 2010-09-29 13:43:28 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-29 13:43:28 -0700 |
commit | ab9f508292f9a1eb54bf97bdd1566bdf8dd43fb3 (patch) | |
tree | 64451ce80880bb35093f87621583c7a53f974dd3 /core/java/android/os/RecoverySystem.java | |
parent | c10207b6bfcfe09636dd2035b4237f1001008a48 (diff) | |
parent | 981dec695f83eb51935fcf480ecbd76ae3f7d6c4 (diff) | |
download | frameworks_base-ab9f508292f9a1eb54bf97bdd1566bdf8dd43fb3.zip frameworks_base-ab9f508292f9a1eb54bf97bdd1566bdf8dd43fb3.tar.gz frameworks_base-ab9f508292f9a1eb54bf97bdd1566bdf8dd43fb3.tar.bz2 |
am 981dec69: Merge "don\'t delete /cache/recovery/last_log on boot" into gingerbread
Merge commit '981dec695f83eb51935fcf480ecbd76ae3f7d6c4' into gingerbread-plus-aosp
* commit '981dec695f83eb51935fcf480ecbd76ae3f7d6c4':
don't delete /cache/recovery/last_log on boot
Diffstat (limited to 'core/java/android/os/RecoverySystem.java')
-rw-r--r-- | core/java/android/os/RecoverySystem.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/os/RecoverySystem.java b/core/java/android/os/RecoverySystem.java index e56e257..6d19f41 100644 --- a/core/java/android/os/RecoverySystem.java +++ b/core/java/android/os/RecoverySystem.java @@ -68,6 +68,7 @@ public class RecoverySystem { private static File RECOVERY_DIR = new File("/cache/recovery"); private static File COMMAND_FILE = new File(RECOVERY_DIR, "command"); private static File LOG_FILE = new File(RECOVERY_DIR, "log"); + private static String LAST_LOG_FILENAME = "last_log"; // Length limits for reading files. private static int LOG_FILE_MAX_LENGTH = 64 * 1024; @@ -399,9 +400,10 @@ public class RecoverySystem { Log.e(TAG, "Error reading recovery log", e); } - // Delete everything in RECOVERY_DIR + // Delete everything in RECOVERY_DIR except LAST_LOG_FILENAME String[] names = RECOVERY_DIR.list(); for (int i = 0; names != null && i < names.length; i++) { + if (names[i].equals(LAST_LOG_FILENAME)) continue; File f = new File(RECOVERY_DIR, names[i]); if (!f.delete()) { Log.e(TAG, "Can't delete: " + f); |