return BATTERY_MONITOR_ERROR_NONE;
}
+static int fill_AppId_info(char *app_id)
+{
+ ENTER;
+ int ret = 0;
+ data_obj->event_tag->uid = 1000;
+ data_obj->event_tag->string_info = g_string_sized_new(7);
+ if (!data_obj->event_tag->string_info) {
+ _ERR("memory allocation failed ");
+ ret = 1;
+ return ret;
+ }
+ g_string_append_printf(data_obj->event_tag->string_info, "%s", app_id);
+ EXIT;
+ return ret;
+}
+
static int fill_battery_info()
{
ENTER;
int *temp = (int *)prv_data;
*temp = app_hsp;
_INFO(" sp index for this app id is = %d and apphsp= %d", *temp, app_hsp);
+ if (fill_AppId_info(app_id)) {
+ error_code = 1;
+ goto out;
+ }
error_code = 0;
goto out;
} else {
*temp = app_hsp;
_INFO("This App is not present in the list, inserting it");
g_hash_table_insert(app_list, app_id, temp);
+ if (fill_AppId_info(app_id)) {
+ error_code = 1;
+ goto out;
+ }
error_code = 0;
return error_code;
}
} else {
_ERR(" data_obj->event_tag object creation fails ");
+ error_code = 1;
goto out;
}
} else {
app_hsp = *tmp;
error_code = 0;
data_obj->event_tag->sp_idx = app_hsp;
+ if (fill_AppId_info(app_id))
+ error_code = 1;
goto out;
} else {
_INFO(" This App is not present in the list and in background");
else
prev_battery_level = data_obj->battery_level;
- if (data_obj->event_tag) {
+ if (data_obj->event_tag && type != LISTEN_APP_STATUS) {
data_obj->event_tag->uid = 1000;
data_obj->event_tag->string_info = g_string_sized_new(7);
if (!data_obj->event_tag->string_info) {
_ERR("memory allocation failed ");
return;
}
+
g_string_append_printf(data_obj->event_tag->string_info, "%s", "Tizen");
+ }
+ if (data_obj->event_tag) {
_DBG("Data Value of listener event uid : %d ", data_obj->event_tag->uid);
- _DBG("Data Value of listener event string : %s sp index = `%d",
- data_obj->event_tag->string_info->str, data_obj->event_tag->sp_idx);
+ _DBG("Data Value of listener event string : %s sp index = %d",
+ data_obj->event_tag->string_info->str, data_obj->event_tag->sp_idx);
}
if (type == LISTEN_POWERLOCKUNLOCK_STATE)