Merge "Add accessor function for bool product variables." into main
diff --git a/android/variable.go b/android/variable.go
index 307deaf..ebc58b4 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -618,6 +618,14 @@
}
}
+func (this *ProductVariables) GetBuildFlagBool(flag string) bool {
+ val, ok := this.BuildFlags[flag]
+ if !ok {
+ return false
+ }
+ return val == "true"
+}
+
// ProductConfigContext requires the access to the Module to get product config properties.
type ProductConfigContext interface {
Module() Module