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

Commit 88a60018 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make sure the full-data backup queue is properly set up on startup"

parents 4b108cd9 5e81097a
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import static com.android.server.backup.internal.BackupHandler.MSG_RUN_CLEAR;
import static com.android.server.backup.internal.BackupHandler.MSG_RUN_RESTORE;
import static com.android.server.backup.internal.BackupHandler.MSG_SCHEDULE_BACKUP_PACKAGE;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
@@ -973,6 +974,7 @@ public class UserBackupManagerService {
                /* scheduler */ null);
    }

    @NonNull
    private ArrayList<FullBackupEntry> readFullBackupSchedule() {
        boolean changed = false;
        ArrayList<FullBackupEntry> schedule = null;
@@ -986,11 +988,11 @@ public class UserBackupManagerService {
                 DataInputStream in = new DataInputStream(bufStream)) {
                int version = in.readInt();
                if (version != SCHEDULE_FILE_VERSION) {
                    Slog.e(
                            TAG,
                            addUserIdToLogMessage(
                                    mUserId, "Unknown backup schedule version " + version));
                    return null;
                    // The file version doesn't match the expected value.
                    // Since this is within a "try" block, this exception will be treated like
                    // any other exception, and caught below.
                    throw new IllegalArgumentException("Unknown backup schedule version "
                            + version);
                }

                final int numPackages = in.readInt();