Replace deprecated APIs 20/35920/2 accepted/tizen_common accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2015.q2_common accepted/tizen/common/20150527.135110 accepted/tizen/mobile/20150528.004240 accepted/tizen/tv/20150528.004210 accepted/tizen/wearable/20150528.004220 submit/tizen/20150527.115529
authorSuchang Woo <suchang.woo@samsung.com>
Thu, 26 Feb 2015 06:15:23 +0000 (15:15 +0900)
committerSuchang Woo <suchang.woo@samsung.com>
Fri, 27 Feb 2015 02:57:04 +0000 (11:57 +0900)
app_manager_get_package() and app_info_get_name() are deprecated.
app_manager_get_package is replaced with app_manager_get_app_id.
app_info_get_name is replaced with app_info_get_label.

Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
Change-Id: I3c3637f295e4f2b8d2788ab9420e357e5836226a

src/location-appman.c

index a4b816a..debd86e 100644 (file)
@@ -558,7 +558,7 @@ int location_appman_get_name(const char *package, char **appname)
        }
        else {
 
-               app_info_get_name(app_info, &name);
+               app_info_get_label(app_info, &name);
                if (name == NULL || g_strcmp0 (name, "(NULL)") == 0) {
                        LOCATION_APPMAN_LOG("name of application[%s] is NULL", package);
                        name = strdup (package);
@@ -883,7 +883,7 @@ int location_appman_get_package_by_pid(pid_t pid, location_appman_s ** appman)
        char *package = NULL;
        int ret = 0;
 
-       ret = app_manager_get_package(pid, &package);
+       ret = app_manager_get_app_id(pid, &package);
        if (ret != APP_MANAGER_ERROR_NONE) {
                const char *pkg_name = g_getenv(LOCATION_APPMAN_PKG_NAME);
                if (!pkg_name) {
@@ -962,7 +962,7 @@ int location_appman_register_package(location_appman_s * appman)
 
        ret = app_manager_get_app_info(appman->package, &app_info);
        if (ret == APP_MANAGER_ERROR_NONE) {
-               app_info_get_name(app_info, &name);
+               app_info_get_label(app_info, &name);
                if (name != NULL) {
                        g_strlcpy(appman->appname, name, 64);
                        g_free(name);