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

Commit

Permalink
Bug 1207813 locked-sim
Browse files Browse the repository at this point in the history
* Added icon on status bar for locked sim
* Displaying the strings for locked sim on Lock screen.
  • Loading branch information
Andrey.Smirnov authored and Andrey.Smirnov committed Dec 3, 2015
1 parent 217ee96 commit 3daf49b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions apps/system/js/signal_icon.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -70,24 +71,26 @@
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
// searching icon if the device is searching. Or show the signal bars
// 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');
Expand Down
Binary file modified apps/system/style/statusbar/images/icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/system/style/statusbar/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/system/style/statusbar/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/system/style/statusbar/images/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/system/style/statusbar/statusbar.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions shared/js/lockscreen_connection_info_manager.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -333,4 +338,5 @@

LockScreenConnInfoManager.prototype = LockScreenConnInfoManagerPrototype;
exports.LockScreenConnInfoManager = LockScreenConnInfoManager;

})(window);

0 comments on commit 3daf49b

Please sign in to comment.