From 8e84648a637c69db354217ecad319190a6bb4ad5 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 2 Apr 2019 22:56:43 -0700 Subject: [PATCH] Export more config variables Export some more config variables that will be used to generate robolectric's build.prop file. Bug: 122331577 Test: m checkbuild Change-Id: I39f3436ed5d5c4e730dd3e1f86c840cf6358ec87 --- android/config.go | 16 ++++++++++++++++ android/variable.go | 20 ++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/android/config.go b/android/config.go index 2e0750b7b..84dd66fd1 100644 --- a/android/config.go +++ b/android/config.go @@ -501,6 +501,22 @@ func (c *config) PlatformSdkCodename() string { return String(c.productVariables.Platform_sdk_codename) } +func (c *config) PlatformSecurityPatch() string { + return String(c.productVariables.Platform_security_patch) +} + +func (c *config) PlatformPreviewSdkVersion() string { + return String(c.productVariables.Platform_preview_sdk_version) +} + +func (c *config) PlatformMinSupportedTargetSdkVersion() string { + return String(c.productVariables.Platform_min_supported_target_sdk_version) +} + +func (c *config) PlatformBaseOS() string { + return String(c.productVariables.Platform_base_os) +} + func (c *config) MinSupportedSdkVersion() int { return 16 } diff --git a/android/variable.go b/android/variable.go index 56ca666fa..21af31fb7 100644 --- a/android/variable.go +++ b/android/variable.go @@ -137,14 +137,18 @@ type productVariables struct { BuildNumberFromFile *string `json:",omitempty"` DateFromFile *string `json:",omitempty"` - Platform_version_name *string `json:",omitempty"` - Platform_sdk_version *int `json:",omitempty"` - Platform_sdk_codename *string `json:",omitempty"` - Platform_sdk_final *bool `json:",omitempty"` - Platform_version_active_codenames []string `json:",omitempty"` - Platform_version_future_codenames []string `json:",omitempty"` - Platform_vndk_version *string `json:",omitempty"` - Platform_systemsdk_versions []string `json:",omitempty"` + Platform_version_name *string `json:",omitempty"` + Platform_sdk_version *int `json:",omitempty"` + Platform_sdk_codename *string `json:",omitempty"` + Platform_sdk_final *bool `json:",omitempty"` + Platform_version_active_codenames []string `json:",omitempty"` + Platform_version_future_codenames []string `json:",omitempty"` + Platform_vndk_version *string `json:",omitempty"` + Platform_systemsdk_versions []string `json:",omitempty"` + Platform_security_patch *string `json:",omitempty"` + Platform_preview_sdk_version *string `json:",omitempty"` + Platform_min_supported_target_sdk_version *string `json:",omitempty"` + Platform_base_os *string `json:",omitempty"` DeviceName *string `json:",omitempty"` DeviceArch *string `json:",omitempty"`