Class ShadowRoleManager

    • Constructor Detail

      • ShadowRoleManager

        public ShadowRoleManager()
    • Method Detail

      • isRoleHeld

        @Implementation
        protected boolean isRoleHeld​(@NonNull
                                     String roleName)
        Check whether the calling application is holding a particular role.

        Callers can add held roles via addHeldRole(String)

        Parameters:
        roleName - the name of the role to check for
        Returns:
        whether the calling application is holding the role
      • removeHeldRole

        public void removeHeldRole​(@NonNull
                                   String roleName)
      • isRoleAvailable

        @Implementation
        protected boolean isRoleAvailable​(@NonNull
                                          String roleName)
        Check whether a particular role is available on the device.

        Callers can add available roles via addAvailableRole(String)

        Parameters:
        roleName - the name of the role to check for
        Returns:
        whether the role is available
      • removeAvailableRole

        public void removeAvailableRole​(@NonNull
                                        String roleName)