Skip to content

Most visited

Recently visited

navigation

UpdatePolicy

UpdatePolicy

public class UpdatePolicy
extends Object

java.lang.Object
   ↳ com.google.android.things.update.UpdatePolicy


The UpdatePolicy is an immutable object that represents the combination of an UpdateManager policy and its options.

Summary

Nested classes

class UpdatePolicy.Builder

The Builder is used to construct new UpdatePolicy objects. 

Constants

int POLICY_APPLY_AND_REBOOT

Use with setPolicy(int) and performUpdateNow(int) to download and apply updates, followed by an automatic reboot of the device.

int POLICY_APPLY_ONLY

Use with setPolicy(int) and performUpdateNow(int) to download and apply updates.

int POLICY_CHECKS_ONLY

Use with setPolicy(int) and performUpdateNow(int) to check for software updates.

Inherited methods

From class java.lang.Object

Constants

POLICY_APPLY_AND_REBOOT

int POLICY_APPLY_AND_REBOOT

Use with setPolicy(int) and performUpdateNow(int) to download and apply updates, followed by an automatic reboot of the device.

See also:

Constant Value: 1 (0x00000001)

POLICY_APPLY_ONLY

int POLICY_APPLY_ONLY

Use with setPolicy(int) and performUpdateNow(int) to download and apply updates. The device is ready to be rebooted using reboot() when onStatusUpdate(UpdateManagerStatus) is called with a status of STATE_UPDATED_NEEDS_REBOOT.

See also:

Constant Value: 2 (0x00000002)

POLICY_CHECKS_ONLY

int POLICY_CHECKS_ONLY

Use with setPolicy(int) and performUpdateNow(int) to check for software updates. A software update is available when onStatusUpdate(UpdateManagerStatus) is called with a status of STATE_UPDATE_AVAILABLE.

See also:

Constant Value: 3 (0x00000003)

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)