Automatic system updates
The following option has been added in Android 6.0 and its main purpose is to allow device owners to auto-accept a system update:
DevicePolicyManager.setSystemUpdatePolicy (ComponentName admin, SystemUpdatePolicy policy)
SystemUpdatePolicy
has been added as well, and you can choose from three options:
TYPE_INSTALL_AUTOMATIC
: update as soon as you get an updateTYPE_INSTALL_WINDOWED
: update should be done within a timed system maintenance and only then, just for 30 days and then return to normal behaviorTYPE_POSTPONE
: postpone updates for up to 30 days and then return to normal behavior afterwards
This can come in handy if you have devices such as showcase tablets or kiosk mode devices, where the update should not mess with the devices' work.