typedef struct _xmlDoc xmlDoc;
typedef xmlDoc* xmlDocPtr;
-static bool pluginInstalled = false;
+static std::string prevInstallPkgId = std::string("");
extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
{
+ if (pkgId == NULL) {
+ return 0;
+ }
+
// Can be multiple apps in one package
- if (pluginInstalled) {
- _INFO("Plugin already installed");
+ if (strcmp(pkgId, prevInstallPkgId.c_str()) == 0) {
+ _INFO("AppType Plugin already run for same pkgId (%s)", pkgId);
return 0;
}
- pluginInstalled = true;
+ prevInstallPkgId = pkgId;
std::string appType = getAppType(pkgId);
if (appType.empty()) {