Dump PackageInstaller state outside of mPackages lock

Otherwise it may cause a deadlock.

Also removed new line before instant attribute.

Test: manual
Change-Id: I2812a6fe76c638f12728ca6850918eb3a98e3158
Fixes: 36813032
This commit is contained in:
Fyodor Kupolov
2017-04-03 17:45:50 -07:00
parent 644648ebfd
commit 09546ff639
2 changed files with 9 additions and 8 deletions

View File

@@ -20854,13 +20854,6 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
mSettings.dumpRestoredPermissionGrantsLPr(pw, dumpState);
}
if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS) && packageName == null) {
// XXX should handle packageName != null by dumping only install data that
// the given package is involved with.
if (dumpState.onTitlePrinted()) pw.println();
mInstallerService.dump(new IndentingPrintWriter(pw, " ", 120));
}
if (!checkin && dumpState.isDumping(DumpState.DUMP_FROZEN) && packageName == null) {
// XXX should handle packageName != null by dumping only install data that
// the given package is involved with.
@@ -20931,6 +20924,14 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
}
}
}
// PackageInstaller should be called outside of mPackages lock
if (!checkin && dumpState.isDumping(DumpState.DUMP_INSTALLS) && packageName == null) {
// XXX should handle packageName != null by dumping only install data that
// the given package is involved with.
if (dumpState.onTitlePrinted()) pw.println();
mInstallerService.dump(new IndentingPrintWriter(pw, " ", 120));
}
}
private void dumpProto(FileDescriptor fd) {

View File

@@ -4777,7 +4777,7 @@ final class Settings {
pw.print(" notLaunched=");
pw.print(ps.getNotLaunched(user.id));
pw.print(" enabled=");
pw.println(ps.getEnabled(user.id));
pw.print(ps.getEnabled(user.id));
pw.print(" instant=");
pw.println(ps.getInstantApp(user.id));
String lastDisabledAppCaller = ps.getLastDisabledAppCaller(user.id);