Skip to content
Commit 137f496a authored by Jay Thomas Sullivan's avatar Jay Thomas Sullivan
Browse files

[Role Logic Move] Migrate isVisible behavior

The goal of this change is to move any remaining PermissionController-
specific dependencies out of RoleControllerServiceImpl. This includes
the following two methods calls:

- RoleUiBehaviorUtils::isVisibleAsUser
- RoleUiBehaviorUtils::isApplicationVisibleAsUser

...which in turn call RoleUiBehavior::isVisibleAsUser and
RoleUiBehavior::isApplicationVisibleAsUser, which are implemented in
various RoleUiBehavior implementations.

Move all of this logic into the role-controller module. After this
change, RoleControllerServiceImpl now calls:

- Role::isVisibleAsUser
- Role::isApplicationVisibleAsUser

...which in turn call RoleBehavior::isVisibleAsUser and
RoleBehavior::isApplicationVisibleAsUser, which are implemented in
various RoleBehavior implementations.(All of these classes are in
role-controller.)

Also, our RoleUiBehavior implementations fetch app resources. But,
resources are app-specific, some of our behaviors need
PermissionController-specific resources, and those behaviors currently
assume that PermissionController is the "current" app, and therefore
this will break if we move this code to SystemServer. So, change the
behaviors to explicitly fetch the resource from SystemServer or
PermissionController as needed (now encapsulated within
VisibilityMixin), without assuming the current app.

Bug: 309139048
Test: atest CtsRoleTestCases
Change-Id: I535239c8ad869e70ad5c76f95925979dff16eb71
parent 83c155a4
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