Enforce cross profile calendar policies in one place.
Instead of checking dpm policy in primary user and settings value
in managed profile user, we'd better check them all in primary user.
Calendar provider will need INTERACT_ACROSS_USER_FULL to access
settings provider and this permission is not granted to any app
in privapp-permissions-platform.xml. So I think it's safer to
change isPackageAllowedToAccessCalendar to check both
admin policy & settings value.
Bug: 123629973
Test: atest CalendarProvider2Test
Change-Id: I632204290454c2a00a2348333064e79a02557d9a
4 files changed