Change-Id: Idedc4f2cecd041e3ff4e6e4bcfc4d89072d2720d
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
int error_code = BATTERY_MONITOR_ERROR_NONE;
- pthread_mutex_lock(&battery_monitor_mutex);
-
BM_RETURN_VAL((app_id != NULL), {}, BATTERY_MONITOR_ERROR_INVALID_PARAMETER, ("Application Id is NULL"));
BM_RETURN_VAL((g_hBatteryMonitorDB != NULL), {}, BATTERY_MONITOR_ERROR_DB_NOT_OPENED, ("The database isn't connected."));
+ pthread_mutex_lock(&battery_monitor_mutex);
+
error_code = bm_delete_table_by_app_id(g_hBatteryMonitorDB, app_id);
pthread_mutex_unlock(&battery_monitor_mutex);