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

Commit 4cf3ba51 authored by Rhed Jao's avatar Rhed Jao
Browse files

Move dump preferred activities to the ComputerEngine

Reduce package manager lock contention in the dump function by
moving the dumps to the ComputerEngine.

Test: adb bugreport
Bug: 178304105
Change-Id: Ifc6ffc18fd9140dff514ccfbff185cd1a643999e
parent 304d3a07
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -4485,6 +4485,10 @@ public class PackageManagerService extends IPackageManager.Stub
                    break;
                }
                case DumpState.DUMP_PREFERRED:
                    mSettings.dumpPreferred(pw, dumpState, packageName);
                    break;
                case DumpState.DUMP_PREFERRED_XML:
                {
                    pw.flush();
@@ -24128,11 +24132,7 @@ public class PackageManagerService extends IPackageManager.Stub
        }
        if (!checkin && dumpState.isDumping(DumpState.DUMP_PREFERRED)) {
            // TODO: This cannot be moved to ComputerEngine since some variables with collections
            //  types in IntentResolver such as mTypeToFilter do not have a copy of `F[]`.
            synchronized (mLock) {
                mSettings.dumpPreferred(pw, dumpState, packageName);
            }
            dump(DumpState.DUMP_PREFERRED, fd, pw, dumpState);
        }
        if (!checkin && dumpState.isDumping(DumpState.DUMP_PREFERRED_XML)) {