diff --git a/src/android/src/com/nordnetab/chcp/main/HotCodePushPlugin.java b/src/android/src/com/nordnetab/chcp/main/HotCodePushPlugin.java index cc6260c7..f80b5bdf 100644 --- a/src/android/src/com/nordnetab/chcp/main/HotCodePushPlugin.java +++ b/src/android/src/com/nordnetab/chcp/main/HotCodePushPlugin.java @@ -251,7 +251,8 @@ public void run() { }); // fetch update when we are initialized - if (chcpXmlConfig.isAutoDownloadIsAllowed()) { + if (chcpXmlConfig.isAutoDownloadIsAllowed() && + !UpdatesInstaller.isInstalling() && !UpdatesLoader.isExecuting()) { fetchUpdate(null); } } @@ -507,7 +508,10 @@ public void onEvent(AssetsInstalledEvent event) { PluginResult result = PluginResultHelper.pluginResultFromEvent(event); sendMessageToDefaultCallback(result); - fetchUpdate(null); + if (chcpXmlConfig.isAutoDownloadIsAllowed() && + !UpdatesInstaller.isInstalling() && !UpdatesLoader.isExecuting()) { + fetchUpdate(null); + } } /**