Merge b2g-inbound to m-c a=merge

This commit is contained in:
Wes Kocher 2014-09-04 17:31:18 -07:00
Родитель f20cb9b88b 0b2baf74e1
Коммит 7725890754
27 изменённых файлов: 279 добавлений и 288 удалений

Просмотреть файл

@ -8,6 +8,7 @@ const { interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/FxAccountsCommon.js");
Cu.import("resource://gre/modules/ContentRequestHelper.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
function FxAccountsUIGlue() {
}

Просмотреть файл

@ -12,10 +12,10 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="4b4336c73c081b39776d399835ce4853aee5cc1c">
<project name="platform_build" path="build" remote="b2g" revision="fe92ddd450e03b38edb2d465de7897971d68ac68">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<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="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<!-- 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="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
@ -137,7 +137,7 @@
<project name="platform/system/core" path="system/core" revision="53d584d4a4b4316e4de9ee5f210d662f89b44e7e"/>
<project name="u-boot" path="u-boot" revision="2d7a801a3e002078f885e8085fad374a564682e5"/>
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="7feb3df0e150053e0143ef525f6e082bda320aea"/>
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="2be9b6d4984da4a2d0afde1e149c01a12f691f30"/>
<project name="vendor/sprd/open-source" path="vendor/sprd/open-source" revision="cbc0a8e207a21bfaa96e07971ac1f380d9a677cf"/>
<project name="vendor/sprd/partner" path="vendor/sprd/partner" revision="8649c7145972251af11b0639997edfecabfc7c2e"/>
<project name="vendor/sprd/proprietories" path="vendor/sprd/proprietories" revision="d2466593022f7078aaaf69026adf3367c2adb7bb"/>
</manifest>

Просмотреть файл

@ -15,17 +15,17 @@
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
<project name="platform_build" path="build" remote="b2g" revision="700b031a54079f791344aa091798f6b43a9e2900">
<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="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -12,15 +12,15 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="74465af039d2809454afdfef285285bb63146e1b">
<project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -133,7 +133,7 @@
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="57b16fcb790bdf0b53b3c6435a37ccc8ca90ed36"/>
<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="9f28c4faea3b2f01db227b2467b08aeba96d9bec"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb24caca12c1ee69a26b778f67b802a812550703"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e5ae3ef2fe1cbc1c9a4fc718b01b7f28b1c5486"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="8b1365af38c9a653df97349ee53a3f5d64fd590a"/>
<project name="darwinstreamingserver" path="system/darwinstreamingserver" remote="b2g" revision="cf85968c7f85e0ec36e72c87ceb4837a943b8af6"/>
</manifest>

Просмотреть файл

@ -12,10 +12,10 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="4b4336c73c081b39776d399835ce4853aee5cc1c">
<project name="platform_build" path="build" remote="b2g" revision="fe92ddd450e03b38edb2d465de7897971d68ac68">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<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="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<!-- 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"/>

Просмотреть файл

@ -15,17 +15,17 @@
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
<project name="platform_build" path="build" remote="b2g" revision="700b031a54079f791344aa091798f6b43a9e2900">
<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="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c058843242068d0df7c107e09da31b53d2e08fa6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>

Просмотреть файл

@ -12,10 +12,10 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="4b4336c73c081b39776d399835ce4853aee5cc1c">
<project name="platform_build" path="build" remote="b2g" revision="fe92ddd450e03b38edb2d465de7897971d68ac68">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
@ -23,7 +23,7 @@
<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="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<!-- 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="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<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="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>
@ -138,8 +138,8 @@
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="082a1f98422e6a6b56f61218d6fcf465e85d4c58"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="5b71e40213f650459e95d35b6f14af7e88d8ab62"/>
<project name="platform_external_libnfc-nci" path="external/libnfc-nci" remote="t2m" revision="4186bdecb4dae911b39a8202252cc2310d91b0be"/>
<project name="platform/frameworks/av" path="frameworks/av" revision="9e88d2eb335f00d9d9af18f663f9d3e55b019bf8"/>
<project name="platform/frameworks/base" path="frameworks/base" revision="714e6634f12435c208622a2b32e8f7fcb421771e"/>
<project name="platform/frameworks/av" path="frameworks/av" revision="c1814713bd2d07c2af0c236007badc8732a34324"/>
<project name="platform/frameworks/base" path="frameworks/base" revision="6b58ab45e3e56c1fc20708cc39fa2264c52558df"/>
<project name="platform/frameworks/native" path="frameworks/native" revision="a46a9f1ac0ed5662d614c277cbb14eb3f332f365"/>
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="9982f697972cfab09379fd909307e993a6247ebf"/>
<project name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="8d7676dfb68ee0cd069affedd5d1e97316a184ba"/>
@ -151,7 +151,7 @@
<project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
<project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
<project name="platform/system/core" path="system/core" revision="350eac5403124dacb2a5fd9e28ac290a59fc3b8e"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb24caca12c1ee69a26b778f67b802a812550703"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e5ae3ef2fe1cbc1c9a4fc718b01b7f28b1c5486"/>
<project name="platform/system/qcom" path="system/qcom" revision="63e3f6f176caad587d42bba4c16b66d953fb23c2"/>
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="6ada483cf7ff87eec2a9496941352606db73291e"/>
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="5d1dbc698de7294697373b436dd44e240f40e1ac"/>

Просмотреть файл

@ -12,15 +12,15 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="74465af039d2809454afdfef285285bb63146e1b">
<project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -145,7 +145,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="adc485d8755af6a61641d197de7cfef667722580"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="eb24caca12c1ee69a26b778f67b802a812550703"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e5ae3ef2fe1cbc1c9a4fc718b01b7f28b1c5486"/>
<project name="platform/system/qcom" path="system/qcom" revision="1cdab258b15258b7f9657da70e6f06ebd5a2fc25"/>
<project name="platform/vendor/qcom/msm8610" path="device/qcom/msm8610" revision="4ae5df252123591d5b941191790e7abed1bce5a4"/>
<project name="platform/vendor/qcom-opensource/wlan/prima" path="vendor/qcom/opensource/wlan/prima" revision="ce18b47b4a4f93a581d672bbd5cb6d12fe796ca9"/>

Просмотреть файл

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "9c3a4beb0c7c08c6a20dd406210f3c671557e121",
"revision": "c24176cfc9d128e5673782e05532f09ff94d09c5",
"repo_path": "/integration/gaia-central"
}

Просмотреть файл

@ -13,16 +13,16 @@
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
<project name="platform_build" path="build" remote="b2g" revision="700b031a54079f791344aa091798f6b43a9e2900">
<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="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>

Просмотреть файл

@ -11,11 +11,11 @@
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<default remote="caf" revision="b2g/ics_strawberry" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
<project name="platform_build" path="build" remote="b2g" revision="700b031a54079f791344aa091798f6b43a9e2900">
<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="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

Просмотреть файл

@ -12,15 +12,15 @@
<!--original fetch url was https://git.mozilla.org/releases-->
<remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="74465af039d2809454afdfef285285bb63146e1b">
<project name="platform_build" path="build" remote="b2g" revision="8986df0f82e15ac2798df0b6c2ee3435400677ac">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->
@ -129,7 +129,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="eb24caca12c1ee69a26b778f67b802a812550703"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="7e5ae3ef2fe1cbc1c9a4fc718b01b7f28b1c5486"/>
<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"/>

Просмотреть файл

@ -13,16 +13,16 @@
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
<default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/>
<!-- Gonk specific things and forks -->
<project name="platform_build" path="build" remote="b2g" revision="0d616942c300d9fb142483210f1dda9096c9a9fc">
<project name="platform_build" path="build" remote="b2g" revision="700b031a54079f791344aa091798f6b43a9e2900">
<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="de59e0c3614dd0061881fe284e9f2d74fa0d1d5d"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="5765c62163bcb7fde5ebfd211881117de31a7c46"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="6969df171e5295f855f12d12db0382048e6892e7"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="562d357b72279a9e35d4af5aeecc8e1ffa2f44f1"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="68af8bfafdf9e35f4db0ae60e087cbf8f6d7ee6d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7af569a39a6a7d01a58093a01b16644c2c0f5657"/>
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>

Просмотреть файл

@ -511,18 +511,26 @@ GonkCameraParameters::SetTranslated(uint32_t aKey, const ICameraControl::Positio
if (!isnan(aPosition.latitude)) {
DOM_CAMERA_LOGI("setting picture latitude to %lf\n", aPosition.latitude);
SetImpl(Parameters::KEY_GPS_LATITUDE, nsPrintfCString("%lf", aPosition.latitude).get());
} else {
ClearImpl(Parameters::KEY_GPS_LATITUDE);
}
if (!isnan(aPosition.longitude)) {
DOM_CAMERA_LOGI("setting picture longitude to %lf\n", aPosition.longitude);
SetImpl(Parameters::KEY_GPS_LONGITUDE, nsPrintfCString("%lf", aPosition.longitude).get());
} else {
ClearImpl(Parameters::KEY_GPS_LONGITUDE);
}
if (!isnan(aPosition.altitude)) {
DOM_CAMERA_LOGI("setting picture altitude to %lf\n", aPosition.altitude);
SetImpl(Parameters::KEY_GPS_ALTITUDE, nsPrintfCString("%lf", aPosition.altitude).get());
} else {
ClearImpl(Parameters::KEY_GPS_ALTITUDE);
}
if (!isnan(aPosition.timestamp)) {
DOM_CAMERA_LOGI("setting picture timestamp to %lf\n", aPosition.timestamp);
SetImpl(Parameters::KEY_GPS_TIMESTAMP, nsPrintfCString("%lf", aPosition.timestamp).get());
} else {
ClearImpl(Parameters::KEY_GPS_TIMESTAMP);
}
return NS_OK;

Просмотреть файл

@ -123,6 +123,8 @@ protected:
void get(const char* aKey, int& aRet) { aRet = getInt(aKey); }
void get(const char* aKey, bool& aRet) { aRet = strcmp(get(aKey), FALSE); }
void remove(const char* aKey) { android::CameraParameters::remove(aKey); }
static const char* GetTextKey(uint32_t aKey);
};
@ -169,6 +171,13 @@ protected:
return NS_OK;
}
nsresult
ClearImpl(const char* aKey)
{
mParams.remove(aKey);
return NS_OK;
}
// The *Translated() functions allow us to handle special cases;
// for example, where the thumbnail size setting is exposed as an
// ICameraControl::Size object, but is handled by the AOSP layer

