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

Commit 388ff393 authored by Christopher Tate's avatar Christopher Tate Committed by Android (Google) Code Review
Browse files

Merge "Don't run full backups until package metadata has been pushed"

parents 63b9e820 27aec3c5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3909,6 +3909,16 @@ public class BackupManagerService {
                    return;
                }

                // Don't proceed unless we have already established package metadata
                // for the current dataset via a key/value backup pass.
                File stateDir = new File(mBaseStateDir, transport.transportDirName());
                File pmState = new File(stateDir, PACKAGE_MANAGER_SENTINEL);
                if (pmState.length() <= 0) {
                    Slog.i(TAG, "Full backup requested but dataset not yet initialized "
                            + "via k/v backup pass; ignoring");
                    return;
                }

                // Set up to send data to the transport
                final int N = mPackages.size();
                for (int i = 0; i < N; i++) {