diff options
author | MÃ¥rten Kongstad <marten.kongstad@sony.com> | 2018-02-21 10:43:13 +0100 |
---|---|---|
committer | Todd Kennedy <toddke@google.com> | 2018-05-08 16:07:01 -0700 |
commit | 0b930eeb61b97e19f6345435ab33b3a6e26fca04 (patch) | |
tree | c14284d3ac70ed2cabcbfaa8b6b1b6e5f6b2f07a /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 35424828755937b9457f5f8c0972793b4b6945ff (diff) |
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions