Delte meaningless code 27/301827/1
authorIlho Kim <ilho159.kim@samsung.com>
Fri, 24 Nov 2023 04:55:03 +0000 (13:55 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Fri, 24 Nov 2023 04:57:11 +0000 (13:57 +0900)
Remove the deprecated api call
appsvc unset was transferred to parser-plugin

Change-Id: If54e17e12144fe8814297e738bb69fb01a13dc98
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
parser/src/pkgmgr_parser.c

index 5c78b18..388d31d 100644 (file)
@@ -20,7 +20,6 @@
  *
  */
 #define _GNU_SOURCE
-#include <dlfcn.h>
 #include <string.h>
 #include <unistd.h>
 #include <libxml/parser.h>
 #include "pkgmgr_parser_db.h"
 #include "pkgmgr_parser_debug.h"
 
-#define LIBAPPSVC_PATH LIB_PATH "/libappsvc.so.0"
-
-static int __ps_remove_appsvc_db(manifest_x *mfx, uid_t uid)
-{
-       void *lib_handle = NULL;
-       int (*appsvc_operation) (const char *, uid_t);
-       int ret = 0;
-       GList *tmp;
-       application_x *application;
-
-       lib_handle = dlopen(LIBAPPSVC_PATH, RTLD_LAZY);
-       if (lib_handle == NULL) {
-               _LOGE("dlopen is failed LIBAPPSVC_PATH[%s]\n", LIBAPPSVC_PATH);
-               goto END;
-       }
-
-       appsvc_operation = dlsym(lib_handle, "appsvc_unset_defapp");
-       if (appsvc_operation == NULL || dlerror() != NULL) {
-               _LOGE("can not find symbol \n");
-               goto END;
-       }
-
-       for (tmp = mfx->application; tmp; tmp = tmp->next) {
-               application = (application_x *)tmp->data;
-               if (application == NULL)
-                       continue;
-               ret = appsvc_operation(application->appid, uid);
-               if (ret < 0)
-                       _LOGE("can not operation  symbol \n");
-       }
-
-END:
-       if (lib_handle)
-               dlclose(lib_handle);
-
-       return ret;
-}
-
 API void pkgmgr_parser_free_manifest_xml(manifest_x *mfx)
 {
        pkgmgrinfo_basic_free_package((package_x *)mfx);
@@ -161,12 +122,6 @@ API int pkgmgr_parser_process_usr_manifest_x_for_uninstallation(manifest_x *mfx,
        else
                _LOGD("DB Delete Success\n");
 
-       ret = __ps_remove_appsvc_db(mfx, uid);
-       if (ret == -1)
-               _LOGD("Removing appsvc_db failed\n");
-       else
-               _LOGD("Removing appsvc_db Success\n");
-
        return PMINFO_R_OK;
 }