From c2970dd06f7b23179dddf71dd9041024cf743b26 Mon Sep 17 00:00:00 2001 From: Nelson Li Date: Wed, 19 Jun 2024 02:14:23 +0000 Subject: [PATCH] Rewrite `init_vendor` using select syntax The `select` syntax rewrite makes it more concise and easier to understand. Bug: 347605145 Test: m init_vendor Change-Id: I866bbe9360fdbdf69cac3c6a24bbe37306227755 --- init/Android.bp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/init/Android.bp b/init/Android.bp index 6526a934e..7b7a856e9 100644 --- a/init/Android.bp +++ b/init/Android.bp @@ -664,22 +664,10 @@ sh_binary { filename_from_src: true, } -soong_config_module_type { - name: "board_use_recovery_as_boot_phony", - module_type: "phony", - config_namespace: "ANDROID", - bool_variables: ["BOARD_USES_RECOVERY_AS_BOOT"], - properties: ["required"], -} - -board_use_recovery_as_boot_phony { +phony { name: "init_vendor", - soong_config_variables: { - BOARD_USES_RECOVERY_AS_BOOT: { - required: [], - conditions_default: { - required: ["init_first_stage"], - }, - }, - }, + required: select(soong_config_variable("ANDROID", "BOARD_USES_RECOVERY_AS_BOOT"), { + true: [], + default: ["init_first_stage"], + }), }