pm: Modify getPackage() to only return non-null packages

Bug: 74214574
Test: successfully flash and boot from build 4504078 to ToT master
Change-Id: I458db34a441dabed3cad7bd8fc9769bad49b3b30
(cherry picked from commit b6c042f4bb65cf322151e50a3090e4b1f6304b2a)
1 file changed