From 65d9718328856b649efc76abf9ac4b6d0a2adcf6 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 Change-Id: Ie11ca62be05754bb2593da16e1380103c670b393 --- android/config.go | 4 ++++ android/variable.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/android/config.go b/android/config.go index cd1ac31dc..99b1ad177 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 f489dd939..b7bc824b3 100644 --- a/android/variable.go +++ b/android/variable.go @@ -417,6 +417,8 @@ type productVariables struct { SepolicyFreezeTestExtraDirs []string `json:",omitempty"` SepolicyFreezeTestExtraPrebuiltDirs []string `json:",omitempty"` + + GenerateAidlNdkPlatformBackend bool `json:",omitempty"` } func boolPtr(v bool) *bool {