alarm_info_t *alarm_info = NULL; /* = (alarm_info_t*)alarm; */
const char *operation = NULL;
int error_code = 0;
+ char *appid = NULL;
bundle *b=(bundle *)bundle_data;
alarm_info = (alarm_info_t *) alarm;
+ appid = appsvc_get_appid(b);
+
+ if (NULL == appid && (alarm_info->alarm_type & ALARM_TYPE_NOLAUNCH) )
+ {
+ ALARM_MGR_EXCEPTION_PRINT("Invalid parameter\n");
+ return ERR_ALARM_INVALID_PARAM;
+ }
+
if (alarm_info == NULL || alarm_id == NULL) {
ALARM_MGR_EXCEPTION_PRINT("Invalid parameter\n");
return ERR_ALARM_INVALID_PARAM;
struct tm duetime_tm;
alarm_info_t alarm_info;
const char *operation = NULL;
+ char *appid = NULL;
bundle *b=(bundle *)bundle_data;
return ERR_ALARM_INVALID_PARAM;
}
+ appid = appsvc_get_appid(b);
+
+ if (NULL == appid && (alarm_type & ALARM_TYPE_NOLAUNCH) )
+ {
+ ALARM_MGR_EXCEPTION_PRINT("Invalid parameter\n");
+ return ERR_ALARM_INVALID_PARAM;
+ }
+
if (__alarmmgr_init_appsvc() < 0)
{
ALARM_MGR_EXCEPTION_PRINT("Unable to initialize dbus!!!\n");
char alarm_id_val[32]={0,};
int b_len = 0;
bundle *b = NULL;
+ char *appid = NULL;
ALARM_MGR_LOG_PRINT("[alarm-server]: Enter \n");
}
else
{
- if ( appsvc_run_service(b, 0, NULL, NULL) < 0)
+ appid = appsvc_get_appid(b);
+ if( (__alarm_info->alarm_info.alarm_type & ALARM_TYPE_NOLAUNCH) && !aul_app_is_running(appid))
{
- ALARM_MGR_EXCEPTION_PRINT("Unable to run app svc\n");
+ ALARM_MGR_EXCEPTION_PRINT("This alarm is ignored\n");
}
else
{
- ALARM_MGR_LOG_PRINT("Successfuly ran app svc\n");
+ if ( appsvc_run_service(b, 0, NULL, NULL) < 0)
+ {
+ ALARM_MGR_EXCEPTION_PRINT("Unable to run app svc\n");
+ }
+ else
+ {
+ ALARM_MGR_LOG_PRINT("Successfuly ran app svc\n");
+ }
}
}
bundle_free(b);
#define ALARM_TYPE_DEFAULT 0x0 /*< non volatile */
#define ALARM_TYPE_VOLATILE 0x02 /*< volatile */
+#define ALARM_TYPE_NOLAUNCH 0x04 /*<without launch */
/**