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

Commit

Permalink
Merge pull request #7864 from frsela/STK/Bug836135
Browse files Browse the repository at this point in the history
Bug 836135 - STK PLAY_TONE does not process any button presses, r=vingtetun
  • Loading branch information
Fernando Rodríguez Sela committed Jan 30, 2013
2 parents 4443211 + 62e2028 commit f2f2fe5
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions apps/settings/js/icc.js
Expand Up @@ -116,6 +116,13 @@
getIccInfo();
}

function stkResTerminate() {
iccLastCommandProcessed = true;
responseSTKCommand({
resultCode: icc.STK_RESULT_UICC_SESSION_TERM_BY_USER
});
}

function stkResGoBack() {
iccLastCommandProcessed = true;
responseSTKCommand({
Expand Down Expand Up @@ -741,10 +748,7 @@
alertbox_btnclose.onclick = function() {
clearTimeout(timeoutId);
alertbox.classList.add('hidden');
iccLastCommandProcessed = true;
responseSTKCommand({
resultCode: icc.STK_RESULT_UICC_SESSION_TERM_BY_USER
});
stkResTerminate();
};

alertbox_msg.textContent = options.text;
Expand All @@ -755,6 +759,11 @@
* Play tones
*/
function playTone(options) {
function closeToneAlert() {
tonePlayer.pause();
alertbox.classList.add('hidden');
}

debug('playTone: ', options);

var tonePlayer = new Audio();
Expand Down Expand Up @@ -818,8 +827,14 @@
}

if (options.text) {
alertbox_btn.onclick = function() {
alertbox.classList.add('hidden');
alertbox_btn.onclick = closeToneAlert;
alertbox_btnback.onclick = function() {
closeToneAlert();
stkResGoBack();
};
alertbox_btnclose.onclick = function() {
closeToneAlert();
stkResTerminate();
};
alertbox_msg.textContent = options.text;
alertbox.classList.remove('hidden');
Expand Down

0 comments on commit f2f2fe5

Please sign in to comment.