static void __vconf_cb(keynode_t *key, void *data)
{
+ char *val;
+
+ val = vconf_keynode_get_str(key);
+ if (val && cur_language && !strcmp(val, cur_language))
+ return;
+
__invalidate_cache();
}
return AUL_RESOURCE_ERROR_NONE;
}
+static bool __verify_current_language(void)
+{
+ char *lang;
+
+ lang = vconf_get_str(VCONFKEY_LANGSET);
+ if (!lang)
+ return false;
+
+ if (cur_language && !strcmp(lang, cur_language)) {
+ free(lang);
+ return true;
+ }
+
+ free(lang);
+
+ return false;
+}
+
API int aul_resource_manager_get(aul_resource_e type, const char *id, char **path)
{
int retval = AUL_RESOURCE_ERROR_NONE;
return retval;
}
- /* To get fname from cache */
- cached_path = __get_cache(type, id);
- if (cached_path != NULL) {
- *path = strdup(cached_path);
- return AUL_RESOURCE_ERROR_NONE;
+ if (__verify_current_language()) {
+ /* To get fname from cache */
+ cached_path = __get_cache(type, id);
+ if (cached_path != NULL) {
+ *path = strdup(cached_path);
+ return AUL_RESOURCE_ERROR_NONE;
+ }
+ } else {
+ __invalidate_cache();
}
}