[Refactoring] Code cleanup and remove duplicate methods
[platform/core/dotnet/launcher.git] / NativeLauncher / installer-plugin / dotnet_apptype_plugin.cc
index 8db651c..0cff386 100644 (file)
@@ -18,8 +18,9 @@
 #include "utils.h"
 #include "multi_target_resolver.h"
 #include "ni_common.h"
-
-#include <vector>
+#include "profile_common.h"
+#include "privilege_common.h"
+#include "launcher_env.h"
 
 #ifdef  LOG_TAG
 #undef  LOG_TAG
@@ -29,7 +30,7 @@
 typedef struct _xmlDoc xmlDoc;
 typedef xmlDoc* xmlDocPtr;
 
-bool pluginInstalled = false;
+static bool pluginInstalled = false;
 
 extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
 {
@@ -56,7 +57,7 @@ extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
                return 0;
        }
 
-       if (removeAppProfileData(pkgId) != NI_ERROR_NONE) {
+       if (removeAppProfileData(pkgId) != PROFILE_ERROR_NONE) {
                _ERR("Failed to remove [%s] profile data", pkgId);
        }
 
@@ -64,6 +65,8 @@ extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
                _ERR("Failed to resolve platform specific resources of nuget");
        }
 
+       checkInternetPrivilegeAndDisableIPv6(pkgId, rootPath);
+
        return 0;
 }
 extern "C" int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr doc, const char* pkgId)