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

Commit 09893e9a authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't allow restore sessions during backups

Gracefully no-op if apps attempt to restore themselves while there is
a backup pass in flight.

Bug 29135379

Change-Id: I8f0b5cd9d149b703e1de7a3a0b4b54c3aff766b6
parent 142fc425
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -9849,7 +9849,11 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF

        synchronized(this) {
            if (mActiveRestoreSession != null) {
                Slog.d(TAG, "Restore session requested but one already active");
                Slog.i(TAG, "Restore session requested but one already active");
                return null;
            }
            if (mBackupRunning) {
                Slog.i(TAG, "Restore session requested but currently running backups");
                return null;
            }
            mActiveRestoreSession = new ActiveRestoreSession(packageName, transport);