summaryrefslogtreecommitdiff
path: root/dynamic_partition_control_interface.h
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2019-10-17 14:34:22 -0700
committerTreehugger Robot <treehugger-gerrit@google.com>2019-10-23 22:36:01 +0000
commit6e0d0ef979d2d0dd99c586f83fd7edbf356c63c3 (patch)
tree59f0d470c4209905fed702ff3caa410a67b8aa40 /dynamic_partition_control_interface.h
parent6c70b934f24d3d1b14795f34e8504e2a05f85c95 (diff)
Sanity check that no downgrade package on launch VAB device.
If the OTA server were misconfigured, OTA client can reject the OTA if the current device launches with VAB but is trying to update to a build that does not support VAB. This operation is only permitted on retrofit devices. Bug: 138258570 Test: pass Change-Id: I159ff2edc81555fee8bfa6296e0c6c969f2f4f6d
Diffstat (limited to 'dynamic_partition_control_interface.h')
-rw-r--r--dynamic_partition_control_interface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/dynamic_partition_control_interface.h b/dynamic_partition_control_interface.h
index 9c4c2e82..9c18973f 100644
--- a/dynamic_partition_control_interface.h
+++ b/dynamic_partition_control_interface.h
@@ -36,6 +36,7 @@ struct FeatureFlag {
constexpr explicit FeatureFlag(Value value) : value_(value) {}
constexpr bool IsEnabled() const { return value_ != Value::NONE; }
constexpr bool IsRetrofit() const { return value_ == Value::RETROFIT; }
+ constexpr bool IsLaunch() const { return value_ == Value::LAUNCH; }
private:
Value value_;