Popup removal 2
[framework/web/wrt-installer.git] / src / wrt-installer / plugin_utils.cpp
index f168866..5368f3f 100644 (file)
@@ -34,8 +34,13 @@ const char* PLUGIN_INSTALL_LOCK_FILE = "/tmp/.wrt_plugin_install_lock";
 
 static int s_plugin_install_lock_fd = -1;
 
-bool lockPluginInstallation()
+bool lockPluginInstallation(bool isPreload)
 {
+    if (isPreload) {
+        fprintf(stderr, "Skip create lock file.. \n");
+        return true;
+    }
+
     int ret = 0;
 
     LogInfo("Try to lock for plugins installation.");
@@ -63,9 +68,13 @@ bool lockPluginInstallation()
     return true;
 }
 
-bool unlockPluginInstallation()
+bool unlockPluginInstallation(bool isPreload)
 {
     LogInfo("Unlock for plugins installation.");
+    if (isPreload) {
+        fprintf(stderr, "Skip plugin unlock.. \n");
+        return true;
+    }
 
     if (s_plugin_install_lock_fd != -1) {
         int ret = 0;