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
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user