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
diff --git a/dynamic_partition_control_interface.h b/dynamic_partition_control_interface.h
index 9c4c2e8..9c18973 100644
--- a/dynamic_partition_control_interface.h
+++ b/dynamic_partition_control_interface.h
@@ -36,6 +36,7 @@
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_;