Просмотреть файл

@ -584,6 +584,10 @@ DeviceStorageRequestParent::CreateFdEvent::CancelableRun()
nsCOMPtr<nsIRunnable> r;
if (!mFile->mFile) {
r = new PostErrorEvent(mParent, POST_ERROR_EVENT_UNKNOWN);
return NS_DispatchToMainThread(r);
}
bool check = false;
mFile->mFile->Exists(&check);
if (check) {
@ -628,7 +632,7 @@ DeviceStorageRequestParent::WriteFileEvent::CancelableRun()
nsCOMPtr<nsIRunnable> r;
if (!mInputStream) {
if (!mInputStream || !mFile->mFile) {
r = new PostErrorEvent(mParent, POST_ERROR_EVENT_UNKNOWN);
return NS_DispatchToMainThread(r);
}
@ -684,6 +688,10 @@ DeviceStorageRequestParent::DeleteFileEvent::CancelableRun()
nsCOMPtr<nsIRunnable> r;
if (!mFile->mFile) {
r = new PostErrorEvent(mParent, POST_ERROR_EVENT_UNKNOWN);
return NS_DispatchToMainThread(r);
}
bool check = false;
mFile->mFile->Exists(&check);
if (check) {
@ -784,6 +792,11 @@ DeviceStorageRequestParent::ReadFileEvent::CancelableRun()
MOZ_ASSERT(!NS_IsMainThread());
nsCOMPtr<nsIRunnable> r;
if (!mFile->mFile) {
r = new PostErrorEvent(mParent, POST_ERROR_EVENT_UNKNOWN);
return NS_DispatchToMainThread(r);
}
bool check = false;
mFile->mFile->Exists(&check);

Просмотреть файл

@ -302,7 +302,9 @@ DeviceStorageTypeChecker::Check(const nsAString& aType, nsIDOMBlob* aBlob)
bool
DeviceStorageTypeChecker::Check(const nsAString& aType, nsIFile* aFile)
{
MOZ_ASSERT(aFile);
if (!aFile) {
return false;
}
if (aType.EqualsLiteral(DEVICESTORAGE_APPS) ||
aType.EqualsLiteral(DEVICESTORAGE_SDCARD) ||
@ -1070,6 +1072,9 @@ DeviceStorageFile::AppendRelativePath(const nsAString& aPath) {
nsresult
DeviceStorageFile::CreateFileDescriptor(FileDescriptor& aFileDescriptor)
{
if (!mFile) {
return NS_ERROR_FAILURE;
}
ScopedPRFileDesc fd;
nsresult rv = mFile->OpenNSPRFileDesc(PR_RDWR | PR_CREATE_FILE,
0660, &fd.rwget());
@ -1241,6 +1246,9 @@ DeviceStorageFile::CalculateMimeType()
{
MOZ_ASSERT(NS_IsMainThread());
if (!mFile) {
return NS_ERROR_FAILURE;
}
nsAutoCString mimeType;
nsCOMPtr<nsIMIMEService> mimeService =
do_GetService(NS_MIMESERVICE_CONTRACTID);
@ -1261,6 +1269,10 @@ DeviceStorageFile::CalculateSizeAndModifiedDate()
{
MOZ_ASSERT(!NS_IsMainThread());
if (!mFile) {
return NS_ERROR_FAILURE;
}
int64_t fileSize;
nsresult rv = mFile->GetFileSize(&fileSize);
NS_ENSURE_SUCCESS(rv, rv);
@ -1279,6 +1291,9 @@ void
DeviceStorageFile::CollectFiles(nsTArray<nsRefPtr<DeviceStorageFile> > &aFiles,
PRTime aSince)
{
if (!mFile) {
return;
}
nsString fullRootPath;
mFile->GetPath(fullRootPath);
collectFilesInternal(aFiles, aSince, fullRootPath);
@ -1489,7 +1504,7 @@ DeviceStorageFile::DoFormat(nsAString& aStatus)
{
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
if (!typeChecker) {
if (!typeChecker || !mFile) {
return;
}
if (!typeChecker->IsVolumeBased(mStorageType)) {
@ -1519,7 +1534,7 @@ DeviceStorageFile::DoMount(nsAString& aStatus)
{
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
if (!typeChecker) {
if (!typeChecker || !mFile) {
return;
}
if (!typeChecker->IsVolumeBased(mStorageType)) {
@ -1549,7 +1564,7 @@ DeviceStorageFile::DoUnmount(nsAString& aStatus)
{
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
if (!typeChecker) {
if (!typeChecker || !mFile) {
return;
}
if (!typeChecker->IsVolumeBased(mStorageType)) {
@ -1581,7 +1596,7 @@ DeviceStorageFile::GetStatus(nsAString& aStatus)
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
if (!typeChecker) {
if (!typeChecker || !mFile) {
return;
}
if (!typeChecker->IsVolumeBased(mStorageType)) {
@ -1635,7 +1650,7 @@ DeviceStorageFile::GetStorageStatus(nsAString& aStatus)
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
if (!typeChecker) {
if (!typeChecker || !mFile) {
return;
}
if (!typeChecker->IsVolumeBased(mStorageType)) {
@ -2382,6 +2397,8 @@ public:
, mRequest(aRequest)
{
MOZ_ASSERT(mDSFileDescriptor);
MOZ_ASSERT(mDSFileDescriptor->mDSFile);
MOZ_ASSERT(mDSFileDescriptor->mDSFile->mFile);
MOZ_ASSERT(mRequest);
}
@ -2390,7 +2407,6 @@ public:
MOZ_ASSERT(!NS_IsMainThread());
DeviceStorageFile* dsFile = mDSFileDescriptor->mDSFile;
MOZ_ASSERT(dsFile);
nsString fullPath;
dsFile->GetFullPath(fullPath);
@ -2437,6 +2453,7 @@ public:
, mRequestType(aRequestType)
{
MOZ_ASSERT(mFile);
MOZ_ASSERT(mFile->mFile);
MOZ_ASSERT(mRequest);
MOZ_ASSERT(mRequestType);
}

Просмотреть файл

@ -92,8 +92,8 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () {
nfc: null,
// Manage registered Peer Targets
peerTargetsMap: {},
currentPeerAppId: null,
peerTargets: {},
currentPeer: null,
init: function init(nfc) {
this.nfc = nfc;
@ -152,55 +152,36 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () {
ppmm = null;
},
registerPeerReadyTarget: function registerPeerReadyTarget(message) {
let appInfo = message.data;
let targets = this.peerTargetsMap;
let targetInfo = targets[appInfo.appId];
// If the application Id is already registered
if (targetInfo) {
return;
registerPeerReadyTarget: function registerPeerReadyTarget(target, appId) {
if (!this.peerTargets[appId]) {
this.peerTargets[appId] = target;
}
// Target not registered yet! Add to the target map
let newTargetInfo = { target : message.target,
isPeerReadyCalled: false };
targets[appInfo.appId] = newTargetInfo;
},
unregisterPeerReadyTarget: function unregisterPeerReadyTarget(message) {
let appInfo = message.data;
let targets = this.peerTargetsMap;
let targetInfo = targets[appInfo.appId];
if (targetInfo) {
// Remove the target from the list of registered targets
delete targets[appInfo.appId]
unregisterPeerReadyTarget: function unregisterPeerReadyTarget(appId) {
if (this.peerTargets[appId]) {
delete this.peerTargets[appId];
}
},
removePeerTarget: function removePeerTarget(target) {
let targets = this.peerTargetsMap;
Object.keys(targets).forEach((appId) => {
let targetInfo = targets[appId];
if (targetInfo && targetInfo.target === target) {
// Remove the target from the list of registered targets
delete targets[appId];
Object.keys(this.peerTargets).forEach((appId) => {
if (this.peerTargets[appId] === target) {
if (this.currentPeer === target) {
this.currentPeer = null;
}
delete this.peerTargets[appId];
}
});
},
isPeerReadyTarget: function isPeerReadyTarget(appId) {
let targetInfo = this.peerTargetsMap[appId];
return (targetInfo != null);
},
notifyPeerEvent: function notifyPeerEvent(target, event, sessionToken) {
if (!target) {
dump("invalid target");
return;
}
isPeerReadyCalled: function isPeerReadyCalled(appId) {
let targetInfo = this.peerTargetsMap[appId];
return !!targetInfo.IsPeerReadyCalled;
},
notifyPeerEvent: function notifyPeerEvent(appId, event, sessionToken) {
let targetInfo = this.peerTargetsMap[appId];
targetInfo.target.sendAsyncMessage("NFC:PeerEvent", {
target.sendAsyncMessage("NFC:PeerEvent", {
event: event,
sessionToken: sessionToken
});
@ -209,27 +190,41 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () {
checkP2PRegistration: function checkP2PRegistration(message) {
// Check if the session and application id yeild a valid registered
// target. It should have registered for NFC_PEER_EVENT_READY
let isValid = !!this.nfc.sessionTokenMap[this.nfc._currentSessionId] &&
this.isPeerReadyTarget(message.data.appId);
// Remember the current AppId if registered.
this.currentPeerAppId = (isValid) ? message.data.appId : null;
let isValid = (this.nfc._currentSessionId != null) &&
(this.peerTargets[message.data.appId] != null);
let respMsg = { requestId: message.data.requestId };
if(!isValid) {
if (!isValid) {
respMsg.errorMsg = this.nfc.getErrorMessage(NFC.NFC_GECKO_ERROR_P2P_REG_INVALID);
}
// Notify the content process immediately of the status
message.target.sendAsyncMessage(message.name + "Response", respMsg);
},
onPeerLost: function onPeerLost(sessionToken) {
let appId = this.currentPeerAppId;
// For peerlost, the message is delievered to the target which
// registered onpeerready and onpeerready has been called before.
if (this.isPeerReadyTarget(appId) && this.isPeerReadyCalled(appId)) {
this.notifyPeerEvent(appId, NFC.NFC_PEER_EVENT_LOST, sessionToken);
this.currentPeerAppId = null;
notifyUserAcceptedP2P: function notifyUserAcceptedP2P(appId) {
let target = this.peerTargets[appId];
let sessionToken = this.nfc.sessionTokenMap[this.nfc._currentSessionId];
let isValid = (sessionToken != null) && (target != null);
if (!isValid) {
debug("Peer already lost or " + appId + " is not a registered PeerReadytarget");
return;
}
// Remember the target that receives onpeerready.
this.currentPeer = target;
this.notifyPeerEvent(target, NFC.NFC_PEER_EVENT_READY, sessionToken);
},
onPeerLost: function onPeerLost(sessionToken) {
if (!this.currentPeer) {
// not a P2P session or the target is already killed.
return;
}
// For peerlost, the message is delievered to the target which
// onpeerready has been called before.
this.notifyPeerEvent(this.currentPeer, NFC.NFC_PEER_EVENT_LOST, sessionToken);
this.currentPeer = null;
},
/**
@ -240,6 +235,7 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () {
debug("Received '" + JSON.stringify(message) + "' message from content process");
if (message.name == "child-process-shutdown") {
this.removePeerTarget(message.target);
this.nfc.removeTarget(message.target);
return null;
}
@ -277,25 +273,16 @@ XPCOMUtils.defineLazyGetter(this, "gMessageManager", function () {
}
return NFC.NFC_SUCCESS;
case "NFC:RegisterPeerReadyTarget":
this.registerPeerReadyTarget(message);
this.registerPeerReadyTarget(message.target, message.data.appId);
return null;
case "NFC:UnregisterPeerReadyTarget":
this.unregisterPeerReadyTarget(message);
this.unregisterPeerReadyTarget(message.data.appId);
return null;
case "NFC:CheckP2PRegistration":
this.checkP2PRegistration(message);
return null;
case "NFC:NotifyUserAcceptedP2P":
// Notify the 'NFC_PEER_EVENT_READY' since user has acknowledged
if (!this.isPeerReadyTarget(message.data.appId)) {
debug("Application ID : " + message.data.appId + " is not a registered PeerReadytarget");
return null;
}
let targetInfo = this.peerTargetsMap[message.data.appId];
targetInfo.IsPeerReadyCalled = true;
let sessionToken = this.nfc.sessionTokenMap[this.nfc._currentSessionId];
this.notifyPeerEvent(message.data.appId, NFC.NFC_PEER_EVENT_READY, sessionToken);
this.notifyUserAcceptedP2P(message.data.appId);
return null;
case "NFC:NotifySendFileStatus":
// Upon receiving the status of sendFile operation, send the response
@ -581,6 +568,14 @@ Nfc.prototype = {
return null;
},
removeTarget: function removeTarget(target) {
Object.keys(this.targetsByRequestId).forEach((requestId) => {
if (this.targetsByRequestId[requestId] === target) {
delete this.targetsByRequestId[requestId];
}
});
},
/**
* nsIObserver interface methods.
*/

Просмотреть файл

@ -80,6 +80,7 @@ enum SecureElementOrigin {
SIM = 0,
ESE = 1,
ASSD = 2,
OriginEndGuard = 3
};
} // namespace mozilla

Просмотреть файл

@ -83,7 +83,7 @@ struct EventOptions
{
EventOptions()
: mType(EmptyString()), mStatus(-1), mSessionId(-1), mRequestId(EmptyString()), mMajorVersion(-1), mMinorVersion(-1),
mIsReadOnly(-1), mCanBeMadeReadOnly(-1), mMaxSupportedLength(-1), mPowerLevel(-1), mOrigin(EmptyString()),
mIsReadOnly(-1), mCanBeMadeReadOnly(-1), mMaxSupportedLength(-1), mPowerLevel(-1),
mOriginType(-1), mOriginIndex(-1)
{}
@ -100,7 +100,6 @@ struct EventOptions
int32_t mMaxSupportedLength;
int32_t mPowerLevel;
nsString mOrigin;
int32_t mOriginType;
int32_t mOriginIndex;
nsTArray<uint8_t> mAid;

Просмотреть файл

@ -6,11 +6,13 @@
#include <binder/Parcel.h>
#include "mozilla/ModuleUtils.h"
#include "mozilla/ClearOnShutdown.h"
#include "mozilla/dom/NfcOptionsBinding.h"
#include "mozilla/dom/ToJSValue.h"
#include "mozilla/dom/RootedDictionary.h"
#include "nsAutoPtr.h"
#include "nsString.h"
#include "nsXULAppAPI.h"
#include "NfcGonkMessage.h"
#include "NfcOptions.h"
#define NS_NFCSERVICE_CID \
@ -21,21 +23,6 @@ using namespace android;
using namespace mozilla::dom;
using namespace mozilla::ipc;
nsLiteralString NfcTechString[] = {
NS_LITERAL_STRING("NDEF"),
NS_LITERAL_STRING("NDEF_WRITEABLE"),
NS_LITERAL_STRING("NDEF_FORMATABLE"),
NS_LITERAL_STRING("P2P"),
NS_LITERAL_STRING("NFC_A"),
NS_LITERAL_STRING("NFC_B"),
NS_LITERAL_STRING("NFC_F"),
NS_LITERAL_STRING("NFC_V"),
NS_LITERAL_STRING("NFC_ISO_DEP"),
NS_LITERAL_STRING("MIFARE_CLASSIC"),
NS_LITERAL_STRING("MIFARE_ULTRALIGHT"),
NS_LITERAL_STRING("BARCODE")
};
static const nsLiteralString SEOriginString[] = {
NS_LITERAL_STRING("SIM"),
NS_LITERAL_STRING("ESE"),
@ -128,8 +115,9 @@ public:
}
for (int i = 0; i < length; i++) {
nsString& elem = *event.mTechList.Value().AppendElement();
elem = NfcTechString[mEvent.mTechList[i]];
NFCTechType tech = static_cast<NFCTechType>(mEvent.mTechList[i]);
MOZ_ASSERT(tech < NFCTechType::EndGuard_);
*event.mTechList.Value().AppendElement() = tech;
}
}
@ -169,14 +157,12 @@ public:
COPY_OPT_FIELD(mMaxSupportedLength, -1)
// HCI Event Transaction parameters.
int size = sizeof(SEOriginString) / sizeof(nsLiteralString);
// TODO: We need a map or something to more rigorously validate against
// Gonk Message header values from inside NfcService.
if ((mEvent.mOriginType != -1) && (mEvent.mOriginType < size)) {
mEvent.mOrigin.Assign(SEOriginString[mEvent.mOriginType]);
mEvent.mOrigin.AppendInt(mEvent.mOriginIndex, 16 /* radix */);
if (mEvent.mOriginType != -1) {
MOZ_ASSERT(mEvent.mOriginType < SecureElementOrigin::OriginEndGuard);
event.mOrigin.Construct();
event.mOrigin.Value() = mEvent.mOrigin;
event.mOrigin.Value().Assign(SEOriginString[mEvent.mOriginType]);
event.mOrigin.Value().AppendInt(mEvent.mOriginIndex, 16 /* radix */);
}
if (mEvent.mAid.Length() > 0) {

Просмотреть файл

@ -29,7 +29,7 @@ function testNfcNotEnabledError() {
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
.then(registerAndFireOnpeerready)
.then(() => toggleNFC(false))
.then(() => sendNDEFExpectError(nfcPeers[0], 'NfcNotEnabledError'))
.then(() => sendNDEFExpectError(nfcPeers[0]))
.then(endTest)
.catch(handleRejectedPromise);
}
@ -50,7 +50,7 @@ function testNfcBadSessionIdError() {
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
.then(registerAndFireOnpeerready)
// we have 2 peers in nfcPeers array, peer0 has old/invalid session token
.then(() => sendNDEFExpectError(nfcPeers[0], 'NfcBadSessionIdError'))
.then(() => sendNDEFExpectError(nfcPeers[0]))
.then(() => toggleNFC(false))
.then(endTest)
.catch(handleRejectedPromise);
@ -96,46 +96,26 @@ function registerAndFireOnpeerready() {
let deferred = Promise.defer();
nfc.onpeerready = function(event) {
log("onpeerready called");
nfcPeers.push(event.peer);
nfc.onpeerready = null;
deferred.resolve();
};
let req = nfc.checkP2PRegistration(MANIFEST_URL);
req.onsuccess = function() {
is(req.result, true, 'P2P registration result');
if(req.result) {
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
} else {
ok(false, 'this should not happen');
nfc.onpeerready = null;
deferred.reject();
}
};
req.onerror = function() {
ok(false, 'not possible');
nfc.onpeerready = null;
deferred.reject();
};
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
return deferred.promise;
}
function sendNDEFExpectError(peer, errorMsg) {
function sendNDEFExpectError(peer) {
let deferred = Promise.defer();
let req = peer.sendNDEF(NDEF_MESSAGE);
req.onsuccess = function() {
ok(false, 'success on sending ndef not possible shoudl get: ' + errorMsg);
try {
peer.sendNDEF(NDEF_MESSAGE);
deferred.reject();
};
req.onerror = function() {
ok(true, 'this should happen');
is(req.error.name, errorMsg, 'Should have proper error name');
} catch (e) {
ok(true, 'this should happen ' + e);
deferred.resolve();
};
}
return deferred.promise;
}

Просмотреть файл

@ -34,16 +34,7 @@ function handleTechnologyDiscoveredRE0(msg) {
nfc.onpeerready = peerReadyCb;
nfc.onpeerlost = peerLostCb;
let request = nfc.checkP2PRegistration(MANIFEST_URL);
request.onsuccess = function (evt) {
is(request.result, true, "check for P2P registration result");
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
}
request.onerror = function () {
ok(false, "checkP2PRegistration failed.");
toggleNFC(false).then(runNextTest);
}
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
}
function handleTechnologyDiscoveredRE0ForP2PRegFailure(msg) {
@ -94,6 +85,34 @@ function testCheckP2PRegFailure() {
toggleNFC(true).then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0));
}
/**
* test for onpeerlost still should be called even onpeerready resets itself.
*/
function testPeerLostShouldBeCalled() {
nfc.onpeerready = function() {
NCI.deactivate();
nfc.onpeerready = null;
};
nfc.onpeerlost = function() {
ok(true, "peerlost should be called even peerready is reset");
toggleNFC(false).then(runNextTest);
};
sysMsgHelper.waitForTechDiscovered(function() {
log("testPeerLostShouldBeCalled techDiscoverd");
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
});
toggleNFC(true)
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0));
}
/**
* test case for
* 1. tech-discovered
* 2. tech-lost -> onpeerlost shouldn't be called.
*/
function testPeerLostShouldNotBeCalled() {
log("testPeerLostShouldNotBeCalled");
nfc.onpeerlost = function () {
@ -158,15 +177,7 @@ function testPeerShouldThrow() {
sysMsgHelper.waitForTechDiscovered(function() {
log("testPeerShouldThrow techDiscovered");
let request = nfc.checkP2PRegistration(MANIFEST_URL);
request.onsuccess = function (evt) {
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
}
request.onerror = function () {
ok(false, "checkP2PRegistration failed.");
toggleNFC(false).then(runNextTest);
}
nfc.notifyUserAcceptedP2P(MANIFEST_URL);
});
toggleNFC(true)
@ -197,6 +208,7 @@ let tests = [
testPeerReady,
testGetNFCPeer,
testCheckP2PRegFailure,
testPeerLostShouldBeCalled,
testPeerLostShouldNotBeCalled,
testPeerShouldThrow,
testPeerInvalidToken,

Просмотреть файл

@ -40,77 +40,33 @@ XPCOMUtils.defineLazyServiceGetter(this, "uuidgen",
"nsIUUIDGenerator");
let SettingsPermissions = {
_mmPermissions: {},
addManager: function(aMessage) {
if (DEBUG) debug("Adding message manager permissions");
let mm = aMessage.target;
// In order for mochitests to work, we have to update permissions on every
// lock creation or observer addition. This still means we can cache
// permissions.
if (this._mmPermissions[mm]) {
if (DEBUG) debug("Manager already added, updating permissions");
checkPermission: function(aPrincipal, aPerm) {
if (aPrincipal.origin == "[System Principal]" ||
Services.perms.testExactPermissionFromPrincipal(aPrincipal, aPerm) == Ci.nsIPermissionManager.ALLOW_ACTION) {
return true;
}
let perms = [];
let principal;
let isSystemPrincipal = false;
if (aMessage.principal.origin == "[System Principal]") {
isSystemPrincipal = true;
} else {
let uri = Services.io.newURI(aMessage.principal.origin, null, null);
principal = Services.scriptSecurityManager.getAppCodebasePrincipal(uri,
aMessage.principal.appId,
aMessage.principal.isInBrowserElement);
}
for (let i in AllPossiblePermissions) {
let permName = AllPossiblePermissions[i];
// We only care about permissions starting with the word "settings"
if (permName.indexOf("settings") != 0) {
continue;
}
if (isSystemPrincipal || Services.perms.testExactPermissionFromPrincipal(principal, permName) == Ci.nsIPermissionManager.ALLOW_ACTION) {
perms.push(permName);
}
}
this._mmPermissions[mm] = perms;
return false;
},
removeManager: function(aMsgMgr) {
if (DEBUG) debug("Removing message manager permissions for " + aMsgMgr);
if (!this._mmPermissions[aMsgMgr]) {
if (DEBUG) debug("Manager not added!");
return;
}
delete this._mmPermissions[aMsgMgr];
hasAllReadPermission: function(aPrincipal) {
return this.checkPermission(aPrincipal, kAllSettingsReadPermission);
},
checkPermission: function(aMsgMgr, aPerm) {
if (!this._mmPermissions[aMsgMgr]) {
if (DEBUG) debug("Manager not added!");
return false;
}
return (this._mmPermissions[aMsgMgr].indexOf(aPerm) != -1);
hasAllWritePermission: function(aPrincipal) {
return this.checkPermission(aPrincipal, kAllSettingsWritePermission);
},
hasAllReadPermission: function(aMsgMgr) {
return this.checkPermission(aMsgMgr, kAllSettingsReadPermission);
hasSomeReadPermission: function(aPrincipal) {
return this.checkPermission(aPrincipal, kSomeSettingsReadPermission);
},
hasAllWritePermission: function(aMsgMgr) {
return this.checkPermission(aMsgMgr, kAllSettingsWritePermission);
hasSomeWritePermission: function(aPrincipal) {
return this.checkPermission(aPrincipal, kSomeSettingsWritePermission);
},
hasSomeReadPermission: function(aMsgMgr) {
return this.checkPermission(aMsgMgr, kSomeSettingsReadPermission);
hasClearPermission: function(aPrincipal) {
return this.checkPermission(aPrincipal, kSettingsClearPermission);
},
hasSomeWritePermission: function(aMsgMgr) {
return this.checkPermission(aMsgMgr, kSomeSettingsWritePermission);
hasReadPermission: function(aPrincipal, aSettingsName) {
return this.hasAllReadPermission(aPrincipal) || this.checkPermission(aPrincipal, "settings:" + aSettingsName + kSettingsReadSuffix);
},
hasClearPermission: function(aMsgMgr) {
return this.checkPermission(aMsgMgr, kSettingsClearPermission);
},
assertSomeReadPermission: function(aMsgMgr) {
aMsgMgr.assertPermission(kSomeSettingsReadPermission);
},
hasReadPermission: function(aMsgMgr, aSettingsName) {
return this.hasAllReadPermission(aMsgMgr) || this.checkPermission(aMsgMgr, "settings:" + aSettingsName + kSettingsReadSuffix);
},
hasWritePermission: function(aMsgMgr, aSettingsName) {
return this.hasAllWritePermission(aMsgMgr) || this.checkPermission(aMsgMgr, "settings:" + aSettingsName + kSettingsWriteSuffix);
hasWritePermission: function(aPrincipal, aSettingsName) {
return this.hasAllWritePermission(aPrincipal) || this.checkPermission(aPrincipal, "settings:" + aSettingsName + kSettingsWriteSuffix);
}
};
@ -142,7 +98,7 @@ function SettingsLockInfo(aDB, aMsgMgr, aLockID, aIsServiceLock) {
canClear: true,
// Lets us know if this lock has been used to clear at any point.
hasCleared: false,
getObjectStore: function() {
getObjectStore: function(aPrincipal) {
if (DEBUG) debug("Getting transaction for " + this.lockID);
let store;
// Test for transaction validity via trying to get the
@ -163,9 +119,11 @@ function SettingsLockInfo(aDB, aMsgMgr, aLockID, aIsServiceLock) {
// slightly slower on apps with full settings permissions, but
// it means we don't have to do our own transaction order
// bookkeeping.
if (!SettingsPermissions.hasSomeWritePermission(this._mm)) {
if (!SettingsPermissions.hasSomeWritePermission(aPrincipal)) {
if (DEBUG) debug("Making READONLY transaction for " + this.lockID);
this._transaction = aDB._db.transaction(SETTINGSSTORE_NAME, "readonly");
} else {
if (DEBUG) debug("Making READWRITE transaction for " + this.lockID);
this._transaction = aDB._db.transaction(SETTINGSSTORE_NAME, "readwrite");
}
this._transaction.oncomplete = function() {
@ -186,9 +144,6 @@ function SettingsLockInfo(aDB, aMsgMgr, aLockID, aIsServiceLock) {
}
}
return store;
},
get objectStore() {
return this.getObjectStore();
}
};
}
@ -207,6 +162,7 @@ let SettingsRequestManager = {
// until they hit the front of the queue.
settingsLockQueue: [],
children: [],
mmPrincipals: {},
init: function() {
if (DEBUG) debug("init");
this.settingsDB.init();
@ -247,7 +203,7 @@ let SettingsRequestManager = {
});
},
queueTask: function(aOperation, aData) {
queueTask: function(aOperation, aData, aPrincipal) {
if (DEBUG) debug("Queueing task: " + aOperation);
let defer = {};
@ -262,11 +218,10 @@ let SettingsRequestManager = {
aData.settings = this._serializePreservingBinaries(aData.settings);
}
this.lockInfo[aData.lockID].tasks.push({
operation: aOperation,
data: aData,
principal: aPrincipal,
defer: defer
});
@ -289,7 +244,7 @@ let SettingsRequestManager = {
if (DEBUG) debug("Making task queuing transaction request.");
let data = aTask.data;
let lock = this.lockInfo[data.lockID];
let store = lock.objectStore;
let store = lock.getObjectStore(aTask.principal);
if (!store) {
if (DEBUG) debug("Rejecting task queue on lock " + aTask.data.lockID);
return Promise.reject({task: aTask, error: "Cannot get object store"});
@ -339,7 +294,7 @@ let SettingsRequestManager = {
lock.canClear = false;
if (!SettingsPermissions.hasReadPermission(lock._mm, data.name)) {
if (!SettingsPermissions.hasReadPermission(aTask.principal, data.name)) {
if (DEBUG) debug("get not allowed for " + data.name);
lock._failed = true;
return Promise.reject({task: aTask, error: "No permission to get " + data.name});
@ -355,7 +310,7 @@ let SettingsRequestManager = {
// Create/Get transaction and make request
if (DEBUG) debug("Making get transaction request for " + data.name);
let store = lock.objectStore;
let store = lock.getObjectStore(aTask.principal);
if (!store) {
if (DEBUG) debug("Rejecting Get task on lock " + aTask.data.lockID);
return Promise.reject({task: aTask, error: "Cannot get object store"});
@ -422,7 +377,7 @@ let SettingsRequestManager = {
}
for (let i = 0; i < keys.length; i++) {
if (!SettingsPermissions.hasWritePermission(lock._mm, keys[i])) {
if (!SettingsPermissions.hasWritePermission(aTask.principal, keys[i])) {
if (DEBUG) debug("set not allowed on " + keys[i]);
lock._failed = true;
return Promise.reject({task: aTask, error: "No permission to set " + keys[i]});
@ -471,7 +426,7 @@ let SettingsRequestManager = {
return Promise.resolve({task: aTask});
}
let store = lock.objectStore;
let store = lock.getObjectStore(aTask.principal);
if (!store) {
if (DEBUG) debug("Rejecting Set task on lock " + aTask.data.lockID);
return Promise.reject({task: aTask, error: "Cannot get object store"});
@ -566,7 +521,7 @@ let SettingsRequestManager = {
return Promise.reject({task: aTask, error: "Cannot call clear after queuing other tasks, all requests now failing."});
}
if (!SettingsPermissions.hasClearPermission(lock._mm)) {
if (!SettingsPermissions.hasClearPermission(aTask.principal)) {
if (DEBUG) debug("clear not allowed");
lock._failed = true;
return Promise.reject({task: aTask, error: "No permission to clear DB"});
@ -574,7 +529,7 @@ let SettingsRequestManager = {
lock.hasCleared = true;
let store = lock.objectStore;
let store = lock.getObjectStore(aTask.principal);
if (!store) {
if (DEBUG) debug("Rejecting Clear task on lock " + aTask.data.lockID);
return Promise.reject({task: aTask, error: "Cannot get object store"});
@ -718,17 +673,22 @@ let SettingsRequestManager = {
broadcastMessage: function broadcastMessage(aMsgName, aContent) {
if (DEBUG) debug("Broadcast");
this.children.forEach(function(msgMgr) {
if (SettingsPermissions.hasReadPermission(msgMgr, aContent.key)) {
let principal = this.mmPrincipals[msgMgr];
if (!principal) {
if (DEBUG) debug("Cannot find principal for message manager to check permissions");
}
else if (SettingsPermissions.hasReadPermission(principal, aContent.key)) {
msgMgr.sendAsyncMessage(aMsgName, aContent);
}
});
}.bind(this));
if (DEBUG) debug("Finished Broadcasting");
},
addObserver: function(aMsgMgr) {
addObserver: function(aMsgMgr, aPrincipal) {
if (DEBUG) debug("Add observer for" + aMsgMgr);
if (this.children.indexOf(aMsgMgr) == -1) {
this.children.push(aMsgMgr);
this.mmPrincipals[aMsgMgr] = aPrincipal;
}
},
@ -737,6 +697,7 @@ let SettingsRequestManager = {
let index = this.children.indexOf(aMsgMgr);
if (index != -1) {
this.children.splice(index, 1);
delete this.mmPrincipals[aMsgMgr];
}
},
@ -770,7 +731,6 @@ let SettingsRequestManager = {
removeMessageManager: function(aMsgMgr){
if (DEBUG) debug("Removing message manager " + aMsgMgr);
this.removeObserver(aMsgMgr);
SettingsPermissions.removeManager(aMsgMgr);
let closedLockIDs = [];
let lockIDs = Object.keys(this.lockInfo);
for (let i in lockIDs) {
@ -840,21 +800,19 @@ let SettingsRequestManager = {
this.removeMessageManager(mm);
break;
case "Settings:RegisterForMessages":
SettingsPermissions.addManager(aMessage);
if (!SettingsPermissions.hasSomeReadPermission(mm)) {
if (!SettingsPermissions.hasSomeReadPermission(aMessage.principal)) {
Cu.reportError("Settings message " + aMessage.name +
" from a content process with no 'settings-api-read' privileges.");
// Kill app after reporting error
SettingsPermissions.assertSomeReadPermission(mm);
aMessage.target.assertPermission("message-manager-no-read-kill");
return;
}
this.addObserver(mm);
this.addObserver(mm, aMessage.principal);
break;
case "Settings:UnregisterForMessages":
this.removeObserver(mm);
break;
case "Settings:CreateLock":
if (DEBUG) debug("Received CreateLock for " + msg.lockID);
if (DEBUG) debug("Received CreateLock for " + msg.lockID + " from " + aMessage.principal.origin);
// If we try to create a lock ID that collides with one
// already in the system, consider it a security violation and
// kill.
@ -864,12 +822,11 @@ let SettingsRequestManager = {
return;
}
this.settingsLockQueue.push(msg.lockID);
SettingsPermissions.addManager(aMessage);
this.lockInfo[msg.lockID] = SettingsLockInfo(this.settingsDB, mm, msg.lockID, msg.isServiceLock);
break;
case "Settings:Get":
if (DEBUG) debug("Received getRequest from " + msg.lockID);
this.queueTask("get", msg).then(function(settings) {
this.queueTask("get", msg, aMessage.principal).then(function(settings) {
returnMessage("Settings:Get:OK", {
lockID: msg.lockID,
requestID: msg.requestID,
@ -886,7 +843,7 @@ let SettingsRequestManager = {
break;
case "Settings:Set":
if (DEBUG) debug("Received Set Request from " + msg.lockID);
this.queueTask("set", msg).then(function(settings) {
this.queueTask("set", msg, aMessage.principal).then(function(settings) {
returnMessage("Settings:Set:OK", {
lockID: msg.lockID,
requestID: msg.requestID
@ -901,7 +858,7 @@ let SettingsRequestManager = {
break;
case "Settings:Clear":
if (DEBUG) debug("Received Clear Request from " + msg.lockID);
this.queueTask("clear", msg).then(function() {
this.queueTask("clear", msg, aMessage.principal).then(function() {
returnMessage("Settings:Clear:OK", {
lockID: msg.lockID,
requestID: msg.requestID
@ -916,7 +873,7 @@ let SettingsRequestManager = {
break;
case "Settings:Finalize":
if (DEBUG) debug("Received Finalize");
this.queueTask("finalize", msg).then(function() {
this.queueTask("finalize", msg, aMessage.principal).then(function() {
returnMessage("Settings:Finalize:OK", {
lockID: msg.lockID
});

Просмотреть файл

@ -575,6 +575,21 @@ Telephony::EnumerateCallStateComplete()
{
MOZ_ASSERT(!mEnumerated);
// Set conference state.
if (mGroup->CallsArray().Length() >= 2) {
const nsTArray<nsRefPtr<TelephonyCall> > &calls = mGroup->CallsArray();
uint16_t callState = calls[0]->CallState();
for (uint32_t i = 1; i < calls.Length(); i++) {
if (calls[i]->CallState() != callState) {
callState = nsITelephonyService::CALL_STATE_UNKNOWN;
break;
}
}
mGroup->ChangeState(callState);
}
mEnumerated = true;
if (NS_FAILED(NotifyEvent(NS_LITERAL_STRING("ready")))) {

Просмотреть файл

@ -9,18 +9,18 @@
*/
enum NFCTechType {
"NDEF",
"NDEF_WRITABLE",
"NDEF_FORMATABLE",
"P2P",
"NFC_A",
"NFC_B",
"NFC_ISO_DEP",
"NFC_F",
"NFC_V",
"NDEF",
"NDEF_FORMATABLE",
"NFC_ISO_DEP",
"MIFARE_CLASSIC",
"MIFARE_ULTRALIGHT",
"NFC_BARCODE",
"P2P",
"UNKNOWN_TECH"
"NFC_BARCODE"
};
[JSImplementation="@mozilla.org/nfc/NFCTag;1", AvailableIn="CertifiedApps"]

Просмотреть файл

@ -35,7 +35,7 @@ dictionary NfcEventOptions
long majorVersion;
long minorVersion;
sequence<DOMString> techList;
sequence<NFCTechType> techList;
sequence<NDEFRecord> records;
boolean isReadOnly;
@ -46,8 +46,6 @@ dictionary NfcEventOptions
// HCI Event Transaction fields
DOMString origin;
long originType;
long originIndex;
Uint8Array aid;
Uint8Array payload;
};