Add /system_ext/etc to config search path /product should be at the highest search order. Load libnfc-nci.conf from /system or /system_ext partition if it is not found in /product or other partitions. Bug: 157704723 Test: adb push libnfc-nci.conf to /system_ext and check if it is loaded Change-Id: Ic6a9399497d20ba0bff468d043ce3b5e04453aa8 Merged-In: Ic6a9399497d20ba0bff468d043ce3b5e04453aa8 (cherry picked from commit 707ff2b12514e3bd712066ddaa4b3982ba9c1abc)
diff --git a/src/adaptation/nfc_config.cc b/src/adaptation/nfc_config.cc index f406847..264968e 100644 --- a/src/adaptation/nfc_config.cc +++ b/src/adaptation/nfc_config.cc
@@ -29,9 +29,10 @@ namespace { std::string searchConfigPath(std::string file_name) { - const vector<string> search_path = {"/odm/etc/", "/vendor/etc/", - "/product/etc/", "/etc/"}; - for (string path : search_path) { + const std::vector<std::string> search_path = { + "/product/etc/", "/odm/etc/", "/vendor/etc/", "/system_ext/etc/", "/etc/", + }; + for (std::string path : search_path) { path.append(file_name); struct stat file_stat; if (stat(path.c_str(), &file_stat) != 0) continue;