Reland: Add NEED_AIDL_NDK_PLATFORM_BACKEND

The config variable 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: Iba8633263ae649af783e94b01f5c1b5c6e042948
Change-Id: I8b73a6a1e5169c35daf333316857b3c3b110a0f7
diff --git a/core/soong_config.mk b/core/soong_config.mk
index fd60b71..a48b4d8 100644
--- a/core/soong_config.mk
+++ b/core/soong_config.mk
@@ -271,6 +271,8 @@
 $(call add_json_list, SepolicyFreezeTestExtraDirs,         $(SEPOLICY_FREEZE_TEST_EXTRA_DIRS))
 $(call add_json_list, SepolicyFreezeTestExtraPrebuiltDirs, $(SEPOLICY_FREEZE_TEST_EXTRA_PREBUILT_DIRS))
 
+$(call add_json_bool, GenerateAidlNdkPlatformBackend, $(filter true,$(NEED_AIDL_NDK_PLATFORM_BACKEND)))
+
 $(call json_end)
 
 $(file >$(SOONG_VARIABLES).tmp,$(json_contents))