Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab9f5082 authored by Doug Zongker's avatar Doug Zongker Committed by Android Git Automerger
Browse files

am 981dec69: Merge "don\'t delete /cache/recovery/last_log on boot" into gingerbread

Merge commit '981dec69' into gingerbread-plus-aosp

* commit '981dec69':
  don't delete /cache/recovery/last_log on boot
parents c10207b6 981dec69
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);