From: Sungbae Yoo Date: Mon, 29 Aug 2016 07:41:31 +0000 (+0900) Subject: Add an indicator icon that shows foreground app is in krate X-Git-Tag: accepted/tizen/common/20160920.131728~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33bd97c33e0bd4f943c81834e51c1fa93cd929de;p=platform%2Fcore%2Fsecurity%2Fkrate.git Add an indicator icon that shows foreground app is in krate Signed-off-by: Sungbae Yoo Change-Id: I0fefb395ecaf8f40f34b2c2f7456c378135ef24b --- diff --git a/server/manager.cpp b/server/manager.cpp index 0bf09d0..ec6f58a 100644 --- a/server/manager.cpp +++ b/server/manager.cpp @@ -226,7 +226,7 @@ void krateProcessCallback(GDBusConnection *connection, static runtime::User owner(KRATE_DEFAULT_OWNER); int pid, status; -// notification_h noti = reinterpret_cast(userData); + notification_h noti = reinterpret_cast(userData); g_variant_get(params, "(ii)", &status, &pid); @@ -240,20 +240,18 @@ void krateProcessCallback(GDBusConnection *connection, return; } - // this will have been commented until notification_delete_for_uid can work - /* - if (owner.getUid() != st.st_uid) { + if (st.st_uid == owner.getUid() || st.st_uid == 0) { + if (isKrateForeground) { + notification_delete_for_uid(noti, owner.getUid()); + isKrateForeground = false; + } + } else { if (!isKrateForeground) { notification_set_text(noti, NT_CONTENT, NT_APPINFO, NULL, NT_NONE); notification_post_for_uid(noti, owner.getUid()); isKrateForeground = true; } - } else { - if (isKrateForeground) { - notification_delete_for_uid(noti, owner.getUid()); - isKrateForeground = false; - } - }*/ + } } notification_h createNotification()