Skip to content
Commit 0b930eeb authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Todd Kennedy
Browse files

Fix NPE in package manager when asserting overlays

When a newer version of a package exists on /data, the package manager
will skip scanning the outdated version on /system. This means the
PackageSetting.pkg corresponding to the outdated version will be null.

This will cause an NPE when asserting that an upgraded overlay is
non-static (<overlay isStatic="false">). Prevent the exception by
checking for null, and, if needed, explicitly scan the outdated version
of the overlay within the scope of the assertion.

Bug: 78871949
Test: manual (have a pre-installed overlay, adb install a newer version, reboot)
Change-Id: I74d12c913705309dbb34f837b6806bb0fef25086
parent 35424828
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment