Fix system server crash during movePackage

After reducing package parsing times, we use cached PackageLite
instead of parsing on demand. Therefore, this cached PackageLite
shouldn't be null in normal case. Since movePackage flow doesn't
have a valid PackageLite, the NPE results in system server crash.

Parse and cache PackageLite for movePackage case, and add null
check to avoid the crash.

Bug: 175148169
Test: atest AdoptableHostTest
Change-Id: I3e54adc2f3b5f87ea6a6f3109aa138f3c93dcfd2
2 files changed