g_mas_dependency.unset_voice_key_tap_duration =
(mas_dependency_unset_voice_key_tap_duration)dlsym(g_handle,
MAS_DEPENDENCY_FUNC_UNSET_VOICE_KEY_TAP_DURATION);
+ g_mas_dependency.set_voice_key_support_mode =
+ (mas_dependency_set_voice_key_support_mode)dlsym(g_handle,
+ MAS_DEPENDENCY_FUNC_SET_VOICE_KEY_SUPPORT_MODE);
+ g_mas_dependency.get_custom_vconf_key =
+ (mas_dependency_get_custom_vconf_key)dlsym(g_handle,
+ MAS_DEPENDENCY_FUNC_GET_CUSTOM_VCONF_KEY);
int ret = -1;
int dependency_version = 0;
}
return ret;
+}
+
+int dependency_resolver_get_custom_vconf_key(const char* default_key, char** custom_key)
+{
+ int ret = -1;
+ if (NULL != g_handle) {
+ mas_dependency_get_custom_vconf_key func = g_mas_dependency.get_custom_vconf_key;
+ if (NULL == func) {
+ MAS_LOGE("[ERROR] symbol lookup failed : %s", MAS_DEPENDENCY_FUNC_GET_CUSTOM_VCONF_KEY);
+ } else {
+ try {
+ ret = func(default_key, custom_key);
+ } catch (const std::exception& e) {
+ MAS_LOGE("[ERROR] %s of dependency module threw exception : %s",
+ MAS_DEPENDENCY_FUNC_GET_CUSTOM_VCONF_KEY, e.what());
+ }
+ if (0 != ret) {
+ MAS_LOGE("[ERROR] Fail to get custom vconf key, ret(%d)", ret);
+ }
+ }
+ } else {
+ MAS_LOGE("[ERROR] g_handle is not valid");
+ }
+
+ return ret;
}
\ No newline at end of file