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 #14803 from mcjimenez/bug951552
Browse files Browse the repository at this point in the history
Bug 951552 - Incorrect behavior when first boot is run with a pin locked SIM (and no PIN is entered)
  • Loading branch information
Carmen Jiménez committed Dec 19, 2013
2 parents 0cabcbb + 00a6932 commit 5e5c9f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
18 changes: 3 additions & 15 deletions apps/communications/ftu/js/operatorVariant.js
Expand Up @@ -15,13 +15,13 @@ var OperatorVariant = (function() {
* If ftu.simPresentOnFirstBoot setting has value do nothing otherwise
* set ftu.simPresentOnFirstBoot = true if
* IccHelper.cardState value is:
* 'ready'.
* otherwise set to false.
* 'pinRequired',
* 'pukRequired',
* 'networkLocked',
* 'corporateLocked',
* 'serviceProviderLocked',
* 'ready'.
* otherwise set to false.
*/
function setSIMOnFirstBootState() {
var cardState;
Expand All @@ -44,19 +44,7 @@ var OperatorVariant = (function() {
req.onsuccess = function ov_onsuccess() {
var currentStatus = req.result['ftu.simPresentOnFirstBoot'];
if (currentStatus === undefined || currentStatus === null) {
switch (cardState) {
case 'pinRequired':
case 'pukRequired':
case 'networkLocked':
case 'corporateLocked':
case 'serviceProviderLocked':
case 'ready':
setIsSIMPresentOnFirstBoot(true);
break;
default:
setIsSIMPresentOnFirstBoot(false);
break;
}
setIsSIMPresentOnFirstBoot(cardState === 'ready');
}
cardState = null;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/communications/ftu/test/unit/operatorVariant_test.js
Expand Up @@ -54,7 +54,7 @@ suite('operatorVariant set First run state >', function() {
},
{
'preValSet': undefined,
'expecValSet': true,
'expecValSet': false,
'cardState': 'pinRequired',
'title': 'Operator Variant set first run type - sim pinRequired'
},
Expand Down

0 comments on commit 5e5c9f7

Please sign in to comment.