From d163d4d7f501d00f59c73e853307ae0b24c068ac Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 12 Oct 2021 16:47:43 +0900 Subject: [PATCH] Add the device config GenerateAidlNdkPlatformBackend The config is used to force the generation of the AIDL ndk_platform backend which will eventually be removed in favor of the ndk backend. The switch is needed as an escape hatch for some devices whose BSP (outsourced and thus hardly modifiable) depends on the ndk_backend libraries. Bug: 161456198 Test: m Merged-In: Ie11ca62be05754bb2593da16e1380103c670b393 Change-Id: Ie11ca62be05754bb2593da16e1380103c670b393 (cherry picked from commit 65d9718328856b649efc76abf9ac4b6d0a2adcf6) --- android/config.go | 4 ++++ android/variable.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/android/config.go b/android/config.go index c8d7cfdc9..6060bce7c 100644 --- a/android/config.go +++ b/android/config.go @@ -1578,6 +1578,10 @@ func (c *deviceConfig) SepolicyFreezeTestExtraPrebuiltDirs() []string { return c.config.productVariables.SepolicyFreezeTestExtraPrebuiltDirs } +func (c *deviceConfig) GenerateAidlNdkPlatformBackend() bool { + return c.config.productVariables.GenerateAidlNdkPlatformBackend +} + // The ConfiguredJarList struct provides methods for handling a list of (apex, jar) pairs. // Such lists are used in the build system for things like bootclasspath jars or system server jars. // The apex part is either an apex name, or a special names "platform" or "system_ext". Jar is a diff --git a/android/variable.go b/android/variable.go index 5c54e9436..baa6dfac3 100644 --- a/android/variable.go +++ b/android/variable.go @@ -419,6 +419,8 @@ type productVariables struct { SepolicyFreezeTestExtraDirs []string `json:",omitempty"` SepolicyFreezeTestExtraPrebuiltDirs []string `json:",omitempty"` + + GenerateAidlNdkPlatformBackend bool `json:",omitempty"` } func boolPtr(v bool) *bool {