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

Commit 33b9a7c

Browse files
Andrey.SmirnovAndrey.Smirnov
authored andcommitted
Bug 1207813 - locked-sim
* Added icon on status bar for locked sim * Displaying the strings for locked sim on Lock screen.
1 parent 217ee96 commit 33b9a7c

File tree

7 files changed

+14
-2
lines changed

7 files changed

+14
-2
lines changed

apps/system/js/signal_icon.js

100644100755
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
_(this.element, 'statusbarSignalNoSimCard');
5656
} else if (data && data.connected &&
5757
data.type && data.type.startsWith('evdo')) {
58+
this.element.classList.remove('sim-locked');
5859
// "Carrier" / "Carrier (Roaming)" (EVDO)
5960
// Show signal strength of data call as EVDO only supports data call.
6061
this.debug('data connection, level=', data.relSignalStrength);
@@ -70,24 +71,26 @@
7071
this.updateSignal(voice);
7172
} else if (simslot.isLocked()) {
7273
this.debug('locked simcard');
74+
this.element.classList.add('sim-locked');
75+
this.show();
7376
// SIM locked
7477
// We check if the sim card is locked after checking hasActiveCall
7578
// because we still need to show the signal bars in the case of
7679
// making emergency calls when the sim card is locked.
77-
this.hide();
7880
} else {
7981
this.debug('emergency call only');
8082
// emergencyCallsOnly is always true if voice.connected is false. Show
8183
// searching icon if the device is searching. Or show the signal bars
8284
// with a red "x", which stands for emergency calls only.
8385
this.updateSignal(voice, true);
8486
}
87+
8588
};
8689
SignalIcon.prototype.updateSignal = function(connInfo, emergency) {
8790
if (!this.element) {
8891
return;
8992
}
90-
93+
this.element.classList.remove('sim-locked');
9194
this.show();
9295
var _ = navigator.mozL10n.setAttributes, level;
9396
var previousSearching = (this.element.dataset.searching === 'true');
-1.66 KB
Loading
-1.88 KB
Loading
887 Bytes
Loading
-5.35 KB
Loading

apps/system/style/statusbar/statusbar.css

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ html[dir="rtl"] #statusbar-call-forwardings > * { float: right; }
439439
background-position: -14rem -8rem;
440440
position: relative;
441441
}
442+
.sb-icon-signal.sim-locked{
443+
background-position: -30rem -4rem;
444+
}
442445

443446
.sb-icon-network-activity {
444447
width: 1.6rem;

shared/js/lockscreen_connection_info_manager.js

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,12 @@
265265
} else if (SIMSlotManager.noSIMCardConnectedToNetwork()) {
266266
if (index === 0) {
267267
lineText(nextLine(), 'emergencyCallsOnly');
268+
269+
if(SIMSlotManager.getSlots()[index].isLocked()){
270+
lineText(nextLine(), 'emergencyCallsOnly-pinRequired');
271+
}
268272
}
273+
269274
simIDLine.hidden = true;
270275
return;
271276
}
@@ -333,4 +338,5 @@
333338

334339
LockScreenConnInfoManager.prototype = LockScreenConnInfoManagerPrototype;
335340
exports.LockScreenConnInfoManager = LockScreenConnInfoManager;
341+
336342
})(window);

0 commit comments

Comments
 (0)