Fix a NPE in PackageInstaller

We were returing a null PermissionGroup object to a place
where this was not expected by design. The reason for that
was an incorrect fix for b/28241097. This CL reverts the
introduced regression and adds a null check just in case.

bug:27102458

Change-Id: I78f8107d0adf6bb2da5d8e11c5f3cf3c00fe36a2
2 files changed