I am developing a device owner app. In the app I'm trying to gain the SET_TIME permission by using:
DeviceOwnerHelper.getInstance().getDevicePolicyManager().setPermissionGrantState(new ComponentName(this, DeviceOwnerReceiver.class), getApplicationContext().getPackageName(), Manifest.permission.SET_TIME, DevicePolicyManager.PERMISSION_GRANT_STATE_GRANTED);
But this method does not work? Please help!