The new Android Lollipop API provides a new pair of methods for getting and setting restrictions on other apps: DevicePolicyManager.getApplicationRestrictions and DevicePolicyManager.setApplicationRestrictions
There's an example of them being used in the BasicManagedProfile sample app to set restrictions on the Chrome app by passing a set of key/value pairs that seem to correlate to the Chrome's published policy list. This works perfectly for me.
But I can't find any documentation on any other apps that can be restricted in this way. Does anyone know of any other apps that can be restricted with these methods, and the keys that can be set?
DevicePolicyManager.getApplicationRestrictions only seems to return the restrictions you've already set for that app, not a list of all available restrictions. I also tried using RestrictionsManager.getManifestRestrictions on Chrome but this returns an empty list, so I think this is something different.
Bundle appRestrictions=manager.getApplicationRestrictions(BasicDeviceAdminReceiver.getComponentName(getActivity()), "com.adobe.reader"); Log.d("","*$%^"+appRestrictions.toString());
that prints 'Bundle[EMPTY_PARCEL]' – Dituri