Disable IME on the personal profile
Background:
* On organization-owned devices with managed profiles,
the work admin needs to be able to restrict
IMEs on the personal side.
* They should be able to restrict IMEs without having
visibility on the personal side. This is done by
introducing the ability for the admin to set the
permitted IMEs on the parent profile.
Changes:
* Update DPM permitted input methods apis to be
callable on the parent profile.
* Update RestrictedLockUtilsInternal to check the
permitted input methods on the parent profile
Manual test steps:
* Set up organization-owned device and download
IME apps on the personal profile
* Download TestDPC
* Select prefence Set input methods on parent
* Select allow only system IMEs and check Settings to see
all non-system IMEs are disabled.
* Select allow all IME apps and check Settings to see
no IME apps are disabled.
Bug: 170459562
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.settingslib.RestrictedLockUtilsTest
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPermittedInputMethods
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testPermittedInputMethodsLogged
Change-Id: Iecd19adb6d3ca064a8d7f9ff0c1c41aa64bd6ace
5 files changed