shadows/framework/src/main/java/org/robolectric/shadows/ShadowDevicePolicyManager.java
@Implementation(minSdk = LOLLIPOP)
  protected boolean setPermittedAccessibilityServices(
      ComponentName admin, List<String> packageNames) {
    enforceDeviceOwnerOrProfileOwner(admin);
    permittedAccessibilityServices = packageNames;
    return true;
  }
@Implementation(minSdk = LOLLIPOP)
  protected boolean setPermittedAccessibilityServices(
      ComponentName admin, List<String> packageNames) {
    enforceDeviceOwnerOrProfileOwner(admin);
    permittedAccessibilityServices = packageNames;
    return true;
  }
@ Implementation ( minSdk = LOLLIPOP ) protected boolean setPermittedAccessibilityServices ( ComponentName admin , List < String > packageNames ) { enforceDeviceOwnerOrProfileOwner ( admin ) ; permittedAccessibilityServices = packageNames ; return true ; }
Sets permitted accessibility services.

<p>The API can be called by either a profile or device owner.

<p>This method does not check already enabled non-system accessibility services, so will always
set the restriction and return true.
Sets permitted accessibility services .