IPACM: move ipacm configuration file to /vendor/etc
In treble requirement, move the ipacm configuration
file from /etc to /vendor/etc
Change-Id: I6e755c826995721e68faf314a073c3b8472dd1e7
diff --git a/hal/src/HAL.cpp b/hal/src/HAL.cpp
index 0d25aa0..18249a5 100644
--- a/hal/src/HAL.cpp
+++ b/hal/src/HAL.cpp
@@ -86,16 +86,16 @@
void HAL::registerAsSystemService(const char* name) {
status_t ret = 0;
- ret = IOffloadControl::registerAsService(name);
+ ret = IOffloadControl::registerAsService();
if (ret != 0) ALOGE("Failed to register IOffloadControl (%d)", ret);
else if (DBG) {
- ALOGI("Successfully registered IOffloadControl (%s)", name);
+ ALOGI("Successfully registered IOffloadControl");
}
- IOffloadConfig::registerAsService(name);
+ IOffloadConfig::registerAsService();
if (ret != 0) ALOGE("Failed to register IOffloadConfig (%d)", ret);
else if (DBG) {
- ALOGI("Successfully registered IOffloadConfig (%s)", name);
+ ALOGI("Successfully registered IOffloadConfig");
}
} /* registerAsSystemService */
diff --git a/ipacm/src/Android.mk b/ipacm/src/Android.mk
index bcb8332..262f8c4 100644
--- a/ipacm/src/Android.mk
+++ b/ipacm/src/Android.mk
@@ -107,7 +107,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE := IPACM_cfg.xml
LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_OWNER := ipacm
diff --git a/ipacm/src/IPACM_Config.cpp b/ipacm/src/IPACM_Config.cpp
index b8cd382..64534ee 100644
--- a/ipacm/src/IPACM_Config.cpp
+++ b/ipacm/src/IPACM_Config.cpp
@@ -181,8 +181,11 @@
{
IPACMERR("Failed opening %s.\n", DEVICE_NAME);
}
+#ifdef FEATURE_IPACM_HAL
+ strncpy(IPACM_config_file, "/vendor/etc/IPACM_cfg.xml", sizeof(IPACM_config_file));
+#else
strncpy(IPACM_config_file, "/etc/IPACM_cfg.xml", sizeof(IPACM_config_file));
-
+#endif
IPACMDBG_H("\n IPACM XML file is %s \n", IPACM_config_file);
if (IPACM_SUCCESS == ipacm_read_cfg_xml(IPACM_config_file, cfg))
{