Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d1a18160 authored by Azhara Assanova's avatar Azhara Assanova
Browse files

[AAPM] Disallow Install Unknown Sources Hook

Implement an AdvancedProtectionHook class for disallowing install unknown
sources via DevicePolicyManager restriction
DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY.

To do the above, this change introduces two hidden APIs in
DevicePolicyManager that allow setting global restrictions for system
components. They mimic the existing hidden APIs for setting local
restricitons for system components.

Bug: 369361373
Test: manually tested the restriction is set even after reboot
Test: atest AdvancedProtectionManagerTest
Test: atest AdvancedProtectionServiceTest
Test: atest DisallowInstallUnknownSourcesTest
Flag: android.security.aapm_feature_disable_install_unknown_sources
Change-Id: I80722ee489a79a316cd54f171a180b609effd80f
parent 913e30ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment