diff options
Diffstat (limited to 'android/config.go')
-rw-r--r-- | android/config.go | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/android/config.go b/android/config.go index 936d1d3ae..10c30d4df 100644 --- a/android/config.go +++ b/android/config.go @@ -18,7 +18,6 @@ package android // product variables necessary for soong_build's operation. import ( - "android/soong/shared" "encoding/json" "fmt" "os" @@ -30,6 +29,8 @@ import ( "sync" "unicode" + "android/soong/shared" + "github.com/google/blueprint" "github.com/google/blueprint/bootstrap" "github.com/google/blueprint/pathtools" @@ -167,7 +168,10 @@ func (c Config) DisableHiddenApiChecks() bool { // Thus, verify_overlaps is disabled when RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE is set to false. // TODO(b/308174018): Re-enable verify_overlaps for both builr from source/mainline prebuilts. func (c Config) DisableVerifyOverlaps() bool { - return c.IsEnvTrue("DISABLE_VERIFY_OVERLAPS") || !c.ReleaseDefaultModuleBuildFromSource() + if c.IsEnvFalse("DISABLE_VERIFY_OVERLAPS") && c.ReleaseDisableVerifyOverlaps() { + panic("The current release configuration does not support verify_overlaps. DISABLE_VERIFY_OVERLAPS cannot be set to false") + } + return c.IsEnvTrue("DISABLE_VERIFY_OVERLAPS") || c.ReleaseDisableVerifyOverlaps() || !c.ReleaseDefaultModuleBuildFromSource() } // MaxPageSizeSupported returns the max page size supported by the device. This @@ -208,6 +212,10 @@ func (c Config) ReleaseDefaultModuleBuildFromSource() bool { Bool(c.config.productVariables.ReleaseDefaultModuleBuildFromSource) } +func (c Config) ReleaseDisableVerifyOverlaps() bool { + return c.config.productVariables.GetBuildFlagBool("RELEASE_DISABLE_VERIFY_OVERLAPS_CHECK") +} + // Enables flagged apis annotated with READ_WRITE aconfig flags to be included in the stubs // and hiddenapi flags so that they are accessible at runtime func (c Config) ReleaseExportRuntimeApis() bool { @@ -638,9 +646,12 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error) "framework-adservices": {}, "framework-appsearch": {}, "framework-bluetooth": {}, + "framework-configinfrastructure": {}, "framework-connectivity": {}, "framework-connectivity-t": {}, + "framework-devicelock": {}, "framework-graphics": {}, + "framework-healthfitness": {}, "framework-location": {}, "framework-media": {}, "framework-mediaprovider": {}, @@ -1342,13 +1353,16 @@ func (c *config) PrevVendorApiLevel() string { panic(fmt.Errorf("Cannot parse vendor API level %s to an integer: %s", c.VendorApiLevel(), err)) } - if vendorApiLevel < 202404 || vendorApiLevel%100 != 4 { - panic("Unknown vendor API level " + c.VendorApiLevel()) - } // The version before trunk stable is 34. if vendorApiLevel == 202404 { return "34" } + if vendorApiLevel >= 1 && vendorApiLevel <= 34 { + return strconv.Itoa(vendorApiLevel - 1) + } + if vendorApiLevel < 202404 || vendorApiLevel%100 != 4 { + panic("Unknown vendor API level " + c.VendorApiLevel()) + } return strconv.Itoa(vendorApiLevel - 100) } @@ -1932,6 +1946,10 @@ func (c *deviceConfig) GenerateAidlNdkPlatformBackend() bool { return c.config.productVariables.GenerateAidlNdkPlatformBackend } +func (c *deviceConfig) AconfigContainerValidation() string { + return c.config.productVariables.AconfigContainerValidation +} + func (c *config) IgnorePrefer32OnDevice() bool { return c.productVariables.IgnorePrefer32OnDevice } |