How to set the value to the "WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN" setting present in MArshMallow

I tried to set the value WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWNin MarshMallow using SetGlobalSetting APIwhich is in the Device Policy Manager class. But I get a security exception every time I try to call SetGlobalSetting. I actually use reflection to call this API. Whenever I try to call a method using reflection as follows, I get a security exception

Object o = method.invoke(receiver, args);

I am not sure what the problem is. I found that the SetGlobalSetting API has String parameters. However, the installation "WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN"expects an integer value. Can someone help me on this.

+4
source share

Source: https://habr.com/ru/post/1624215/


All Articles