Use the new 'partition' field in 'ApexInfo' to identify vendor apexes
A new field 'partition' was added to `ApexInfo` recently which stores
pre-installed partition information as string (e.g. 'SYSTEM') in
aosp/3335753. Using 'partition' field for Subcontext vendor apex
initialization because the existing field `preinstalledModulePath` won't
be populated for brand-new apex (a new type we introduced recently).
Bug: 377111286
Test: atest CtsInitTestCases
Change-Id: I8970b3cb5884bdb949035f5bdc5b2e18618cc9cc
diff --git a/init/subcontext_benchmark.cpp b/init/subcontext_benchmark.cpp
index ccef2f3..172ee31 100644
--- a/init/subcontext_benchmark.cpp
+++ b/init/subcontext_benchmark.cpp
@@ -33,7 +33,7 @@
return;
}
- auto subcontext = Subcontext({"path"}, context);
+ auto subcontext = Subcontext({"path"}, {"partition"}, context);
free(context);
while (state.KeepRunning()) {