Revert "Migrate buildinfo.sh script into Soong"
Revert submission 3004875-buildinfo_prop_soong
Reason for revert: DroidMonitor-triggered revert due to breakage b/331462869
Reverted changes: /q/submissionid:3004875-buildinfo_prop_soong
Bug: 331462869
Change-Id: Ib8bbbad29a4ad7b800e6bd1a67a401c2225b78cb
diff --git a/android/config.go b/android/config.go
index 18f89fb..10c30d4 100644
--- a/android/config.go
+++ b/android/config.go
@@ -114,8 +114,6 @@
GenerateDocFile
)
-const testKeyDir = "build/make/target/product/security"
-
// SoongOutDir returns the build output directory for the configuration.
func (c Config) SoongOutDir() string {
return c.soongOutDir
@@ -843,10 +841,6 @@
return String(c.productVariables.BuildId)
}
-func (c *config) DisplayBuildNumber() bool {
- return Bool(c.productVariables.DisplayBuildNumber)
-}
-
// BuildNumberFile returns the path to a text file containing metadata
// representing the current build's number.
//
@@ -858,23 +852,6 @@
return PathForOutput(ctx, String(c.productVariables.BuildNumberFile))
}
-// BuildHostnameFile returns the path to a text file containing metadata
-// representing the current build's host name.
-func (c *config) BuildHostnameFile(ctx PathContext) Path {
- return PathForOutput(ctx, String(c.productVariables.BuildHostnameFile))
-}
-
-// BuildThumbprintFile returns the path to a text file containing metadata
-// representing the current build's thumbprint.
-//
-// Rules that want to reference the build thumbprint should read from this file
-// without depending on it. They will run whenever their other dependencies
-// require them to run and get the current build thumbprint. This ensures they
-// don't rebuild on every incremental build when the build thumbprint changes.
-func (c *config) BuildThumbprintFile(ctx PathContext) Path {
- return PathForOutput(ctx, String(c.productVariables.BuildThumbprintFile))
-}
-
// DeviceName returns the name of the current device target.
// TODO: take an AndroidModuleContext to select the device name for multi-device builds
func (c *config) DeviceName() string {
@@ -896,10 +873,6 @@
return c.productVariables.DeviceProduct != nil
}
-func (c *config) DeviceAbi() []string {
- return c.productVariables.DeviceAbi
-}
-
func (c *config) DeviceResourceOverlays() []string {
return c.productVariables.DeviceResourceOverlays
}
@@ -908,10 +881,6 @@
return c.productVariables.ProductResourceOverlays
}
-func (c *config) PlatformDisplayVersionName() string {
- return String(c.productVariables.Platform_display_version_name)
-}
-
func (c *config) PlatformVersionName() string {
return String(c.productVariables.Platform_version_name)
}
@@ -1069,7 +1038,7 @@
if defaultCert != "" {
return PathForSource(ctx, filepath.Dir(defaultCert))
}
- return PathForSource(ctx, testKeyDir)
+ return PathForSource(ctx, "build/make/target/product/security")
}
func (c *config) DefaultAppCertificate(ctx PathContext) (pem, key SourcePath) {
@@ -1081,18 +1050,10 @@
return defaultDir.Join(ctx, "testkey.x509.pem"), defaultDir.Join(ctx, "testkey.pk8")
}
-func (c *config) BuildKeys() string {
- defaultCert := String(c.productVariables.DefaultAppCertificate)
- if defaultCert == "" || defaultCert == filepath.Join(testKeyDir, "testkey") {
- return "test-keys"
- }
- return "dev-keys"
-}
-
func (c *config) ApexKeyDir(ctx ModuleContext) SourcePath {
// TODO(b/121224311): define another variable such as TARGET_APEX_KEY_OVERRIDE
defaultCert := String(c.productVariables.DefaultAppCertificate)
- if defaultCert == "" || filepath.Dir(defaultCert) == testKeyDir {
+ if defaultCert == "" || filepath.Dir(defaultCert) == "build/make/target/product/security" {
// When defaultCert is unset or is set to the testkeys path, use the APEX keys
// that is under the module dir
return pathForModuleSrc(ctx)
@@ -1151,10 +1112,6 @@
return Bool(c.productVariables.Eng)
}
-func (c *config) BuildType() string {
- return String(c.productVariables.BuildType)
-}
-
// DevicePrimaryArchType returns the ArchType for the first configured device architecture, or
// Common if there are no device architectures.
func (c *config) DevicePrimaryArchType() ArchType {
@@ -2129,19 +2086,3 @@
func (c *config) BuildIgnoreApexContributionContents() []string {
return c.productVariables.BuildIgnoreApexContributionContents
}
-
-func (c *config) ProductLocales() []string {
- return c.productVariables.ProductLocales
-}
-
-func (c *config) ProductDefaultWifiChannels() []string {
- return c.productVariables.ProductDefaultWifiChannels
-}
-
-func (c *config) BoardUseVbmetaDigestInFingerprint() bool {
- return Bool(c.productVariables.BoardUseVbmetaDigestInFingerprint)
-}
-
-func (c *config) OemProperties() []string {
- return c.productVariables.OemProperties
-}