From a42b304f926e775947be7b4fd52a27dc5c3270c9 Mon Sep 17 00:00:00 2001 From: Jose Dapena Paz Date: Wed, 30 Mar 2022 09:59:44 +0200 Subject: 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 --- src/js/background.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } -- cgit 1.2.3-korg