}
-void MsgInitMsgMgr()
+void MsgBootMsgMgr()
{
- msg_launch_app(MSG_MGR_APP_ID, NULL);
+ bundle *bundle_data = bundle_create();
+
+ bundle_add_str(bundle_data, "cmd", "on_boot");
+
+ msg_launch_app(MSG_MGR_APP_ID, bundle_data);
+
+ bundle_free(bundle_data);
}
===================================================================================================*/
void MsgMgrInitReportNotiList();
+void MsgInitNotiCb(void *data);
void MsgRefreshNotiCb(void *data);
void MsgMgrDeleteNotiCb(void *data);
if (bNotiSvcReady == true) {
MSG_MGR_DEBUG("Notification server is available");
+ MsgMgrInitReportNotiList();
+ } else {
+ MSG_MGR_DEBUG("Notification server is not available. Init is defered");
+ notification_add_deferred_task(MsgInitNotiCb, NULL);
+ }
+
+ is_init = true;
+}
+
+
+void MsgInitNotiCb(void *data)
+{
+ MsgMgrInitReportNotiList();
+
+ if (data) {
+ free(data);
+ data = NULL;
+ }
+
+ return;
+}
+
+
+void MsgMgrOnBoot()
+{
+ bool bNotiSvcReady = false;
+
+ bNotiSvcReady = notification_is_service_ready();
+
+ if (bNotiSvcReady == true) {
+ MSG_MGR_DEBUG("Notification server is available");
#ifndef MSG_NOTI_INTEGRATION
MsgDeleteNotification(MSG_MGR_NOTI_TYPE_SIM, -1);
#endif
MsgMgrRefreshAllNotification(false, true, MSG_MGR_ACTIVE_NOTI_TYPE_INSTANT); /* On Booting */
- MsgMgrInitReportNotiList();
} else {
MSG_MGR_DEBUG("Notification server is not available. Init is defered");
#ifndef MSG_NOTI_INTEGRATION
}
notification_add_deferred_task(MsgDeleteNotiCb, (void *)delNotiInfo);
#endif
- notification_add_deferred_task(MsgRefreshNotiCb, (void *)NULL);
+ notification_add_deferred_task(MsgRefreshNotiCb, NULL);
}
-
- is_init = true;
}
void MsgRefreshNotiCb(void *data)
{
MsgMgrRefreshAllNotification(false, true, MSG_MGR_ACTIVE_NOTI_TYPE_INSTANT);
- MsgMgrInitReportNotiList();
if (data) {
free(data);
MsgMgrChangePmState();
}
+void _on_boot_func(app_control_h app_control)
+{
+ MsgMgrOnBoot();
+}
+
void service_app_control(app_control_h app_control, void *data)
{
MSG_MGR_INFO("service_app_control called");
_sound_play_start_func(app_control);
} else if (g_strcmp0(cmd, "change_pm_state") == 0) {
_change_pm_state_func(app_control);
+ } else if (g_strcmp0(cmd, "on_boot") == 0) {
+ _on_boot_func(app_control);
}
g_free(cmd);