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

Commit 547578c8 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

Move removePackageData to handler thread.

It does a lot of heavy lifting and should not happen under package lock.

Bug: 245997611
Fixes: 245997611
Test: presubmit + boots
Change-Id: If6c044a31b2d22631a7d0ad57efcb9ea86955aa3
parent e4c0e42c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3311,7 +3311,8 @@ final class InstallPackageHelper {
            if (disabledPs == null) {
                logCriticalInfo(Log.WARN, "System package " + packageName
                        + " no longer exists; its data will be wiped");
                mRemovePackageHelper.removePackageData(ps, userIds, null, 0, false);
                mInjector.getHandler().post(
                        () -> mRemovePackageHelper.removePackageData(ps, userIds, null, 0, false));
            } else {
                // we still have a disabled system package, but, it still might have
                // been removed. check the code path still exists and check there's