hidl: sensors: 2.1: Adding suport for multiple multihal config files

Bug: 259450346
Test: Presubmits
Change-Id: Ic7b113e6b8bf94e0c0ffe539f965232b24bdf66d
This commit is contained in:
Aditya Chitnis 2022-12-01 10:07:31 +00:00 committed by Bruno Martins
parent 06ea5c2c31
commit 2d14c1f3be

View file

@ -101,8 +101,11 @@ bool patchXiaomiPickupSensor(V2_1::SensorInfo& sensor) {
}
HalProxy::HalProxy() {
const char* kMultiHalConfigFile = "/vendor/etc/sensors/hals.conf";
initializeSubHalListFromConfigFile(kMultiHalConfigFile);
static const std::string kMultiHalConfigFiles[] = {"/vendor/etc/sensors/hals.conf",
"/odm/etc/sensors/hals.conf"};
for (const std::string& configFile : kMultiHalConfigFiles) {
initializeSubHalListFromConfigFile(configFile.c_str());
}
init();
}