int __set_time(time_t _time);
+struct running_info_t {
+ int pid;
+ char *appid;
+ bool is_running;
+};
+
struct filtered_alarm_app_s {
int is_ui_app;
uid_t uid;
return ret;
}
+static int __app_info_iter(const aul_app_info *info, void *data)
+{
+ struct running_info_t *app_info = (struct running_info_t *)data;
+
+ if (app_info->pid == info->pid &&
+ strcmp(app_info->appid, info->appid) == 0)
+ app_info->is_running = true;
+
+ return 0;
+}
+
static void __alarm_expired()
{
int ret;
} else {
char appid[MAX_SERVICE_NAME_LEN] = { 0, };
pkgmgrinfo_appinfo_h appinfo_handle = NULL;
+ struct running_info_t app_info;
if (g_quark_to_string(__alarm_info->quark_bundle) != NULL && strncmp(g_quark_to_string(__alarm_info->quark_dst_service_name), "null", 4) == 0) {
SECURE_LOGD("[alarm-server]:destination is null, so we send expired alarm to %s(%u).",
/* Case #2. The process was killed && App type
* This app is launched and owner of DBus connection is changed. and then, expiration noti is sent by DBus. */
- if (ret == PMINFO_R_OK && !aul_app_is_running_for_uid(appid, __alarm_info->uid)) {
+
+ app_info.is_running = false;
+ if (ret == PMINFO_R_OK) {
+ app_info.pid = __alarm_info->pid;
+ app_info.appid = appid;
+ aul_app_get_all_running_app_info_for_uid(__app_info_iter,
+ &app_info, __alarm_info->uid);
+ }
+
+ if (ret == PMINFO_R_OK && !app_info.is_running) {
__expired_alarm_t *expire_info;
char alarm_id_str[32] = { 0, };