mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 788191 - Exporting ICC SPN and MSISDN, r=vicamo, sr=sicking
SPN is Service Provider Name, MSISDN is Mobile Station ISDN Number (i.e. user's phone number), and both can be useful to have, e.g., to be able to display them in Gaia settings (as Android does).
This commit is contained in:
parent
0658c28103
commit
7e170b73a1
@ -374,7 +374,7 @@ interface nsIDOMMozMobileCellInfo: nsISupports
|
||||
readonly attribute unsigned long gsmCellId;
|
||||
};
|
||||
|
||||
[scriptable, uuid(8854ee5f-8ffa-45c1-84d6-e87d82de6ae8)]
|
||||
[scriptable, uuid(a71c66ed-dfb0-4c33-9942-049e6f03dbed)]
|
||||
interface nsIDOMMozMobileICCInfo : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -391,4 +391,15 @@ interface nsIDOMMozMobileICCInfo : nsISupports
|
||||
* Mobile Network Code (MNC) of the subscriber's home network.
|
||||
*/
|
||||
readonly attribute unsigned short mnc;
|
||||
|
||||
/**
|
||||
* Service Provider Name (SPN) of the subscriber's home network.
|
||||
*/
|
||||
readonly attribute DOMString spn;
|
||||
|
||||
/**
|
||||
* Mobile Station ISDN Number (MSISDN) of the subscriber's, aka
|
||||
* his phone number.
|
||||
*/
|
||||
readonly attribute DOMString msisdn;
|
||||
};
|
||||
|
@ -17,6 +17,10 @@ is(connection.iccInfo.iccid, 89014103211118510720);
|
||||
// See it here {B2G_HOME}/external/qemu/telephony/android_modem.c#L2465.
|
||||
is(connection.iccInfo.mcc, 310);
|
||||
is(connection.iccInfo.mnc, 260);
|
||||
is(connection.iccInfo.spn, "Android");
|
||||
// Phone number is hardcoded in MSISDN
|
||||
// See {B2G_HOME}/external/qemu/telephony/sim_card.c, in asimcard_io()
|
||||
is(connection.iccInfo.msisdn, "15555215554");
|
||||
|
||||
SpecialPowers.removePermission("mobileconnection", document);
|
||||
finish();
|
||||
|
@ -111,7 +111,9 @@ MobileICCInfo.prototype = {
|
||||
|
||||
iccid: null,
|
||||
mcc: 0,
|
||||
mnc: 0
|
||||
mnc: 0,
|
||||
spn: null,
|
||||
msisdn: null,
|
||||
};
|
||||
|
||||
function MobileConnectionInfo() {}
|
||||
|
@ -1401,7 +1401,9 @@ RadioInterfaceLayer.prototype = {
|
||||
let iccInfoChanged = !oldIcc ||
|
||||
oldIcc.iccid != message.iccid ||
|
||||
oldIcc.mcc != message.mcc ||
|
||||
oldIcc.mnc != message.mnc;
|
||||
oldIcc.mnc != message.mnc ||
|
||||
oldIcc.spn != message.spn ||
|
||||
oldIcc.msisdn != message.msisdn;
|
||||
if (!iccInfoChanged) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user