Fix issue where install restrictions were not properly enforced.

Bug: 293959514
Test: manual && atest CtsPackageInstallTestCases:UserRestrictionInstallTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:31bf927202796339a5713e74cedc2ff9cda115fb)

Merged-In: I6c9ce43a698580d768a80e9060e0f075e3ab14d1
Change-Id: I6c9ce43a698580d768a80e9060e0f075e3ab14d1
1 file changed