[Release] wrt-installer_0.0.89
[framework/web/wrt-installer.git] / src / jobs / widget_uninstall / task_db_update.cpp
index b18feb0..d3f2c93 100644 (file)
 #include <widget_uninstall/task_db_update.h>
 #include <widget_uninstall/job_widget_uninstall.h>
 #include <widget_uninstall/widget_uninstall_errors.h>
+#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <ace_api_install.h>
 
 #include <dpl/assert.h>
+#include <ace-common/ace_api_common.h>
 
 using namespace WrtDB;
 
@@ -45,6 +48,9 @@ void TaskDbUpdate::StepDbUpdate()
 {
     Try
     {
+        //TODO: widget handle should not be used any more
+        ace_unregister_widget(static_cast<ace_widget_handle_t>(
+            WidgetDAOReadOnly::getHandle(m_context.locations->getPkgname())));
         WidgetDAO::unregisterWidget(m_context.locations->getPkgname());
 
         LogDebug("Unregistered widget successfully!");