#include <notification.h>
#include <notification_list.h>
//#include <notification_internal.h>
-#include <pkgmgr-info.h>
+#include <app_manager.h>
#include <app_preference.h>
#include "common.h"
char* __indicator_ui_get_pkginfo_icon(const char *pkgid)
{
- int ret = 0;
+ int ret;
char *icon_path = NULL;
- char *icon_ret = NULL;
- retif(pkgid == NULL, NULL, "invalid parameter");
+ app_info_h app_info;
- pkgmgrinfo_appinfo_h appinfo_h = NULL;
+ retif(pkgid == NULL, NULL, "invalid parameter");
- ret = pkgmgrinfo_appinfo_get_appinfo(pkgid, &appinfo_h);
- if (ret < 0) {
- ERR("pkgmgrinfo_appinfo_get_appinfo is failed %d %s", ret,pkgid);
+ ret = app_info_create(pkgid, &app_info);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ ERR("app_info_create for %s failed %d", pkgid, ret);
+ return NULL;
}
/* Icon path */
- ret = pkgmgrinfo_appinfo_get_icon(appinfo_h, &icon_path);
-
- if (ret < 0) {
- ERR("pkgmgrinfo_appinfo_get_icon is failed %d", ret);
- }
- if(icon_path) {
- icon_ret = (char*)strdup(icon_path);
- }
- if (appinfo_h) {
- pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+ ret = app_info_get_icon(app_info, &icon_path);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ app_info_destroy(app_info);
+ ERR("app_info_get_icon failed %d", ret);
+ return NULL;
}
- return icon_ret;
+ app_info_destroy(app_info);
+
+ return icon_path;
}
#include <metadata_extractor.h>
#include <notification.h>
//#include <notification_text_domain.h>
-#include <pkgmgr-info.h>
+#include <app_manager.h>
#include "common.h"
#include "main.h"
static char *_get_pkginfo_icon(const char *pkgid)
{
- int ret = 0;
+ int ret;
char *icon_path = NULL;
- char *icon_ret = NULL;
- retif(pkgid == NULL, NULL, "invalid parameter");
+ app_info_h app_info;
- pkgmgrinfo_appinfo_h appinfo_h = NULL;
+ retif(pkgid == NULL, NULL, "invalid parameter");
- ret = pkgmgrinfo_appinfo_get_appinfo(pkgid, &appinfo_h);
- if (ret < 0) {
- _E("pkgmgrinfo_appinfo_get_appinfo is failed %d", ret);
+ ret = app_info_create(pkgid, &app_info);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ _E("app_info_create for %s failed %d", pkgid, ret);
return NULL;
}
- ret = pkgmgrinfo_appinfo_get_icon(appinfo_h, &icon_path);
- if (ret < 0) {
- _E("pkgmgrinfo_appinfo_get_icon is failed %d", ret);
- }
- if (icon_path) {
- icon_ret = (char*)strdup(icon_path);
- }
- if (appinfo_h) {
- pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
+ ret = app_info_get_icon(app_info, &icon_path);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ app_info_destroy(app_info);
+ _E("app_info_get_icon failed %d", ret);
+ return NULL;
}
- return icon_ret;
+ app_info_destroy(app_info);
+
+ return icon_path;
}
static Evas_Object *_ticker_create_icon(Evas_Object *parent, notification_h noti)
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.indicator-win" version="1.0.0">
- <profile name="mobile" />
- <ui-application appid="org.tizen.indicator-win" exec="indicator-win" type="capp" multiple="false" taskmanage="true" nodisplay="false" launch_mode="single">
- <icon>indicator-win.png</icon>
- <label>indicator-win</label>
- </ui-application>
+ <profile name="mobile"/>
+ <ui-application appid="org.tizen.indicator-win" exec="indicator-win" launch_mode="single" multiple="false" nodisplay="true" taskmanage="false" type="capp">
+ <label>indicator-win</label>
+ <icon>indicator-win.png</icon>
+ </ui-application>
+ <privileges>
+ <privilege>http://tizen.org/privilege/packagemanager.info</privilege>
+ </privileges>
</manifest>