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

Commit 27aec3c5 authored by Christopher Tate's avatar Christopher Tate
Browse files

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

Bug 19692849

Change-Id: I13615db7408b5c6fbc787c4773103c052e70f0b2
parent d58617b4
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++) {