Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Bug 837558 - Delay STK command until FTU is done #8531

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 26 additions & 15 deletions apps/system/js/icc_cache.js
Expand Up @@ -63,22 +63,33 @@
return; // If settings is opened, we don't manage it
}

debug('Locating settings . . .');
navigator.mozApps.mgmt.getAll().onsuccess = function gotApps(evt) {
var apps = evt.target.result;
apps.forEach(function appIterator(app) {
if (app.origin != application)
return;
function launchSettings() {
debug('Locating settings . . .');
navigator.mozApps.mgmt.getAll().onsuccess = function gotApps(evt) {
var apps = evt.target.result;
apps.forEach(function appIterator(app) {
if (app.origin != application)
return;

var reqIccData = window.navigator.mozSettings.createLock().set({
'icc.data': JSON.stringify(command)
});
reqIccData.onsuccess = function icc_getIccData() {
debug('Launching ', app.origin);
app.launch();
};
}, this);
};
var reqIccData = window.navigator.mozSettings.createLock().set({
'icc.data': JSON.stringify(command)
});
reqIccData.onsuccess = function icc_getIccData() {
debug('Launching ', app.origin);
app.launch();
};
}, this);
};
}
if (FtuLauncher.isFtuRunning()) {
// Delay the stk command until FTU is done
window.addEventListener('ftudone', function ftudone() {
debug('ftu is done!');
launchSettings();
});
} else {
launchSettings();
}
};
}
});
Expand Down