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

Commit 0c6506a4 authored by TYM Tsai's avatar TYM Tsai
Browse files

Close freezer early before posted to handler

1. Close freezer early before posted to handler.
2. Backup/restore should be workling during freezing, remove
   the freezer-closer

Bug: 388132224
FLAG: EXEMPT bugfix
Test: atest CtsPackageInstallTestCases
Test: atest CtsInstallHostTestCases
Change-Id: I542dd1f17d4963231f10744fcb6bed4aa086b824
parent 73a93318
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -861,7 +861,6 @@ final class InstallPackageHelper {
            // restore if appropriate, then pass responsibility back to the
            // Package Manager to run the post-install observer callbacks
            // and broadcasts.
            request.closeFreezer();
            doRestore = performBackupManagerRestore(userId, token, request);
        }

@@ -898,8 +897,11 @@ final class InstallPackageHelper {
                }
            }
        } else {
            // No restore possible, or the Backup Manager was mysteriously not
            // available -- just fire the post-install work request directly.
            // No restore possible, or the Backup Manager was mysteriously not available.
            // we don't need to wait for restore to complete before closing the freezer,
            // so we can close the freezer right away.
            // Also just fire the post-install work request directly.
            request.closeFreezer();
            if (DEBUG_INSTALL) Log.v(TAG, "No restore - queue post-install for " + token);

            Trace.asyncTraceBegin(TRACE_TAG_PACKAGE_MANAGER, "postInstall", token);