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 |
int |
POLICY_APPLY_ONLY
Use with |
int |
POLICY_CHECKS_ONLY
Use with |
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.
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
.
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
.
Constant Value: 3 (0x00000003)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2019-12-27 UTC.