From 5bac3b6f2a47a5525bb76a3d767f629483997635 Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Fri, 25 Aug 2023 21:29:46 +0900 Subject: [PATCH] Use board api level for seapp coredomain check Rather than PRODUCT_SHIPPING_API_LEVEL, use board api level (BOARD_API_LEVEL or BOARD_SHIPPING_API_LEVEL) to determine whether we check coredomain violations or not. Also provides a Makefile variable to override the flag, for targets that want to turn on the check optionally. Bug: 280547417 Test: see build command of vendor_seapp_contexts Change-Id: Ic7c4a53d0df0cccd45eb699e236a92c8c0bc2d56 --- android/config.go | 4 ++++ android/variable.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/android/config.go b/android/config.go index 3e7bb1426..0b15c79c0 100644 --- a/android/config.go +++ b/android/config.go @@ -2081,3 +2081,7 @@ func (c *config) SetApiLibraries(libs []string) { func (c *config) GetApiLibraries() map[string]struct{} { return c.apiLibraries } + +func (c *deviceConfig) CheckVendorSeappViolations() bool { + return Bool(c.config.productVariables.CheckVendorSeappViolations) +} diff --git a/android/variable.go b/android/variable.go index ca9a221b1..8805fe5a2 100644 --- a/android/variable.go +++ b/android/variable.go @@ -486,6 +486,8 @@ type ProductVariables struct { ReleaseAconfigFlagDefaultPermission string `json:",omitempty"` KeepVndk *bool `json:",omitempty"` + + CheckVendorSeappViolations *bool `json:",omitempty"` } func boolPtr(v bool) *bool {