This change prevents an NPE that was occurring when the package
for a given setting was assumed to be non-null while dumping
package information for e.g. adb shell dumpsys package
Test: manual - adb shell dumpsys package is no longer malformed
Change-Id: Idaf6a6b82f1fb450848faa15f19ee08085605bdb
Fixes:
79268525
pw.print(prefix); pw.print(" pkgFlags="); printFlags(pw, ps.pkgFlags, FLAG_DUMP_SPEC);
pw.println();
- if (ps.pkg.mOverlayTarget != null) {
+ if (ps.pkg != null && ps.pkg.mOverlayTarget != null) {
pw.print(prefix); pw.print(" overlayTarget="); pw.println(ps.pkg.mOverlayTarget);
pw.print(prefix); pw.print(" overlayCategory="); pw.println(ps.pkg.mOverlayCategory);
}