merge b2g-inbound to mozilla-central

This commit is contained in:
Carsten "Tomcat" Book 2014-05-28 14:33:48 +02:00
commit b01cb5d079
52 changed files with 741 additions and 277 deletions

View File

@ -78,14 +78,12 @@ SettingsListener.observe('language.current', 'en-US', function(value) {
Services.prefs.setCharPref('general.useragent.locale', value);
let prefName = 'intl.accept_languages';
if (Services.prefs.prefHasUserValue(prefName)) {
Services.prefs.clearUserPref(prefName);
}
let defaultBranch = Services.prefs.getDefaultBranch(null);
let intl = '';
try {
intl = Services.prefs.getComplexValue(prefName,
Ci.nsIPrefLocalizedString).data;
intl = defaultBranch.getComplexValue(prefName,
Ci.nsIPrefLocalizedString).data;
} catch(e) {}
// Bug 830782 - Homescreen is in English instead of selected locale after
@ -474,6 +472,13 @@ SettingsListener.observe('debugger.remote-mode', false, function(value) {
#endif
});
// If debug access to certified apps is allowed, we need to preserve system
// sources so that they are visible in the debugger.
let forbidCertified =
Services.prefs.getBoolPref('devtools.debugger.forbid-certified-apps');
Services.prefs.setBoolPref('javascript.options.discardSystemSource',
forbidCertified);
// =================== Device Storage ====================
SettingsListener.observe('device.storage.writable.name', 'sdcard', function(value) {
if (Services.prefs.getPrefType('device.storage.writable.name') != Ci.nsIPrefBranch.PREF_STRING) {

View File

@ -19,13 +19,13 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="5688c04e38ceacb9069b6157db69b37beafab331"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -17,10 +17,10 @@
</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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -128,9 +128,9 @@
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="c3ee0c875393607430086f942950d1b3f496ab0e"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="acbdbe5196f06589da05c3bd1f14b27a6cae69c2"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="02f0cc39345c36689ea4bca436b789b38f5751e0"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="dd94b2e17a146cb782d71933d25dcaa9c060e6ce"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="56e7fe044cb6a0ad689b96ad7a3636d65e769b34"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="ea8011252172347bd7711f6fc9c5cc24ab1a109b"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
</manifest>

View File

@ -15,14 +15,14 @@
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<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="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>

View File

@ -19,13 +19,13 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="5688c04e38ceacb9069b6157db69b37beafab331"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

View File

@ -15,13 +15,12 @@
<project name="platform_build" path="build" remote="b2g" revision="42c224f4304c10166739fd9e25b2db1036410bd8">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -119,7 +118,7 @@
<!-- Flame specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="e8a318f7690092e639ba88891606f4183e846d3f"/>
<project name="device/qcom/common" path="device/qcom/common" revision="34ed8345250bb97262d70a052217a92e83444ede"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="b99bd353c9a1e292a21e686f2d6b35aafa1d06ca"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="81eab0894a773fc0274b64432f1f49da95d63b7d"/>
<project name="kernel/msm" path="kernel" revision="228d59147ff524e90774c566eef03260cc6857b8"/>
<project name="platform/bootable/recovery" path="bootable/recovery" revision="f2914eacee9120680a41463708bb6ee8291749fc"/>
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="81c4a859d75d413ad688067829d21b7ba9205f81"/>
@ -141,7 +140,7 @@
<project name="platform/hardware/ril" path="hardware/ril" revision="c4e2ac95907a5519a0e09f01a0d8e27fec101af0"/>
<project name="platform/system/bluetooth" path="system/bluetooth" revision="e1eb226fa3ad3874ea7b63c56a9dc7012d7ff3c2"/>
<project name="platform/system/core" path="system/core" revision="bbf7212289fc8311e43f9d11e10788e310d36a08"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="56e7fe044cb6a0ad689b96ad7a3636d65e769b34"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="ea8011252172347bd7711f6fc9c5cc24ab1a109b"/>
<project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
</manifest>

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "a9c51a635e985bfa1a1448101e9763dd35426dfa",
"revision": "f2274c0c94a989a204b03b693c73ed1414b0f543",
"repo_path": "/integration/gaia-central"
}

View File

@ -17,12 +17,12 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<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="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

View File

@ -15,7 +15,7 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -19,12 +19,12 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<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="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/>

View File

@ -17,12 +17,12 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<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="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

View File

@ -17,10 +17,10 @@
</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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -127,7 +127,7 @@
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="56e7fe044cb6a0ad689b96ad7a3636d65e769b34"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="ea8011252172347bd7711f6fc9c5cc24ab1a109b"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>

View File

@ -17,10 +17,10 @@
</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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -127,7 +127,7 @@
<project name="device-mako" path="device/lge/mako" remote="b2g" revision="78d17f0c117f0c66dd55ee8d5c5dde8ccc93ecba"/>
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
<project name="device/lge/mako-kernel" path="device/lge/mako-kernel" revision="d1729e53d71d711c8fde25eab8728ff2b9b4df0e"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="56e7fe044cb6a0ad689b96ad7a3636d65e769b34"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="ea8011252172347bd7711f6fc9c5cc24ab1a109b"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="0e1929fa3aa38bf9d40e9e953d619fab8164c82e"/>

View File

@ -17,12 +17,12 @@
<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="bc6f07c149770c6e6dfbea941ac65138dc364a15"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="389dee3293891002f825ea1d5d92283094b7d931"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="87ee480405c4a109c01f68dd64de625f1ff819d9"/>
<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="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="df6b6315b7217522ae03151449a841f0c382c888"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="ef8e1c9128ee14189263382788a7b6b06353a6e8"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

View File

@ -19,6 +19,8 @@ if CONFIG['MOZ_WEBAPP_RUNTIME']:
add_tier_dir('app', 'b2g/chrome')
add_tier_dir('app', 'b2g/components')
add_tier_dir('app', 'b2g/dev/app')
# Never add tier dirs after browser because they apparently won't get
# packaged properly on Mac.
add_tier_dir('app', 'browser')

5
b2g/dev/app/Makefile.in Normal file
View File

@ -0,0 +1,5 @@
# 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/.
PREF_JS_EXPORTS += $(topsrcdir)/b2g/app/b2g.js

View File

@ -627,7 +627,11 @@
; [Default Preferences]
; All the pref files must be part of base to prevent migration bugs
#ifdef MOZ_MULET
@BINPATH@/defaults/pref/b2g.js
#else
@BINPATH@/@PREF_DIR@/b2g.js
#endif
@BINPATH@/@PREF_DIR@/channel-prefs.js
@BINPATH@/greprefs.js
@BINPATH@/defaults/autoconfig/platform.js

View File

@ -7,10 +7,6 @@ dist_dest = $(DIST)/$(MOZ_MACBUNDLE_NAME)
PREF_JS_EXPORTS = $(srcdir)/profile/firefox.js \
$(NULL)
ifdef MOZ_MULET
PREF_JS_EXPORTS += $(topsrcdir)/b2g/app/b2g.js
endif
# hardcode en-US for the moment
AB_CD = en-US

View File

@ -10,10 +10,17 @@ include $(topsrcdir)/config/rules.mk
MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
ifdef MOZ_MULET
MOZ_PKG_MANIFEST_P += $(topsrcdir)/b2g/installer/package-manifest.in
endif
# Some files have been already bundled with xulrunner
ifndef SYSTEM_LIBXUL
ifndef MOZ_MULET
MOZ_PKG_FATAL_WARNINGS = 1
endif
endif
DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
@ -88,7 +95,7 @@ ifdef MOZ_PKG_MANIFEST_P
MOZ_PKG_MANIFEST = package-manifest
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) $(GLOBAL_DEPS)
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $(MOZ_PKG_MANIFEST_P) -o $@)
GARBAGE += $(MOZ_PKG_MANIFEST)
endif

View File

@ -233,12 +233,6 @@ RemoveObserversExceptBluetoothManager
return PL_DHASH_NEXT;
}
void
BluetoothService::RemoveObserverFromTable(const nsAString& key)
{
mBluetoothSignalObserverTable.Remove(key);
}
// static
BluetoothService*
BluetoothService::Create()

View File

@ -308,9 +308,6 @@ public:
bool
IsToggling() const;
void
RemoveObserverFromTable(const nsAString& key);
/**
* Below 2 function/variable are used for ensuring event 'AdapterAdded' will
* be fired after event 'Enabled'.

View File

@ -233,12 +233,6 @@ RemoveObserversExceptBluetoothManager
return PL_DHASH_NEXT;
}
void
BluetoothService::RemoveObserverFromTable(const nsAString& key)
{
mBluetoothSignalObserverTable.Remove(key);
}
// static
BluetoothService*
BluetoothService::Create()

View File

@ -308,9 +308,6 @@ public:
bool
IsToggling() const;
void
RemoveObserverFromTable(const nsAString& key);
/**
* Below 2 function/variable are used for ensuring event 'AdapterAdded' will
* be fired after event 'Enabled'.

View File

@ -5,7 +5,7 @@
#include "nsISupports.idl"
#include "nsIDOMSmsSegmentInfo.idl"
[scriptable, uuid(41db87b0-b0a1-11e3-a04f-cf487d837ee3)]
[scriptable, uuid(0e6f8ace-cc59-11e3-aad5-e32847abfda1)]
interface nsIMobileMessageCallback : nsISupports
{
/**
@ -30,7 +30,7 @@ interface nsIMobileMessageCallback : nsISupports
* |message| can be nsIDOMMoz{Mms,Sms}Message.
*/
void notifyMessageSent(in nsISupports message);
void notifySendMessageFailed(in long error);
void notifySendMessageFailed(in long error, in nsISupports message);
/**
* |message| can be nsIDOMMoz{Mms,Sms}Message.

View File

@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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 "DOMMobileMessageError.h"
#include "mozilla/dom/DOMMobileMessageErrorBinding.h"
#include "mozilla/dom/UnionTypes.h"
#include "nsIDOMMozMmsMessage.h"
#include "nsIDOMMozSmsMessage.h"
using namespace mozilla::dom;
NS_IMPL_CYCLE_COLLECTION_CLASS(DOMMobileMessageError)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DOMMobileMessageError, DOMError)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mSms)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mMms)
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(DOMMobileMessageError, DOMError)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSms)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMms)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(DOMMobileMessageError)
NS_INTERFACE_MAP_END_INHERITING(DOMError)
NS_IMPL_ADDREF_INHERITED(DOMMobileMessageError, DOMError)
NS_IMPL_RELEASE_INHERITED(DOMMobileMessageError, DOMError)
DOMMobileMessageError::DOMMobileMessageError(nsPIDOMWindow* aWindow,
const nsAString& aName,
nsIDOMMozSmsMessage* aSms)
: DOMError(aWindow, aName)
, mSms(aSms)
, mMms(nullptr)
{
}
DOMMobileMessageError::DOMMobileMessageError(nsPIDOMWindow* aWindow,
const nsAString& aName,
nsIDOMMozMmsMessage* aMms)
: DOMError(aWindow, aName)
, mSms(nullptr)
, mMms(aMms)
{
}
void
DOMMobileMessageError::GetData(OwningMozSmsMessageOrMozMmsMessage& aRetVal) const
{
if (mSms) {
aRetVal.SetAsMozSmsMessage() = mSms;
return;
}
if (mMms) {
aRetVal.SetAsMozMmsMessage() = mMms;
return;
}
MOZ_ASSUME_UNREACHABLE("Bad object with invalid mSms and mMms.");
}
JSObject*
DOMMobileMessageError::WrapObject(JSContext* aCx)
{
return DOMMobileMessageErrorBinding::Wrap(aCx, this);
}

View File

@ -0,0 +1,45 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* 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_MobileMessageError_h
#define mozilla_dom_MobileMessageError_h
#include "mozilla/dom/DOMError.h"
class nsIDOMMozMmsMessage;
class nsIDOMMozSmsMessage;
namespace mozilla {
namespace dom {
class OwningMozSmsMessageOrMozMmsMessage;
class DOMMobileMessageError MOZ_FINAL : public DOMError
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DOMMobileMessageError, DOMError)
DOMMobileMessageError(nsPIDOMWindow* aWindow, const nsAString& aName,
nsIDOMMozSmsMessage* aSms);
DOMMobileMessageError(nsPIDOMWindow* aWindow, const nsAString& aName,
nsIDOMMozMmsMessage* aMms);
virtual JSObject*
WrapObject(JSContext* aCx) MOZ_OVERRIDE;
void GetData(OwningMozSmsMessageOrMozMmsMessage& aRetVal) const;
private:
nsCOMPtr<nsIDOMMozSmsMessage> mSms;
nsCOMPtr<nsIDOMMozMmsMessage> mMms;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_MobileMessageError_h

View File

@ -16,11 +16,57 @@
#include "xpcpublic.h"
#include "nsServiceManagerUtils.h"
#include "nsTArrayHelpers.h"
#include "DOMMobileMessageError.h"
namespace mozilla {
namespace dom {
namespace mobilemessage {
static nsAutoString
ConvertErrorCodeToErrorString(int32_t aError)
{
nsAutoString errorStr;
switch (aError) {
case nsIMobileMessageCallback::NO_SIGNAL_ERROR:
errorStr = NS_LITERAL_STRING("NoSignalError");
break;
case nsIMobileMessageCallback::NOT_FOUND_ERROR:
errorStr = NS_LITERAL_STRING("NotFoundError");
break;
case nsIMobileMessageCallback::UNKNOWN_ERROR:
errorStr = NS_LITERAL_STRING("UnknownError");
break;
case nsIMobileMessageCallback::INTERNAL_ERROR:
errorStr = NS_LITERAL_STRING("InternalError");
break;
case nsIMobileMessageCallback::NO_SIM_CARD_ERROR:
errorStr = NS_LITERAL_STRING("NoSimCardError");
break;
case nsIMobileMessageCallback::RADIO_DISABLED_ERROR:
errorStr = NS_LITERAL_STRING("RadioDisabledError");
break;
case nsIMobileMessageCallback::INVALID_ADDRESS_ERROR:
errorStr = NS_LITERAL_STRING("InvalidAddressError");
break;
case nsIMobileMessageCallback::FDN_CHECK_ERROR:
errorStr = NS_LITERAL_STRING("FdnCheckError");
break;
case nsIMobileMessageCallback::NON_ACTIVE_SIM_CARD_ERROR:
errorStr = NS_LITERAL_STRING("NonActiveSimCardError");
break;
case nsIMobileMessageCallback::STORAGE_FULL_ERROR:
errorStr = NS_LITERAL_STRING("StorageFullError");
break;
case nsIMobileMessageCallback::SIM_NOT_MATCHED_ERROR:
errorStr = NS_LITERAL_STRING("SimNotMatchedError");
break;
default: // SUCCESS_NO_ERROR is handled above.
MOZ_CRASH("Should never get here!");
}
return errorStr;
}
NS_IMPL_ADDREF(MobileMessageCallback)
NS_IMPL_RELEASE(MobileMessageCallback)
@ -78,56 +124,26 @@ MobileMessageCallback::NotifySuccess(nsISupports *aMessage, bool aAsync)
}
nsresult
MobileMessageCallback::NotifyError(int32_t aError, bool aAsync)
MobileMessageCallback::NotifyError(int32_t aError, DOMError *aDetailedError, bool aAsync)
{
nsAutoString errorStr;
switch (aError) {
case nsIMobileMessageCallback::NO_SIGNAL_ERROR:
errorStr = NS_LITERAL_STRING("NoSignalError");
break;
case nsIMobileMessageCallback::NOT_FOUND_ERROR:
errorStr = NS_LITERAL_STRING("NotFoundError");
break;
case nsIMobileMessageCallback::UNKNOWN_ERROR:
errorStr = NS_LITERAL_STRING("UnknownError");
break;
case nsIMobileMessageCallback::INTERNAL_ERROR:
errorStr = NS_LITERAL_STRING("InternalError");
break;
case nsIMobileMessageCallback::NO_SIM_CARD_ERROR:
errorStr = NS_LITERAL_STRING("NoSimCardError");
break;
case nsIMobileMessageCallback::RADIO_DISABLED_ERROR:
errorStr = NS_LITERAL_STRING("RadioDisabledError");
break;
case nsIMobileMessageCallback::INVALID_ADDRESS_ERROR:
errorStr = NS_LITERAL_STRING("InvalidAddressError");
break;
case nsIMobileMessageCallback::FDN_CHECK_ERROR:
errorStr = NS_LITERAL_STRING("FdnCheckError");
break;
case nsIMobileMessageCallback::NON_ACTIVE_SIM_CARD_ERROR:
errorStr = NS_LITERAL_STRING("NonActiveSimCardError");
break;
case nsIMobileMessageCallback::STORAGE_FULL_ERROR:
errorStr = NS_LITERAL_STRING("StorageFullError");
break;
case nsIMobileMessageCallback::SIM_NOT_MATCHED_ERROR:
errorStr = NS_LITERAL_STRING("SimNotMatchedError");
break;
default: // SUCCESS_NO_ERROR is handled above.
MOZ_CRASH("Should never get here!");
}
if (aAsync) {
NS_ASSERTION(!aDetailedError,
"No Support to FireDetailedErrorAsync() in nsIDOMRequestService!");
nsCOMPtr<nsIDOMRequestService> rs =
do_GetService(DOMREQUEST_SERVICE_CONTRACTID);
NS_ENSURE_TRUE(rs, NS_ERROR_FAILURE);
return rs->FireErrorAsync(mDOMRequest, errorStr);
return rs->FireErrorAsync(mDOMRequest,
ConvertErrorCodeToErrorString(aError));
}
if (aDetailedError) {
mDOMRequest->FireDetailedError(aDetailedError);
} else {
mDOMRequest->FireError(ConvertErrorCodeToErrorString(aError));
}
mDOMRequest->FireError(errorStr);
return NS_OK;
}
@ -138,9 +154,25 @@ MobileMessageCallback::NotifyMessageSent(nsISupports *aMessage)
}
NS_IMETHODIMP
MobileMessageCallback::NotifySendMessageFailed(int32_t aError)
MobileMessageCallback::NotifySendMessageFailed(int32_t aError, nsISupports *aMessage)
{
return NotifyError(aError);
nsRefPtr<DOMMobileMessageError> domMobileMessageError;
if (aMessage) {
nsAutoString errorStr = ConvertErrorCodeToErrorString(aError);
nsCOMPtr<nsIDOMMozSmsMessage> smsMsg = do_QueryInterface(aMessage);
if (smsMsg) {
domMobileMessageError =
new DOMMobileMessageError(mDOMRequest->GetOwner(), errorStr, smsMsg);
}
else {
nsCOMPtr<nsIDOMMozMmsMessage> mmsMsg = do_QueryInterface(aMessage);
domMobileMessageError =
new DOMMobileMessageError(mDOMRequest->GetOwner(), errorStr, mmsMsg);
}
NS_ASSERTION(domMobileMessageError, "Invalid DOMMobileMessageError!");
}
return NotifyError(aError, domMobileMessageError);
}
NS_IMETHODIMP
@ -211,7 +243,7 @@ MobileMessageCallback::NotifySegmentInfoForTextGot(nsIDOMMozSmsSegmentInfo *aInf
NS_IMETHODIMP
MobileMessageCallback::NotifyGetSegmentInfoForTextFailed(int32_t aError)
{
return NotifyError(aError, true);
return NotifyError(aError, nullptr, true);
}
NS_IMETHODIMP

View File

@ -31,7 +31,7 @@ private:
nsresult NotifySuccess(JS::Handle<JS::Value> aResult, bool aAsync = false);
nsresult NotifySuccess(nsISupports *aMessage, bool aAsync = false);
nsresult NotifyError(int32_t aError, bool aAsync = false);
nsresult NotifyError(int32_t aError, DOMError *aDetailedError = nullptr, bool aAsync = false);
};
} // namespace mobilemessage

View File

@ -1955,8 +1955,7 @@ MmsService.prototype = {
.setMessageReadStatusByEnvelopeId(envelopeId, address, readStatus,
(function(aRv, aDomMessage) {
if (!Components.isSuccessCode(aRv)) {
// Notifying observers the read status is error.
Services.obs.notifyObservers(aDomMessage, kSmsReadSuccessObserverTopic, null);
if (DEBUG) debug("Failed to update read status: " + aRv);
return;
}
@ -2171,7 +2170,7 @@ MmsService.prototype = {
// If the messsage has been deleted (because the sending process is
// cancelled), we don't need to reset the its delievery state/status.
if (aErrorCode == Ci.nsIMobileMessageCallback.NOT_FOUND_ERROR) {
aRequest.notifySendMessageFailed(aErrorCode);
aRequest.notifySendMessageFailed(aErrorCode, aDomMessage);
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
return;
}
@ -2188,7 +2187,7 @@ MmsService.prototype = {
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
if (!isSentSuccess) {
if (DEBUG) debug("Sending MMS failed.");
aRequest.notifySendMessageFailed(aErrorCode);
aRequest.notifySendMessageFailed(aErrorCode, aDomMessage);
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
return;
}
@ -2214,7 +2213,8 @@ MmsService.prototype = {
if (!Components.isSuccessCode(aRv)) {
if (DEBUG) debug("Error! Fail to save sending message! rv = " + aRv);
aRequest.notifySendMessageFailed(
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(aRv));
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(aRv),
aDomMessage);
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
return;
}

View File

@ -8,6 +8,8 @@ include protocol PSms;
include protocol PBlob;
include SmsTypes;
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
namespace mozilla {
namespace dom {
namespace mobilemessage {
@ -28,9 +30,16 @@ struct ReplyMessageSend
MobileMessageData messageData;
};
union OptionalMobileMessageData
{
void_t;
MobileMessageData;
};
struct ReplyMessageSendFail
{
int32_t error;
OptionalMobileMessageData messageData;
};
struct ReplyGetMessage

View File

@ -191,8 +191,18 @@ SmsRequestChild::Recv__delete__(const MessageReply& aReply)
mReplyRequest->NotifyMessageSent(msg);
}
break;
case MessageReply::TReplyMessageSendFail:
mReplyRequest->NotifySendMessageFailed(aReply.get_ReplyMessageSendFail().error());
case MessageReply::TReplyMessageSendFail: {
const ReplyMessageSendFail &replyFail = aReply.get_ReplyMessageSendFail();
nsCOMPtr<nsISupports> msg;
if (replyFail.messageData().type() ==
OptionalMobileMessageData::TMobileMessageData) {
msg = CreateMessageFromMessageData(
replyFail.messageData().get_MobileMessageData());
}
mReplyRequest->NotifySendMessageFailed(replyFail.error(), msg);
}
break;
case MessageReply::TReplyGetMessage: {
const MobileMessageData& data =

View File

@ -126,6 +126,40 @@ GetParamsFromSendMmsMessageRequest(JSContext* aCx,
return true;
}
static bool
GetMobileMessageDataFromMessage(ContentParent* aParent,
nsISupports *aMsg,
MobileMessageData &aData)
{
if (!aMsg) {
NS_WARNING("Invalid message to convert!");
return false;
}
nsCOMPtr<nsIDOMMozMmsMessage> mmsMsg = do_QueryInterface(aMsg);
if (mmsMsg) {
if (!aParent) {
NS_ERROR("Invalid ContentParent to convert MMS Message!");
return false;
}
MmsMessageData data;
if (!static_cast<MmsMessage*>(mmsMsg.get())->GetData(aParent, data)) {
return false;
}
aData = data;
return true;
}
nsCOMPtr<nsIDOMMozSmsMessage> smsMsg = do_QueryInterface(aMsg);
if (smsMsg) {
aData = static_cast<SmsMessage*>(smsMsg.get())->GetData();
return true;
}
NS_WARNING("Cannot get MobileMessageData");
return false;
}
NS_IMPL_ISUPPORTS(SmsParent, nsIObserver)
SmsParent::SmsParent()
@ -172,9 +206,11 @@ NS_IMETHODIMP
SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData)
{
ContentParent *parent = static_cast<ContentParent*>(Manager());
if (!strcmp(aTopic, kSmsReceivedObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-received' topic without a valid message!");
return NS_OK;
}
@ -185,7 +221,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsRetrievingObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-retrieving' topic without a valid message!");
return NS_OK;
}
@ -196,7 +232,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsSendingObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-sending' topic without a valid message!");
return NS_OK;
}
@ -207,7 +243,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsSentObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-sent' topic without a valid message!");
return NS_OK;
}
@ -218,7 +254,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsFailedObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-failed' topic without a valid message!");
return NS_OK;
}
@ -229,7 +265,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsDeliverySuccessObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-sending' topic without a valid message!");
return NS_OK;
}
@ -240,7 +276,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsDeliveryErrorObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-delivery-error' topic without a valid message!");
return NS_OK;
}
@ -267,10 +303,9 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
if (!strcmp(aTopic, kSmsReadSuccessObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-read-success' topic without a valid message!");
return NS_OK;
}
@ -281,7 +316,7 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
if (!strcmp(aTopic, kSmsReadErrorObserverTopic)) {
MobileMessageData msgData;
if (!GetMobileMessageDataFromMessage(aSubject, msgData)) {
if (!GetMobileMessageDataFromMessage(parent, aSubject, msgData)) {
NS_ERROR("Got a 'sms-read-error' topic without a valid message!");
return NS_OK;
}
@ -294,31 +329,6 @@ SmsParent::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
bool
SmsParent::GetMobileMessageDataFromMessage(nsISupports *aMsg,
MobileMessageData &aData)
{
nsCOMPtr<nsIDOMMozMmsMessage> mmsMsg = do_QueryInterface(aMsg);
if (mmsMsg) {
MmsMessageData data;
ContentParent *parent = static_cast<ContentParent*>(Manager());
if (!static_cast<MmsMessage*>(mmsMsg.get())->GetData(parent, data)) {
return false;
}
aData = data;
return true;
}
nsCOMPtr<nsIDOMMozSmsMessage> smsMsg = do_QueryInterface(aMsg);
if (smsMsg) {
aData = static_cast<SmsMessage*>(smsMsg.get())->GetData();
return true;
}
NS_WARNING("Cannot get MobileMessageData");
return false;
}
bool
SmsParent::RecvAddSilentNumber(const nsString& aNumber)
{
@ -619,30 +629,27 @@ SmsRequestParent::NotifyMessageSent(nsISupports *aMessage)
{
NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMMozMmsMessage> mms = do_QueryInterface(aMessage);
if (mms) {
MmsMessage *msg = static_cast<MmsMessage*>(mms.get());
ContentParent *parent = static_cast<ContentParent*>(Manager()->Manager());
MmsMessageData data;
if (!msg->GetData(parent, data)) {
return NS_ERROR_FAILURE;
}
return SendReply(ReplyMessageSend(MobileMessageData(data)));
}
nsCOMPtr<nsIDOMMozSmsMessage> sms = do_QueryInterface(aMessage);
if (sms) {
SmsMessage* msg = static_cast<SmsMessage*>(sms.get());
return SendReply(ReplyMessageSend(MobileMessageData(msg->GetData())));
ContentParent *parent = static_cast<ContentParent*>(Manager()->Manager());
MobileMessageData data;
if (GetMobileMessageDataFromMessage(parent, aMessage, data)) {
return SendReply(ReplyMessageSend(data));
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
SmsRequestParent::NotifySendMessageFailed(int32_t aError)
SmsRequestParent::NotifySendMessageFailed(int32_t aError, nsISupports *aMessage)
{
return SendReply(ReplyMessageSendFail(aError));
NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
ContentParent *parent = static_cast<ContentParent*>(Manager()->Manager());
MobileMessageData data;
if (!GetMobileMessageDataFromMessage(parent, aMessage, data)) {
return SendReply(ReplyMessageSendFail(aError, OptionalMobileMessageData(void_t())));
}
return SendReply(ReplyMessageSendFail(aError, OptionalMobileMessageData(data)));
}
NS_IMETHODIMP
@ -650,21 +657,10 @@ SmsRequestParent::NotifyMessageGot(nsISupports *aMessage)
{
NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
nsCOMPtr<nsIDOMMozMmsMessage> mms = do_QueryInterface(aMessage);
if (mms) {
MmsMessage *msg = static_cast<MmsMessage*>(mms.get());
ContentParent *parent = static_cast<ContentParent*>(Manager()->Manager());
MmsMessageData data;
if (!msg->GetData(parent, data)) {
return NS_ERROR_FAILURE;
}
return SendReply(ReplyGetMessage(MobileMessageData(data)));
}
nsCOMPtr<nsIDOMMozSmsMessage> sms = do_QueryInterface(aMessage);
if (sms) {
SmsMessage* msg = static_cast<SmsMessage*>(sms.get());
return SendReply(ReplyGetMessage(MobileMessageData(msg->GetData())));
ContentParent *parent = static_cast<ContentParent*>(Manager()->Manager());
MobileMessageData data;
if (GetMobileMessageDataFromMessage(parent, aMessage, data)) {
return SendReply(ReplyGetMessage(data));
}
return NS_ERROR_FAILURE;

View File

@ -66,9 +66,6 @@ protected:
virtual bool
DeallocPMobileMessageCursorParent(PMobileMessageCursorParent* aActor) MOZ_OVERRIDE;
bool
GetMobileMessageDataFromMessage(nsISupports* aMsg, MobileMessageData& aData);
private:
nsTArray<nsString> mSilentNumbers;
};

View File

@ -37,6 +37,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
]
EXPORTS.mozilla.dom += [
'DOMMobileMessageError.h',
'MmsMessage.h',
'MobileMessageManager.h',
'SmsFilter.h',
@ -46,6 +47,7 @@ EXPORTS.mozilla.dom += [
UNIFIED_SOURCES += [
'Constants.cpp',
'DOMMobileMessageError.cpp',
'ipc/SmsChild.cpp',
'ipc/SmsIPCService.cpp',
'ipc/SmsParent.cpp',

View File

@ -70,6 +70,33 @@ function waitForManagerEvent(aEventName) {
return deferred.promise;
}
/**
* Wrap DOMRequest onsuccess/onerror events to Promise resolve/reject.
*
* Fulfill params: A DOMEvent.
* Reject params: A DOMEvent.
*
* @param aRequest
* A DOMRequest instance.
*
* @return A deferred promise.
*/
function wrapDomRequestAsPromise(aRequest) {
let deferred = Promise.defer();
ok(aRequest instanceof DOMRequest,
"aRequest is instanceof " + aRequest.constructor);
aRequest.addEventListener("success", function(aEvent) {
deferred.resolve(aEvent);
});
aRequest.addEventListener("error", function(aEvent) {
deferred.reject(aEvent);
});
return deferred.promise;
}
/**
* Send a SMS message to a single receiver. Resolve if it succeeds, reject
* otherwise.
@ -86,17 +113,42 @@ function waitForManagerEvent(aEventName) {
* @return A deferred promise.
*/
function sendSmsWithSuccess(aReceiver, aText) {
let deferred = Promise.defer();
let request = manager.send(aReceiver, aText);
return wrapDomRequestAsPromise(request)
.then((aEvent) => { return aEvent.target.result; },
(aEvent) => { throw aEvent.target.error; });
}
/**
* Send a SMS message to a single receiver.
* Resolve if it fails, reject otherwise.
*
* Fulfill params:
* {
* message, -- the failed MmsMessage
* error, -- error of the send request
* }
*
* Reject params: (none)
*
* @param aReceiver the address of the receiver.
* @param aText the text body of the message.
*
* @return A deferred promise.
*/
function sendSmsWithFailure(aReceiver, aText) {
let promises = [];
promises.push(waitForManagerEvent("failed")
.then((aEvent) => { return aEvent.message; }));
let request = manager.send(aReceiver, aText);
request.onsuccess = function(event) {
deferred.resolve(event.target.result);
};
request.onerror = function(event) {
deferred.reject(event.target.error);
};
promises.push(wrapDomRequestAsPromise(request)
.then((aEvent) => { throw aEvent; },
(aEvent) => { return aEvent.target.error; }));
return deferred.promise;
return Promise.all(promises)
.then((aResults) => { return { message: aResults[0],
error: aResults[1] }; });
}
/**
@ -118,30 +170,18 @@ function sendSmsWithSuccess(aReceiver, aText) {
* @return A deferred promise.
*/
function sendMmsWithFailure(aMmsParameters, aSendParameters) {
let deferred = Promise.defer();
let result = { message: null, error: null };
function got(which, value) {
result[which] = value;
if (result.message != null && result.error != null) {
deferred.resolve(result);
}
}
manager.addEventListener("failed", function onfailed(event) {
manager.removeEventListener("failed", onfailed);
got("message", event.message);
});
let promises = [];
promises.push(waitForManagerEvent("failed")
.then((aEvent) => { return aEvent.message; }));
let request = manager.sendMMS(aMmsParameters, aSendParameters);
request.onsuccess = function(event) {
deferred.reject();
};
request.onerror = function(event) {
got("error", event.target.error);
}
promises.push(wrapDomRequestAsPromise(request)
.then((aEvent) => { throw aEvent; },
(aEvent) => { return aEvent.target.error; }));
return deferred.promise;
return Promise.all(promises)
.then((aResults) => { return { message: aResults[0],
error: aResults[1] }; });
}
/**
@ -272,15 +312,9 @@ function deleteMessagesById(aMessageIds) {
return [];
}
let deferred = Promise.defer();
let request = manager.delete(aMessageIds);
request.onsuccess = function(event) {
deferred.resolve(event.target.result);
};
request.onerror = deferred.reject.bind(deferred);
return deferred.promise;
return wrapDomRequestAsPromise(request)
.then((aEvent) => { return aEvent.target.result; });
}
/**

View File

@ -49,3 +49,4 @@ qemu = true
[test_mt_sms_concatenation.js]
[test_error_of_mms_manual_retrieval.js]
[test_error_of_mms_send.js]
[test_error_of_sms_send.js]

View File

@ -14,13 +14,31 @@ function testSendFailed(aCause, aServiceId) {
sendParameters = { serviceId: aServiceId };
}
let mmsParameters = { subject: "Test",
receivers: ["+0987654321"],
let testSubject = "Test";
let testReceivers = ["+0987654321"];
let mmsParameters = { subject: testSubject,
receivers: testReceivers,
attachments: [] };
return sendMmsWithFailure(mmsParameters, sendParameters)
.then((result) => {
is(result.error.name, aCause, "Checking failure cause.");
let domMessage = result.error.data;
is(domMessage.id, result.message.id, "Checking message id.");
is(domMessage.subject, testSubject, "Checking subject.");
is(domMessage.receivers.length, testReceivers.length, "Checking no. of receivers.");
for (let i = 0; i < testReceivers.length; i++) {
is(domMessage.receivers[i], testReceivers[i], "Checking receiver address.");
}
let deliveryInfo = domMessage.deliveryInfo;
is(deliveryInfo.length, testReceivers.length, "Checking no. of deliveryInfo.");
for (let i = 0; i < deliveryInfo.length; i++) {
is(deliveryInfo[i].receiver, testReceivers[i], "Checking receiver address.");
is(deliveryInfo[i].deliveryStatus, "error", "Checking deliveryStatus.");
}
});
}

View File

@ -0,0 +1,105 @@
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = 'head.js';
const kPrefRilRadioDisabled = "ril.radio.disabled";
let connection;
function ensureMobileConnection() {
let deferred = Promise.defer();
let permissions = [{
"type": "mobileconnection",
"allow": true,
"context": document,
}];
SpecialPowers.pushPermissions(permissions, function() {
ok(true, "permissions pushed: " + JSON.stringify(permissions));
connection = window.navigator.mozMobileConnections[0];
if (connection) {
log("navigator.mozMobileConnections[0] is instance of " + connection.constructor);
} else {
log("navigator.mozMobileConnections[0] is undefined.");
}
if (connection instanceof MozMobileConnection) {
deferred.resolve(connection);
} else {
deferred.reject();
}
});
return deferred.promise;
}
function waitRadioState(state) {
let deferred = Promise.defer();
waitFor(function() {
deferred.resolve();
}, function() {
return connection.radioState == state;
});
return deferred.promise;
}
function setRadioEnabled(enabled) {
log("setRadioEnabled to " + enabled);
let deferred = Promise.defer();
let finalState = (enabled) ? "enabled" : "disabled";
connection.onradiostatechange = function() {
let state = connection.radioState;
log("Received 'radiostatechange' event, radioState: " + state);
if (state == finalState) {
deferred.resolve();
connection.onradiostatechange = null;
}
};
let req = connection.setRadioEnabled(enabled);
req.onsuccess = function() {
log("setRadioEnabled success");
};
req.onerror = function() {
ok(false, "setRadioEnabled should not fail");
deferred.reject();
};
return deferred.promise;
}
function testSendFailed(aCause) {
log("testSendFailed, aCause: " + aCause);
let testReceiver = "+0987654321";
let testMessage = "quick fox jump over the lazy dog";
return sendSmsWithFailure(testReceiver, testMessage)
.then((result) => {
is(result.error.name, aCause, "Checking failure cause.");
let domMessage = result.error.data;
is(domMessage.id, result.message.id, "Checking message id.");
is(domMessage.receiver, testReceiver, "Checking receiver address.");
is(domMessage.body, testMessage, "Checking message body.");
is(domMessage.delivery, "error", "Checking delivery.");
is(domMessage.deliveryStatus, "error", "Checking deliveryStatus.");
});
}
startTestCommon(function testCaseMain() {
return ensureMobileConnection()
.then(() => waitRadioState("enabled"))
.then(() => setRadioEnabled(false))
.then(() => testSendFailed("RadioDisabledError"))
.then(() => setRadioEnabled(true));
});

View File

@ -159,5 +159,15 @@ var NfcUtils = {
buf[i] = str.charCodeAt(i);
}
return buf;
},
toUTF8: function(array) {
if (!array) {
return null;
}
let str = "";
for (var i = 0; i < array.length; i++) {
str += String.fromCharCode(array[i]);
}
return str;
}
};

View File

@ -8,5 +8,4 @@ qemu=true
[test_nfc_manager_tech_discovered.js]
[test_nfc_peer.js]
[test_nfc_peer_sendndef.js]
[test_nfc_checkP2PRegistration.js]
[test_nfc_error_messages.js]
[test_nfc_tag.js]

View File

@ -0,0 +1,73 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000;
MARIONETTE_HEAD_JS = "head.js";
let url = "http://www.mozilla.org";
// TODO : Get this from emulator console command.
const T2T_RE_INDEX = 2;
function activateRE(re) {
let deferred = Promise.defer();
let cmd = "nfc nci rf_intf_activated_ntf " + re;
emulator.run(cmd, function(result) {
is(result.pop(), "OK", "check activation of RE" + re);
deferred.resolve();
});
return deferred.promise;
}
function setTagData(re, flag, tnf, type, payload) {
let deferred = Promise.defer();
let cmd = "nfc tag set " + re +
" [" + flag + "," + tnf + "," + type + "," + payload + ",]";
log("Executing \'" + cmd + "\'");
emulator.run(cmd, function(result) {
is(result.pop(), "OK", "set NDEF data of tag" + re);
deferred.resolve();
});
return deferred.promise;
}
function testUrlTagDiscover() {
log("Running \'testUrlTagDiscover\'");
// TODO : Make flag value readable.
let flag = 0xd0;
let tnf = NDEF.TNF_WELL_KNOWN;
let type = "U";
let payload = url;
window.navigator.mozSetMessageHandler("nfc-manager-tech-discovered", function(msg) {
log("Received \'nfc-manager-tech-ndiscovered\'");
is(msg.type, "techDiscovered", "check for correct message type");
let index = msg.techList.indexOf("NDEF");
isnot(index, -1, "check for \'NDEF\' in tech list");
let records = msg.records;
ok(records.length > 0);
is(tnf, records[0].tnf, "check for TNF field in NDEF");
is(type, NfcUtils.toUTF8(records[0].type), "check for type field in NDEF");
is(payload, NfcUtils.toUTF8(records[0].payload), "check for payload field in NDEF");
toggleNFC(false, runNextTest);
});
toggleNFC(true, function() {
setTagData(T2T_RE_INDEX, flag, tnf, btoa(type), btoa(payload))
.then(() => activateRE(T2T_RE_INDEX));
});
}
let tests = [
testUrlTagDiscover
];
SpecialPowers.pushPermissions(
[{'type': 'nfc-manager', 'allow': true, context: document}], runTests);

View File

@ -8,7 +8,7 @@ this.PHONE_NUMBER_META_DATA = {
"299": '["GL","00",,,,,"\\d{6}","[1-689]\\d{5}",[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",,,]]]',
"385": '["HR","00","0",,,"$NP$FG","\\d{6,12}","[1-7]\\d{5,8}|[89]\\d{6,11}",[["(1)(\\d{4})(\\d{3})","$1 $2 $3","1",,],["(6[09])(\\d{4})(\\d{3})","$1 $2 $3","6[09]",,],["(62)(\\d{3})(\\d{3,4})","$1 $2 $3","62",,],["([2-5]\\d)(\\d{3})(\\d{3})","$1 $2 $3","[2-5]",,],["(9\\d)(\\d{3})(\\d{3,4})","$1 $2 $3","9",,],["(9\\d)(\\d{4})(\\d{4})","$1 $2 $3","9",,],["(9\\d)(\\d{3,4})(\\d{3})(\\d{3})","$1 $2 $3 $4","9",,],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3","6[145]|7",,],["(\\d{2})(\\d{3,4})(\\d{3})","$1 $2 $3","6[145]|7",,],["(80[01])(\\d{2})(\\d{2,3})","$1 $2 $3","8",,],["(80[01])(\\d{3,4})(\\d{3})","$1 $2 $3","8",,]]]',
"670": '["TL","00",,,,,"\\d{7,8}","[2-489]\\d{6}|7\\d{6,7}",[["(\\d{3})(\\d{4})","$1 $2","[2-489]",,],["(\\d{4})(\\d{4})","$1 $2","7",,]]]',
"258": '["MZ","00",,,,,"\\d{8,9}","[28]\\d{7,8}",[["([28]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3","2|8[246]",,],["(80\\d)(\\d{3})(\\d{3})","$1 $2 $3","80",,]]]',
"258": '["MZ","00",,,,,"\\d{8,9}","[28]\\d{7,8}",[["([28]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3","2|8[2-7]",,],["(80\\d)(\\d{3})(\\d{3})","$1 $2 $3","80",,]]]',
"359": '["BG","00","0",,,"$NP$FG","\\d{5,9}","[23567]\\d{5,7}|[489]\\d{6,8}",[["(2)(\\d{5})","$1 $2","29",,],["(2)(\\d{3})(\\d{3,4})","$1 $2 $3","2",,],["(\\d{3})(\\d{4})","$1 $2","43[124-7]|70[1-9]",,],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3","43[124-7]|70[1-9]",,],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3","[78]00",,],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3","[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]",,],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3","48|8[7-9]|9[08]",,]]]',
"682": '["CK","00",,,,,"\\d{5}","[2-57]\\d{4}",[["(\\d{2})(\\d{3})","$1 $2",,,]]]',
"852": '["HK","00",,,,,"\\d{5,11}","[235-7]\\d{7}|8\\d{7,8}|9\\d{4,10}",[["(\\d{4})(\\d{4})","$1 $2","[235-7]|[89](?:0[1-9]|[1-9])",,],["(800)(\\d{3})(\\d{3})","$1 $2 $3","800",,],["(900)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4","900",,],["(900)(\\d{2,5})","$1 $2","900",,]]]',
@ -31,7 +31,7 @@ this.PHONE_NUMBER_META_DATA = {
"974": '["QA","00",,,,,"\\d{7,8}","[2-8]\\d{6,7}",[["([28]\\d{2})(\\d{4})","$1 $2","[28]",,],["([3-7]\\d{3})(\\d{4})","$1 $2","[3-7]",,]]]',
"218": '["LY","00","0",,,"$NP$FG","\\d{7,9}","[25679]\\d{8}",[["([25679]\\d)(\\d{7})","$1-$2",,,]]]',
"51": '["PE","19(?:1[124]|77|90)00","0",,,"($NP$FG)","\\d{6,9}","[14-9]\\d{7,8}",[["(1)(\\d{7})","$1 $2","1",,],["([4-8]\\d)(\\d{6})","$1 $2","[4-7]|8[2-4]",,],["(\\d{3})(\\d{5})","$1 $2","80",,],["(9\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","9","$FG",]]]',
"62": '["ID","0(?:0[1789]|10(?:00|1[67]))","0",,,"$NP$FG","\\d{5,11}","[1-9]\\d{6,10}",[["(\\d{2})(\\d{7,8})","$1 $2","2[124]|[36]1","($NP$FG)",],["(\\d{3})(\\d{5,7})","$1 $2","[4579]|2[035-9]|[36][02-9]","($NP$FG)",],["(8\\d{2})(\\d{3,4})(\\d{3,4})","$1-$2-$3","8[1-35-9]",,],["(177)(\\d{6,8})","$1 $2","1",,],["(800)(\\d{5,7})","$1 $2","800",,],["(809)(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4","809",,]]]',
"62": '["ID","0(?:0[1789]|10(?:00|1[67]))","0",,,"$NP$FG","\\d{5,11}","[1-9]\\d{6,10}",[["(\\d{2})(\\d{5,8})","$1 $2","2[124]|[36]1","($NP$FG)",],["(\\d{3})(\\d{5,7})","$1 $2","[4579]|2[035-9]|[36][02-9]","($NP$FG)",],["(8\\d{2})(\\d{3,4})(\\d{3,4})","$1-$2-$3","8[1-35-9]",,],["(177)(\\d{6,8})","$1 $2","1",,],["(800)(\\d{5,7})","$1 $2","800",,],["(80\\d)(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4","80[79]",,]]]',
"298": '["FO","00",,"(10(?:01|[12]0|88))",,,"\\d{6}","[2-9]\\d{5}",[["(\\d{6})","$1",,,]]]',
"381": '["RS","00","0",,,"$NP$FG","\\d{5,12}","[126-9]\\d{4,11}|3(?:[0-79]\\d{3,10}|8[2-9]\\d{2,9})",[["([23]\\d{2})(\\d{4,9})","$1 $2","(?:2[389]|39)0",,],["([1-3]\\d)(\\d{5,10})","$1 $2","1|2(?:[0-24-7]|[389][1-9])|3(?:[0-8]|9[1-9])",,],["(6\\d)(\\d{6,8})","$1 $2","6",,],["([89]\\d{2})(\\d{3,9})","$1 $2","[89]",,],["(7[26])(\\d{4,9})","$1 $2","7[26]",,],["(7[08]\\d)(\\d{4,9})","$1 $2","7[08]",,]]]',
"975": '["BT","00",,,,,"\\d{6,8}","[1-8]\\d{6,7}",[["([17]7)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","1|77",,],["([2-8])(\\d{3})(\\d{3})","$1 $2 $3","[2-68]|7[246]",,]]]',
@ -73,7 +73,7 @@ this.PHONE_NUMBER_META_DATA = {
"357": '["CY","00",,,,,"\\d{8}","[257-9]\\d{7}",[["(\\d{2})(\\d{6})","$1 $2",,,]]]',
"240": '["GQ","00",,,,,"\\d{9}","[23589]\\d{8}",[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3","[235]",,],["(\\d{3})(\\d{6})","$1 $2","[89]",,]]]',
"506": '["CR","00",,"(19(?:0[01468]|19|20|66|77))",,,"\\d{8,10}","[24-9]\\d{7,9}",[["(\\d{4})(\\d{4})","$1 $2","[24-7]|8[3-9]",,],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3","[89]0",,]]]',
"86": '["CN","(1[1279]\\d{3})?00","0","(1[1279]\\d{3})|0",,,"\\d{4,12}","[1-7]\\d{6,11}|8[0-357-9]\\d{6,9}|9\\d{9}",[["(80\\d{2})(\\d{4})","$1 $2","80[2678]","$NP$FG",],["([48]00)(\\d{3})(\\d{4})","$1 $2 $3","[48]00",,],["(\\d{5,6})","$1","100|95",,"NA"],["(\\d{2})(\\d{5,6})","$1 $2","(?:10|2\\d)[19]","$NP$FG",],["(\\d{3})(\\d{5,6})","$1 $2","[3-9]","$NP$FG",],["(\\d{3,4})(\\d{4})","$1 $2","[2-9]",,"NA"],["(21)(\\d{4})(\\d{4,6})","$1 $2 $3","21","$NP$FG",],["([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3","10[1-9]|2[02-9]","$NP$FG",],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3","3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)","$NP$FG",],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])","$NP$FG",],["(1[3-58]\\d)(\\d{4})(\\d{4})","$1 $2 $3","1[3-58]",,],["(10800)(\\d{3})(\\d{4})","$1 $2 $3","108",,]]]',
"86": '["CN","(1[1279]\\d{3})?00","0","(1[1279]\\d{3})|0",,,"\\d{4,12}","[1-7]\\d{6,11}|8[0-357-9]\\d{6,9}|9\\d{9}",[["(80\\d{2})(\\d{4})","$1 $2","80[2678]","$NP$FG",],["([48]00)(\\d{3})(\\d{4})","$1 $2 $3","[48]00",,],["(\\d{5,6})","$1","100|95",,"NA"],["(\\d{2})(\\d{5,6})","$1 $2","(?:10|2\\d)[19]","$NP$FG",],["(\\d{3})(\\d{5,6})","$1 $2","[3-9]","$NP$FG",],["(\\d{3,4})(\\d{4})","$1 $2","[2-9]",,"NA"],["(21)(\\d{4})(\\d{4,6})","$1 $2 $3","21","$NP$FG",],["([12]\\d)(\\d{4})(\\d{4})","$1 $2 $3","10[1-9]|2[02-9]","$NP$FG",],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3","3(?:11|7[179])|4(?:[15]1|3[12])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:71|98)","$NP$FG",],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])","$NP$FG",],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3","1[3-578]",,],["(10800)(\\d{3})(\\d{4})","$1 $2 $3","108",,]]]',
"257": '["BI","00",,,,,"\\d{8}","[27]\\d{7}",[["([27]\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]',
"683": '["NU","00",,,,,"\\d{4}","[1-5]\\d{3}",]',
"43": '["AT","00","0",,,"$NP$FG","\\d{3,13}","[1-9]\\d{3,12}",[["(1)(\\d{3,12})","$1 $2","1",,],["(5\\d)(\\d{3,5})","$1 $2","5[079]",,],["(5\\d)(\\d{3})(\\d{3,4})","$1 $2 $3","5[079]",,],["(5\\d)(\\d{4})(\\d{4,7})","$1 $2 $3","5[079]",,],["(\\d{3})(\\d{3,10})","$1 $2","316|46|51|732|6(?:44|5[0-3579]|[6-9])|7(?:1|[28]0)|[89]",,],["(\\d{4})(\\d{3,9})","$1 $2","2|3(?:1[1-578]|[3-8])|4[2378]|5[2-6]|6(?:[12]|4[1-35-9]|5[468])|7(?:2[1-8]|35|4[1-8]|[5-79])",,]]]',
@ -100,26 +100,26 @@ this.PHONE_NUMBER_META_DATA = {
"238": '["CV","0",,,,,"\\d{7}","[259]\\d{6}",[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",,,]]]',
"691": '["FM","00",,,,,"\\d{7}","[39]\\d{6}",[["(\\d{3})(\\d{4})","$1 $2",,,]]]',
"262": ['["RE","00","0",,,"$NP$FG","\\d{9}","[268]\\d{8}",[["([268]\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]','["YT","00","0",,,"$NP$FG","\\d{9}","[268]\\d{8}",]'],
"241": '["GA","00",,,,,"\\d{8}","0\\d{7}",[["(0\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]',
"241": '["GA","00",,,,,"\\d{7,8}","0?\\d{7}",[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","[2-7]","0$FG",],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","0",,]]]',
"370": '["LT","00","8","[08]",,"($NP-$FG)","\\d{8}","[3-9]\\d{7}",[["([34]\\d)(\\d{6})","$1 $2","37|4(?:1|5[45]|6[2-4])",,],["([3-6]\\d{2})(\\d{5})","$1 $2","3[148]|4(?:[24]|6[09])|528|6",,],["([7-9]\\d{2})(\\d{2})(\\d{3})","$1 $2 $3","[7-9]","$NP $FG",],["(5)(2\\d{2})(\\d{4})","$1 $2 $3","52[0-79]",,]]]',
"256": '["UG","00[057]","0",,,"$NP$FG","\\d{5,9}","\\d{9}",[["(\\d{3})(\\d{6})","$1 $2","[7-9]|20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])",,],["(\\d{2})(\\d{7})","$1 $2","3|4(?:[1-5]|6[0-36-9])",,],["(2024)(\\d{5})","$1 $2","2024",,]]]',
"677": '["SB","0[01]",,,,,"\\d{5,7}","[1-9]\\d{4,6}",[["(\\d{3})(\\d{4})","$1 $2","[7-9]",,]]]',
"377": '["MC","00","0",,,"$NP$FG","\\d{8,9}","[4689]\\d{7,8}",[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","[89]","$FG",],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","4",,],["(6)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5","6",,]]]',
"382": '["ME","00","0",,,"$NP$FG","\\d{6,9}","[2-9]\\d{7,8}",[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","[2-57-9]|6[3789]",,],["(67)(9)(\\d{3})(\\d{3})","$1 $2 $3 $4","679",,]]]',
"231": '["LR","00","0",,,"$NP$FG","\\d{7,9}","(?:[29]\\d|[4-6]|7\\d{1,2}|[38]\\d{2})\\d{6}",[["([279]\\d)(\\d{3})(\\d{3})","$1 $2 $3","[279]",,],["(7\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","7",,],["([4-6])(\\d{3})(\\d{3})","$1 $2 $3","[4-6]",,],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3","[38]",,]]]',
"231": '["LR","00","0",,,"$NP$FG","\\d{7,9}","2\\d{7}|[37-9]\\d{8}|[45]\\d{6}",[["(2\\d)(\\d{3})(\\d{3})","$1 $2 $3","2",,],["([79]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","[79]",,],["([4-6])(\\d{3})(\\d{3})","$1 $2 $3","[4-6]",,],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3","[38]",,]]]',
"591": '["BO","00(1\\d)?","0","0(1\\d)?",,,"\\d{7,8}","[23467]\\d{7}",[["([234])(\\d{7})","$1 $2","[234]",,],["([67]\\d{7})","$1","[67]",,]]]',
"808": '["001",,,,,,"\\d{8}","\\d{8}",[["(\\d{4})(\\d{4})","$1 $2",,,]]]',
"964": '["IQ","00","0",,,"$NP$FG","\\d{6,10}","[1-7]\\d{7,9}",[["(1)(\\d{3})(\\d{4})","$1 $2 $3","1",,],["([2-6]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3","[2-6]",,],["(7\\d{2})(\\d{3})(\\d{4})","$1 $2 $3","7",,]]]',
"225": '["CI","00",,,,,"\\d{8}","[02-7]\\d{7}",[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]',
"992": '["TJ","810","8",,,"($NP) $FG","\\d{3,9}","[3-59]\\d{8}",[["([349]\\d{2})(\\d{2})(\\d{4})","$1 $2 $3","[34]7|91[78]",,],["([459]\\d)(\\d{3})(\\d{4})","$1 $2 $3","4[48]|5|9(?:1[59]|[0235-9])",,],["(331700)(\\d)(\\d{2})","$1 $2 $3","331",,],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3","3[1-5]",,]]]',
"55": '["BR","00(?:1[45]|2[135]|[34]1|43)","0","(?:0|90)(?:(1[245]|2[135]|[34]1)(\\d{10,11}))?","$2",,"\\d{8,11}","[1-46-9]\\d{7,10}|5\\d{8,9}",[["(\\d{4})(\\d{4})","$1-$2","[2-9](?:[1-9]|0[1-9])","$FG","NA"],["(\\d{5})(\\d{4})","$1-$2","9(?:[1-9]|0[1-9])","$FG","NA"],["(\\d{3,5})","$1","1[125689]","$FG","NA"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3","(?:1[1-9]|2[12478])9","($FG)",],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3","[1-9][1-9]","($FG)",],["([34]00\\d)(\\d{4})","$1-$2","[34]00",,],["([3589]00)(\\d{2,3})(\\d{4})","$1 $2 $3","[3589]00","$NP$FG",]]]',
"55": '["BR","00(?:1[45]|2[135]|31|4[13])","0","(?:0|90)(?:(1[245]|2[135]|[34]1)(\\d{10,11}))?","$2",,"\\d{8,11}","[1-46-9]\\d{7,10}|5\\d{8,9}",[["(\\d{4})(\\d{4})","$1-$2","[2-9](?:[1-9]|0[1-9])","$FG","NA"],["(\\d{5})(\\d{4})","$1-$2","9(?:[1-9]|0[1-9])","$FG","NA"],["(\\d{3,5})","$1","1[125689]","$FG","NA"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3","(?:1[1-9]|2[12478])9","($FG)",],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3","[1-9][1-9]","($FG)",],["([34]00\\d)(\\d{4})","$1-$2","[34]00",,],["([3589]00)(\\d{2,3})(\\d{4})","$1 $2 $3","[3589]00","$NP$FG",]]]',
"674": '["NR","00",,,,,"\\d{7}","[458]\\d{6}",[["(\\d{3})(\\d{4})","$1 $2",,,]]]',
"967": '["YE","00","0",,,"$NP$FG","\\d{6,9}","[1-7]\\d{6,8}",[["([1-7])(\\d{3})(\\d{3,4})","$1 $2 $3","[1-6]|7[24-68]",,],["(7\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","7[0137]",,]]]',
"49": '["DE","00","0",,,"$NP$FG","\\d{2,15}","[1-35-9]\\d{3,14}|4(?:[0-8]\\d{4,12}|9(?:[0-37]\\d|4(?:[1-35-8]|4\\d?)|5\\d{1,2}|6[1-8]\\d?)\\d{2,7})",[["(1\\d{2})(\\d{7,8})","$1 $2","1[67]",,],["(1\\d{3})(\\d{7})","$1 $2","15",,],["(\\d{2})(\\d{3,11})","$1 $2","3[02]|40|[68]9",,],["(\\d{3})(\\d{3,11})","$1 $2","2(?:\\d1|0[2389]|1[24]|28|34)|3(?:[3-9][15]|40)|[4-8][1-9]1|9(?:06|[1-9]1)",,],["(\\d{4})(\\d{2,11})","$1 $2","[24-6]|[7-9](?:\\d[1-9]|[1-9]\\d)|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])",,],["(3\\d{4})(\\d{1,10})","$1 $2","3",,],["(800)(\\d{7,12})","$1 $2","800",,],["(177)(99)(\\d{7,8})","$1 $2 $3","177",,],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3","(?:18|90)0",,],["(1\\d{2})(\\d{5,11})","$1 $2","181",,],["(18\\d{3})(\\d{6})","$1 $2","185",,],["(18\\d{2})(\\d{7})","$1 $2","18[68]",,],["(18\\d)(\\d{8})","$1 $2","18[2-579]",,],["(700)(\\d{4})(\\d{4})","$1 $2 $3","700",,]]]',
"49": '["DE","00","0",,,"$NP$FG","\\d{2,15}","[1-35-9]\\d{3,14}|4(?:[0-8]\\d{4,12}|9(?:[0-37]\\d|4(?:[1-35-8]|4\\d?)|5\\d{1,2}|6[1-8]\\d?)\\d{2,7})",[["(1\\d{2})(\\d{7,8})","$1 $2","1[67]",,],["(1\\d{3})(\\d{7})","$1 $2","15",,],["(\\d{2})(\\d{3,11})","$1 $2","3[02]|40|[68]9",,],["(\\d{3})(\\d{3,11})","$1 $2","2(?:\\d1|0[2389]|1[24]|28|34)|3(?:[3-9][15]|40)|[4-8][1-9]1|9(?:06|[1-9]1)",,],["(\\d{4})(\\d{2,11})","$1 $2","[24-6]|[7-9](?:\\d[1-9]|[1-9]\\d)|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])",,],["(3\\d{4})(\\d{1,10})","$1 $2","3",,],["(800)(\\d{7,12})","$1 $2","800",,],["(177)(99)(\\d{7,8})","$1 $2 $3","177",,],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3","(?:18|90)0|137",,],["(1\\d{2})(\\d{5,11})","$1 $2","181",,],["(18\\d{3})(\\d{6})","$1 $2","185",,],["(18\\d{2})(\\d{7})","$1 $2","18[68]",,],["(18\\d)(\\d{8})","$1 $2","18[2-579]",,],["(700)(\\d{4})(\\d{4})","$1 $2 $3","700",,],["(138)(\\d{4})","$1 $2","138",,]]]',
"31": '["NL","00","0",,,"$NP$FG","\\d{5,10}","1\\d{4,8}|[2-7]\\d{8}|[89]\\d{6,9}",[["([1-578]\\d)(\\d{3})(\\d{4})","$1 $2 $3","1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578]",,],["([1-5]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","1[16-8]|2[259]|3[124]|4[17-9]|5[124679]",,],["(6)(\\d{8})","$1 $2","6[0-57-9]",,],["(66)(\\d{7})","$1 $2","66",,],["(14)(\\d{3,4})","$1 $2","14","$FG",],["([89]0\\d)(\\d{4,7})","$1 $2","80|9",,]]]',
"970": '["PS","00","0",,,"$NP$FG","\\d{4,10}","[24589]\\d{7,8}|1(?:[78]\\d{8}|[49]\\d{2,3})",[["([2489])(2\\d{2})(\\d{4})","$1 $2 $3","[2489]",,],["(5[69]\\d)(\\d{3})(\\d{3})","$1 $2 $3","5",,],["(1[78]00)(\\d{3})(\\d{3})","$1 $2 $3","1[78]","$FG",]]]',
"58": '["VE","00","0",,,"$NP$FG","\\d{7,10}","[24589]\\d{9}",[["(\\d{3})(\\d{7})","$1-$2",,,]]]',
"856": '["LA","00","0",,,"$NP$FG","\\d{6,10}","[2-8]\\d{7,9}",[["(20)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4","20",,],["([2-8]\\d)(\\d{3})(\\d{3})","$1 $2 $3","2[13]|[3-8]",,]]]',
"856": '["LA","00","0",,,"$NP$FG","\\d{6,10}","[2-8]\\d{7,9}",[["(20)(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4","20",,],["([2-8]\\d)(\\d{3})(\\d{3})","$1 $2 $3","2[13]|3[14]|[4-8]",,],["(30)(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4","30",,]]]',
"354": '["IS","00",,,,,"\\d{7,9}","[4-9]\\d{6}|38\\d{7}",[["(\\d{3})(\\d{4})","$1 $2","[4-9]",,],["(3\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","3",,]]]',
"242": '["CG","00",,,,,"\\d{9}","[028]\\d{8}",[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3","[02]",,],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3","8",,]]]',
"423": '["LI","00","0",,,,"\\d{7,9}","6\\d{8}|[23789]\\d{6}",[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3","[23]|7[3-57-9]|87",,],["(6\\d)(\\d{3})(\\d{3})","$1 $2 $3","6",,],["(6[567]\\d)(\\d{3})(\\d{3})","$1 $2 $3","6[567]",,],["(69)(7\\d{2})(\\d{4})","$1 $2 $3","697",,],["([7-9]0\\d)(\\d{2})(\\d{2})","$1 $2 $3","[7-9]0",,],["([89]0\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","[89]0","$NP$FG",]]]',
@ -148,22 +148,22 @@ this.PHONE_NUMBER_META_DATA = {
"971": '["AE","00","0",,,"$NP$FG","\\d{5,12}","[2-79]\\d{7,8}|800\\d{2,9}",[["([2-4679])(\\d{3})(\\d{4})","$1 $2 $3","[2-4679][2-8]",,],["(5[0256])(\\d{3})(\\d{4})","$1 $2 $3","5",,],["([479]00)(\\d)(\\d{5})","$1 $2 $3","[479]0","$FG",],["([68]00)(\\d{2,9})","$1 $2","60|8","$FG",]]]',
"30": '["GR","00",,,,,"\\d{10}","[26-9]\\d{9}",[["([27]\\d)(\\d{4})(\\d{4})","$1 $2 $3","21|7",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","2[2-9]1|[689]",,],["(2\\d{3})(\\d{6})","$1 $2","2[2-9][02-9]",,]]]',
"228": '["TG","00",,,,,"\\d{8}","[29]\\d{7}",[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]',
"48": '["PL","00",,,,,"\\d{6,9}","[1-58]\\d{6,8}|9\\d{8}|[67]\\d{5,8}",[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4","[124]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145]",,],["(\\d{2})(\\d{4,6})","$1 $2","[124]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-7]",,],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3","39|5[0137]|6[0469]|7[02389]|8[08]",,],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3","64",,],["(\\d{3})(\\d{3})","$1 $2","64",,]]]',
"886": '["TW","0(?:0[25679]|19)","0",,,"$NP$FG","\\d{8,9}","[2-9]\\d{7,8}",[["([2-8])(\\d{3,4})(\\d{4})","$1 $2 $3","[2-7]|8[1-9]",,],["([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","80|9",,]]]',
"48": '["PL","00",,,,,"\\d{6,9}","[12]\\d{6,8}|[3-57-9]\\d{8}|6\\d{5,8}",[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4","[124]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145]",,],["(\\d{2})(\\d{1})(\\d{4})","$1 $2 $3","[12]2",,],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3","39|5[0137]|6[0469]|7[02389]|8[08]",,],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3","64",,],["(\\d{3})(\\d{3})","$1 $2","64",,]]]',
"886": '["TW","0(?:0[25679]|19)","0",,,"$NP$FG","\\d{8,10}","[2-689]\\d{7,8}|7\\d{7,9}",[["([2-8])(\\d{3,4})(\\d{4})","$1 $2 $3","[2-6]|[78][1-9]",,],["([89]\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","80|9",,],["(70)(\\d{4})(\\d{4})","$1 $2 $3","70",,]]]',
"212": ['["MA","00","0",,,"$NP$FG","\\d{9}","[5689]\\d{8}",[["([56]\\d{2})(\\d{6})","$1-$2","5(?:2[015-7]|3[0-4])|6",,],["([58]\\d{3})(\\d{5})","$1-$2","5(?:2[2-489]|3[5-9])|892",,],["(5\\d{4})(\\d{4})","$1-$2","5(?:29|38)",,],["(8[09])(\\d{7})","$1-$2","8(?:0|9[013-9])",,]]]','["EH","00","0",,,"$NP$FG","\\d{9}","[5689]\\d{8}",]'],
"372": '["EE","00",,,,,"\\d{4,10}","1\\d{3,4}|[3-9]\\d{6,7}|800\\d{6,7}",[["([3-79]\\d{2})(\\d{4})","$1 $2","[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]",,],["(70)(\\d{2})(\\d{4})","$1 $2 $3","70",,],["(8000)(\\d{3})(\\d{3})","$1 $2 $3","800",,],["([458]\\d{3})(\\d{3,4})","$1 $2","40|5|8(?:00|[1-5])",,]]]',
"598": '["UY","0(?:1[3-9]\\d|0)","0",,,,"\\d{7,8}","[2489]\\d{6,7}",[["(\\d{4})(\\d{4})","$1 $2","[24]",,],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","9[1-9]","$NP$FG",],["(\\d{3})(\\d{4})","$1 $2","[89]0","$NP$FG",]]]',
"502": '["GT","00",,,,,"\\d{8}(?:\\d{3})?","[2-7]\\d{7}|1[89]\\d{9}",[["(\\d{4})(\\d{4})","$1 $2","[2-7]",,],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3","1",,]]]',
"82": '["KR","00(?:[124-68]|[37]\\d{2})","0","0(8[1-46-8]|85\\d{2})?",,"$NP$FG","\\d{4,10}","[1-7]\\d{3,9}|8\\d{8}",[["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3","1(?:0|1[19]|[69]9|5[458])|[57]0",,],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3","1(?:[169][2-8]|[78]|5[1-4])|[68]0|[3-6][1-9][1-9]",,],["(\\d{3})(\\d)(\\d{4})","$1-$2-$3","131",,],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3","131",,],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3","13[2-9]",,],["(\\d{2})(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3-$4","30",,],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3","2[1-9]",,],["(\\d)(\\d{3,4})","$1-$2","21[0-46-9]",,],["(\\d{2})(\\d{3,4})","$1-$2","[3-6][1-9]1",,],["(\\d{4})(\\d{4})","$1-$2","1(?:5[46-9]|6[04678])","$FG",]]]',
"253": '["DJ","00",,,,,"\\d{8}","[27]\\d{7}",[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]',
"91": '["IN","00","0",,,"$NP$FG","\\d{6,13}","1\\d{7,12}|[2-9]\\d{9,10}",[["(\\d{2})(\\d{2})(\\d{6})","$1 $2 $3","7(?:2[0579]|3[057-9]|4[0-389]|6[0-35-9]|[57]|8[0-79])|8(?:0[015689]|1[0-57-9]|2[2356-9]|3[0-57-9]|[45]|6[02457-9]|7[1-69]|8[0124-9]|9[02-9])|9",,],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3","11|2[02]|33|4[04]|79|80[2-46]",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","1(?:2[0-249]|3[0-25]|4[145]|[569][14]|7[1257]|8[1346]|[68][1-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[126-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:[136][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80)",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)",,],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3","1(?:[23579]|[468][1-9])|[2-8]",,],["(1600)(\\d{2})(\\d{4})","$1 $2 $3","160","$FG",],["(1800)(\\d{4,5})","$1 $2","180","$FG",],["(18[06]0)(\\d{2,4})(\\d{4})","$1 $2 $3","18[06]","$FG",],["(140)(\\d{3})(\\d{4})","$1 $2 $3","140","$FG",],["(\\d{4})(\\d{3})(\\d{4})(\\d{2})","$1 $2 $3 $4","18[06]","$FG",]]]',
"91": '["IN","00","0",,,"$NP$FG","\\d{6,13}","1\\d{7,12}|[2-9]\\d{9,10}",[["(\\d{2})(\\d{2})(\\d{6})","$1 $2 $3","7(?:0[2-4]|2[0579]|3[057-9]|4[0-389]|6[0-35-9]|[57]|8[0-79])|8(?:0[015689]|1[0-57-9]|2[2356-9]|3[0-57-9]|[45]|6[02457-9]|7[1-69]|8[0124-9]|9[02-9])|9",,],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3","11|2[02]|33|4[04]|79|80[2-46]",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","1(?:2[0-249]|3[0-25]|4[145]|[569][14]|7[1257]|8[1346]|[68][1-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[126-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:[136][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80)",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)",,],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3","1(?:[23579]|[468][1-9])|[2-8]",,],["(1600)(\\d{2})(\\d{4})","$1 $2 $3","160","$FG",],["(1800)(\\d{4,5})","$1 $2","180","$FG",],["(18[06]0)(\\d{2,4})(\\d{4})","$1 $2 $3","18[06]","$FG",],["(140)(\\d{3})(\\d{4})","$1 $2 $3","140","$FG",],["(\\d{4})(\\d{3})(\\d{4})(\\d{2})","$1 $2 $3 $4","18[06]","$FG",]]]',
"389": '["MK","00","0",,,"$NP$FG","\\d{8}","[2-578]\\d{7}",[["(2)(\\d{3})(\\d{4})","$1 $2 $3","2",,],["([347]\\d)(\\d{3})(\\d{3})","$1 $2 $3","[347]",,],["([58]\\d{2})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4","[58]",,]]]',
"1": ['["US","011","1",,,,"\\d{7}(?:\\d{3})?","[2-9]\\d{9}",[["(\\d{3})(\\d{4})","$1-$2",,,"NA"],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",,,"$1-$2-$3"]]]','["AI","011","1",,,,"\\d{7}(?:\\d{3})?","[2589]\\d{9}",]','["AS","011","1",,,,"\\d{7}(?:\\d{3})?","[5689]\\d{9}",]','["BB","011","1",,,,"\\d{7}(?:\\d{3})?","[2589]\\d{9}",]','["BM","011","1",,,,"\\d{7}(?:\\d{3})?","[4589]\\d{9}",]','["BS","011","1",,,,"\\d{7}(?:\\d{3})?","[2589]\\d{9}",]','["CA","011","1",,,,"\\d{7}(?:\\d{3})?","[2-9]\\d{9}|3\\d{6}",]','["DM","011","1",,,,"\\d{7}(?:\\d{3})?","[57-9]\\d{9}",]','["DO","011","1",,,,"\\d{7}(?:\\d{3})?","[589]\\d{9}",]','["GD","011","1",,,,"\\d{7}(?:\\d{3})?","[4589]\\d{9}",]','["GU","011","1",,,,"\\d{7}(?:\\d{3})?","[5689]\\d{9}",]','["JM","011","1",,,,"\\d{7}(?:\\d{3})?","[589]\\d{9}",]','["KN","011","1",,,,"\\d{7}(?:\\d{3})?","[589]\\d{9}",]','["KY","011","1",,,,"\\d{7}(?:\\d{3})?","[3589]\\d{9}",]','["LC","011","1",,,,"\\d{7}(?:\\d{3})?","[5789]\\d{9}",]','["MP","011","1",,,,"\\d{7}(?:\\d{3})?","[5689]\\d{9}",]','["MS","011","1",,,,"\\d{7}(?:\\d{3})?","[5689]\\d{9}",]','["PR","011","1",,,,"\\d{7}(?:\\d{3})?","[5789]\\d{9}",]','["SX","011","1",,,,"\\d{7}(?:\\d{3})?","[5789]\\d{9}",]','["TC","011","1",,,,"\\d{7}(?:\\d{3})?","[5689]\\d{9}",]','["TT","011","1",,,,"\\d{7}(?:\\d{3})?","[589]\\d{9}",]','["AG","011","1",,,,"\\d{7}(?:\\d{3})?","[2589]\\d{9}",]','["VC","011","1",,,,"\\d{7}(?:\\d{3})?","[5789]\\d{9}",]','["VG","011","1",,,,"\\d{7}(?:\\d{3})?","[2589]\\d{9}",]','["VI","011","1",,,,"\\d{7}(?:\\d{3})?","[3589]\\d{9}",]'],
"60": '["MY","00","0",,,,"\\d{6,10}","[13-9]\\d{7,9}",[["([4-79])(\\d{3})(\\d{4})","$1-$2 $3","[4-79]","$NP$FG",],["(3)(\\d{4})(\\d{4})","$1-$2 $3","3","$NP$FG",],["([18]\\d)(\\d{3})(\\d{3,4})","$1-$2 $3","1[02-46-9][1-9]|8","$NP$FG",],["(1)([36-8]00)(\\d{2})(\\d{4})","$1-$2-$3-$4","1[36-8]0",,],["(11)(\\d{4})(\\d{4})","$1-$2 $3","11","$NP$FG",],["(15[49])(\\d{3})(\\d{4})","$1-$2 $3","15","$NP$FG",]]]',
"355": '["AL","00","0",,,"$NP$FG","\\d{5,9}","[2-57]\\d{7}|6\\d{8}|8\\d{5,7}|9\\d{5}",[["(4)(\\d{3})(\\d{4})","$1 $2 $3","4[0-6]",,],["(6[6-9])(\\d{3})(\\d{4})","$1 $2 $3","6",,],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3","[2358][2-5]|4[7-9]",,],["(\\d{3})(\\d{3,5})","$1 $2","[235][16-9]|8[016-9]|[79]",,]]]',
"254": '["KE","000","0",,,"$NP$FG","\\d{5,10}","20\\d{6,7}|[4-9]\\d{6,9}",[["(\\d{2})(\\d{4,7})","$1 $2","[24-6]",,],["(\\d{3})(\\d{6,7})","$1 $2","7",,],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3","[89]",,]]]',
"223": '["ML","00",,,,,"\\d{8}","[246-9]\\d{7}",[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","[246-9]",,],["(\\d{4})","$1","67|74",,"NA"]]]',
"686": '["KI","00",,"0",,,"\\d{5,8}","[2-58]\\d{4}|7\\d{7}",]',
"686": '["KI","00",,"0",,,"\\d{5,8}","[2458]\\d{4}|3\\d{4,7}|7\\d{7}",]',
"994": '["AZ","00","0",,,"($NP$FG)","\\d{7,9}","[1-9]\\d{8}",[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4","(?:1[28]|2(?:[45]2|[0-36])|365)",,],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4","[4-8]","$NP$FG",],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","9","$NP$FG",]]]',
"979": '["001",,,,,,"\\d{9}","\\d{9}",[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",,,]]]',
"66": '["TH","00","0",,,"$NP$FG","\\d{4}|\\d{8,10}","[2-9]\\d{7,8}|1\\d{3}(?:\\d{6})?",[["(2)(\\d{3})(\\d{4})","$1 $2 $3","2",,],["([3-9]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3","[3-9]",,],["(1[89]00)(\\d{3})(\\d{3})","$1 $2 $3","1","$FG",]]]',
@ -197,7 +197,7 @@ this.PHONE_NUMBER_META_DATA = {
"976": '["MN","001","0",,,"$NP$FG","\\d{6,10}","[12]\\d{7,9}|[57-9]\\d{7}",[["([12]\\d)(\\d{2})(\\d{4})","$1 $2 $3","[12]1",,],["([12]2\\d)(\\d{5,6})","$1 $2","[12]2[1-3]",,],["([12]\\d{3})(\\d{5})","$1 $2","[12](?:27|[3-5])",,],["(\\d{4})(\\d{4})","$1 $2","[57-9]","$FG",],["([12]\\d{4})(\\d{4,5})","$1 $2","[12](?:27|[3-5])",,]]]',
"20": '["EG","00","0",,,"$NP$FG","\\d{5,10}","1\\d{4,9}|[2456]\\d{8}|3\\d{7}|[89]\\d{8,9}",[["(\\d)(\\d{7,8})","$1 $2","[23]",,],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3","1[012]|[89]00",,],["(\\d{2})(\\d{6,7})","$1 $2","1[35]|[4-6]|[89][2-9]",,]]]',
"689": '["PF","00",,,,,"\\d{6}(?:\\d{2})?","[2-79]\\d{5}|8\\d{5,7}",[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4","89",,],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",,,]]]',
"56": '["CL","(?:0|1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))0","0","0|(1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))",,"$NP$FG","\\d{6,11}","(?:[2-9]|600|123)\\d{7,8}",[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3","2","($FG)",],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3","[357]|4[1-35]|6[13-57]","($FG)",],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3","65","($FG)",],["(9)([5-9]\\d{3})(\\d{4})","$1 $2 $3","9",,],["(44)(\\d{3})(\\d{4})","$1 $2 $3","44",,],["([68]00)(\\d{3})(\\d{3,4})","$1 $2 $3","60|8","$FG",],["(600)(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4","60","$FG",],["(1230)(\\d{3})(\\d{4})","$1 $2 $3","1","$FG",],["(\\d{4,5})","$1","[1-9]","$FG","NA"]]]',
"56": '["CL","(?:0|1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))0","0","0|(1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))",,"$NP$FG","\\d{6,11}","(?:[2-9]|600|123)\\d{7,8}",[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3","22","($FG)",],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3","[357]|4[1-35]|6[13-57]","($FG)",],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3","65","($FG)",],["(9)([5-9]\\d{3})(\\d{4})","$1 $2 $3","9",,],["(44)(\\d{3})(\\d{4})","$1 $2 $3","44",,],["([68]00)(\\d{3})(\\d{3,4})","$1 $2 $3","60|8","$FG",],["(600)(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4","60","$FG",],["(1230)(\\d{3})(\\d{4})","$1 $2 $3","1","$FG",],["(\\d{5})(\\d{4})","$1 $2","219","($FG)",],["(\\d{4,5})","$1","[1-9]","$FG","NA"]]]',
"596": '["MQ","00","0",,,"$NP$FG","\\d{9}","[56]\\d{8}",[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",,,]]]',
"508": '["PM","00","0",,,"$NP$FG","\\d{6}","[45]\\d{5}",[["([45]\\d)(\\d{2})(\\d{2})","$1 $2 $3",,,]]]',
"269": '["KM","00",,,,,"\\d{7}","[379]\\d{6}",[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",,,]]]',

View File

@ -195,25 +195,26 @@ WifiGeoPositionProvider.prototype = {
updateMobileInfo: function() {
LOG("updateMobileInfo called");
try {
let radio = Cc["@mozilla.org/ril;1"]
.getService(Ci.nsIRadioInterfaceLayer)
.getRadioInterface(0);
let radioService = Cc["@mozilla.org/ril;1"]
.getService(Ci.nsIRadioInterfaceLayer);
let numInterfaces = radioService.numRadioInterfaces;
let result = [];
for (let i = 0; i < numInterfaces; i++) {
LOG("Looking for SIM in slot:" + i + " of " + numInterfaces);
let radio = radioService.getRadioInterface(i);
let iccInfo = radio.rilContext.iccInfo;
let cell = radio.rilContext.voice.cell;
let iccInfo = radio.rilContext.iccInfo;
let cell = radio.rilContext.voice.cell;
LOG("mcc: " + iccInfo.mcc);
LOG("mnc: " + iccInfo.mnc);
LOG("cid: " + cell.gsmCellId);
LOG("lac: " + cell.gsmLocationAreaCode);
gCellResults = [{
"radio": "gsm",
"mobileCountryCode": iccInfo.mcc,
"mobileNetworkCode": iccInfo.mnc,
"locationAreaCode": cell.gsmLocationAreaCode,
"cellId": cell.gsmCellId,
}];
if (iccInfo && cell) {
// TODO type and signal strength
result.push({ radio: "gsm",
mobileCountryCode: iccInfo.mcc,
mobileNetworkCode: iccInfo.mnc,
locationAreaCode: cell.gsmLocationAreaCode,
cellId: cell.gsmCellId });
}
}
return result;
} catch (e) {
gCellResults = null;
}

View File

@ -453,12 +453,25 @@ AutoMounter::UpdateState()
Volume::STATE volState = vol->State();
if (vol->State() == nsIVolume::STATE_MOUNTED) {
LOG("UpdateState: Volume %s is %s and %s @ %s gen %d locked %d sharing %c",
LOG("UpdateState: Volume %s is %s and %s @ %s gen %d locked %d sharing %s",
vol->NameStr(), vol->StateStr(),
vol->MediaPresent() ? "inserted" : "missing",
vol->MountPoint().get(), vol->MountGeneration(),
(int)vol->IsMountLocked(),
vol->CanBeShared() ? (vol->IsSharingEnabled() ? 'y' : 'n') : 'x');
vol->CanBeShared() ? (vol->IsSharingEnabled() ? (vol->IsSharing() ? "en-y" : "en-n") : "dis") : "x");
if (vol->IsSharing() && !usbCablePluggedIn) {
// We call SetIsSharing(true) below to indicate intent to share. This
// causes a state change which notifys apps, and they'll close any
// open files, which will initiate the change away from the mounted
// state and into the sharing state. Normally, when the volume
// transitions back to the mounted state, then vol->mIsSharing gets set
// to false. However, if the user pulls the USB cable before we
// actually start sharing, then the volume never actually leaves
// the mounted state (and hence never transitions from
// sharing -> mounted), and mIsSharing never gets set back to false.
// So we clear mIsSharing here.
vol->SetIsSharing(false);
}
} else {
LOG("UpdateState: Volume %s is %s and %s", vol->NameStr(), vol->StateStr(),
vol->MediaPresent() ? "inserted" : "missing");

View File

@ -4039,7 +4039,8 @@ RadioInterface.prototype = {
if (!Components.isSuccessCode(rv)) {
if (DEBUG) this.debug("Error! Fail to save sending message! rv = " + rv);
request.notifySendMessageFailed(
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(rv));
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(rv),
domMessage);
Services.obs.notifyObservers(domMessage, kSmsFailedObserverTopic, null);
return;
}
@ -4065,7 +4066,7 @@ RadioInterface.prototype = {
}
if (errorCode) {
if (silent) {
request.notifySendMessageFailed(errorCode);
request.notifySendMessageFailed(errorCode, domMessage);
return;
}
@ -4077,7 +4078,7 @@ RadioInterface.prototype = {
null,
function notifyResult(rv, domMessage) {
// TODO bug 832140 handle !Components.isSuccessCode(rv)
request.notifySendMessageFailed(errorCode);
request.notifySendMessageFailed(errorCode, domMessage);
Services.obs.notifyObservers(domMessage, kSmsFailedObserverTopic, null);
});
return;
@ -4107,7 +4108,25 @@ RadioInterface.prototype = {
}
if (context.silent) {
context.request.notifySendMessageFailed(error);
// There is no way to modify nsIDOMMozSmsMessage attributes as they
// are read only so we just create a new sms instance to send along
// with the notification.
let sms = context.sms;
context.request.notifySendMessageFailed(
error,
gMobileMessageService.createSmsMessage(sms.id,
sms.threadId,
sms.iccId,
DOM_MOBILE_MESSAGE_DELIVERY_ERROR,
RIL.GECKO_SMS_DELIVERY_STATUS_ERROR,
sms.sender,
sms.receiver,
sms.body,
sms.messageClass,
sms.timestamp,
0,
0,
sms.read));
return false;
}
@ -4119,7 +4138,7 @@ RadioInterface.prototype = {
null,
function notifyResult(rv, domMessage) {
// TODO bug 832140 handle !Components.isSuccessCode(rv)
context.request.notifySendMessageFailed(error);
context.request.notifySendMessageFailed(error, domMessage);
Services.obs.notifyObservers(domMessage, kSmsFailedObserverTopic, null);
});
return false;

View File

@ -78,9 +78,7 @@ Volume::SetIsSharing(bool aIsSharing)
mIsSharing = aIsSharing;
LOG("Volume %s: IsSharing set to %d state %s",
NameStr(), (int)mIsSharing, StateStr(mState));
if (mIsSharing) {
mEventObserverList.Broadcast(this);
}
mEventObserverList.Broadcast(this);
}
void

View File

@ -308,6 +308,8 @@ var interfaceNamesInGlobalScope =
"DOMImplementation",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "DOMMMIError", b2g: true, pref: "dom.mobileconnection.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "DOMMobileMessageError", b2g: true, pref: "dom.sms.enabled"},
// IMPORTANT: Do not change this list without review from a DOM peer!
"DOMParser",
// IMPORTANT: Do not change this list without review from a DOM peer!

View File

@ -0,0 +1,10 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/.
*/
[Pref="dom.sms.enabled"]
interface DOMMobileMessageError : DOMError {
readonly attribute (MozSmsMessage or MozMmsMessage) data;
};

View File

@ -88,6 +88,7 @@ WEBIDL_FILES = [
'DOMError.webidl',
'DOMException.webidl',
'DOMImplementation.webidl',
'DOMMobileMessageError.webidl',
'DOMParser.webidl',
'DOMPoint.webidl',
'DOMQuad.webidl',

View File

@ -210,7 +210,7 @@ GLLibraryEGL::EnsureInitialized()
}
GLLibraryLoader::SymLoadStruct optionalSymbols[] = {
// On Android 4.2 and up, certain features like ANDROID_native_fence_sync
// On Android 4.3 and up, certain features like ANDROID_native_fence_sync
// can only be queried by using a special eglQueryString.
{ (PRFuncPtr*) &mSymbols.fQueryStringImplementationANDROID,
{ "_Z35eglQueryStringImplementationANDROIDPvi", nullptr } },
@ -219,7 +219,7 @@ GLLibraryEGL::EnsureInitialized()
GLLibraryLoader::LoadSymbols(mEGLLibrary, &optionalSymbols[0]);
#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 17
#if defined(MOZ_WIDGET_GONK) && ANDROID_VERSION >= 18
MOZ_RELEASE_ASSERT(mSymbols.fQueryStringImplementationANDROID,
"Couldn't find eglQueryStringImplementationANDROID");
#endif

View File

@ -6,7 +6,6 @@
DEFINES['_GLIBCXX_OS_DEFINES'] = True
DEFINES['ANDROID_SMP'] = 0
DEFINES['FAKE_LOG_DEVICE'] = True
DEFINES['LOG_NDEBUG'] = 0
if CONFIG['_MSC_VER']:
@ -44,6 +43,17 @@ else:
'-Wno-incompatible-pointer-types-discards-qualifiers'
]
if CONFIG['OS_TARGET'] != 'Android':
DEFINES['FAKE_LOG_DEVICE'] = True
SOURCES += [
'system/core/liblog/fake_log_device.c',
]
UNIFIED_SOURCES += [
'system/core/libcutils/strdup16to8.c',
'system/core/liblog/logd_write.c',
'system/core/liblog/logprint.c',
]
EXPORTS.mp4_demuxer += [
'binding/include/mp4_demuxer/DecoderData.h',
'binding/include/mp4_demuxer/mp4_demuxer.h',
@ -52,7 +62,6 @@ EXPORTS.mp4_demuxer += [
SOURCES += [
'frameworks/av/media/libstagefright/foundation/hexdump.cpp',
'frameworks/av/media/libstagefright/MetaData.cpp',
'system/core/liblog/fake_log_device.c',
'system/core/libutils/RefBase.cpp',
'system/core/libutils/String16.cpp',
'system/core/libutils/String8.cpp',
@ -79,9 +88,6 @@ UNIFIED_SOURCES += [
'frameworks/av/media/libstagefright/SampleIterator.cpp',
'frameworks/av/media/libstagefright/SampleTable.cpp',
'frameworks/av/media/libstagefright/Utils.cpp',
'system/core/libcutils/strdup16to8.c',
'system/core/liblog/logd_write.c',
'system/core/liblog/logprint.c',
'system/core/libutils/SharedBuffer.cpp',
'system/core/libutils/Static.cpp',
'system/core/libutils/Unicode.cpp',

View File

@ -504,14 +504,26 @@ MarionetteServerConnection.prototype = {
this.scriptTimeout = 10000;
function waitForWindow() {
let checkTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
let win = this.getCurrentWindow();
if (!win ||
(appName == "Firefox" && !win.gBrowser) ||
(appName == "Fennec" && !win.BrowserApp)) {
if (!win) {
// If the window isn't even created, just poll wait for it
let checkTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
checkTimer.initWithCallback(waitForWindow.bind(this), 100,
Ci.nsITimer.TYPE_ONE_SHOT);
}
else if (win.document.readyState != "complete") {
// Otherwise, wait for it to be fully loaded before proceeding
let listener = (evt) => {
// ensure that we proceed, on the top level document load event
// (not an iframe one...)
if (evt.target != win.document) {
return;
}
win.removeEventListener("load", listener);
waitForWindow.call(this);
};
win.addEventListener("load", listener, true);
}
else {
this.startBrowser(win, true);
}