shadows/framework/src/main/java/org/robolectric/shadows/ShadowDevicePolicyManager.java
public void setApplicationRestrictions(String packageName, Bundle applicationRestrictions) {
    applicationRestrictionsMap.put(packageName, new Bundle(applicationRestrictions));
  }
public void setApplicationRestrictions(String packageName, Bundle applicationRestrictions) {
    applicationRestrictionsMap.put(packageName, new Bundle(applicationRestrictions));
  }
Sets the application restrictions of the {@code packageName}.

<p>The new {@code applicationRestrictions} always completely overwrites any existing ones.