diff --git a/apps/sharedtest/test/unit/lockscreen_conn_info_manager_test.js b/apps/sharedtest/test/unit/lockscreen_conn_info_manager_test.js old mode 100644 new mode 100755 index e4b834c528b5..391df656e7d2 --- a/apps/sharedtest/test/unit/lockscreen_conn_info_manager_test.js +++ b/apps/sharedtest/test/unit/lockscreen_conn_info_manager_test.js @@ -322,6 +322,20 @@ suite('system/LockScreenConnInfoManager >', function() { 'emergencyCallsOnly-unknownSIMState'); }); + test('pinRequired', function() { + mockMobileConnection.voice = { + connected: false, + emergencyCallsOnly: true, + isLocked: true + }; + iccObj.cardState = 'pinRequired'; + + subject.updateConnStates(); + assert.equal(domConnstateL1.dataset.l10nId, 'emergencyCallsOnly'); + assert.equal(domConnstateL2.dataset.l10nId, + 'emergencyCallsOnly-pinRequired'); + }); + test('other card state', function() { mockMobileConnection.voice = { connected: false, diff --git a/apps/system/js/signal_icon.js b/apps/system/js/signal_icon.js old mode 100644 new mode 100755 index 51d8eb77bc3b..323c5ed6cb7f --- a/apps/system/js/signal_icon.js +++ b/apps/system/js/signal_icon.js @@ -55,6 +55,7 @@ _(this.element, 'statusbarSignalNoSimCard'); } else if (data && data.connected && data.type && data.type.startsWith('evdo')) { + this.element.classList.remove('sim-locked'); // "Carrier" / "Carrier (Roaming)" (EVDO) // Show signal strength of data call as EVDO only supports data call. this.debug('data connection, level=', data.relSignalStrength); @@ -70,11 +71,12 @@ this.updateSignal(voice); } else if (simslot.isLocked()) { this.debug('locked simcard'); + this.element.classList.add('sim-locked'); + this.show(); // SIM locked // We check if the sim card is locked after checking hasActiveCall // because we still need to show the signal bars in the case of // making emergency calls when the sim card is locked. - this.hide(); } else { this.debug('emergency call only'); // emergencyCallsOnly is always true if voice.connected is false. Show @@ -82,12 +84,13 @@ // with a red "x", which stands for emergency calls only. this.updateSignal(voice, true); } + }; SignalIcon.prototype.updateSignal = function(connInfo, emergency) { if (!this.element) { return; } - + this.element.classList.remove('sim-locked'); this.show(); var _ = navigator.mozL10n.setAttributes, level; var previousSearching = (this.element.dataset.searching === 'true'); diff --git a/apps/system/style/statusbar/images/icons.png b/apps/system/style/statusbar/images/icons.png index 2e5413caec30..f3dbd7081767 100644 Binary files a/apps/system/style/statusbar/images/icons.png and b/apps/system/style/statusbar/images/icons.png differ diff --git a/apps/system/style/statusbar/images/icons@1.5x.png b/apps/system/style/statusbar/images/icons@1.5x.png index 69f81f9e8631..1291bef0a6d2 100644 Binary files a/apps/system/style/statusbar/images/icons@1.5x.png and b/apps/system/style/statusbar/images/icons@1.5x.png differ diff --git a/apps/system/style/statusbar/images/icons@2.25x.png b/apps/system/style/statusbar/images/icons@2.25x.png index 0df8b6835e73..144ed69a9c72 100644 Binary files a/apps/system/style/statusbar/images/icons@2.25x.png and b/apps/system/style/statusbar/images/icons@2.25x.png differ diff --git a/apps/system/style/statusbar/images/icons@2x.png b/apps/system/style/statusbar/images/icons@2x.png index 3e72e387e952..f741e5ef733c 100644 Binary files a/apps/system/style/statusbar/images/icons@2x.png and b/apps/system/style/statusbar/images/icons@2x.png differ diff --git a/apps/system/style/statusbar/statusbar.css b/apps/system/style/statusbar/statusbar.css old mode 100644 new mode 100755 index 6c0f199d4222..04ae871121ac --- a/apps/system/style/statusbar/statusbar.css +++ b/apps/system/style/statusbar/statusbar.css @@ -439,6 +439,9 @@ html[dir="rtl"] #statusbar-call-forwardings > * { float: right; } background-position: -14rem -8rem; position: relative; } +.sb-icon-signal.sim-locked{ + background-position: -30rem -4rem; +} .sb-icon-network-activity { width: 1.6rem; diff --git a/apps/system/test/unit/signal_icon_test.js b/apps/system/test/unit/signal_icon_test.js old mode 100644 new mode 100755 index dc67aee2fef5..0e2e565fc0d1 --- a/apps/system/test/unit/signal_icon_test.js +++ b/apps/system/test/unit/signal_icon_test.js @@ -185,7 +185,7 @@ suite('system/SignalIcon', function() { test('SIM card is locked', function() { MockService.mockQueryWith('Radio.settingEnabled', true); - this.sinon.stub(subject, 'hide'); + this.sinon.stub(subject, 'sim-locked'); this.sinon.stub(subject.manager, 'isLocked').returns(true); subject.update(); assert.isTrue(subject.hide.called); diff --git a/shared/js/lockscreen_connection_info_manager.js b/shared/js/lockscreen_connection_info_manager.js old mode 100644 new mode 100755 index d7bf4c39ece3..f38e5afa9e12 --- a/shared/js/lockscreen_connection_info_manager.js +++ b/shared/js/lockscreen_connection_info_manager.js @@ -265,7 +265,12 @@ } else if (SIMSlotManager.noSIMCardConnectedToNetwork()) { if (index === 0) { lineText(nextLine(), 'emergencyCallsOnly'); + + if(SIMSlotManager.getSlots()[index].isLocked()){ + lineText(nextLine(), 'emergencyCallsOnly-pinRequired'); + } } + simIDLine.hidden = true; return; } @@ -333,4 +338,5 @@ LockScreenConnInfoManager.prototype = LockScreenConnInfoManagerPrototype; exports.LockScreenConnInfoManager = LockScreenConnInfoManager; + })(window);