Modify setApplicationHidden and isApplicationHidden APIs
* Introduced new logic that allows the profile owner of an
organization-owned device (COPE PO) to hide/unhide system
apps in the personal profile.
* Modified both APIs to be callable on the parent profile
instance if called by the COPE PO.
* When called by the COPE PO, the package provided
must be a system package, otherwise an IllegalArgument
Exception is thrown.
Bug: 147413198
Test: manual testing
atest com.android.server.devicepolicy.DevicePolicyManagerTest
atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testApplicationHidden
atest com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: I4fae8acee9f00e3b9c805f29cf826f917cda6abd
4 files changed