Skip to content
Commit 6fb8a02b authored by Alex Kershaw's avatar Alex Kershaw
Browse files

Support setting the _PROFILES app-op

Add public broadcast
CrossProfileApps#ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED =
"android.content.pm.action.CAN_INTERACT_ACROSS_PROFILES_CHANGED" and
hidden API CrossProfile#setInteractAcrossProfilesAppOp.

This new hidden API should be used rather than setting the app-op
directly. It ensures that the app-op is set for each user in the profile
group and that the new broadcast is sent when an app's ability to
interact across profiles has changed.

Unit tests are added alongside these changes. CTSVerifier changes should
be subsequently added to enforce the behaviour of the new public
broadcast.

Test: atest frameworks/base/services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose
BUG: 136249261
BUG: 147490565
Change-Id: Iad190a4b972da40bae7ffcf215b8962e8225f4af
parent 9d7d8264
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment