зеркало из https://github.com/mozilla/gecko-dev.git
Bug 999458 - 2.c/2: 0 <= gsmLocationAreaCode <= 65535. r=echen
This commit is contained in:
Родитель
edd424c7b2
Коммит
dac9700650
|
@ -523,10 +523,7 @@ function getEmulatorGsmLocation() {
|
|||
is(aResults[1].substring(0,2), "ci", "ci output");
|
||||
|
||||
let lac = parseInt(aResults[0].substring(5));
|
||||
lac = (lac < 0 ? 65535 : lac);
|
||||
let cid = parseInt(aResults[1].substring(4));
|
||||
cid = (cid < 0 ? 268435455 : cid);
|
||||
|
||||
return { lac: lac, cid: cid };
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ function verifyDataCellLocationInfo(aLac, aCid) {
|
|||
let cell = mobileConnection.data.cell;
|
||||
ok(cell, "location available");
|
||||
|
||||
// Initial LAC/CID. Android emulator initializes both value to
|
||||
// 0xffff/0xffffffff.
|
||||
is(cell.gsmLocationAreaCode, aLac, "data.cell.gsmLocationAreaCode");
|
||||
is(cell.gsmCellId, aCid, "data.cell.gsmCellId");
|
||||
is(cell.cdmaBaseStationId, -1, "data.cell.cdmaBaseStationId");
|
||||
|
|
|
@ -13,8 +13,8 @@ const INITIAL_STATES = {
|
|||
relSignalStrength: 44,
|
||||
|
||||
cell: {
|
||||
gsmLocationAreaCode: 65535,
|
||||
gsmCellId: 268435455,
|
||||
gsmLocationAreaCode: 0,
|
||||
gsmCellId: 0,
|
||||
cdmaBaseStationId: -1,
|
||||
cdmaBaseStationLatitude: -2147483648,
|
||||
cdmaBaseStationLongitude: -2147483648,
|
||||
|
@ -73,8 +73,8 @@ const TEST_DATA = [{
|
|||
signalStrength: -99,
|
||||
relSignalStrength: 44,
|
||||
cell: {
|
||||
gsmLocationAreaCode: 65535,
|
||||
gsmCellId: 268435455
|
||||
gsmLocationAreaCode: 0,
|
||||
gsmCellId: 0
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -88,8 +88,8 @@ const TEST_DATA = [{
|
|||
signalStrength: -99,
|
||||
relSignalStrength: 44,
|
||||
cell: {
|
||||
gsmLocationAreaCode: 65535,
|
||||
gsmCellId: 268435455
|
||||
gsmLocationAreaCode: 0,
|
||||
gsmCellId: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,6 @@ function verifyVoiceCellLocationInfo(aLac, aCid) {
|
|||
let cell = mobileConnection.voice.cell;
|
||||
ok(cell, "location available");
|
||||
|
||||
// Initial LAC/CID. Android emulator initializes both value to
|
||||
// 0xffff/0xffffffff.
|
||||
is(cell.gsmLocationAreaCode, aLac, "check voice.cell.gsmLocationAreaCode");
|
||||
is(cell.gsmCellId, aCid, "check voice.cell.gsmCellId");
|
||||
is(cell.cdmaBaseStationId, -1, "check voice.cell.cdmaBaseStationId");
|
||||
|
|
|
@ -13,8 +13,8 @@ const INITIAL_STATES = {
|
|||
relSignalStrength: 44,
|
||||
|
||||
cell: {
|
||||
gsmLocationAreaCode: 65535,
|
||||
gsmCellId: 268435455,
|
||||
gsmLocationAreaCode: 0,
|
||||
gsmCellId: 0,
|
||||
cdmaBaseStationId: -1,
|
||||
cdmaBaseStationLatitude: -2147483648,
|
||||
cdmaBaseStationLongitude: -2147483648,
|
||||
|
@ -70,8 +70,8 @@ const TEST_DATA = [{
|
|||
signalStrength: -99,
|
||||
relSignalStrength: 44,
|
||||
cell: {
|
||||
gsmLocationAreaCode: 65535,
|
||||
gsmCellId: 268435455
|
||||
gsmLocationAreaCode: 0,
|
||||
gsmCellId: 0
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -85,8 +85,8 @@ const TEST_DATA = [{
|
|||
signalStrength: -99,
|
||||
relSignalStrength: 44,
|
||||
cell: {
|
||||
gsmLocationAreaCode: 65535,
|
||||
gsmCellId: 268435455
|
||||
gsmLocationAreaCode: 0,
|
||||
gsmCellId: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13622,7 +13622,7 @@ ICCUtilsHelperObject.prototype = {
|
|||
let iccInfo = RIL.iccInfo;
|
||||
let pnnEntry;
|
||||
|
||||
if (!mcc || !mnc || !lac) {
|
||||
if (!mcc || !mnc || lac == null || lac < 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче