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 #7414 from Rik/roaming-825121
Browse files Browse the repository at this point in the history
Bug 825121 - [Lockscreen] service provider shown wrongly when roaming, r=timdream, a=blocking-basecamp
  • Loading branch information
timdream committed Jan 9, 2013
2 parents 2a3b7e8 + 6c1de81 commit 8869378
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions apps/system/test/unit/mobile_operator_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ suite('shared/MobileOperator', function() {
assert.isUndefined(infos.carrier);
assert.isUndefined(infos.region);
});
test('Connection with roaming', function() {
MockMobileConnection.voice.roaming = true;
var infos = MobileOperator.userFacingInfo(MockMobileConnection);
assert.equal(infos.operator, 'Fake short');
assert.isUndefined(infos.carrier);
assert.isUndefined(infos.region);
});
test('Connection with roaming and SPN display', function() {
MockMobileConnection.voice.roaming = true;
MockMobileConnection.iccInfo.isDisplaySpnRequired = true;
var infos = MobileOperator.userFacingInfo(MockMobileConnection);
assert.equal(infos.operator, 'Fake short');
assert.isUndefined(infos.carrier);
assert.isUndefined(infos.region);
});
});
suite('Brazilian connection', function() {
test('Connection ', function() {
Expand Down
3 changes: 2 additions & 1 deletion shared/js/mobile_operator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ var MobileOperator = {
var iccInfo = mobileConnection.iccInfo;
var operator = network.shortName || network.longName;

if (iccInfo.isDisplaySpnRequired && iccInfo.spn) {
if (iccInfo.isDisplaySpnRequired && iccInfo.spn
&& !mobileConnection.voice.roaming) {
if (iccInfo.isDisplayNetworkNameRequired) {
operator = operator + ' ' + iccInfo.spn;
} else {
Expand Down

0 comments on commit 8869378

Please sign in to comment.