[AAPM] DisallowInstallUnknownSources: set state after disable

After AAPM is disabled, all disallow install unknown sources toggles
should be disabled. This is done by setting the
OP_REQUEST_INSTALL_PACKAGES app op to MODE_ERRORED for all users and
packages with REQUEST_INSTALL_PACKAGES permission.

Bug: 369361373
Test: manually enabled, disabled, and observed the toggle is disabled
Test: atest DisallowInstallUnknownSourcesTest
Flag: android.security.aapm_feature_disable_install_unknown_sources
Change-Id: I7ae8777bd8a254ee80239bf93e916dce155717f3
1 file changed