From 3fefc23391b5a2bf24cbaecf30dbb45c3bd78aea Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 4 Dec 2023 17:35:15 +0000 Subject: [PATCH] Add accessor function for bool product variables. Test: treehugger Change-Id: If6a59ba140d28696d1411ee5b5fcfc4fc0e97926 --- android/variable.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/variable.go b/android/variable.go index 307deaf32..ebc58b490 100644 --- a/android/variable.go +++ b/android/variable.go @@ -618,6 +618,14 @@ func (v *ProductVariables) SetDefaultConfig() { } } +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