Skip generating missing permission state for unknown permissions.

Fixes the NullPointerException. Unknown permissions was skipped in
restorePermissionState() when handling changing regarding platform
permissions, so it's safe to skip it when generating missing
(platform) permission state as well.

Test: Flash a recent build without this fix
Test: Install an app which uses an unknown permission
Test: Manually remove app entry in runtime-permissions.xml with root
Test: Reboot device and confirm system server crash and stacktrace
Test: Flash a build with this fix, without clearing data
Test: Confirm system boots, log shows missing permission state was
Test: generated for the app and unknown permission was skipped
Bug: 158860316
Change-Id: Idfc9b5bf6c69772d41ccf781b84a4d101ed1277d
1 file changed