gpointer key, value;
unsigned long elapsed = 0;
+ if (!ht_appstatus) {
+ _E("app status table is not initialized");
+ return ;
+ }
g_hash_table_iter_init (&iter, ht_appstatus);
while (g_hash_table_iter_next(&iter, &key, &value)) {
if(((const app_status*)value)->is_running) {
gpointer key, value;
unsigned long elapsed = 0;
+ if (!ht_appstatus) {
+ _E("app status table is not initialized");
+ return ;
+ }
g_hash_table_iter_init (&iter, ht_appstatus);
while (g_hash_table_iter_next(&iter, &key, &value)) {
if(((const app_status*)value)->is_running) {
GHashTableIter iter;
gpointer key, value;
+ if (!ht_apptime) {
+ _E("battery-monitor module is not initialized");
+ return ;
+ }
g_hash_table_iter_init(&iter, ht_apptime);
while (g_hash_table_iter_next(&iter, &key, &value)) {
g_variant_builder_add(atm_builder, "(su)", (const char *)key, (*(unsigned int*)value));
}
/* if size(ht_apptime) is 0, there is no app that is using GPS */
+ if (!ht_apptime) {
+ _E("battery-monitor module is not initialized");
+ return ;
+ }
if (g_hash_table_size(ht_apptime)) {
t_start = timespec_to_ms(gps_session_start_t);
t_end = timespec_to_ms(gps_session_end_t);