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

Commit a7e47d5d authored by Christopher Tate's avatar Christopher Tate
Browse files

Don't crash if a system restore fails before constructing the PMBA

If a whole-system restore operation failed at just the wrong point,
we'd wind up in the teardown code without a certain vital bit of it
having been initialized, and crash on the null pointer.  Now we
recognize this failure mode and make sure not to do that.

Bug 18574450

Change-Id: Ifa2c10ce16bb3c6bc916ed7151c5fd51b7225691
parent 089f95f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7664,7 +7664,7 @@ if (MORE_DEBUG) Slog.v(TAG, " + got " + nRead + "; now wanting " + (size - soF

            // If this was a full-system restore, record the ancestral
            // dataset information
            if (mIsSystemRestore) {
            if (mIsSystemRestore && mPmAgent != null) {
                mAncestralPackages = mPmAgent.getRestoredPackages();
                mAncestralToken = mToken;
                writeRestoreTokens();