Use IsEnvTrue for USE_BAZEL_ANALYSIS check.

Make this consistent with the check in soong_ui: https://cs.android.com/android/platform/superproject/+/master:build/soong/ui/build/config.go;l=930;drc=0b55bdb7af7ab2a039fefc88086f0ee41c00ac69

Change-Id: I8d57fafa954ce3dd041cc38250819531125d81ac
Test: TH
This commit is contained in:
Jingwen Chen
2021-06-17 07:02:15 +00:00
parent 2c891873d6
commit 442b1a4070

View File

@@ -205,7 +205,7 @@ func (m noopBazelContext) BuildStatementsToRegister() []bazel.BuildStatement {
func NewBazelContext(c *config) (BazelContext, error) {
// TODO(cparsons): Assess USE_BAZEL=1 instead once "mixed Soong/Bazel builds"
// are production ready.
if c.Getenv("USE_BAZEL_ANALYSIS") != "1" {
if !c.IsEnvTrue("USE_BAZEL_ANALYSIS") {
return noopBazelContext{}, nil
}