summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Dapena Paz <jdapena@igalia.com>2022-03-30 09:59:44 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2022-05-03 20:10:16 +0000
commita42b304f926e775947be7b4fd52a27dc5c3270c9 (patch)
tree37865d9e2a5b4484002b5881616f44752142fa00
parent5c9e060c508ab5ea49241d3a88f86075d6dc39cf (diff)
Launch background after launcher.
This introduces a safer sequence for initialization of the HTML5 shell. The sequence will be launching html5-launcher and then html5-background, with 1 second waits. This is to ensure we do not send a request to launch two applications in a very short timespan, that is not working because of WAM AGL service not supporting that. So it is essentially a workaround for that problem. To improve launch experience, background is the last to be launched, as it reduces the number of visible relayouts. Bug-AGL: SPEC-3982 Change-Id: Icfdddb18edbda06e7ece1132f08a9fd469a469a8 Signed-off-by: Jose Dapena Paz <jdapena@igalia.com>
-rw-r--r--src/js/background.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/background.js b/src/js/background.js
index 4a9bd69..aa028fd 100644
--- a/src/js/background.js
+++ b/src/js/background.js
@@ -1,7 +1,9 @@
var configjson = require('../config.json');
export function load() {
- navigator.appService.start(configjson.background);
+ setTimeout(function() {
+ navigator.appService.start(configjson.background);
+ }, 2000);
}