Revert "Disable hiddenapi check for building from prebuilts."

Revert submission 2761821-suppress-hiddenapi-check

Reason for revert: have some typo - break next build

Reverted changes: /q/submissionid:2761821-suppress-hiddenapi-check
(cherry picked from https://android-review.googlesource.com/q/commit:bb6b813b1de26306e1deb3b3d8842af41f4b5847)
Merged-In: I9fce1e1a9389d58928f1eec50c0eaf016f5f63ac
Change-Id: I9fce1e1a9389d58928f1eec50c0eaf016f5f63ac
This commit is contained in:
Alyssa Ketpreechasawat
2023-10-06 03:42:34 +00:00
committed by Cherrypicker Worker
parent 839031363b
commit a54231425c
2 changed files with 2 additions and 13 deletions

View File

@@ -167,8 +167,7 @@ func (c Config) RunningInsideUnitTest() bool {
}
// DisableHiddenApiChecks returns true if hiddenapi checks have been disabled.
// For 'eng' target variant hiddenapi checks are disabled by default for performance optimisation
// Hiddenapi checks are also disabled when RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE is set to false
// For 'eng' target variant hiddenapi checks are disabled by default for performance optimisation,
// but can be enabled by setting environment variable ENABLE_HIDDENAPI_FLAGS=true.
// For other target variants hiddenapi check are enabled by default but can be disabled by
// setting environment variable UNSAFE_DISABLE_HIDDENAPI_FLAGS=true.
@@ -177,8 +176,7 @@ func (c Config) RunningInsideUnitTest() bool {
func (c Config) DisableHiddenApiChecks() bool {
return !c.IsEnvTrue("ENABLE_HIDDENAPI_FLAGS") &&
(c.IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") ||
Bool(c.productVariables.Eng) ||
!c.ReleaseDefaultModuleBuildFromSource())
Bool(c.productVariables.Eng))
}
// MaxPageSizeSupported returns the max page size supported by the device. This
@@ -223,13 +221,6 @@ func (c Config) ReleaseAconfigFlagDefaultPermission() string {
return c.config.productVariables.ReleaseAconfigFlagDefaultPermission
}
// The flag indicating behavior for the tree wrt building modules or using prebuilts
// derived from RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE
func (c Config) ReleaseDefaultModuleBuildFromSource() bool {
return c.config.productVariables.ReleaseDefaultModuleBuildFromSource == nil ||
Bool(c.config.productVariables.ReleaseDefaultModuleBuildFromSource)
}
// A DeviceConfig object represents the configuration for a particular device
// being built. For now there will only be one of these, but in the future there
// may be multiple devices being built.