Commit Graph

5 Commits

Author SHA1 Message Date
Hai Zhang
71d70360b2 Add flags parameter for managing role holders.
This change allows passing a flag parameter when managing role
holders, including a DONT_KILL_APP flag that can be used by the
request role dialog.

Bug: 123429697
Test: manual
Change-Id: I57b690dcdfbf6fd13940cf45d392a48adeccdfaa
2019-02-05 15:37:40 -08:00
Eugene Susla
3496906ffd Cleanup appop/permissions state on sms kill switch toggle
Bug: 110098858
Test: manually remove sms appops from an app, then toggle kill switch and
ensure appop switched to default
Change-Id: I17dcaab7dcef28f6ed7e2b4621d669f24aa8a7ad
2019-02-05 02:10:31 +00:00
Hai Zhang
b295ac4793 Fix role granting flow.
This change fixes various issues realted to the role granting
flow, including allowing permission controller to be granted
SET_PREFERRED_APPLICATIONS for roles, granting
MANAGE_ROLE_HOLDERS permission to shell, and improving
RoleUserState XML parsing.

Bug: 110557011
Test: build
Change-Id: Ia095580ad497af9cf7b29e6bedab70046b09d542
2018-11-20 01:09:33 +00:00
Eugene Susla
a4200f82ed Groundwork for default grants in RoleController
This lays out some plumbing for moving the DfaultPermissionGrantPolicy grants
over to RoleControllerService

Test: enable DEBUG flag and `adb logcat | grep -n5 Role`
Change-Id: Ib0a15b7c839aeccb8848423ddaec38103808bdd6
2018-11-14 16:37:27 -08:00
Hai Zhang
b777668584 Add RoleManager into the system.
A role is a unique name within the system associated with certain
privileges. There can be multiple applications qualifying for a role,
but only a subset of them can become role holders. To qualify for a
role, an application must meet certain requirements, including
defining certain components in its manifest. Then the application will
need user consent to become the role holder.

Upon becoming a role holder, the application may be granted certain
privileges that are role specific. When an application loses its role,
these privileges will also be revoked.

Bug: 110557011
Test: build
Change-Id: Icd453a3b032857a8fd157048de8b9609f04e28b8
2018-10-27 11:14:32 -07:00