Make distinction between null and empty IM list.

* null means no policy is enfrced, any IM is allowed.
* empty means no IMs is allowed except system IMs.

Bug: 211063191
Test: manual, CtsVerifier/BYOD managed provisioning/Policy transparency
Change-Id: I35665a547c1e99129c70c834083b3183ba00208d
This commit is contained in:
Pavel Grafov
2022-02-08 14:46:38 +00:00
parent 949ee0518c
commit 0b3c4b8a53

View File

@@ -140,7 +140,7 @@ public class AvailableVirtualKeyboardFragment extends DashboardFragment
// allowed by organization. Doing so will allow the user to disable the input method and
// remain complaint with the organization's policy. Once disabled, the input method
// cannot be re-enabled because it is not in the permitted list.
final boolean isAllowedByOrganization = permittedList.isEmpty()
final boolean isAllowedByOrganization = permittedList == null
|| permittedList.contains(imi.getPackageName())
|| enabledImis.contains(imi);
final InputMethodPreference pref = new InputMethodPreference(prefContext, imi,