Merge m-c to inbound. a=merge
Merge m-c to inbound. a=merge
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,17 +10,17 @@
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="84923f1940625c47ff4c1fdf01b10fde3b7d909e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
- <project name="gaia.git" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,17 +12,17 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
<project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,17 +10,17 @@
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="84923f1940625c47ff4c1fdf01b10fde3b7d909e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
- <project name="gaia.git" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,17 +10,17 @@
<!--original fetch url was git://codeaurora.org/-->
<remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="3a2947df41a480de1457a6dcdbf46ad0af70d8e0">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -12,17 +12,17 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="e95b4ce22c825da44d14299e1190ea39a5260bde"/>
<project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="471afab478649078ad7c75ec6b252481a59e19b8"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
{
"git": {
"git_revision": "",
"remote": "",
"branch": ""
},
- "revision": "842fd7448790cfaeaf0bf22164e599c74e9be0e9",
+ "revision": "1e5360b21cca807b2ea63ea8fb878b451131c9bd",
"repo_path": "/integration/gaia-central"
}
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -12,17 +12,17 @@
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="84923f1940625c47ff4c1fdf01b10fde3b7d909e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
- <project name="gaia.git" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -10,17 +10,17 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="84923f1940625c47ff4c1fdf01b10fde3b7d909e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
- <project name="gaia.git" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,17 +12,17 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
- <project name="gaia" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
<project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -12,17 +12,17 @@
<!--original fetch url was git://github.com/apitrace/-->
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="84923f1940625c47ff4c1fdf01b10fde3b7d909e">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
- <project name="gaia.git" path="gaia" remote="mozillaorg" revision="470826d13ae130a5c3d572d1029e595105485fb0"/>
+ <project name="gaia.git" path="gaia" remote="mozillaorg" revision="83de447d9ae9a59459d7a445f9348a254c661850"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="5883a99b6528ced9dafaed8d3ca2405fb285537e"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="9eec93462df6d01fe33a737bb4a185e9ad6cee15"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -693,33 +693,47 @@ DOMInterfaces = {
'nativeType': 'mozilla::dom::HTMLCanvasPrintState',
},
'MozChannel': {
'nativeType': 'nsIChannel',
'notflattened': True
},
+'MozCdmaIccInfo': {
+ 'headerFile': 'mozilla/dom/IccInfo.h',
+ 'nativeType': 'mozilla::dom::CdmaIccInfo',
+},
+
'MozCellBroadcast': {
'nativeType': 'mozilla::dom::CellBroadcast',
},
'MozCellBroadcastEtwsInfo': {
'nativeType': 'mozilla::dom::CellBroadcastEtwsInfo',
'headerFile': 'CellBroadcastMessage.h'
},
'MozCellBroadcastMessage': {
'nativeType': 'mozilla::dom::CellBroadcastMessage',
},
+'MozGsmIccInfo': {
+ 'headerFile': 'mozilla/dom/IccInfo.h',
+ 'nativeType': 'mozilla::dom::GsmIccInfo',
+},
+
'MozIcc': {
'nativeType': 'mozilla::dom::Icc',
},
+'MozIccInfo': {
+ 'nativeType': 'mozilla::dom::IccInfo',
+},
+
'MozIccManager': {
'nativeType': 'mozilla::dom::IccManager',
},
'MozMobileCellInfo': {
'nativeType': 'mozilla::dom::MobileCellInfo',
},
@@ -1789,17 +1803,16 @@ addExternalIface('HitRegionOptions', nat
addExternalIface('imgINotificationObserver', nativeType='imgINotificationObserver')
addExternalIface('imgIRequest', nativeType='imgIRequest', notflattened=True)
addExternalIface('MenuBuilder', nativeType='nsIMenuBuilder', notflattened=True)
addExternalIface('MozBoxObject', nativeType='nsIBoxObject')
addExternalIface('MozControllers', nativeType='nsIControllers')
addExternalIface('MozFrameLoader', nativeType='nsIFrameLoader', notflattened=True)
addExternalIface('MozFrameRequestCallback', nativeType='nsIFrameRequestCallback',
notflattened=True)
-addExternalIface('MozIccInfo', headerFile='nsIDOMIccInfo.h')
addExternalIface('MozMmsMessage')
addExternalIface('MozObserver', nativeType='nsIObserver', notflattened=True)
addExternalIface('MozRDFCompositeDataSource', nativeType='nsIRDFCompositeDataSource',
notflattened=True)
addExternalIface('MozRDFResource', nativeType='nsIRDFResource', notflattened=True)
addExternalIface('MozSmsMessage')
addExternalIface('MozTreeBoxObject', nativeType='nsITreeBoxObject',
notflattened=True)
--- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
@@ -11,17 +11,17 @@
#include "BluetoothUtils.h"
#include "jsapi.h"
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPtr.h"
#include "nsContentUtils.h"
#include "nsIAudioManager.h"
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionService.h"
#include "nsIMobileNetworkInfo.h"
#include "nsIObserverService.h"
#include "nsISettingsService.h"
#include "nsITelephonyService.h"
#include "nsRadioInterfaceLayer.h"
@@ -668,21 +668,21 @@ BluetoothHfpManager::HandleVoiceConnecti
void
BluetoothHfpManager::HandleIccInfoChanged(uint32_t aClientId)
{
nsCOMPtr<nsIIccProvider> icc =
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
NS_ENSURE_TRUE_VOID(icc);
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
icc->GetIccInfo(aClientId, getter_AddRefs(iccInfo));
NS_ENSURE_TRUE_VOID(iccInfo);
- nsCOMPtr<nsIDOMMozGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
+ nsCOMPtr<nsIGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
NS_ENSURE_TRUE_VOID(gsmIccInfo);
gsmIccInfo->GetMsisdn(mMsisdn);
}
void
BluetoothHfpManager::HandleShutdown()
{
MOZ_ASSERT(NS_IsMainThread());
--- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp
@@ -22,17 +22,17 @@
#include "nsContentUtils.h"
#include "nsIObserverService.h"
#include "nsISettingsService.h"
#include "nsServiceManagerUtils.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/SettingChangeNotificationBinding.h"
#ifdef MOZ_B2G_RIL
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionService.h"
#include "nsIMobileNetworkInfo.h"
#include "nsITelephonyService.h"
#include "nsRadioInterfaceLayer.h"
#endif
@@ -669,21 +669,21 @@ BluetoothHfpManager::HandleVoiceConnecti
void
BluetoothHfpManager::HandleIccInfoChanged(uint32_t aClientId)
{
nsCOMPtr<nsIIccProvider> icc =
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
NS_ENSURE_TRUE_VOID(icc);
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
icc->GetIccInfo(aClientId, getter_AddRefs(iccInfo));
NS_ENSURE_TRUE_VOID(iccInfo);
- nsCOMPtr<nsIDOMMozGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
+ nsCOMPtr<nsIGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
NS_ENSURE_TRUE_VOID(gsmIccInfo);
gsmIccInfo->GetMsisdn(mMsisdn);
}
#endif // MOZ_B2G_RIL
void
BluetoothHfpManager::HandleShutdown()
{
--- a/dom/bluetooth2/bluedroid/hfp/BluetoothHfpManager.cpp
+++ b/dom/bluetooth2/bluedroid/hfp/BluetoothHfpManager.cpp
@@ -11,17 +11,17 @@
#include "BluetoothUtils.h"
#include "jsapi.h"
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
#include "mozilla/Services.h"
#include "mozilla/StaticPtr.h"
#include "nsContentUtils.h"
#include "nsIAudioManager.h"
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionService.h"
#include "nsIMobileNetworkInfo.h"
#include "nsIObserverService.h"
#include "nsISettingsService.h"
#include "nsITelephonyService.h"
#include "nsRadioInterfaceLayer.h"
@@ -673,21 +673,21 @@ BluetoothHfpManager::HandleVoiceConnecti
void
BluetoothHfpManager::HandleIccInfoChanged(uint32_t aClientId)
{
nsCOMPtr<nsIIccProvider> icc =
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
NS_ENSURE_TRUE_VOID(icc);
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
icc->GetIccInfo(aClientId, getter_AddRefs(iccInfo));
NS_ENSURE_TRUE_VOID(iccInfo);
- nsCOMPtr<nsIDOMMozGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
+ nsCOMPtr<nsIGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
NS_ENSURE_TRUE_VOID(gsmIccInfo);
gsmIccInfo->GetMsisdn(mMsisdn);
}
void
BluetoothHfpManager::HandleShutdown()
{
MOZ_ASSERT(NS_IsMainThread());
--- a/dom/bluetooth2/bluez/BluetoothHfpManager.cpp
+++ b/dom/bluetooth2/bluez/BluetoothHfpManager.cpp
@@ -22,17 +22,17 @@
#include "nsContentUtils.h"
#include "nsIObserverService.h"
#include "nsISettingsService.h"
#include "nsServiceManagerUtils.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/SettingChangeNotificationBinding.h"
#ifdef MOZ_B2G_RIL
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
#include "nsIIccProvider.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionService.h"
#include "nsIMobileNetworkInfo.h"
#include "nsITelephonyService.h"
#include "nsRadioInterfaceLayer.h"
#endif
@@ -669,21 +669,21 @@ BluetoothHfpManager::HandleVoiceConnecti
void
BluetoothHfpManager::HandleIccInfoChanged(uint32_t aClientId)
{
nsCOMPtr<nsIIccProvider> icc =
do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
NS_ENSURE_TRUE_VOID(icc);
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
icc->GetIccInfo(aClientId, getter_AddRefs(iccInfo));
NS_ENSURE_TRUE_VOID(iccInfo);
- nsCOMPtr<nsIDOMMozGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
+ nsCOMPtr<nsIGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
NS_ENSURE_TRUE_VOID(gsmIccInfo);
gsmIccInfo->GetMsisdn(mMsisdn);
}
#endif // MOZ_B2G_RIL
void
BluetoothHfpManager::HandleShutdown()
{
--- a/dom/icc/Icc.cpp
+++ b/dom/icc/Icc.cpp
@@ -1,45 +1,60 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-#include "Icc.h"
+#include "mozilla/dom/Icc.h"
+#include "mozilla/dom/DOMRequest.h"
+#include "mozilla/dom/IccInfo.h"
#include "mozilla/dom/MozIccBinding.h"
#include "mozilla/dom/MozStkCommandEvent.h"
-#include "mozilla/dom/DOMRequest.h"
#include "mozilla/dom/ScriptSettings.h"
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
+#include "nsIIccProvider.h"
#include "nsJSON.h"
#include "nsRadioInterfaceLayer.h"
#include "nsServiceManagerUtils.h"
using namespace mozilla::dom;
-Icc::Icc(nsPIDOMWindow* aWindow, long aClientId, const nsAString& aIccId)
+NS_IMPL_CYCLE_COLLECTION_INHERITED(Icc, DOMEventTargetHelper, mIccInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(Icc)
+NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
+
+NS_IMPL_ADDREF_INHERITED(Icc, DOMEventTargetHelper)
+NS_IMPL_RELEASE_INHERITED(Icc, DOMEventTargetHelper)
+
+Icc::Icc(nsPIDOMWindow* aWindow, long aClientId, nsIIccInfo* aIccInfo)
: mLive(true)
, mClientId(aClientId)
- , mIccId(aIccId)
{
SetIsDOMBinding();
BindToOwner(aWindow);
mProvider = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
+ if (aIccInfo) {
+ aIccInfo->GetIccid(mIccId);
+ UpdateIccInfo(aIccInfo);
+ }
+
// Not being able to acquire the provider isn't fatal since we check
// for it explicitly below.
if (!mProvider) {
NS_WARNING("Could not acquire nsIIccProvider!");
}
}
void
Icc::Shutdown()
{
+ mIccInfo.SetNull();
mProvider = nullptr;
mLive = false;
}
nsresult
Icc::NotifyEvent(const nsAString& aName)
{
return DispatchTrustedEvent(aName);
@@ -69,40 +84,62 @@ Icc::NotifyStkEvent(const nsAString& aNa
init.mCommand = value;
nsRefPtr<MozStkCommandEvent> event =
MozStkCommandEvent::Constructor(this, aName, init);
return DispatchTrustedEvent(event);
}
+void
+Icc::UpdateIccInfo(nsIIccInfo* aIccInfo)
+{
+ if (!aIccInfo) {
+ mIccInfo.SetNull();
+ return;
+ }
+
+ nsCOMPtr<nsIGsmIccInfo> gsmIccInfo(do_QueryInterface(aIccInfo));
+ if (gsmIccInfo) {
+ if (mIccInfo.IsNull() || !mIccInfo.Value().IsMozGsmIccInfo()) {
+ mIccInfo.SetValue().SetAsMozGsmIccInfo() = new GsmIccInfo(GetOwner());
+ }
+ mIccInfo.Value().GetAsMozGsmIccInfo().get()->Update(gsmIccInfo);
+ return;
+ }
+
+ nsCOMPtr<nsICdmaIccInfo> cdmaIccInfo(do_QueryInterface(aIccInfo));
+ if (cdmaIccInfo) {
+ if (mIccInfo.IsNull() || !mIccInfo.Value().IsMozCdmaIccInfo()) {
+ mIccInfo.SetValue().SetAsMozCdmaIccInfo() = new CdmaIccInfo(GetOwner());
+ }
+ mIccInfo.Value().GetAsMozCdmaIccInfo().get()->Update(cdmaIccInfo);
+ return;
+ }
+
+ if (mIccInfo.IsNull() || !mIccInfo.Value().IsMozIccInfo()) {
+ mIccInfo.SetValue().SetAsMozIccInfo() = new IccInfo(GetOwner());
+ }
+ mIccInfo.Value().GetAsMozIccInfo().get()->Update(aIccInfo);
+}
+
// WrapperCache
JSObject*
Icc::WrapObject(JSContext* aCx)
{
return MozIccBinding::Wrap(aCx, this);
}
// MozIcc WebIDL
-already_AddRefed<nsIDOMMozIccInfo>
-Icc::GetIccInfo() const
+void
+Icc::GetIccInfo(Nullable<OwningMozIccInfoOrMozGsmIccInfoOrMozCdmaIccInfo>& aIccInfo) const
{
- if (!mProvider) {
- return nullptr;
- }
-
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
- nsresult rv = mProvider->GetIccInfo(mClientId, getter_AddRefs(iccInfo));
- if (NS_FAILED(rv)) {
- return nullptr;
- }
-
- return iccInfo.forget();
+ aIccInfo = mIccInfo;
}
void
Icc::GetCardState(nsString& aCardState) const
{
aCardState.SetIsVoid(true);
if (!mProvider) {
--- a/dom/icc/Icc.h
+++ b/dom/icc/Icc.h
@@ -1,58 +1,66 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_Icc_h
#define mozilla_dom_Icc_h
+#include "mozilla/dom/UnionTypes.h"
#include "mozilla/DOMEventTargetHelper.h"
-#include "nsIIccProvider.h"
+
+class nsIIccInfo;
+class nsIIccProvider;
namespace mozilla {
namespace dom {
class DOMRequest;
class Icc MOZ_FINAL : public DOMEventTargetHelper
{
public:
+ NS_DECL_ISUPPORTS_INHERITED
+ NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Icc, DOMEventTargetHelper)
NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
- Icc(nsPIDOMWindow* aWindow, long aClientId, const nsAString& aIccId);
+ Icc(nsPIDOMWindow* aWindow, long aClientId, nsIIccInfo* aIccInfo);
void
Shutdown();
nsresult
NotifyEvent(const nsAString& aName);
nsresult
NotifyStkEvent(const nsAString& aName, const nsAString& aMessage);
nsString
GetIccId()
{
return mIccId;
}
+ void
+ UpdateIccInfo(nsIIccInfo* aIccInfo);
+
nsPIDOMWindow*
GetParentObject() const
{
return GetOwner();
}
// WrapperCache
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
// MozIcc WebIDL
- already_AddRefed<nsIDOMMozIccInfo>
- GetIccInfo() const;
+ void
+ GetIccInfo(Nullable<OwningMozIccInfoOrMozGsmIccInfoOrMozCdmaIccInfo>& aIccInfo) const;
void
GetCardState(nsString& aCardState) const;
void
SendStkResponse(const JSContext* aCx, JS::Handle<JS::Value> aCommand,
JS::Handle<JS::Value> aResponse, ErrorResult& aRv);
@@ -111,14 +119,15 @@ public:
private:
bool mLive;
uint32_t mClientId;
nsString mIccId;
// mProvider is a xpcom service and will be released at shutdown, so it
// doesn't need to be cycle collected.
nsCOMPtr<nsIIccProvider> mProvider;
+ Nullable<OwningMozIccInfoOrMozGsmIccInfoOrMozCdmaIccInfo> mIccInfo;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_icc_Icc_h
new file mode 100644
--- /dev/null
+++ b/dom/icc/IccInfo.cpp
@@ -0,0 +1,230 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "mozilla/dom/IccInfo.h"
+
+#include "nsPIDOMWindow.h"
+
+#define CONVERT_STRING_TO_NULLABLE_ENUM(_string, _enumType, _enum) \
+{ \
+ uint32_t i = 0; \
+ for (const EnumEntry* entry = _enumType##Values::strings; \
+ entry->value; \
+ ++entry, ++i) { \
+ if (_string.EqualsASCII(entry->value)) { \
+ _enum.SetValue(static_cast<_enumType>(i)); \
+ } \
+ } \
+}
+
+using namespace mozilla::dom;
+
+// IccInfo
+
+NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(IccInfo, mWindow, mIccInfo)
+
+NS_IMPL_CYCLE_COLLECTING_ADDREF(IccInfo)
+NS_IMPL_CYCLE_COLLECTING_RELEASE(IccInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(IccInfo)
+ NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
+ NS_INTERFACE_MAP_ENTRY(nsISupports)
+NS_INTERFACE_MAP_END
+
+IccInfo::IccInfo(nsPIDOMWindow* aWindow)
+ : mWindow(aWindow)
+{
+ SetIsDOMBinding();
+}
+
+void
+IccInfo::Update(nsIIccInfo* aInfo)
+{
+ mIccInfo = aInfo;
+}
+
+JSObject*
+IccInfo::WrapObject(JSContext* aCx)
+{
+ return MozIccInfoBinding::Wrap(aCx, this);
+}
+
+Nullable<IccType>
+IccInfo::GetIccType() const
+{
+ if (!mIccInfo) {
+ return Nullable<IccType>();
+ }
+
+ nsAutoString type;
+ Nullable<IccType> iccType;
+
+ mIccInfo->GetIccType(type);
+ CONVERT_STRING_TO_NULLABLE_ENUM(type, IccType, iccType);
+
+ return iccType;
+}
+
+void
+IccInfo::GetIccid(nsAString& aIccId) const
+{
+ if (!mIccInfo) {
+ aIccId.SetIsVoid(true);
+ return;
+ }
+
+ mIccInfo->GetIccid(aIccId);
+}
+
+void
+IccInfo::GetMcc(nsAString& aMcc) const
+{
+ if (!mIccInfo) {
+ aMcc.SetIsVoid(true);
+ return;
+ }
+
+ mIccInfo->GetMcc(aMcc);
+}
+
+void
+IccInfo::GetMnc(nsAString& aMnc) const
+{
+ if (!mIccInfo) {
+ aMnc.SetIsVoid(true);
+ return;
+ }
+
+ mIccInfo->GetMnc(aMnc);
+}
+
+void
+IccInfo::GetSpn(nsAString& aSpn) const
+{
+ if (!mIccInfo) {
+ aSpn.SetIsVoid(true);
+ return;
+ }
+
+ mIccInfo->GetSpn(aSpn);
+}
+
+bool
+IccInfo::IsDisplayNetworkNameRequired() const
+{
+ if (!mIccInfo) {
+ return false;
+ }
+
+ bool isDisplayNetworkNameRequired;
+ mIccInfo->GetIsDisplayNetworkNameRequired(&isDisplayNetworkNameRequired);
+
+ return isDisplayNetworkNameRequired;
+}
+
+bool
+IccInfo::IsDisplaySpnRequired() const
+{
+ if (!mIccInfo) {
+ return false;
+ }
+
+ bool isDisplaySpnRequired;
+ mIccInfo->GetIsDisplaySpnRequired(&isDisplaySpnRequired);
+
+ return isDisplaySpnRequired;
+}
+
+// GsmIccInfo
+
+NS_IMPL_CYCLE_COLLECTION_INHERITED(GsmIccInfo, IccInfo, mGsmIccInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(GsmIccInfo)
+NS_INTERFACE_MAP_END_INHERITING(IccInfo)
+
+NS_IMPL_ADDREF_INHERITED(GsmIccInfo, IccInfo)
+NS_IMPL_RELEASE_INHERITED(GsmIccInfo, IccInfo)
+
+GsmIccInfo::GsmIccInfo(nsPIDOMWindow* aWindow)
+ : IccInfo(aWindow)
+{
+ SetIsDOMBinding();
+}
+
+void
+GsmIccInfo::Update(nsIGsmIccInfo* aInfo)
+{
+ IccInfo::Update(aInfo);
+ mGsmIccInfo = aInfo;
+}
+
+JSObject*
+GsmIccInfo::WrapObject(JSContext* aCx)
+{
+ return MozGsmIccInfoBinding::Wrap(aCx, this);
+}
+
+void
+GsmIccInfo::GetMsisdn(nsAString& aMsisdn) const
+{
+ if (!mGsmIccInfo) {
+ aMsisdn.SetIsVoid(true);
+ return;
+ }
+
+ mGsmIccInfo->GetMsisdn(aMsisdn);
+}
+
+// CdmaIccInfo
+
+NS_IMPL_CYCLE_COLLECTION_INHERITED(CdmaIccInfo, IccInfo, mCdmaIccInfo)
+
+NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(CdmaIccInfo)
+NS_INTERFACE_MAP_END_INHERITING(IccInfo)
+
+NS_IMPL_ADDREF_INHERITED(CdmaIccInfo, IccInfo)
+NS_IMPL_RELEASE_INHERITED(CdmaIccInfo, IccInfo)
+
+CdmaIccInfo::CdmaIccInfo(nsPIDOMWindow* aWindow)
+ : IccInfo(aWindow)
+{
+ SetIsDOMBinding();
+}
+
+void
+CdmaIccInfo::Update(nsICdmaIccInfo* aInfo)
+{
+ IccInfo::Update(aInfo);
+ mCdmaIccInfo = aInfo;
+}
+
+JSObject*
+CdmaIccInfo::WrapObject(JSContext* aCx)
+{
+ return MozCdmaIccInfoBinding::Wrap(aCx, this);
+}
+
+void
+CdmaIccInfo::GetMdn(nsAString& aMdn) const
+{
+ if (!mCdmaIccInfo) {
+ aMdn.SetIsVoid(true);
+ return;
+ }
+
+ mCdmaIccInfo->GetMdn(aMdn);
+}
+
+int32_t
+CdmaIccInfo::PrlVersion() const
+{
+ if (!mCdmaIccInfo) {
+ return 0;
+ }
+
+ int32_t prlVersion;
+ mCdmaIccInfo->GetPrlVersion(&prlVersion);
+
+ return prlVersion;
+}
new file mode 100644
--- /dev/null
+++ b/dom/icc/IccInfo.h
@@ -0,0 +1,128 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef mozilla_dom_IccInfo_h
+#define mozilla_dom_IccInfo_h
+
+#include "MozIccInfoBinding.h"
+#include "nsIIccInfo.h"
+#include "nsWrapperCache.h"
+
+class nsPIDOMWindow;
+
+namespace mozilla {
+namespace dom {
+
+class IccInfo : public nsISupports
+ , public nsWrapperCache
+{
+public:
+ NS_DECL_CYCLE_COLLECTING_ISUPPORTS
+ NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IccInfo)
+
+ explicit IccInfo(nsPIDOMWindow* aWindow);
+
+ void
+ Update(nsIIccInfo* aInfo);
+
+ nsPIDOMWindow*
+ GetParentObject() const
+ {
+ return mWindow;
+ }
+
+ // WrapperCache
+ virtual JSObject*
+ WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+ // WebIDL interface
+ Nullable<IccType>
+ GetIccType() const;
+
+ void
+ GetIccid(nsAString& aIccId) const;
+
+ void
+ GetMcc(nsAString& aMcc) const;
+
+ void
+ GetMnc(nsAString& aMnc) const;
+
+ void
+ GetSpn(nsAString& aSpn) const;
+
+ bool
+ IsDisplayNetworkNameRequired() const;
+
+ bool
+ IsDisplaySpnRequired() const;
+
+protected:
+ ~IccInfo() {}
+
+protected:
+ nsCOMPtr<nsPIDOMWindow> mWindow;
+ nsCOMPtr<nsIIccInfo> mIccInfo;
+};
+
+class GsmIccInfo MOZ_FINAL : public IccInfo
+{
+public:
+ NS_DECL_ISUPPORTS_INHERITED
+ NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(GsmIccInfo, IccInfo)
+
+ explicit GsmIccInfo(nsPIDOMWindow* aWindow);
+
+ void
+ Update(nsIGsmIccInfo* aInfo);
+
+ // WrapperCache
+ virtual JSObject*
+ WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+ // MozCdmaIccInfo WebIDL
+ void
+ GetMsisdn(nsAString& aMsisdn) const;
+
+private:
+ ~GsmIccInfo() {}
+
+private:
+ nsCOMPtr<nsIGsmIccInfo> mGsmIccInfo;
+};
+
+class CdmaIccInfo MOZ_FINAL : public IccInfo
+{
+public:
+ NS_DECL_ISUPPORTS_INHERITED
+ NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CdmaIccInfo, IccInfo)
+
+ explicit CdmaIccInfo(nsPIDOMWindow* aWindow);
+
+ void
+ Update(nsICdmaIccInfo* aInfo);
+
+ // WrapperCache
+ virtual JSObject*
+ WrapObject(JSContext* aCx) MOZ_OVERRIDE;
+
+ // MozCdmaIccInfo WebIDL
+ void
+ GetMdn(nsAString& aMdn) const;
+
+ int32_t
+ PrlVersion() const;
+
+private:
+ ~CdmaIccInfo() {}
+
+private:
+ nsCOMPtr<nsICdmaIccInfo> mCdmaIccInfo;
+};
+
+} // namespace dom
+} // namespace mozilla
+
+#endif // mozilla_dom_IccInfo_h
+
--- a/dom/icc/IccListener.cpp
+++ b/dom/icc/IccListener.cpp
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "IccListener.h"
#include "Icc.h"
#include "IccManager.h"
#include "nsIDOMClassInfo.h"
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
#include "nsRadioInterfaceLayer.h"
using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(IccListener, nsIIccListener)
IccListener::IccListener(IccManager* aIccManager, uint32_t aClientId)
: mClientId(aClientId)
@@ -22,23 +22,23 @@ IccListener::IccListener(IccManager* aIc
mProvider = do_GetService(NS_RILCONTENTHELPER_CONTRACTID);
if (!mProvider) {
NS_WARNING("Could not acquire nsIIccProvider!");
return;
}
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
mProvider->GetIccInfo(mClientId, getter_AddRefs(iccInfo));
if (iccInfo) {
nsString iccId;
iccInfo->GetIccid(iccId);
if (!iccId.IsEmpty()) {
- mIcc = new Icc(mIccManager->GetOwner(), mClientId, iccId);
+ mIcc = new Icc(mIccManager->GetOwner(), mClientId, iccInfo);
}
}
DebugOnly<nsresult> rv = mProvider->RegisterIccMsg(mClientId, this);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"Failed registering icc messages with provider");
}
@@ -93,35 +93,36 @@ IccListener::NotifyCardStateChanged()
}
return mIcc->NotifyEvent(NS_LITERAL_STRING("cardstatechange"));
}
NS_IMETHODIMP
IccListener::NotifyIccInfoChanged()
{
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
mProvider->GetIccInfo(mClientId, getter_AddRefs(iccInfo));
// Create/delete icc object based on current iccInfo.
// 1. If the mIcc is nullptr and iccInfo has valid data, create icc object and
// notify mIccManager a new icc is added.
// 2. If the mIcc is not nullptr and iccInfo becomes to null, delete existed
// icc object and notify mIccManager the icc is removed.
if (!mIcc) {
if (iccInfo) {
nsString iccId;
iccInfo->GetIccid(iccId);
if (!iccId.IsEmpty()) {
- mIcc = new Icc(mIccManager->GetOwner(), mClientId, iccId);
+ mIcc = new Icc(mIccManager->GetOwner(), mClientId, iccInfo);
mIccManager->NotifyIccAdd(iccId);
mIcc->NotifyEvent(NS_LITERAL_STRING("iccinfochange"));
}
}
} else {
+ mIcc->UpdateIccInfo(iccInfo);
mIcc->NotifyEvent(NS_LITERAL_STRING("iccinfochange"));
if (!iccInfo) {
nsString iccId = mIcc->GetIccId();
mIcc->Shutdown();
mIcc = nullptr;
mIccManager->NotifyIccRemove(iccId);
}
}
--- a/dom/icc/IccManager.cpp
+++ b/dom/icc/IccManager.cpp
@@ -3,17 +3,17 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "IccManager.h"
#include "mozilla/dom/MozIccManagerBinding.h"
#include "Icc.h"
#include "IccListener.h"
#include "mozilla/dom/IccChangeEvent.h"
#include "mozilla/Preferences.h"
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
using namespace mozilla::dom;
NS_IMPL_CYCLE_COLLECTION_CLASS(IccManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(IccManager,
DOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
--- a/dom/icc/interfaces/moz.build
+++ b/dom/icc/interfaces/moz.build
@@ -1,12 +1,12 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
XPIDL_SOURCES += [
- 'nsIDOMIccInfo.idl',
+ 'nsIIccInfo.idl',
'nsIIccProvider.idl',
]
XPIDL_MODULE = 'dom_icc'
rename from dom/icc/interfaces/nsIDOMIccInfo.idl
rename to dom/icc/interfaces/nsIIccInfo.idl
--- a/dom/icc/interfaces/nsIDOMIccInfo.idl
+++ b/dom/icc/interfaces/nsIIccInfo.idl
@@ -1,16 +1,16 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
-[scriptable, uuid(dd9f229c-e5a6-453a-8388-950af0ff9918)]
-interface nsIDOMMozIccInfo : nsISupports
+[scriptable, uuid(3ba11a90-34e0-11e4-8c21-0800200c9a66)]
+interface nsIIccInfo : nsISupports
{
/**
* Integrated Circuit Card Type.
*
* Possible values: null(unknown), "sim", "usim", "csim", ruim".
*/
readonly attribute DOMString iccType;
@@ -40,28 +40,28 @@ interface nsIDOMMozIccInfo : nsISupports
readonly attribute boolean isDisplayNetworkNameRequired;
/**
* Service provider name must be a part of displayed carrier name.
*/
readonly attribute boolean isDisplaySpnRequired;
};
-[scriptable, uuid(3c237e39-7af3-4748-baf4-4a3b6c3e0e66)]
-interface nsIDOMMozGsmIccInfo : nsIDOMMozIccInfo
+[scriptable, uuid(6c9c78b0-34e0-11e4-8c21-0800200c9a66)]
+interface nsIGsmIccInfo : nsIIccInfo
{
/**
* Mobile Station ISDN Number (MSISDN) of the subscriber, aka
* his phone number.
*/
readonly attribute DOMString msisdn;
};
-[scriptable, uuid(7e937d09-4d1d-43c5-96d8-c91396022809)]
-interface nsIDOMMozCdmaIccInfo : nsIDOMMozIccInfo
+[scriptable, uuid(7452f570-34e0-11e4-8c21-0800200c9a66)]
+interface nsICdmaIccInfo : nsIIccInfo
{
/**
* Mobile Directory Number (MDN) of the subscriber, aka his phone number.
*/
readonly attribute DOMString mdn;
/**
* Preferred Roaming List (PRL) version of the subscriber.
--- a/dom/icc/interfaces/nsIIccProvider.idl
+++ b/dom/icc/interfaces/nsIIccProvider.idl
@@ -1,45 +1,45 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface nsIDOMDOMRequest;
-interface nsIDOMMozIccInfo;
interface nsIDOMWindow;
+interface nsIIccInfo;
[scriptable, uuid(7c0ada3d-d8d4-493e-9243-fa3df39855e4)]
interface nsIIccListener : nsISupports
{
void notifyStkCommand(in DOMString aMessage);
void notifyStkSessionEnd();
void notifyCardStateChanged();
void notifyIccInfoChanged();
};
/**
* XPCOM component (in the content process) that provides the ICC information.
*/
-[scriptable, uuid(7c67ab92-52a3-4e11-995c-c0ad2f66c4cb)]
+[scriptable, uuid(1afa72d0-3d70-11e4-916c-0800200c9a66)]
interface nsIIccProvider : nsISupports
{
/**
* Called when a content process registers receiving unsolicited messages from
* RadioInterfaceLayer in the chrome process. Only a content process that has
* the 'mobileconnection' permission is allowed to register.
*/
void registerIccMsg(in unsigned long clientId, in nsIIccListener listener);
void unregisterIccMsg(in unsigned long clientId, in nsIIccListener listener);
/**
* UICC Information
*/
- nsIDOMMozIccInfo getIccInfo(in unsigned long clientId);
+ nsIIccInfo getIccInfo(in unsigned long clientId);
/**
* Card State
*/
DOMString getCardState(in unsigned long clientId);
/**
* STK interfaces.
--- a/dom/icc/moz.build
+++ b/dom/icc/moz.build
@@ -3,21 +3,23 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['interfaces']
EXPORTS.mozilla.dom += [
'Icc.h',
+ 'IccInfo.h',
'IccManager.h',
]
UNIFIED_SOURCES += [
'Icc.cpp',
+ "IccInfo.cpp",
'IccListener.cpp',
'IccManager.cpp',
]
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')
--- a/dom/icc/tests/marionette/test_icc_info.js
+++ b/dom/icc/tests/marionette/test_icc_info.js
@@ -30,17 +30,17 @@ function setEmulatorMccMnc(mcc, mnc) {
/* Basic test */
taskHelper.push(function basicTest() {
let iccInfo = icc.iccInfo;
// The emulator's hard coded iccid value.
// See it here {B2G_HOME}/external/qemu/telephony/sim_card.c#L299.
is(iccInfo.iccid, 89014103211118510720);
- if (iccInfo instanceof Ci.nsIDOMMozGsmIccInfo) {
+ if (iccInfo instanceof MozGsmIccInfo) {
log("Test Gsm IccInfo");
is(iccInfo.iccType, "sim");
is(iccInfo.spn, "Android");
// The emulator's hard coded mcc and mnc codes.
// See it here {B2G_HOME}/external/qemu/telephony/android_modem.c#L2465.
is(iccInfo.mcc, 310);
is(iccInfo.mnc, 260);
// Phone number is hardcoded in MSISDN
--- a/dom/mobilemessage/gonk/MmsService.js
+++ b/dom/mobilemessage/gonk/MmsService.js
@@ -334,32 +334,32 @@ MmsConnection.prototype = {
if (DEBUG) debug("isVoiceRoaming = " + isRoaming);
return isRoaming;
},
/**
* Get phone number from iccInfo.
*
* If the icc card is gsm card, the phone number is in msisdn.
- * @see nsIDOMMozGsmIccInfo
+ * @see nsIGsmIccInfo
*
* Otherwise, the phone number is in mdn.
- * @see nsIDOMMozCdmaIccInfo
+ * @see nsICdmaIccInfo
*/
getPhoneNumber: function() {
let number;
// Get the proper IccInfo based on the current card type.
try {
let iccInfo = null;
let baseIccInfo = this.radioInterface.rilContext.iccInfo;
if (baseIccInfo.iccType === 'ruim' || baseIccInfo.iccType === 'csim') {
- iccInfo = baseIccInfo.QueryInterface(Ci.nsIDOMMozCdmaIccInfo);
+ iccInfo = baseIccInfo.QueryInterface(Ci.nsICdmaIccInfo);
number = iccInfo.mdn;
} else {
- iccInfo = baseIccInfo.QueryInterface(Ci.nsIDOMMozGsmIccInfo);
+ iccInfo = baseIccInfo.QueryInterface(Ci.nsIGsmIccInfo);
number = iccInfo.msisdn;
}
} catch (e) {
if (DEBUG) {
debug("Exception - QueryInterface failed on iccinfo for GSM/CDMA info");
}
return null;
}
--- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp
+++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp
@@ -29,17 +29,17 @@
#include "nsIObserverService.h"
#include "nsJSUtils.h"
#include "nsPrintfCString.h"
#include "nsServiceManagerUtils.h"
#include "nsThreadUtils.h"
#include "prtime.h"
#ifdef MOZ_B2G_RIL
-#include "nsIDOMIccInfo.h"
+#include "nsIIccInfo.h"
#include "nsIMobileConnectionInfo.h"
#include "nsIMobileConnectionService.h"
#include "nsIMobileCellInfo.h"
#include "nsIRadioInterfaceLayer.h"
#endif
#ifdef AGPS_TYPE_INVALID
#define AGPS_HAVE_DUAL_APN
@@ -454,20 +454,20 @@ GonkGPSGeolocationProvider::RequestSetID
if (rilCtx) {
nsAutoString id;
if (flags & AGPS_RIL_REQUEST_SETID_IMSI) {
type = AGPS_SETID_TYPE_IMSI;
rilCtx->GetImsi(id);
}
if (flags & AGPS_RIL_REQUEST_SETID_MSISDN) {
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
rilCtx->GetIccInfo(getter_AddRefs(iccInfo));
if (iccInfo) {
- nsCOMPtr<nsIDOMMozGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
+ nsCOMPtr<nsIGsmIccInfo> gsmIccInfo = do_QueryInterface(iccInfo);
if (gsmIccInfo) {
type = AGPS_SETID_TYPE_MSISDN;
gsmIccInfo->GetMsisdn(id);
}
}
}
NS_ConvertUTF16toUTF8 idBytes(id);
@@ -489,17 +489,17 @@ GonkGPSGeolocationProvider::SetReference
mRadioInterface->GetRilContext(getter_AddRefs(rilCtx));
AGpsRefLocation location;
// TODO: Bug 772750 - get mobile connection technology from rilcontext
location.type = AGPS_REF_LOCATION_TYPE_UMTS_CELLID;
if (rilCtx) {
- nsCOMPtr<nsIDOMMozIccInfo> iccInfo;
+ nsCOMPtr<nsIIccInfo> iccInfo;
rilCtx->GetIccInfo(getter_AddRefs(iccInfo));
if (iccInfo) {
nsresult result;
nsAutoString mcc, mnc;
iccInfo->GetMcc(mcc);
iccInfo->GetMnc(mnc);
--- a/dom/system/gonk/RILContentHelper.js
+++ b/dom/system/gonk/RILContentHelper.js
@@ -36,22 +36,16 @@ const kPrefRilDebuggingEnabled = "ril.de
let DEBUG;
function debug(s) {
dump("-*- RILContentHelper: " + s + "\n");
}
const RILCONTENTHELPER_CID =
Components.ID("{472816e1-1fd6-4405-996c-806f9ea68174}");
-const ICCINFO_CID =
- Components.ID("{39d64d90-26a6-11e4-8c21-0800200c9a66}");
-const GSMICCINFO_CID =
- Components.ID("{e0fa785b-ad3f-46ed-bc56-fcb0d6fe4fa8}");
-const CDMAICCINFO_CID =
- Components.ID("{3d1f844f-9ec5-48fb-8907-aed2e5421709}");
const ICCCARDLOCKERROR_CID =
Components.ID("{08a71987-408c-44ff-93fd-177c0a85c3dd}");
const RIL_IPC_MSG_NAMES = [
"RIL:CardStateChanged",
"RIL:IccInfoChanged",
"RIL:CardLockResult",
"RIL:CardLockRetryCount",
@@ -103,66 +97,45 @@ function MobileIccCardLockRetryCount(opt
MobileIccCardLockRetryCount.prototype = {
__exposedProps__ : {lockType: 'r',
retryCount: 'r',
success: 'r'}
};
function IccInfo() {}
IccInfo.prototype = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozIccInfo]),
- classID: ICCINFO_CID,
- classInfo: XPCOMUtils.generateCI({
- classID: ICCINFO_CID,
- classDescription: "MozIccInfo",
- flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMMozIccInfo]
- }),
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsIIccInfo]),
- // nsIDOMMozIccInfo
+ // nsIIccInfo
iccType: null,
iccid: null,
mcc: null,
mnc: null,
spn: null,
isDisplayNetworkNameRequired: null,
isDisplaySpnRequired: null
};
function GsmIccInfo() {}
GsmIccInfo.prototype = {
- __proto__: IccInfo.prototype,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozGsmIccInfo]),
- classID: GSMICCINFO_CID,
- classInfo: XPCOMUtils.generateCI({
- classID: GSMICCINFO_CID,
- classDescription: "MozGsmIccInfo",
- flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMMozGsmIccInfo]
- }),
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsIGsmIccInfo,
+ Ci.nsIIccInfo]),
- // nsIDOMMozGsmIccInfo
+ // nsIGsmIccInfo
msisdn: null
};
function CdmaIccInfo() {}
CdmaIccInfo.prototype = {
- __proto__: IccInfo.prototype,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozCdmaIccInfo]),
- classID: CDMAICCINFO_CID,
- classInfo: XPCOMUtils.generateCI({
- classID: CDMAICCINFO_CID,
- classDescription: "MozCdmaIccInfo",
- flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMMozCdmaIccInfo]
- }),
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsICdmaIccInfo,
+ Ci.nsIIccInfo]),
- // nsIDOMMozCdmaIccInfo
+ // nsICdmaIccInfo
mdn: null,
prlVersion: 0
};
function IccCardLockError() {
}
IccCardLockError.prototype = {
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -48,22 +48,16 @@ let RILQUIRKS_HAVE_IPV6 =
libcutils.property_get("ro.moz.ril.ipv6", "false") == "true";
const RADIOINTERFACELAYER_CID =
Components.ID("{2d831c8d-6017-435b-a80c-e5d422810cea}");
const RADIOINTERFACE_CID =
Components.ID("{6a7c91f0-a2b3-4193-8562-8969296c0b54}");
const RILNETWORKINTERFACE_CID =
Components.ID("{3bdd52a9-3965-4130-b569-0ac5afed045e}");
-const ICCINFO_CID =
- Components.ID("{52eec7f0-26a4-11e4-8c21-0800200c9a66}");
-const GSMICCINFO_CID =
- Components.ID("{d90c4261-a99d-47bc-8b05-b057bb7e8f8a}");
-const CDMAICCINFO_CID =
- Components.ID("{39ba3c08-aacc-46d0-8c04-9b619c387061}");
const NEIGHBORINGCELLINFO_CID =
Components.ID("{f9dfe26a-851e-4a8b-a769-cbb1baae7ded}");
const GSMCELLINFO_CID =
Components.ID("{41f6201e-7263-42e3-b31f-38a9dc8a280a}");
const WCDMACELLINFO_CID =
Components.ID("{eeaaf307-df6e-4c98-b121-e3302b1fc468}");
const CDMACELLINFO_CID =
Components.ID("{b497d6e4-4cb8-4d6e-b673-840c7d5ddf25}");
@@ -936,66 +930,47 @@ try {
} catch (e) {}
return 1;
})());
} catch (e) {}
function IccInfo() {}
IccInfo.prototype = {
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozIccInfo]),
- classID: ICCINFO_CID,
- classInfo: XPCOMUtils.generateCI({
- classID: ICCINFO_CID,
- classDescription: "MozIccInfo",
- flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMMozIccInfo]
- }),
-
- // nsIDOMMozIccInfo
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsIIccInfo]),
+
+ // nsIIccInfo
iccType: null,
iccid: null,
mcc: null,
mnc: null,
spn: null,
isDisplayNetworkNameRequired: null,
isDisplaySpnRequired: null
};
function GsmIccInfo() {}
GsmIccInfo.prototype = {
__proto__: IccInfo.prototype,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozGsmIccInfo]),
- classID: GSMICCINFO_CID,
- classInfo: XPCOMUtils.generateCI({
- classID: GSMICCINFO_CID,
- classDescription: "MozGsmIccInfo",
- flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMMozGsmIccInfo]
- }),
-
- // nsIDOMMozGsmIccInfo
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsIGsmIccInfo,
+ Ci.nsIIccInfo]),
+
+ // nsIGsmIccInfo
msisdn: null
};
function CdmaIccInfo() {}
CdmaIccInfo.prototype = {
__proto__: IccInfo.prototype,
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIDOMMozCdmaIccInfo]),
- classID: CDMAICCINFO_CID,
- classInfo: XPCOMUtils.generateCI({
- classID: CDMAICCINFO_CID,
- classDescription: "MozCdmaIccInfo",
- flags: Ci.nsIClassInfo.DOM_OBJECT,
- interfaces: [Ci.nsIDOMMozCdmaIccInfo]
- }),
-
- // nsIDOMMozCdmaIccInfo
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsICdmaIccInfo,
+ Ci.nsIIccInfo]),
+
+ // nsICdmaIccInfo
mdn: null,
prlVersion: 0
};
function NeighboringCellInfo() {}
NeighboringCellInfo.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsINeighboringCellInfo]),
@@ -2136,30 +2111,30 @@ RadioInterface.prototype = {
message.rilMessageType);
}
},
/**
* Get phone number from iccInfo.
*
* If the icc card is gsm card, the phone number is in msisdn.
- * @see nsIDOMMozGsmIccInfo
+ * @see nsIGsmIccInfo
*
* Otherwise, the phone number is in mdn.
- * @see nsIDOMMozCdmaIccInfo
+ * @see nsICdmaIccInfo
*/
getPhoneNumber: function() {
let iccInfo = this.rilContext.iccInfo;
if (!iccInfo) {
return null;
}
// After moving SMS code out of RadioInterfaceLayer, we could use
- // |iccInfo instanceof Ci.nsIDOMMozGsmIccInfo| here.
+ // |iccInfo instanceof Ci.nsIGsmIccInfo| here.
// TODO: Bug 873351 - B2G SMS: move SMS code out of RadioInterfaceLayer to
// SmsService
let number = (iccInfo instanceof GsmIccInfo) ? iccInfo.msisdn : iccInfo.mdn;
// Workaround an xpconnect issue with undefined string objects.
// See bug 808220
if (number === undefined || number === "undefined") {
return null;
--- a/dom/system/gonk/nsIRadioInterfaceLayer.idl
+++ b/dom/system/gonk/nsIRadioInterfaceLayer.idl
@@ -1,41 +1,41 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
#include "nsINetworkManager.idl"
-interface nsIDOMMozIccInfo;
+interface nsICellInfoListCallback;
+interface nsIIccInfo;
interface nsIMobileConnectionInfo;
interface nsIMobileMessageCallback;
interface nsINeighboringCellIdsCallback;
-interface nsICellInfoListCallback;
[scriptable, uuid(6e0f45b8-410e-11e3-8c8e-b715b2cd0128)]
interface nsIRilNetworkInterface : nsINetworkInterface
{
readonly attribute unsigned long serviceId;
readonly attribute DOMString iccId;
/* The following attributes are for MMS proxy settings. */
readonly attribute DOMString mmsc; // Empty string if not set.
readonly attribute DOMString mmsProxy; // Empty string if not set.
readonly attribute long mmsPort; // -1 if not set.
};
-[scriptable, uuid(0226a2c1-a3b9-416a-92cb-c89e4dad4be0)]
+[scriptable, uuid(08a69c70-34b1-11e4-8c21-0800200c9a66)]
interface nsIRilContext : nsISupports
{
readonly attribute DOMString cardState;
readonly attribute DOMString imsi;
- readonly attribute nsIDOMMozIccInfo iccInfo;
+ readonly attribute nsIIccInfo iccInfo;
};
[scriptable, function, uuid(3bc96351-53b0-47a1-a888-c74c64b60f25)]
interface nsIRilSendWorkerMessageCallback : nsISupports
{
boolean handleResponse(in jsval response);
};
--- a/dom/system/gonk/ril_worker.js
+++ b/dom/system/gonk/ril_worker.js
@@ -2720,16 +2720,23 @@ RilObject.prototype = {
* @param program
* One of CALL_BARRING_PROGRAM_* constants.
* @param serviceClass
* One of ICC_SERVICE_CLASS_* constants.
*/
queryCallBarringStatus: function(options) {
options.facility = CALL_BARRING_PROGRAM_TO_FACILITY[options.program];
options.password = ""; // For query no need to provide it.
+
+ // For some operators, querying specific serviceClass doesn't work. We use
+ // serviceClass 0 instead, and then process the response to extract the
+ // answer for queryServiceClass.
+ options.queryServiceClass = options.serviceClass;
+ options.serviceClass = 0;
+
this.queryICCFacilityLock(options);
},
/**
* Configures call barring rule.
*
* @param program
* One of CALL_BARRING_PROGRAM_* constants.
@@ -5925,30 +5932,33 @@ RilObject.prototype[REQUEST_DEACTIVATE_D
RilObject.prototype[REQUEST_QUERY_FACILITY_LOCK] = function REQUEST_QUERY_FACILITY_LOCK(length, options) {
options.success = (options.rilRequestError === 0);
if (!options.success) {
options.errorMsg = RIL_ERROR_TO_GECKO_ERROR[options.rilRequestError];
this.sendChromeMessage(options);
return;
}
- let services;
- if (length) {
- // Buf.readInt32List()[0] for Call Barring is a bit vector of services.
- services = this.context.Buf.readInt32List()[0];
- } else {
+ if (!length) {
options.success = false;
options.errorMsg = GECKO_ERROR_GENERIC_FAILURE;
this.sendChromeMessage(options);
return;
}
- options.enabled = services === 0 ? false : true;
-
- if (options.success && (options.rilMessageType === "sendMMI")) {
+ // Buf.readInt32List()[0] for Call Barring is a bit vector of services.
+ let services = this.context.Buf.readInt32List()[0];
+
+ if (options.queryServiceClass) {
+ options.enabled = (services & options.queryServiceClass) ? true : false;
+ } else {
+ options.enabled = services ? true : false;
+ }
+
+ if (options.rilMessageType === "sendMMI") {
if (!options.enabled) {
options.statusMessage = MMI_SM_KS_SERVICE_DISABLED;
} else {
options.statusMessage = MMI_SM_KS_SERVICE_ENABLED_FOR;
let serviceClass = [];
for (let serviceClassMask = 1;
serviceClassMask <= ICC_SERVICE_CLASS_MAX;
serviceClassMask <<= 1) {
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -696,26 +696,32 @@ var interfaceNamesInGlobalScope =
"mozContact",
// IMPORTANT: Do not change this list without review from a DOM peer!
"MozContactChangeEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
"MozCSSKeyframeRule",
// IMPORTANT: Do not change this list without review from a DOM peer!
"MozCSSKeyframesRule",
// IMPORTANT: Do not change this list without review from a DOM peer!
+ {name: "MozCdmaIccInfo", b2g: true, pref: "dom.icc.enabled"},
+// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozEmergencyCbModeEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozIcc", b2g: true, pref: "dom.icc.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
+ {name: "MozIccInfo", b2g: true, pref: "dom.icc.enabled"},
+// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozIccManager", b2g: true, pref: "dom.icc.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozInputContext", b2g: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozInputMethodManager", b2g: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
+ {name: "MozGsmIccInfo", b2g: true, pref: "dom.icc.enabled"},
+// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozMessageDeletedEvent", b2g: true, pref: "dom.sms.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
"MozMmsEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
"MozMmsMessage",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "MozMobileCellInfo", b2g: true, pref: "dom.mobileconnection.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webidl/MozIcc.webidl
+++ b/dom/webidl/MozIcc.webidl
@@ -1,27 +1,25 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
-interface MozIccInfo;
-
[Pref="dom.icc.enabled"]
interface MozIcc : EventTarget
{
// Integrated Circuit Card Information.
/**
* Information stored in the device's ICC.
*
* Once the ICC becomes undetectable, iccinfochange event will be notified.
* Also, the attribute is set to null and this MozIcc object becomes invalid.
* Calling asynchronous functions raises exception then.
*/
- readonly attribute MozIccInfo? iccInfo;
+ readonly attribute (MozIccInfo or MozGsmIccInfo or MozCdmaIccInfo)? iccInfo;
/**
* The 'iccinfochange' event is notified whenever the icc info object
* changes.
*/
attribute EventHandler oniccinfochange;
// Integrated Circuit Card State.
new file mode 100644
--- /dev/null
+++ b/dom/webidl/MozIccInfo.webidl
@@ -0,0 +1,65 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+enum IccType {"sim", "usim", "csim", "ruim"};
+
+[Pref="dom.icc.enabled"]
+interface MozIccInfo {
+ /**
+ * Integrated Circuit Card Type.
+ */
+ readonly attribute IccType? iccType;
+
+ /**
+ * Integrated Circuit Card Identifier.
+ */
+ readonly attribute DOMString? iccid;
+
+ /**
+ * Mobile Country Code (MCC) of the subscriber's home network.
+ */
+ readonly attribute DOMString? mcc;
+
+ /**
+ * Mobile Network Code (MNC) of the subscriber's home network.
+ */
+ readonly attribute DOMString? mnc;
+
+ /**
+ * Service Provider Name (SPN) of the subscriber's home network.
+ */
+ readonly attribute DOMString? spn;
+
+ /**
+ * Network name must be a part of displayed carrier name.
+ */
+ readonly attribute boolean isDisplayNetworkNameRequired;
+
+ /**
+ * Service provider name must be a part of displayed carrier name.
+ */
+ readonly attribute boolean isDisplaySpnRequired;
+};
+
+[Pref="dom.icc.enabled"]
+interface MozGsmIccInfo : MozIccInfo {
+ /**
+ * Mobile Station ISDN Number (MSISDN) of the subscriber, aka
+ * his phone number.
+ */
+ readonly attribute DOMString? msisdn;
+};
+
+[Pref="dom.icc.enabled"]
+interface MozCdmaIccInfo : MozIccInfo {
+ /**
+ * Mobile Directory Number (MDN) of the subscriber, aka his phone number.
+ */
+ readonly attribute DOMString? mdn;
+
+ /**
+ * Preferred Roaming List (PRL) version of the subscriber.
+ */
+ readonly attribute long prlVersion;
+};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -611,16 +611,17 @@ if CONFIG['MOZ_B2G_BT']:
'BluetoothDevice.webidl',
'BluetoothManager.webidl',
]
if CONFIG['MOZ_B2G_RIL']:
WEBIDL_FILES += [
'IccCardLockError.webidl',
'MozIcc.webidl',
+ 'MozIccInfo.webidl',
'MozIccManager.webidl',
]
if CONFIG['MOZ_NFC']:
WEBIDL_FILES += [
'MozNDEFRecord.webidl',
'MozNFC.webidl',
'MozNFCPeer.webidl',
--- a/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp
+++ b/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp
@@ -44,16 +44,17 @@ RTSPSource::RTSPSource(
: mURL(url),
mUserAgent(userAgent),
mUIDValid(uidValid),
mUID(uid),
mState(DISCONNECTED),
mFinalResult(OK),
mDisconnectReplyID(0),
mLatestPausedUnit(0),
+ mPlayPending(false),
mSeekGeneration(0)
{
CHECK(aListener != NULL);
// Use main thread pointer, but allow access off main thread.
mListener =
new nsMainThreadPtrHolder<nsIStreamingProtocolListener>(aListener, false);
@@ -208,84 +209,94 @@ status_t RTSPSource::seekTo(int64_t seek
}
void RTSPSource::performPlay(int64_t playTimeUs) {
if (mState == DISCONNECTED) {
LOGI("We are in a idle state, restart play");
start();
return;
}
- if (mState != CONNECTED && mState != PAUSING) {
+ // If state is PAUSING, which means a previous PAUSE request is still being
+ // processed, put off the PLAY request until PausedDone.
+ if (mState == PAUSING) {
+ mPlayPending = true;
return;
}
- if (mState == PAUSING) {
- playTimeUs = mLatestPausedUnit;
+ // Reject invalid state transition.
+ if (mState != CONNECTED && mState != PAUSED) {
+ return;
+ }
+ // Use the latest received frame time if we were paused.
+ if (mState == PAUSED) {
+ playTimeUs = mLatestPausedUnit;
}
int64_t duration = 0;
getDuration(&duration);
MOZ_ASSERT(playTimeUs < duration,
"Should never receive an out of bounds play time!");
if (playTimeUs >= duration) {
- return;
+ return;
}
LOGI("performPlay : duration=%lld playTimeUs=%lld", duration, playTimeUs);
mState = PLAYING;
mHandler->play(playTimeUs);
}
void RTSPSource::performPause() {
+ // Reject invalid state transition.
if (mState != PLAYING) {
return;
}
LOGI("performPause :");
for (size_t i = 0; i < mTracks.size(); ++i) {
- TrackInfo *info = &mTracks.editItemAt(i);
- info->mLatestPausedUnit = 0;
+ TrackInfo *info = &mTracks.editItemAt(i);
+ info->mLatestPausedUnit = 0;
}
mLatestPausedUnit = 0;
mState = PAUSING;
mHandler->pause();
}
void RTSPSource::performResume() {
// TODO, Bug 895753.
}
void RTSPSource::performSuspend() {
// TODO, Bug 895753.
}
void RTSPSource::performPlaybackEnded() {
- // Transition from PLAYING to CONNECTED state so that we are ready to
- // perform an another play operation.
+ // Reject invalid state transition.
if (mState != PLAYING) {
return;
}
+ // Transition from PLAYING to CONNECTED state so that we are ready to
+ // perform an another play operation.
mState = CONNECTED;
}
void RTSPSource::performSeek(int64_t seekTimeUs) {
- if (mState != CONNECTED && mState != PLAYING && mState != PAUSING) {
+ if (mState != CONNECTED && mState != PLAYING && mState != PAUSED) {
return;
}
int64_t duration = 0;
getDuration(&duration);
MOZ_ASSERT(seekTimeUs < duration,
"Should never receive an out of bounds seek time!");
if (seekTimeUs >= duration) {
- return;
+ return;
}
for (size_t i = 0; i < mTracks.size(); ++i) {
- TrackInfo *info = &mTracks.editItemAt(i);
- info->mLatestPausedUnit = 0;
+ TrackInfo *info = &mTracks.editItemAt(i);
+ info->mLatestPausedUnit = 0;
}
mLatestPausedUnit = 0;
LOGI("performSeek: %llu", seekTimeUs);
mState = SEEKING;
mHandler->seek(seekTimeUs);
}
@@ -361,31 +372,42 @@ void RTSPSource::onMessageReceived(const
info->mLatestPausedUnit = 0;
}
mLatestPausedUnit = 0;
break;
}
case RtspConnectionHandler::kWhatPausedDone:
{
+ // Reject invalid state transition.
+ if (mState != PAUSING) {
+ return;
+ }
+ mState = PAUSED;
+
for (size_t i = 0; i < mTracks.size(); ++i) {
TrackInfo *info = &mTracks.editItemAt(i);
info->mLatestPausedUnit = info->mLatestReceivedUnit;
}
// The timestamp after a 'Pause' is done is the earliest
// timestamp among all of the latest received units.
TrackInfo *info = &mTracks.editItemAt(0);
mLatestPausedUnit = info->mLatestReceivedUnit;
for (size_t i = 1; i < mTracks.size(); ++i) {
TrackInfo *info = &mTracks.editItemAt(i);
if (mLatestPausedUnit > info->mLatestReceivedUnit) {
mLatestPausedUnit = info->mLatestReceivedUnit;
}
}
+
+ if (mPlayPending) {
+ mPlayPending = false;
+ performPlay(mLatestPausedUnit);
+ }
break;
}
case RtspConnectionHandler::kWhatAccessUnitComplete:
{
size_t trackIndex;
CHECK(msg->findSize("trackIndex", &trackIndex));
CHECK_LT(trackIndex, mTracks.size());
@@ -426,17 +448,17 @@ void RTSPSource::onMessageReceived(const
/ info->mTimeScale
* 1000000ll
+ info->mNormalPlaytimeUs;
accessUnit->meta()->setInt64("timeUs", nptUs);
info->mLatestReceivedUnit = nptUs;
// Drop the frames that are older than the frames in the queue.
if (info->mLatestPausedUnit && (int64_t)info->mLatestPausedUnit > nptUs) {
- break;
+ break;
}
source->queueAccessUnit(accessUnit);
}
onTrackDataAvailable(trackIndex);
break;
}
@@ -571,44 +593,44 @@ void RTSPSource::onConnected(bool isSeek
meta = new mozilla::net::RtspMetaData();
meta->SetTotalTracks(numTracks);
meta->SetMimeType(mimeType);
CHECK(format->findInt64(kKeyDuration, &int64Value));
meta->SetDuration(int64Value);
if (isAudio) {
- CHECK(format->findInt32(kKeyChannelCount, &int32Value));
- meta->SetChannelCount(int32Value);
+ CHECK(format->findInt32(kKeyChannelCount, &int32Value));
+ meta->SetChannelCount(int32Value);
- CHECK(format->findInt32(kKeySampleRate, &int32Value));
- meta->SetSampleRate(int32Value);
+ CHECK(format->findInt32(kKeySampleRate, &int32Value));
+ meta->SetSampleRate(int32Value);
} else {
- CHECK(format->findInt32(kKeyWidth, &int32Value));
- meta->SetWidth(int32Value);
+ CHECK(format->findInt32(kKeyWidth, &int32Value));
+ meta->SetWidth(int32Value);
- CHECK(format->findInt32(kKeyHeight, &int32Value));
- meta->SetHeight(int32Value);
+ CHECK(format->findInt32(kKeyHeight, &int32Value));
+ meta->SetHeight(int32Value);
}
// Optional meta data.
const void *data;
uint32_t type;
size_t length = 0;
if (format->findData(kKeyESDS, &type, &data, &length)) {
- nsCString esds;
- esds.Assign((const char *)data, length);
- meta->SetEsdsData(esds);
+ nsCString esds;
+ esds.Assign((const char *)data, length);
+ meta->SetEsdsData(esds);
}
if (format->findData(kKeyAVCC, &type, &data, &length)) {
- nsCString avcc;
- avcc.Assign((const char *)data, length);
- meta->SetAvccData(avcc);
+ nsCString avcc;
+ avcc.Assign((const char *)data, length);
+ meta->SetAvccData(avcc);
}
mListener->OnConnected(i, meta.get());
mTracks.push(info);
}
mState = CONNECTED;
}
--- a/netwerk/protocol/rtsp/rtsp/RTSPSource.h
+++ b/netwerk/protocol/rtsp/rtsp/RTSPSource.h
@@ -84,16 +84,17 @@ private:
};
enum State {
DISCONNECTED,
CONNECTING,
CONNECTED,
SEEKING,
PAUSING,
+ PAUSED,
PLAYING,
};
enum Flags {
// Don't log any URLs.
kFlagIncognito = 1,
};
@@ -112,16 +113,17 @@ private:
AString mURL;
AString mUserAgent;
bool mUIDValid;
uid_t mUID;
State mState;
status_t mFinalResult;
uint32_t mDisconnectReplyID;
uint64_t mLatestPausedUnit;
+ bool mPlayPending;
sp<ALooper> mLooper;
sp<AHandlerReflector<RTSPSource> > mReflector;
sp<RtspConnectionHandler> mHandler;
Vector<TrackInfo> mTracks;
sp<AnotherPacketSource> mAudioTrack;
sp<AnotherPacketSource> mVideoTrack;
--- a/services/mobileid/MobileIdentityManager.jsm
+++ b/services/mobileid/MobileIdentityManager.jsm
@@ -275,18 +275,17 @@ this.MobileIdentityManager = {
// First of all we need to check if we already have existing credentials
// for the given SIM information (ICC ID or MSISDN). If we have no valid
// credentials, we have to check with the server which options do we have
// to verify the associated phone number.
return this.credStore.getByIccId(this.iccInfo[aServiceId].iccId)
.then(
(creds) => {
if (creds) {
- this.iccInfo[aServiceId].credentials = creds;
- return;
+ return creds;
}
return this.credStore.getByMsisdn(this.iccInfo[aServiceId].msisdn);
}
)
.then(
(creds) => {
if (creds) {
this.iccInfo[aServiceId].credentials = creds;
@@ -301,20 +300,22 @@ this.MobileIdentityManager = {
return this.client.discover(this.iccInfo[aServiceId].msisdn,
this.iccInfo[aServiceId].mcc,
this.iccInfo[aServiceId].mnc,
this.iccInfo[aServiceId].roaming);
}
)
.then(
(result) => {
- log.debug("Discover result ${}", result);
+ // If we already have credentials for this ICC and no discover request
+ // is done, we just bail out.
if (!result || !result.verificationMethods) {
return;
}
+ log.debug("Discover result ${}", result);
this.iccInfo[aServiceId].verificationMethods = result.verificationMethods;
this.iccInfo[aServiceId].verificationDetails = result.verificationDetails;
this.iccInfo[aServiceId].canDoSilentVerification =
(result.verificationMethods.indexOf(SMS_MO_MT) != -1);
return;
}
);
},
@@ -670,24 +671,26 @@ this.MobileIdentityManager = {
(!result.phoneNumber && (result.serviceId === undefined))) {
return Promise.reject(ERROR_INTERNAL_INVALID_PROMPT_RESULT);
}
let msisdn;
let mcc;
// If the user selected one of the existing SIM cards we have to check
- // that we either have the MSISDN for that SIM or we can do a silent
- // verification that does not require us to have the MSISDN in advance.
+ // that we either have the MSISDN for that SIM, we have already existing
+ // credentials or we can do a silent verification that does not require
+ // us to have the MSISDN in advance.
// result.serviceId can be "0".
if (result.serviceId !== undefined &&
result.serviceId !== null) {
let icc = this.iccInfo[result.serviceId];
log.debug("icc ${}", icc);
- if (!icc || !icc.msisdn && !icc.canDoSilentVerification) {
+ if (!icc || !icc.msisdn && !icc.canDoSilentVerification &&
+ !icc.credentials) {
return Promise.reject(ERROR_INTERNAL_CANNOT_VERIFY_SELECTION);
}
msisdn = icc.msisdn;
mcc = icc.mcc;
} else {
msisdn = result.prefix ? result.prefix + result.phoneNumber
: result.phoneNumber;
mcc = result.mcc;
@@ -967,17 +970,22 @@ this.MobileIdentityManager = {
.then(
(creds) => {
// Even if we have credentails it is possible that the user has
// removed the permission to share its mobile id with this origin, so
// we check the permission and if it is not granted, we ask the user
// before generating and sharing the assertion.
// If we've just prompted the user in the previous step, the permission
// is already granted and stored so we just progress the credentials.
+ // But we have to refresh the cached permission before checking.
if (creds) {
+ permission = permissionManager.testPermissionFromPrincipal(
+ principal,
+ MOBILEID_PERM
+ );
if (permission == Ci.nsIPermissionManager.ALLOW_ACTION) {
return creds;
}
return this.promptAndVerify(principal, manifestURL, creds);
}
return this.promptAndVerify(principal, manifestURL);
}
)
--- a/services/mobileid/tests/xpcshell/test_mobileid_manager.js
+++ b/services/mobileid/tests/xpcshell/test_mobileid_manager.js
@@ -452,17 +452,17 @@ add_test(function() {
credStore._("getByOrigin").call(1).arg(1, ORIGIN);
credStore._("getByMsisdn").callsLength(1);
credStore._("getByMsisdn").call(1).arg(1, PHONE_NUMBER);
credStore._("add").callsLength(1);
credStore._("add").call(1).arg(1, undefined);
credStore._("add").call(1).arg(2, PHONE_NUMBER);
credStore._("add").call(1).arg(3, ORIGIN);
credStore._("add").call(1).arg(4, SESSION_TOKEN);
- credStore._("add").call(1).arg(5, null);
+ credStore._("add").call(1).arg(5, []);
// MockUI.
ui._("startFlow").callsLength(1);
ui._("startFlow").call(1).arg(1, "");
ui._("startFlow").call(1).arg(2, []);
ui._("verifyCodePrompt").callsLength(1);
ui._("verifyCodePrompt").call(1).arg(1, 3);
@@ -955,20 +955,20 @@ add_test(function() {
// MockCredStore.
credStore._("getByOrigin").callsLength(1);
credStore._("getByOrigin").call(1).arg(1, ORIGIN);
credStore._("add").callsLength(1);
credStore._("add").call(1).arg(1, undefined);
credStore._("add").call(1).arg(2, PHONE_NUMBER);
credStore._("add").call(1).arg(3, ORIGIN);
credStore._("add").call(1).arg(4, SESSION_TOKEN);
- credStore._("add").call(1).arg(5, null);
+ credStore._("add").call(1).arg(5, []);
credStore._("setDeviceIccIds").callsLength(1);
credStore._("setDeviceIccIds").call(1).arg(1, PHONE_NUMBER);
- credStore._("setDeviceIccIds").call(1).arg(2, null);
+ credStore._("setDeviceIccIds").call(1).arg(2, []);
// MockUI.
ui._("startFlow").callsLength(1);
ui._("verifyCodePrompt").callsLength(0);
ui._("verify").callsLength(0);
// MockClient.
client._("discover").callsLength(0);
@@ -1049,17 +1049,17 @@ add_test(function() {
credStore._("getByOrigin").call(1).arg(1, ORIGIN);
credStore._("getByMsisdn").callsLength(1);
credStore._("getByMsisdn").call(1).arg(1, ANOTHER_PHONE_NUMBER);
credStore._("add").callsLength(1);
credStore._("add").call(1).arg(1, undefined);
credStore._("add").call(1).arg(2, ANOTHER_PHONE_NUMBER);
credStore._("add").call(1).arg(3, ORIGIN);
credStore._("add").call(1).arg(4, _sessionToken);
- credStore._("add").call(1).arg(5, null);
+ credStore._("add").call(1).arg(5, []);
credStore._("setDeviceIccIds").callsLength(0);
credStore._("removeOrigin").callsLength(1);
credStore._("removeOrigin").call(1).arg(1, PHONE_NUMBER);
credStore._("removeOrigin").call(1).arg(2, ORIGIN);
// MockUI.
ui._("startFlow").callsLength(1);
ui._("verifyCodePrompt").callsLength(1);
@@ -1134,17 +1134,17 @@ add_test(function() {
credStore._("getByOrigin").callsLength(1);
credStore._("getByOrigin").call(1).arg(1, ORIGIN);
credStore._("getByMsisdn").callsLength(0);
credStore._("add").callsLength(1);
credStore._("add").call(1).arg(1, undefined);
credStore._("add").call(1).arg(2, PHONE_NUMBER);
credStore._("add").call(1).arg(3, ORIGIN);
credStore._("add").call(1).arg(4, _sessionToken);
- credStore._("add").call(1).arg(5, null);
+ credStore._("add").call(1).arg(5, []);
credStore._("setDeviceIccIds").callsLength(1);
credStore._("removeOrigin").callsLength(0);
// MockUI.
ui._("startFlow").callsLength(1);
ui._("verifyCodePrompt").callsLength(0);
ui._("verify").callsLength(0);
@@ -1224,17 +1224,17 @@ add_test(function() {
credStore._("getByOrigin").call(1).arg(1, ORIGIN);
credStore._("getByMsisdn").callsLength(1);
credStore._("getByMsisdn").call(1).arg(1, ANOTHER_PHONE_NUMBER);
credStore._("add").callsLength(1);
credStore._("add").call(1).arg(1, undefined);
credStore._("add").call(1).arg(2, ANOTHER_PHONE_NUMBER);
credStore._("add").call(1).arg(3, ORIGIN);
credStore._("add").call(1).arg(4, _sessionToken);
- credStore._("add").call(1).arg(5, null);
+ credStore._("add").call(1).arg(5, []);
credStore._("setDeviceIccIds").callsLength(0);
credStore._("removeOrigin").callsLength(1);
credStore._("removeOrigin").call(1).arg(1, PHONE_NUMBER);
credStore._("removeOrigin").call(1).arg(2, ORIGIN);
// MockUI.
ui._("startFlow").callsLength(1);
ui._("verifyCodePrompt").callsLength(1);
@@ -1273,17 +1273,17 @@ add_test(function() {
do_test_pending();
let _sessionToken = Date.now();
let existingCredentials = {
sessionToken: _sessionToken,
msisdn: PHONE_NUMBER,
origin: ORIGIN,
- deviceIccIds: null
+ deviceIccIds: []
};
let ui = new MockUi({
startFlowResult: {
phoneNumber: PHONE_NUMBER
}
});
MobileIdentityManager.ui = ui;
@@ -1318,17 +1318,17 @@ add_test(function() {
credStore._("getByOrigin").call(2).arg(1, ORIGIN);
credStore._("getByMsisdn").callsLength(1);
credStore._("getByMsisdn").call(1).arg(1, PHONE_NUMBER);
credStore._("add").callsLength(1);
credStore._("add").call(1).arg(1, undefined);
credStore._("add").call(1).arg(2, PHONE_NUMBER);
credStore._("add").call(1).arg(3, ORIGIN);
credStore._("add").call(1).arg(4, SESSION_TOKEN);
- credStore._("add").call(1).arg(5, null);
+ credStore._("add").call(1).arg(5, []);
credStore._("setDeviceIccIds").callsLength(0);
credStore._("delete").callsLength(1);
credStore._("delete").call(1).arg(1, PHONE_NUMBER);
// MockUI.
ui._("startFlow").callsLength(1);
ui._("verifyCodePrompt").callsLength(1);
ui._("verify").callsLength(1);
@@ -1378,22 +1378,18 @@ add_test(function() {
getRadioInterface: function(aIndex) {
return this._interfaces[aIndex];
}
};
MobileIdentityManager._mobileConnectionService = {
_interfaces: [RADIO_INTERFACE, ANOTHER_RADIO_INTERFACE],
- getVoiceConnectionInfo: function(aIndex) {
- return this._interfaces[aIndex].voice;
- },
-
- getDataConnectionInfo: function(aIndex) {
- return this._interfaces[aIndex].data;
+ getItemByServiceId: function(aIndex) {
+ return this._interfaces[aIndex];
}
};
MobileIdentityManager._iccProvider = {
_listeners: [],
registerIccMsg: function(aClientId, aIccListener) {
this._listeners.push(aIccListener);
},
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -157,17 +157,17 @@ else
INNER_MAKE_PACKAGE = $(CREATE_FINAL_TAR) - $(MOZ_PKG_DIR) | bzip2 -vf > $(PACKAGE)
endif
INNER_UNMAKE_PACKAGE = bunzip2 -c $(UNPACKAGE) | $(UNPACK_TAR)
MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK)
endif
ifeq ($(MOZ_PKG_FORMAT),ZIP)
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
# We can't use signcode on zip files
-MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
+MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out osslsigncode signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
endif
PKG_SUFFIX = .zip
INNER_MAKE_PACKAGE = $(ZIP) -r9D $(PACKAGE) $(MOZ_PKG_DIR) \
-x \*/.mkdir.done
INNER_UNMAKE_PACKAGE = $(UNZIP) $(UNPACKAGE)
MAKE_SDK = $(ZIP) -r9D $(SDK) $(MOZ_APP_NAME)-sdk
endif
ifeq ($(MOZ_PKG_FORMAT),SFX7Z)
--- a/tools/update-packaging/Makefile.in
+++ b/tools/update-packaging/Makefile.in
@@ -42,17 +42,17 @@ endif
endif
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
ifdef MOZ_EXTERNAL_SIGNING_FORMAT
# We can't use signcode on mar files
-MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
+MOZ_EXTERNAL_SIGNING_FORMAT := $(filter-out osslsigncode signcode,$(MOZ_EXTERNAL_SIGNING_FORMAT))
MOZ_EXTERNAL_SIGNING_FORMAT := mar $(MOZ_EXTERNAL_SIGNING_FORMAT)
endif
dir-stage := $(call mkdir_deps,$(STAGE_DIR))
complete-patch:: $(dir-stage)
ifeq ($(OS_TARGET), WINNT)
test -f $(UNPACKAGE)