%attr(700,root,root) %{_sbindir}/krate-volume-manager
%{_unitdir}/krate.service
%{_unitdir}/multi-user.target.wants/krate.service
+%attr(644,root,root) %{TZ_SYS_RO_ICONS}/krate/default_icon.png
%attr(644,root,root) %{TZ_SYS_RO_ICONS}/krate/shortcut_icon.png
%attr(644,root,root) %{TZ_SYS_RO_ICONS}/krate/indicator_icon.png
%attr(644,root,root) %{TZ_SYS_RO_ICONS}/krate/notification_sub_icon.png
INSTALL(TARGETS ${SERVER_NAME} DESTINATION ${BIN_DIR})
INSTALL(FILES systemd/krate.service DESTINATION ${SYSTEMD_UNIT_DIR})
+INSTALL(FILES ${KRATE_DATA}/default_icon.png DESTINATION ${ICON_DIR})
INSTALL(FILES ${KRATE_DATA}/indicator_icon.png DESTINATION ${ICON_DIR})
INSTALL(FILES ${KRATE_DATA}/notification_sub_icon.png DESTINATION ${ICON_DIR})
INSTALL(FILES ${KRATE_DATA}/shortcut_icon.png DESTINATION ${ICON_DIR})
#include "rmi/manager.h"
#define KRATE_DELEGATOR_APP "org.tizen.keyguard"
+#define DEFAULT_ICON_PATH ICON_PATH "/default_icon.png"
#define NOTIFICATION_SUB_ICON_PATH ICON_PATH "/notification_sub_icon.png"
namespace Krate {
notification_clone(noti, &newNoti);
notification_get_pkgname(noti, &pkgId);
- PackageInfo pkg(pkgId, user.getUid());
- notification_set_image(newNoti, NOTIFICATION_IMAGE_TYPE_ICON, pkg.getIcon().c_str());
+ try {
+ PackageInfo pkg(pkgId, user.getUid());
+ notification_set_image(newNoti, NOTIFICATION_IMAGE_TYPE_ICON, pkg.getIcon().c_str());
+ } catch (runtime::Exception &e) {
+ notification_set_image(newNoti, NOTIFICATION_IMAGE_TYPE_ICON, DEFAULT_ICON_PATH);
+ }
+
notification_set_image(newNoti, NOTIFICATION_IMAGE_TYPE_ICON_SUB, NOTIFICATION_SUB_ICON_PATH);
notification_get_launch_option(newNoti, NOTIFICATION_LAUNCH_OPTION_APP_CONTROL, (void *)&appControl);