Pass Context to Build.*Configuration

Context is prepared with activated APEX modules and passed to the
configuration builders.

This doesn't change the current behavior, and there will be follow-up
changes which uses Context to generate APEX-related configuration
dynamically.

Bug: 144664390
Test: compare geneated ld.config.txt files with old ones.
Change-Id: Ice4c7e57d8f5894e4b18510a116e5b38da8d8462
diff --git a/contents/tests/configuration/baseconfig_test.cc b/contents/tests/configuration/baseconfig_test.cc
index c10003d..5a2dead 100644
--- a/contents/tests/configuration/baseconfig_test.cc
+++ b/contents/tests/configuration/baseconfig_test.cc
@@ -19,10 +19,15 @@
 #include "linkerconfig/configwriter.h"
 #include "mockenv.h"
 
+using android::linkerconfig::contents::Context;
+using android::linkerconfig::contents::CreateBaseConfiguration;
+using android::linkerconfig::modules::ConfigWriter;
+
 TEST(linkerconfig_configuration_fulltest, baseconfig_test) {
   MockGenericVariables();
-  auto base_config = android::linkerconfig::contents::CreateBaseConfiguration();
-  android::linkerconfig::modules::ConfigWriter config_writer;
+  Context ctx;
+  auto base_config = CreateBaseConfiguration(ctx);
+  ConfigWriter config_writer;
 
   base_config.WriteConfig(config_writer);
 
@@ -33,9 +38,9 @@
      baseconfig_vndk_using_core_variant_test) {
   MockGenericVariables();
   MockVndkUsingCoreVariant();
-
-  auto base_config = android::linkerconfig::contents::CreateBaseConfiguration();
-  android::linkerconfig::modules::ConfigWriter config_writer;
+  Context ctx;
+  auto base_config = CreateBaseConfiguration(ctx);
+  ConfigWriter config_writer;
 
   base_config.WriteConfig(config_writer);
 
@@ -45,8 +50,9 @@
 TEST(linkerconfig_configuration_fulltest, baseconfig_vndk_27_test) {
   MockGenericVariables();
   MockVndkVersion("27");
-  auto base_config = android::linkerconfig::contents::CreateBaseConfiguration();
-  android::linkerconfig::modules::ConfigWriter config_writer;
+  Context ctx;
+  auto base_config = CreateBaseConfiguration(ctx);
+  ConfigWriter config_writer;
 
   base_config.WriteConfig(config_writer);
 
@@ -56,10 +62,9 @@
 TEST(linkerconfig_configuration_fulltest, vndklite_test) {
   MockGenericVariables();
   MockVnkdLite();
-
-  auto vndklite_config =
-      android::linkerconfig::contents::CreateBaseConfiguration();
-  android::linkerconfig::modules::ConfigWriter config_writer;
+  Context ctx;
+  auto vndklite_config = CreateBaseConfiguration(ctx);
+  ConfigWriter config_writer;
 
   vndklite_config.WriteConfig(config_writer);