Merge b2ginbound to central, a=merge

This commit is contained in:
Wes Kocher 2015-05-20 18:25:05 -07:00
commit 0f5ec5b723
49 changed files with 432 additions and 305 deletions

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73"> <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<!-- Stock Android things --> <!-- 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/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"/> <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"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73"> <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<!-- Stock Android things --> <!-- 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/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"/> <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"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/> <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/>

View File

@ -17,10 +17,10 @@
</project> </project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/> <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things --> <!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73"> <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<!-- Stock Android things --> <!-- 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/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"/> <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

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33"> <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<!-- Stock Android things --> <!-- Stock Android things -->
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/> <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/> <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/> <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73"> <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<!-- Stock Android things --> <!-- 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/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"/> <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"/>

View File

@ -1,9 +1,9 @@
{ {
"git": { "git": {
"git_revision": "b290c77ccb7ab0af599b3d8287b71b9970d8dcb0", "git_revision": "5a7f87b1505ba89b586372cbbbe9507d1016c40c",
"remote": "https://git.mozilla.org/releases/gaia.git", "remote": "https://git.mozilla.org/releases/gaia.git",
"branch": "" "branch": ""
}, },
"revision": "87d96f3c66f704247d1996570748de07ca1aff07", "revision": "85b4fb5a2fd0040b3726a4f1e4218f2dbfd4edce",
"repo_path": "integration/gaia-central" "repo_path": "integration/gaia-central"
} }

View File

@ -17,10 +17,10 @@
</project> </project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/> <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things --> <!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33"> <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/> <copyfile dest="Makefile" src="core/root.mk"/>
</project> </project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/> <project name="gaia" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/> <project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/> <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/> <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/> <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/> <project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/> <project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/> <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
<!-- Stock Android things --> <!-- Stock Android things -->
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/> <project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="ffc05a232799fe8fcb3e47b7440b52b1fb4244c0"/>
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/> <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="337e0ef5e40f02a1ae59b90db0548976c70a7226"/>

View File

@ -68,10 +68,18 @@ Activity::Initialize(nsPIDOMWindow* aWindow,
mProxy = do_CreateInstance("@mozilla.org/dom/activities/proxy;1", &rv); mProxy = do_CreateInstance("@mozilla.org/dom/activities/proxy;1", &rv);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
// We're about the pass the dictionary to a JS-implemented component, so
// rehydrate it in a system scode so that security wrappers don't get in the
// way. See bug 1161748 comment 16.
bool ok;
JS::Rooted<JS::Value> optionsValue(aCx); JS::Rooted<JS::Value> optionsValue(aCx);
if (!ToJSValue(aCx, aOptions, &optionsValue)) { {
return NS_ERROR_FAILURE; JSAutoCompartment ac(aCx, xpc::PrivilegedJunkScope());
ok = ToJSValue(aCx, aOptions, &optionsValue);
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
} }
ok = JS_WrapValue(aCx, &optionsValue);
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
mProxy->StartActivity(static_cast<nsIDOMDOMRequest*>(this), optionsValue, aWindow); mProxy->StartActivity(static_cast<nsIDOMDOMRequest*>(this), optionsValue, aWindow);
return NS_OK; return NS_OK;

View File

@ -203,16 +203,23 @@ TelephonyListener::HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend)
uint32_t callIndex; uint32_t callIndex;
uint16_t callState; uint16_t callState;
nsAutoString number; nsAutoString number;
nsAutoString disconnectedReason;
bool isOutgoing; bool isOutgoing;
bool isConference; bool isConference;
aInfo->GetCallIndex(&callIndex); aInfo->GetCallIndex(&callIndex);
aInfo->GetCallState(&callState); aInfo->GetCallState(&callState);
aInfo->GetNumber(number); aInfo->GetNumber(number);
aInfo->GetDisconnectedReason(disconnectedReason);
aInfo->GetIsOutgoing(&isOutgoing); aInfo->GetIsOutgoing(&isOutgoing);
aInfo->GetIsConference(&isConference); aInfo->GetIsConference(&isConference);
hfp->HandleCallStateChanged(callIndex, callState, EmptyString(), number, // The disconnectedReason of a disconnected call must be nonempty no matter
// the call is disconnected for a normal reason or an error.
MOZ_ASSERT((callState != nsITelephonyService::CALL_STATE_DISCONNECTED ||
!disconnectedReason.IsEmpty()),
"disconnectedReason of an disconnected call must be nonempty.");
hfp->HandleCallStateChanged(callIndex, callState, disconnectedReason, number,
isOutgoing, isConference, aSend); isOutgoing, isConference, aSend);
return NS_OK; return NS_OK;
} }
@ -233,30 +240,6 @@ TelephonyListener::EnumerateCallState(nsITelephonyCallInfo* aInfo)
return HandleCallInfo(aInfo, false); return HandleCallInfo(aInfo, false);
} }
NS_IMETHODIMP
TelephonyListener::NotifyError(uint32_t aServiceId,
int32_t aCallIndex,
const nsAString& aError)
{
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
if (aCallIndex > 0) {
// In order to not miss any related call state transition.
// It's possible that 3G network signal lost for unknown reason.
// If a call is released abnormally, NotifyError() will be called,
// instead of CallStateChanged(). We need to reset the call array state
// via setting CALL_STATE_DISCONNECTED
hfp->HandleCallStateChanged(aCallIndex,
nsITelephonyService::CALL_STATE_DISCONNECTED,
aError, EmptyString(), false, false, true);
BT_WARNING("Reset the call state due to call transition ends abnormally");
}
BT_WARNING(NS_ConvertUTF16toUTF8(aError).get());
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
TelephonyListener::ConferenceCallStateChanged(uint16_t aCallState) TelephonyListener::ConferenceCallStateChanged(uint16_t aCallState)
{ {

View File

@ -194,21 +194,64 @@ let SNEP = (function() {
function toggleNFC(enabled) { function toggleNFC(enabled) {
let deferred = Promise.defer(); let deferred = Promise.defer();
let promise; // In bug 1109592, nfcd will only run when nfc is enabled.
if (enabled) { // The way we activate/deactivate nfcd is by using set property "ctl.start" & "ctl.stop".
promise = nfc.startPoll(); // In emulator it seems sometimes enable/disable NFC too quick will cause nfcd won't starat,
} else { // So here we use a simple workaround to delay enable or disable for 100ms, bug 1164786 is
promise = nfc.powerOff(); // created to track this issue.
} setTimeout(function() {
let promise;
if (enabled) {
promise = nfc.startPoll();
} else {
promise = nfc.powerOff();
}
promise.then(() => { promise.then(() => {
deferred.resolve();
}).catch(() => {
ok(false, 'operation failed, error ' + req.error.name);
deferred.reject();
finish();
});
}, 100);
return deferred.promise;
}
function activateAndwaitForTechDiscovered(re) {
let deferred = Promise.defer();
sysMsgHelper.waitForTechDiscovered(function() {
deferred.resolve(); deferred.resolve();
}).catch(() => {
ok(false, 'operation failed, error ' + req.error.name);
deferred.reject();
finish();
}); });
NCI.activateRE(re);
return deferred.promise;
}
function deactivateAndWaitForTechLost() {
let deferred = Promise.defer();
sysMsgHelper.waitForTechLost(function() {
deferred.resolve();
});
NCI.deactivate();
return deferred.promise;
}
function deactivateAndWaitForPeerLost() {
let deferred = Promise.defer();
nfc.onpeerlost = function() {
deferred.resolve();
};
NCI.deactivate();
return deferred.promise; return deferred.promise;
} }

View File

@ -6,7 +6,7 @@
/* globals log, is, ok, runTests, toggleNFC, runNextTest, /* globals log, is, ok, runTests, toggleNFC, runNextTest,
SpecialPowers, nfc */ SpecialPowers, nfc */
const MARIONETTE_TIMEOUT = 30000; const MARIONETTE_TIMEOUT = 60000;
const MARIONETTE_HEAD_JS = 'head.js'; const MARIONETTE_HEAD_JS = 'head.js';
const MANIFEST_URL = 'app://system.gaiamobile.org/manifest.webapp'; const MANIFEST_URL = 'app://system.gaiamobile.org/manifest.webapp';
@ -18,7 +18,7 @@ const FAKE_MANIFEST_URL = 'app://fake.gaiamobile.org/manifest.webapp';
*/ */
function testNoTargetNoSessionToken() { function testNoTargetNoSessionToken() {
log('testNoTargetNoSessionToken'); log('testNoTargetNoSessionToken');
fireCheckP2PReg(MANIFEST_URL) nfc.checkP2PRegistration(MANIFEST_URL)
.then((result) => { .then((result) => {
is(result, false, 'No target, no sesionToken, result should be false'); is(result, false, 'No target, no sesionToken, result should be false');
runNextTest(); runNextTest();
@ -33,7 +33,7 @@ function testNoTargetNoSessionToken() {
function testWithTargetNoSessionToken() { function testWithTargetNoSessionToken() {
log('testWithTargetNoSessionToken'); log('testWithTargetNoSessionToken');
registerOnpeerready() registerOnpeerready()
.then(() => fireCheckP2PReg(MANIFEST_URL)) .then(() => nfc.checkP2PRegistration(MANIFEST_URL))
.then((result) => { .then((result) => {
is(result, false, is(result, false,
'session token is available and it shouldnt be'); 'session token is available and it shouldnt be');
@ -50,13 +50,13 @@ function testWithTargetNoSessionToken() {
function testWithSessionTokenWithTarget() { function testWithSessionTokenWithTarget() {
log('testWithSessionTokenWithTarget'); log('testWithSessionTokenWithTarget');
toggleNFC(true) toggleNFC(true)
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
.then(registerOnpeerready) .then(registerOnpeerready)
.then(() => fireCheckP2PReg(MANIFEST_URL)) .then(() => nfc.checkP2PRegistration(MANIFEST_URL))
.then((result) => { .then((result) => {
is(result, true, 'should be true, onpeerready reg, sessionToken set'); is(result, true, 'should be true, onpeerready reg, sessionToken set');
nfc.onpeerready = null; nfc.onpeerready = null;
return toggleNFC(false); return deactivateAndWaitForTechLost().then(() => toggleNFC(false));
}) })
.then(runNextTest) .then(runNextTest)
.catch(handleRejectedPromiseWithNfcOn); .catch(handleRejectedPromiseWithNfcOn);
@ -69,12 +69,12 @@ function testWithSessionTokenWithTarget() {
function testWithSessionTokenNoTarget() { function testWithSessionTokenNoTarget() {
log('testWithSessionTokenNoTarget'); log('testWithSessionTokenNoTarget');
toggleNFC(true) toggleNFC(true)
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
.then(() => fireCheckP2PReg(MANIFEST_URL)) .then(() => nfc.checkP2PRegistration(MANIFEST_URL))
.then((result) => { .then((result) => {
is(result, false, is(result, false,
'session token avilable but onpeerready not registered'); 'session token avilable but onpeerready not registered');
return toggleNFC(false); return deactivateAndWaitForTechLost().then(() => toggleNFC(false));
}) })
.then(runNextTest) .then(runNextTest)
.catch(handleRejectedPromiseWithNfcOn); .catch(handleRejectedPromiseWithNfcOn);
@ -87,13 +87,13 @@ function testWithSessionTokenNoTarget() {
function testWithSessionTokenWrongTarget() { function testWithSessionTokenWrongTarget() {
log('testWithSessionTokenWrongTarget'); log('testWithSessionTokenWrongTarget');
toggleNFC(true) toggleNFC(true)
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
.then(registerOnpeerready) .then(registerOnpeerready)
.then(() => fireCheckP2PReg(FAKE_MANIFEST_URL)) .then(() => nfc.checkP2PRegistration(FAKE_MANIFEST_URL))
.then((result) => { .then((result) => {
is(result, false, 'should be false, fake manifest, sessionToken set'); is(result, false, 'should be false, fake manifest, sessionToken set');
nfc.onpeerready = null; nfc.onpeerready = null;
return toggleNFC(false); return deactivateAndWaitForTechLost().then(() => toggleNFC(false));
}) })
.then(runNextTest) .then(runNextTest)
.catch(handleRejectedPromiseWithNfcOn); .catch(handleRejectedPromiseWithNfcOn);
@ -108,21 +108,6 @@ function registerOnpeerready() {
return d.promise; return d.promise;
} }
function fireCheckP2PReg(manifestUrl) {
let deferred = Promise.defer();
let promise = nfc.checkP2PRegistration(manifestUrl);
promise.then(() => {
ok(true, 'checkP2PRegistration allways results in success');
deferred.resolve(request.result);
}).catch(() => {
ok(false, 'see NfcContentHelper.handleCheckP2PRegistrationResponse');
deferred.reject();
});
return deferred.promise;
}
function handleRejectedPromise() { function handleRejectedPromise() {
ok(false, 'Promise rejected. This should not happen'); ok(false, 'Promise rejected. This should not happen');
nfc.onpeerready = null; nfc.onpeerready = null;

View File

@ -25,8 +25,9 @@ let nfcPeers = [];
function testNfcNotEnabledError() { function testNfcNotEnabledError() {
log('testNfcNotEnabledError'); log('testNfcNotEnabledError');
toggleNFC(true) toggleNFC(true)
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
.then(registerAndFireOnpeerready) .then(registerAndFireOnpeerready)
.then(() => deactivateAndWaitForPeerLost())
.then(() => toggleNFC(false)) .then(() => toggleNFC(false))
.then(() => sendNDEFExpectError(nfcPeers[0])) .then(() => sendNDEFExpectError(nfcPeers[0]))
.then(endTest) .then(endTest)
@ -43,13 +44,14 @@ function testNfcNotEnabledError() {
function testNfcBadSessionIdError() { function testNfcBadSessionIdError() {
log('testNfcBadSessionIdError'); log('testNfcBadSessionIdError');
toggleNFC(true) toggleNFC(true)
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
.then(registerAndFireOnpeerready) .then(registerAndFireOnpeerready)
.then(() => NCI.deactivate()) .then(() => NCI.deactivate())
.then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)) .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
.then(registerAndFireOnpeerready) .then(registerAndFireOnpeerready)
// we have 2 peers in nfcPeers array, peer0 has old/invalid session token // we have 2 peers in nfcPeers array, peer0 has old/invalid session token
.then(() => sendNDEFExpectError(nfcPeers[0])) .then(() => sendNDEFExpectError(nfcPeers[0]))
.then(() => deactivateAndWaitForPeerLost())
.then(() => toggleNFC(false)) .then(() => toggleNFC(false))
.then(endTest) .then(endTest)
.catch(handleRejectedPromise); .catch(handleRejectedPromise);
@ -65,7 +67,7 @@ function testNoErrorInTechMsg() {
let techDiscoveredHandler = function(msg) { let techDiscoveredHandler = function(msg) {
ok('Message handler for nfc-manager-tech-discovered'); ok('Message handler for nfc-manager-tech-discovered');
is(msg.type, 'techDiscovered'); ok(msg.peer, 'check for correct tech type');
is(msg.errorMsg, undefined, 'Should not get error msg in tech discovered'); is(msg.errorMsg, undefined, 'Should not get error msg in tech discovered');
setAndFireTechLostHandler() setAndFireTechLostHandler()
@ -108,13 +110,13 @@ function registerAndFireOnpeerready() {
function sendNDEFExpectError(peer) { function sendNDEFExpectError(peer) {
let deferred = Promise.defer(); let deferred = Promise.defer();
try { peer.sendNDEF(NDEF_MESSAGE)
peer.sendNDEF(NDEF_MESSAGE); .then(() => {
deferred.reject(); deferred.reject();
} catch (e) { }).catch((e) => {
ok(true, 'this should happen ' + e); ok(true, 'this should happen ' + e);
deferred.resolve(); deferred.resolve();
} });
return deferred.promise; return deferred.promise;
} }
@ -124,7 +126,6 @@ function setAndFireTechLostHandler() {
let techLostHandler = function(msg) { let techLostHandler = function(msg) {
ok('Message handler for nfc-manager-tech-lost'); ok('Message handler for nfc-manager-tech-lost');
is(msg.type, 'techLost');
is(msg.errorMsg, undefined, 'Should not get error msg in tech lost'); is(msg.errorMsg, undefined, 'Should not get error msg in tech lost');
deferred.resolve(); deferred.resolve();
@ -139,7 +140,8 @@ function setAndFireTechLostHandler() {
let tests = [ let tests = [
testNfcNotEnabledError, testNfcNotEnabledError,
testNfcBadSessionIdError, // This testcase is temporarily removed due to Bug 1055959, will reopen when it is fixed
// testNfcBadSessionIdError
testNoErrorInTechMsg testNoErrorInTechMsg
]; ];

View File

@ -1,14 +1,13 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000; MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = 'head.js'; MARIONETTE_HEAD_JS = 'head.js';
function handleTechnologyDiscoveredRE0(msg) { function handleTechnologyDiscoveredRE0(msg) {
log('Received \'nfc-manager-tech-discovered\''); log('Received \'nfc-manager-tech-discovered\'');
is(msg.type, 'techDiscovered', 'check for correct message type'); ok(msg.peer, 'check for correct tech type');
is(msg.isP2P, 'P2P', 'check for correct tech type'); deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
toggleNFC(false).then(runNextTest);
} }
function testActivateRE0() { function testActivateRE0() {

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000; MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = 'head.js'; MARIONETTE_HEAD_JS = 'head.js';
let tnf = NDEF.TNF_WELL_KNOWN; let tnf = NDEF.TNF_WELL_KNOWN;
@ -18,13 +18,12 @@ function handleSnep(msg) {
type: NfcUtils.fromUTF8(type), type: NfcUtils.fromUTF8(type),
payload: NfcUtils.fromUTF8(payload)})]; payload: NfcUtils.fromUTF8(payload)})];
NDEF.compare(ndef, msg.records); NDEF.compare(ndef, msg.records);
toggleNFC(false).then(runNextTest); deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
} }
function handleTechnologyDiscoveredRE0(msg) { function handleTechnologyDiscoveredRE0(msg) {
log("Received 'nfc-manager-tech-discovered'"); log("Received 'nfc-manager-tech-discovered'");
is(msg.type, "techDiscovered", "check for correct message type"); ok(msg.peer, "check for correct tech type");
is(msg.isP2P, "P2P", "check for correct tech type");
sysMsgHelper.waitForTechDiscovered(handleSnep); sysMsgHelper.waitForTechDiscovered(handleSnep);
SNEP.put(SNEP.SAP_NDEF, SNEP.SAP_NDEF, 0, tnf, btoa(type), btoa(id), btoa(payload)); SNEP.put(SNEP.SAP_NDEF, SNEP.SAP_NDEF, 0, tnf, btoa(type), btoa(id), btoa(payload));

View File

@ -6,15 +6,14 @@ MARIONETTE_HEAD_JS = 'head.js';
function handleTechnologyLost(msg) { function handleTechnologyLost(msg) {
log('Received \'nfc-manager-tech-lost\''); log('Received \'nfc-manager-tech-lost\'');
is(msg.type, 'techLost', 'check for correct message type'); ok(true);
toggleNFC(false).then(runNextTest) toggleNFC(false).then(runNextTest)
} }
function handleTechnologyDiscoveredRE0(msg) { function handleTechnologyDiscoveredRE0(msg) {
log('Received \'nfc-manager-tech-discovered\''); log('Received \'nfc-manager-tech-discovered\'');
is(msg.type, 'techDiscovered', 'check for correct message type'); ok(msg.peer, 'check for correct tech type');
is(msg.isP2P, 'P2P', 'check for correct tech type');
NCI.deactivate(); NCI.deactivate();
} }

View File

@ -28,8 +28,7 @@ function peerLostCb(evt) {
function handleTechnologyDiscoveredRE0(msg) { function handleTechnologyDiscoveredRE0(msg) {
log("Received \'nfc-manager-tech-discovered\'"); log("Received \'nfc-manager-tech-discovered\'");
is(msg.type, "techDiscovered", "check for correct message type"); ok(msg.peer, "check for correct tech type");
is(msg.isP2P, "P2P", "check for correct tech type");
nfc.onpeerready = peerReadyCb; nfc.onpeerready = peerReadyCb;
nfc.onpeerlost = peerLostCb; nfc.onpeerlost = peerLostCb;
@ -39,19 +38,13 @@ function handleTechnologyDiscoveredRE0(msg) {
function handleTechnologyDiscoveredRE0ForP2PRegFailure(msg) { function handleTechnologyDiscoveredRE0ForP2PRegFailure(msg) {
log("Received \'nfc-manager-tech-discovered\'"); log("Received \'nfc-manager-tech-discovered\'");
is(msg.type, "techDiscovered", "check for correct message type"); ok(msg.peer, "check for correct tech type");
is(msg.isP2P, "P2P", "check for correct tech type");
nfc.onpeerready = peerReadyCb; nfc.onpeerready = peerReadyCb;
let promise = nfc.checkP2PRegistration(INCORRECT_MANIFEST_URL); nfc.checkP2PRegistration(INCORRECT_MANIFEST_URL)
promise.then(evt => { .then((result) => {
is(request.result, false, "check for P2P registration result"); is(result, false, "check for P2P registration result");
nfc.onpeerready = null;
NCI.deactivate().then(() => toggleNFC(false)).then(runNextTest);
}).catch(() => {
ok(false, "checkP2PRegistration failed.");
nfc.onpeerready = null; nfc.onpeerready = null;
NCI.deactivate().then(() => toggleNFC(false)).then(runNextTest); NCI.deactivate().then(() => toggleNFC(false)).then(runNextTest);
@ -150,19 +143,19 @@ function testPeerShouldThrow() {
nfc.onpeerlost = function () { nfc.onpeerlost = function () {
log("testPeerShouldThrow peerlost"); log("testPeerShouldThrow peerlost");
try { peer.sendNDEF(ndef)
peer.sendNDEF(ndef); .then(() => {
ok(false, "sendNDEF should throw error"); ok(false, "sendNDEF should throw error");
} catch (e) { }).catch((e) => {
ok(true, "Exception expected " + e); ok(true, "Exception expected " + e);
} });
try { peer.sendFile(new Blob())
peer.sendFile(new Blob()); .then(() => {
ok(false, "sendfile should throw error"); ok(false, "sendfile should throw error");
} catch (e) { }).catch((e) => {
ok(true, "Exception expected" + e); ok(true, "Exception expected" + e);
} });
nfc.onpeerready = null; nfc.onpeerready = null;
nfc.onpeerlost = null; nfc.onpeerlost = null;

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000; MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = "head.js"; MARIONETTE_HEAD_JS = "head.js";
let MANIFEST_URL = "app://system.gaiamobile.org/manifest.webapp"; let MANIFEST_URL = "app://system.gaiamobile.org/manifest.webapp";
@ -23,16 +23,14 @@ function testSendFile() {
}; };
sysMsgHelper.waitForTechDiscovered(function(msg) { sysMsgHelper.waitForTechDiscovered(function(msg) {
let request = nfc.checkP2PRegistration(MANIFEST_URL); nfc.checkP2PRegistration(MANIFEST_URL).then(result => {
request.onsuccess = function(evt) { if (result) {
is(request.result, true, "check for P2P registration result"); nfc.notifyUserAcceptedP2P(MANIFEST_URL);
nfc.notifyUserAcceptedP2P(MANIFEST_URL); } else {
} ok(false, "checkP2PRegistration failed.");
deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
request.onerror = function() { }
ok(false, "checkP2PRegistration failed."); });
toggleNFC(false).then(runNextTest);
}
}); });
toggleNFC(true).then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0)); toggleNFC(true).then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0));
@ -43,6 +41,5 @@ let tests = [
]; ];
SpecialPowers.pushPermissions( SpecialPowers.pushPermissions(
[{"type": "nfc", "allow": true, [{"type": "nfc-share", "allow": true, context: document},
"read": true, 'write': true, context: document},
{"type": "nfc-manager", 'allow': true, context: document}], runTests); {"type": "nfc-manager", 'allow': true, context: document}], runTests);

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000; MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = "head.js"; MARIONETTE_HEAD_JS = "head.js";
let url = "https://www.example.com"; let url = "https://www.example.com";
@ -21,18 +21,17 @@ function sendNDEF(peer) {
emulator.run(cmd, function(result) { emulator.run(cmd, function(result) {
is(result.pop(), "OK", "check SNEP PUT result"); is(result.pop(), "OK", "check SNEP PUT result");
NDEF.compare(ndef, NDEF.parseString(result.pop())); NDEF.compare(ndef, NDEF.parseString(result.pop()));
toggleNFC(false).then(runNextTest); deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
}); });
}).catch(() => { }).catch(() => {
ok(false, "Failed to send NDEF message, error \'" + this.error + "\'"); ok(false, "Failed to send NDEF message, error \'" + this.error + "\'");
toggleNFC(false).then(runNextTest); deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
}); });
} }
function handleTechnologyDiscoveredRE0(msg) { function handleTechnologyDiscoveredRE0(msg) {
log("Received \'nfc-manager-tech-discovered\' " + JSON.stringify(msg)); log("Received \'nfc-manager-tech-discovered\' " + JSON.stringify(msg));
is(msg.type, "techDiscovered", "check for correct message type"); ok(msg.peer, "techDiscovered", "check for correct message type");
is(msg.isP2P, "check for \'P2P\' in tech list");
sendNDEF(msg.peer); sendNDEF(msg.peer);
} }

View File

@ -1,7 +1,7 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000; MARIONETTE_TIMEOUT = 60000;
MARIONETTE_HEAD_JS = "head.js"; MARIONETTE_HEAD_JS = "head.js";
let url = "http://www.mozilla.org"; let url = "http://www.mozilla.org";
@ -16,16 +16,16 @@ function testUrlTagDiscover(re) {
sysMsgHelper.waitForTechDiscovered(function(msg) { sysMsgHelper.waitForTechDiscovered(function(msg) {
log("Received \'nfc-manager-tech-ndiscovered\'"); log("Received \'nfc-manager-tech-ndiscovered\'");
is(msg.type, "techDiscovered", "check for correct message type"); ok(msg.peer === undefined, "peer object should be undefined");
let records = Cu.waiveXrays(msg.records); let records = msg.records;
ok(records.length > 0); ok(records.length > 0);
is(tnf, records[0].tnf, "check for TNF field in NDEF"); 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(type, NfcUtils.toUTF8(Cu.waiveXrays(records[0].type)), "check for type field in NDEF");
is(payload, NfcUtils.toUTF8(records[0].payload), "check for payload field in NDEF"); is(payload, NfcUtils.toUTF8(Cu.waiveXrays(records[0].payload)), "check for payload field in NDEF");
toggleNFC(false).then(runNextTest); deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
}); });
toggleNFC(true) toggleNFC(true)
@ -38,12 +38,12 @@ function testEmptyTagDiscover(re) {
sysMsgHelper.waitForTechDiscovered(function(msg) { sysMsgHelper.waitForTechDiscovered(function(msg) {
log("Received \'nfc-manager-tech-ndiscovered\'"); log("Received \'nfc-manager-tech-ndiscovered\'");
is(msg.type, "techDiscovered", "check for correct message type"); ok(msg.peer === undefined, "peer object should be undefined");
let records = msg.records; let records = msg.records;
ok(records == null); ok(records == null);
toggleNFC(false).then(runNextTest); deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
}); });
toggleNFC(true) toggleNFC(true)

View File

@ -16,6 +16,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=678695
</div> </div>
<pre id="test"> <pre id="test">
<script type="application/javascript"> <script type="application/javascript">
SpecialPowers.addPermission("settings-api-read", true, document);
SpecialPowers.addPermission("settings-api-write", true, document);
SpecialPowers.addPermission("settings-read", true, document);
SpecialPowers.addPermission("settings-write", true, document);
/** Test for Bug 678695 **/ /** Test for Bug 678695 **/

View File

@ -649,6 +649,17 @@ NetworkService.prototype = {
}); });
}, },
stopDhcp: function(interfaceName, callback) {
let params = {
cmd: "stopDhcp",
ifname: interfaceName
};
this.controlMessage(params, function(result) {
callback.nativeCommandResult(!result.error);
});
},
enableInterface: function(interfaceName, callback) { enableInterface: function(interfaceName, callback) {
let params = { let params = {
cmd: "enableInterface", cmd: "enableInterface",

View File

@ -1615,6 +1615,7 @@ void NetworkUtils::ExecuteCommand(NetworkParams aOptions)
BUILD_ENTRY(updateUpStream), BUILD_ENTRY(updateUpStream),
BUILD_ENTRY(configureInterface), BUILD_ENTRY(configureInterface),
BUILD_ENTRY(dhcpRequest), BUILD_ENTRY(dhcpRequest),
BUILD_ENTRY(stopDhcp),
BUILD_ENTRY(enableInterface), BUILD_ENTRY(enableInterface),
BUILD_ENTRY(disableInterface), BUILD_ENTRY(disableInterface),
BUILD_ENTRY(resetConnections), BUILD_ENTRY(resetConnections),
@ -1833,6 +1834,11 @@ CommandResult NetworkUtils::configureInterface(NetworkParams& aOptions)
); );
} }
CommandResult NetworkUtils::stopDhcp(NetworkParams& aOptions)
{
return mNetUtils->do_dhcp_stop(GET_CHAR(mIfname));
}
CommandResult NetworkUtils::dhcpRequest(NetworkParams& aOptions) { CommandResult NetworkUtils::dhcpRequest(NetworkParams& aOptions) {
mozilla::dom::NetworkResultOptions result; mozilla::dom::NetworkResultOptions result;

View File

@ -287,6 +287,7 @@ private:
*/ */
CommandResult configureInterface(NetworkParams& aOptions); CommandResult configureInterface(NetworkParams& aOptions);
CommandResult dhcpRequest(NetworkParams& aOptions); CommandResult dhcpRequest(NetworkParams& aOptions);
CommandResult stopDhcp(NetworkParams& aOptions);
CommandResult enableInterface(NetworkParams& aOptions); CommandResult enableInterface(NetworkParams& aOptions);
CommandResult disableInterface(NetworkParams& aOptions); CommandResult disableInterface(NetworkParams& aOptions);
CommandResult resetConnections(NetworkParams& aOptions); CommandResult resetConnections(NetworkParams& aOptions);

View File

@ -159,7 +159,7 @@ interface nsIDhcpRequestCallback : nsISupports
/** /**
* Provide network services. * Provide network services.
*/ */
[scriptable, uuid(8216224c-a4e0-43fa-9662-3f2446b500c6)] [scriptable, uuid(214c0810-fd41-11e4-b939-0800200c9a66)]
interface nsINetworkService : nsISupports interface nsINetworkService : nsISupports
{ {
const long MODIFY_ROUTE_ADD = 0; const long MODIFY_ROUTE_ADD = 0;
@ -417,6 +417,18 @@ interface nsINetworkService : nsISupports
void dhcpRequest(in DOMString interfaceName, void dhcpRequest(in DOMString interfaceName,
in nsIDhcpRequestCallback callback); in nsIDhcpRequestCallback callback);
/**
* Stop Dhcp daemon.
*
* @param ifname
* Target interface.
*
* @param callback
* Callback to notify the result of stopping dhcp request.
*/
void stopDhcp(in DOMString ifname,
in nsINativeCommandCallback callback);
/** /**
* Enable a network interface. * Enable a network interface.
* *

View File

@ -375,10 +375,14 @@ Telephony::HandleCallInfo(nsITelephonyCallInfo* aInfo)
nsRefPtr<TelephonyCallId> id = call->Id(); nsRefPtr<TelephonyCallId> id = call->Id();
id->UpdateNumber(number); id->UpdateNumber(number);
nsAutoString disconnectedReason;
aInfo->GetDisconnectedReason(disconnectedReason);
// State changed. // State changed.
if (call->CallState() != callState) { if (call->CallState() != callState) {
if (callState == nsITelephonyService::CALL_STATE_DISCONNECTED) { if (callState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
call->ChangeStateInternal(callState, true); call->UpdateDisconnectedReason(disconnectedReason);
call->ChangeState(nsITelephonyService::CALL_STATE_DISCONNECTED);
return NS_OK; return NS_OK;
} }
@ -687,26 +691,6 @@ Telephony::SupplementaryServiceNotification(uint32_t aServiceId,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
Telephony::NotifyError(uint32_t aServiceId,
int32_t aCallIndex,
const nsAString& aError)
{
nsRefPtr<TelephonyCall> callToNotify =
GetCallFromEverywhere(aServiceId, aCallIndex);
if (!callToNotify) {
NS_ERROR("Don't call me with a bad call index!");
return NS_ERROR_UNEXPECTED;
}
// Set the call state to 'disconnected' and remove it from the calls list.
callToNotify->UpdateDisconnectedReason(aError);
callToNotify->NotifyError(aError);
callToNotify->ChangeState(nsITelephonyService::CALL_STATE_DISCONNECTED);
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
Telephony::NotifyCdmaCallWaiting(uint32_t aServiceId, const nsAString& aNumber, Telephony::NotifyCdmaCallWaiting(uint32_t aServiceId, const nsAString& aNumber,
uint16_t aNumberPresentation, uint16_t aNumberPresentation,

View File

@ -119,7 +119,6 @@ TelephonyCall::ChangeStateInternal(uint16_t aCallState, bool aFireEvents)
} else { } else {
mTelephony->RemoveCall(this); mTelephony->RemoveCall(this);
} }
UpdateDisconnectedReason(NS_LITERAL_STRING("NormalCallClearingError"));
} else if (!mLive) { } else if (!mLive) {
mLive = true; mLive = true;
if (mGroup) { if (mGroup) {
@ -196,16 +195,23 @@ TelephonyCall::NotifyError(const nsAString& aError)
void void
TelephonyCall::UpdateDisconnectedReason(const nsAString& aDisconnectedReason) TelephonyCall::UpdateDisconnectedReason(const nsAString& aDisconnectedReason)
{ {
NS_ASSERTION(Substring(aDisconnectedReason, aDisconnectedReason.Length() - 5).EqualsLiteral("Error"), NS_ASSERTION(Substring(aDisconnectedReason,
aDisconnectedReason.Length() - 5).EqualsLiteral("Error"),
"Disconnected reason should end with 'Error'"); "Disconnected reason should end with 'Error'");
if (mDisconnectedReason.IsNull()) { if (!mDisconnectedReason.IsNull()) {
// There is no 'Error' suffix in the corresponding enum. We should skip return;
// that part for comparison. }
CONVERT_STRING_TO_NULLABLE_ENUM(
Substring(aDisconnectedReason, 0, aDisconnectedReason.Length() - 5), // There is no 'Error' suffix in the corresponding enum. We should skip
TelephonyCallDisconnectedReason, // that part for comparison.
mDisconnectedReason); CONVERT_STRING_TO_NULLABLE_ENUM(
Substring(aDisconnectedReason, 0, aDisconnectedReason.Length() - 5),
TelephonyCallDisconnectedReason,
mDisconnectedReason);
if (!aDisconnectedReason.EqualsLiteral("NormalCallClearingError")) {
NotifyError(aDisconnectedReason);
} }
} }

View File

@ -15,10 +15,13 @@ NS_IMPL_ISUPPORTS(TelephonyCallInfo, nsITelephonyCallInfo)
TelephonyCallInfo::TelephonyCallInfo(uint32_t aClientId, TelephonyCallInfo::TelephonyCallInfo(uint32_t aClientId,
uint32_t aCallIndex, uint32_t aCallIndex,
uint16_t aCallState, uint16_t aCallState,
const nsAString& aDisconnectedReason,
const nsAString& aNumber, const nsAString& aNumber,
uint16_t aNumberPresentation, uint16_t aNumberPresentation,
const nsAString& aName, const nsAString& aName,
uint16_t aNamePresentation, uint16_t aNamePresentation,
bool aIsOutgoing, bool aIsOutgoing,
bool aIsEmergency, bool aIsEmergency,
bool aIsConference, bool aIsConference,
@ -27,10 +30,13 @@ TelephonyCallInfo::TelephonyCallInfo(uint32_t aClientId,
: mClientId(aClientId), : mClientId(aClientId),
mCallIndex(aCallIndex), mCallIndex(aCallIndex),
mCallState(aCallState), mCallState(aCallState),
mDisconnectedReason(aDisconnectedReason),
mNumber(aNumber), mNumber(aNumber),
mNumberPresentation(aNumberPresentation), mNumberPresentation(aNumberPresentation),
mName(aName), mName(aName),
mNamePresentation(aNamePresentation), mNamePresentation(aNamePresentation),
mIsOutgoing(aIsOutgoing), mIsOutgoing(aIsOutgoing),
mIsEmergency(aIsEmergency), mIsEmergency(aIsEmergency),
mIsConference(aIsConference), mIsConference(aIsConference),
@ -60,6 +66,13 @@ TelephonyCallInfo::GetCallState(uint16_t* aCallState)
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
TelephonyCallInfo::GetDisconnectedReason(nsAString& aDisconnectedReason)
{
aDisconnectedReason = mDisconnectedReason;
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
TelephonyCallInfo::GetNumber(nsAString& aNumber) TelephonyCallInfo::GetNumber(nsAString& aNumber)
{ {

View File

@ -21,12 +21,21 @@ public:
NS_DECL_ISUPPORTS NS_DECL_ISUPPORTS
NS_DECL_NSITELEPHONYCALLINFO NS_DECL_NSITELEPHONYCALLINFO
TelephonyCallInfo(uint32_t aClientId, uint32_t aCallIndex, TelephonyCallInfo(uint32_t aClientId,
uint16_t aCallState, const nsAString& aNumber, uint32_t aCallIndex,
uint16_t aNumberPresentation, const nsAString& aName, uint16_t aCallState,
uint16_t aNamePresentation, bool aIsOutgoing, const nsAString& aDisconnectedReason,
bool aIsEmergency, bool aIsConference,
bool aIsSwitchable, bool aIsMergeable); const nsAString& aNumber,
uint16_t aNumberPresentation,
const nsAString& aName,
uint16_t aNamePresentation,
bool aIsOutgoing,
bool aIsEmergency,
bool aIsConference,
bool aIsSwitchable,
bool aIsMergeable);
private: private:
// Don't try to use the default constructor. // Don't try to use the default constructor.
@ -37,10 +46,13 @@ private:
uint32_t mClientId; uint32_t mClientId;
uint32_t mCallIndex; uint32_t mCallIndex;
uint16_t mCallState; uint16_t mCallState;
nsString mDisconnectedReason;
nsString mNumber; nsString mNumber;
uint16_t mNumberPresentation; uint16_t mNumberPresentation;
nsString mName; nsString mName;
uint16_t mNamePresentation; uint16_t mNamePresentation;
bool mIsOutgoing; bool mIsOutgoing;
bool mIsEmergency; bool mIsEmergency;
bool mIsConference; bool mIsConference;

View File

@ -124,10 +124,13 @@ function TelephonyCallInfo(aCall) {
this.clientId = aCall.clientId; this.clientId = aCall.clientId;
this.callIndex = aCall.callIndex; this.callIndex = aCall.callIndex;
this.callState = aCall.state; this.callState = aCall.state;
this.disconnectedReason = aCall.disconnectedReason || "";
this.number = aCall.number; this.number = aCall.number;
this.numberPresentation = aCall.numberPresentation; this.numberPresentation = aCall.numberPresentation;
this.name = aCall.name; this.name = aCall.name;
this.namePresentation = aCall.namePresentation; this.namePresentation = aCall.namePresentation;
this.isOutgoing = aCall.isOutgoing; this.isOutgoing = aCall.isOutgoing;
this.isEmergency = aCall.isEmergency; this.isEmergency = aCall.isEmergency;
this.isConference = aCall.isConference; this.isConference = aCall.isConference;
@ -148,10 +151,13 @@ TelephonyCallInfo.prototype = {
clientId: 0, clientId: 0,
callIndex: 0, callIndex: 0,
callState: nsITelephonyService.CALL_STATE_UNKNOWN, callState: nsITelephonyService.CALL_STATE_UNKNOWN,
disconnectedReason: "",
number: "", number: "",
numberPresentation: nsITelephonyService.CALL_PRESENTATION_ALLOWED, numberPresentation: nsITelephonyService.CALL_PRESENTATION_ALLOWED,
name: "", name: "",
namePresentation: nsITelephonyService.CALL_PRESENTATION_ALLOWED, namePresentation: nsITelephonyService.CALL_PRESENTATION_ALLOWED,
isOutgoing: true, isOutgoing: true,
isEmergency: false, isEmergency: false,
isConference: false, isConference: false,
@ -1438,10 +1444,6 @@ TelephonyService.prototype = {
* calls being disconnected as well. * calls being disconnected as well.
* *
* @return Array a list of calls we need to fire callStateChange * @return Array a list of calls we need to fire callStateChange
*
* TODO: The list currently doesn't contain calls that we fire notifyError
* for them. However, after Bug 1147736, notifyError is replaced by
* callStateChanged and those calls should be included in the list.
*/ */
_disconnectCalls: function(aClientId, aCalls, _disconnectCalls: function(aClientId, aCalls,
aFailCause = RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) { aFailCause = RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
@ -1465,7 +1467,7 @@ TelephonyService.prototype = {
disconnectedCalls.forEach(call => { disconnectedCalls.forEach(call => {
call.state = nsITelephonyService.CALL_STATE_DISCONNECTED; call.state = nsITelephonyService.CALL_STATE_DISCONNECTED;
call.failCause = aFailCause; call.disconnectedReason = aFailCause;
if (call.parentId) { if (call.parentId) {
let parentCall = this._currentCalls[aClientId][call.parentId]; let parentCall = this._currentCalls[aClientId][call.parentId];
@ -1474,13 +1476,7 @@ TelephonyService.prototype = {
this._notifyCallEnded(call); this._notifyCallEnded(call);
if (call.hangUpLocal || !call.failCause || callsForStateChanged.push(call);
call.failCause === RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
callsForStateChanged.push(call);
} else {
this._notifyAllListeners("notifyError",
[aClientId, call.callIndex, call.failCause]);
}
delete this._currentCalls[aClientId][call.callIndex]; delete this._currentCalls[aClientId][call.callIndex];
}); });

View File

@ -125,8 +125,6 @@ sync protocol PTelephony {
manages PTelephonyRequest; manages PTelephonyRequest;
child: child:
NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError);
NotifyCallStateChanged(nsTelephonyCallInfo[] aAllInfo); NotifyCallStateChanged(nsTelephonyCallInfo[] aAllInfo);
NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData); NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData);

View File

@ -47,17 +47,6 @@ TelephonyChild::DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor)
return true; return true;
} }
bool
TelephonyChild::RecvNotifyCallError(const uint32_t& aClientId,
const int32_t& aCallIndex,
const nsString& aError)
{
MOZ_ASSERT(mService);
mService->NotifyError(aClientId, aCallIndex, aError);
return true;
}
bool bool
TelephonyChild::RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) TelephonyChild::RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo)
{ {

View File

@ -34,10 +34,6 @@ protected:
virtual bool virtual bool
DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) override; DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) override;
virtual bool
RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
const nsString& aError) override;
virtual bool virtual bool
RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) override; RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) override;

View File

@ -37,10 +37,13 @@ struct ParamTraits<nsITelephonyCallInfo*>
uint32_t clientId; uint32_t clientId;
uint32_t callIndex; uint32_t callIndex;
uint16_t callState; uint16_t callState;
nsString disconnectedReason;
nsString number; nsString number;
uint16_t numberPresentation; uint16_t numberPresentation;
nsString name; nsString name;
uint16_t namePresentation; uint16_t namePresentation;
bool isOutgoing; bool isOutgoing;
bool isEmergency; bool isEmergency;
bool isConference; bool isConference;
@ -50,10 +53,13 @@ struct ParamTraits<nsITelephonyCallInfo*>
aParam->GetClientId(&clientId); aParam->GetClientId(&clientId);
aParam->GetCallIndex(&callIndex); aParam->GetCallIndex(&callIndex);
aParam->GetCallState(&callState); aParam->GetCallState(&callState);
aParam->GetDisconnectedReason(disconnectedReason);
aParam->GetNumber(number); aParam->GetNumber(number);
aParam->GetNumberPresentation(&numberPresentation); aParam->GetNumberPresentation(&numberPresentation);
aParam->GetName(name); aParam->GetName(name);
aParam->GetNamePresentation(&namePresentation); aParam->GetNamePresentation(&namePresentation);
aParam->GetIsOutgoing(&isOutgoing); aParam->GetIsOutgoing(&isOutgoing);
aParam->GetIsEmergency(&isEmergency); aParam->GetIsEmergency(&isEmergency);
aParam->GetIsConference(&isConference); aParam->GetIsConference(&isConference);
@ -63,10 +69,13 @@ struct ParamTraits<nsITelephonyCallInfo*>
WriteParam(aMsg, clientId); WriteParam(aMsg, clientId);
WriteParam(aMsg, callIndex); WriteParam(aMsg, callIndex);
WriteParam(aMsg, callState); WriteParam(aMsg, callState);
WriteParam(aMsg, disconnectedReason);
WriteParam(aMsg, number); WriteParam(aMsg, number);
WriteParam(aMsg, numberPresentation); WriteParam(aMsg, numberPresentation);
WriteParam(aMsg, name); WriteParam(aMsg, name);
WriteParam(aMsg, namePresentation); WriteParam(aMsg, namePresentation);
WriteParam(aMsg, isOutgoing); WriteParam(aMsg, isOutgoing);
WriteParam(aMsg, isEmergency); WriteParam(aMsg, isEmergency);
WriteParam(aMsg, isConference); WriteParam(aMsg, isConference);
@ -90,10 +99,13 @@ struct ParamTraits<nsITelephonyCallInfo*>
uint32_t clientId; uint32_t clientId;
uint32_t callIndex; uint32_t callIndex;
uint16_t callState; uint16_t callState;
nsString disconnectedReason;
nsString number; nsString number;
uint16_t numberPresentation; uint16_t numberPresentation;
nsString name; nsString name;
uint16_t namePresentation; uint16_t namePresentation;
bool isOutgoing; bool isOutgoing;
bool isEmergency; bool isEmergency;
bool isConference; bool isConference;
@ -104,10 +116,13 @@ struct ParamTraits<nsITelephonyCallInfo*>
if (!(ReadParam(aMsg, aIter, &clientId) && if (!(ReadParam(aMsg, aIter, &clientId) &&
ReadParam(aMsg, aIter, &callIndex) && ReadParam(aMsg, aIter, &callIndex) &&
ReadParam(aMsg, aIter, &callState) && ReadParam(aMsg, aIter, &callState) &&
ReadParam(aMsg, aIter, &disconnectedReason) &&
ReadParam(aMsg, aIter, &number) && ReadParam(aMsg, aIter, &number) &&
ReadParam(aMsg, aIter, &numberPresentation) && ReadParam(aMsg, aIter, &numberPresentation) &&
ReadParam(aMsg, aIter, &name) && ReadParam(aMsg, aIter, &name) &&
ReadParam(aMsg, aIter, &namePresentation) && ReadParam(aMsg, aIter, &namePresentation) &&
ReadParam(aMsg, aIter, &isOutgoing) && ReadParam(aMsg, aIter, &isOutgoing) &&
ReadParam(aMsg, aIter, &isEmergency) && ReadParam(aMsg, aIter, &isEmergency) &&
ReadParam(aMsg, aIter, &isConference) && ReadParam(aMsg, aIter, &isConference) &&
@ -117,10 +132,21 @@ struct ParamTraits<nsITelephonyCallInfo*>
} }
nsCOMPtr<nsITelephonyCallInfo> info = nsCOMPtr<nsITelephonyCallInfo> info =
new TelephonyCallInfo(clientId, callIndex, callState, number, new TelephonyCallInfo(clientId,
numberPresentation, name, namePresentation, callIndex,
isOutgoing, isEmergency, isConference, callState,
isSwitchable, isMergeable); disconnectedReason,
number,
numberPresentation,
name,
namePresentation,
isOutgoing,
isEmergency,
isConference,
isSwitchable,
isMergeable);
info.forget(aResult); info.forget(aResult);

View File

@ -421,16 +421,6 @@ TelephonyIPCService::NotifyConferenceError(const nsAString& aName,
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP
TelephonyIPCService::NotifyError(uint32_t aClientId, int32_t aCallIndex,
const nsAString& aError)
{
for (uint32_t i = 0; i < mListeners.Length(); i++) {
mListeners[i]->NotifyError(aClientId, aCallIndex, aError);
}
return NS_OK;
}
NS_IMETHODIMP NS_IMETHODIMP
TelephonyIPCService::SupplementaryServiceNotification(uint32_t aClientId, TelephonyIPCService::SupplementaryServiceNotification(uint32_t aClientId,
int32_t aCallIndex, int32_t aCallIndex,

View File

@ -331,17 +331,6 @@ TelephonyParent::NotifyConferenceError(const nsAString& aName,
: NS_ERROR_FAILURE; : NS_ERROR_FAILURE;
} }
NS_IMETHODIMP
TelephonyParent::NotifyError(uint32_t aClientId,
int32_t aCallIndex,
const nsAString& aError)
{
NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
return SendNotifyCallError(aClientId, aCallIndex, nsString(aError))
? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP NS_IMETHODIMP
TelephonyParent::SupplementaryServiceNotification(uint32_t aClientId, TelephonyParent::SupplementaryServiceNotification(uint32_t aClientId,
int32_t aCallIndex, int32_t aCallIndex,
@ -431,14 +420,6 @@ TelephonyRequestParent::NotifyConferenceError(const nsAString& aName,
MOZ_CRASH("Not a TelephonyParent!"); MOZ_CRASH("Not a TelephonyParent!");
} }
NS_IMETHODIMP
TelephonyRequestParent::NotifyError(uint32_t aClientId,
int32_t aCallIndex,
const nsAString& aError)
{
MOZ_CRASH("Not a TelephonyParent!");
}
NS_IMETHODIMP NS_IMETHODIMP
TelephonyRequestParent::SupplementaryServiceNotification(uint32_t aClientId, TelephonyRequestParent::SupplementaryServiceNotification(uint32_t aClientId,
int32_t aCallIndex, int32_t aCallIndex,

View File

@ -4,7 +4,7 @@
#include "nsISupports.idl" #include "nsISupports.idl"
[scriptable, uuid(3ea2d155-8ea2-42be-85d7-bd8ede8afc40)] [scriptable, uuid(e5e1be26-a3d4-49b3-8d9f-c1df5192b364)]
interface nsITelephonyCallInfo : nsISupports interface nsITelephonyCallInfo : nsISupports
{ {
/** /**
@ -22,6 +22,14 @@ interface nsITelephonyCallInfo : nsISupports
*/ */
readonly attribute unsigned short callState; readonly attribute unsigned short callState;
/**
* The disconnectedReason of a call is defualt to an empty string when the
* call is "not disconnected", but once the call becomes "disconnected" the
* disconnectedReason should be a non-empty string no matter the call is
* disconnected for a noraml reason or an error.
*/
readonly attribute DOMString disconnectedReason;
/** /**
* Number of the other party. * Number of the other party.
*/ */

View File

@ -7,7 +7,7 @@
interface nsIMobileCallForwardingOptions; interface nsIMobileCallForwardingOptions;
interface nsITelephonyCallInfo; interface nsITelephonyCallInfo;
[scriptable, uuid(37fb45bb-ae10-4cfd-b24e-d656a9787a0a)] [scriptable, uuid(80faf34e-286b-4487-bd55-135bd92668b9)]
interface nsITelephonyListener : nsISupports interface nsITelephonyListener : nsISupports
{ {
/** /**
@ -54,20 +54,6 @@ interface nsITelephonyListener : nsISupports
in long callIndex, in long callIndex,
in unsigned short notification); in unsigned short notification);
/**
* Called when RIL error occurs.
*
* @param clientId
Indicate the RIL client, 0 ~ (number of client - 1).
* @param callIndex
* Call identifier assigned by the RIL. -1 if no connection
* @param error
* Error from RIL.
*/
void notifyError(in unsigned long clientId,
in long callIndex,
in AString error);
/** /**
* Called when a waiting call comes in CDMA networks. * Called when a waiting call comes in CDMA networks.
* *

View File

@ -1,9 +1,12 @@
FROM quay.io/mozilla/builder:0.5.4 FROM quay.io/mozilla/builder:0.5.5
MAINTAINER Wander Lairson Costa <wcosta@mozilla.com> MAINTAINER Wander Lairson Costa <wcosta@mozilla.com>
ENV SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE /home/worker/socorro.token
# Add utilities and configuration # Add utilities and configuration
ADD bin /home/worker/bin ADD bin /home/worker/bin
ADD config /home/worker/.aws/config ADD config /home/worker/.aws/config
ADD socorro.token /home/worker/socorro.token
RUN yum install -y bc lzop RUN yum install -y bc lzop
RUN pip install awscli RUN pip install awscli

View File

@ -1 +1 @@
0.0.13 0.0.14

View File

@ -1,6 +1,6 @@
#! /bin/bash -e #! /bin/bash -e
while getopts "t:i:k:" arg; do while getopts "t:i:k:s:" arg; do
case $arg in case $arg in
t) t)
TAG=$OPTARG TAG=$OPTARG
@ -11,6 +11,9 @@ while getopts "t:i:k:" arg; do
k) k)
SECRET_KEY=$OPTARG SECRET_KEY=$OPTARG
;; ;;
s)
SOCORRO_TOKEN=$OPTARG
;;
esac esac
done done
@ -19,12 +22,16 @@ pushd $(dirname $0)
test $TAG test $TAG
test $KEY_ID test $KEY_ID
test $SECRET_KEY test $SECRET_KEY
test $SOCORRO_TOKEN
(echo '[default]' (echo '[default]'
echo "aws_access_key_id = $KEY_ID" echo "aws_access_key_id = $KEY_ID"
echo "aws_secret_access_key = $SECRET_KEY") > config echo "aws_secret_access_key = $SECRET_KEY") > config
echo $SOCORRO_TOKEN > socorro.token
docker build -t $TAG . docker build -t $TAG .
rm -f config rm -f config
rm -f socorro.token
popd popd

View File

@ -386,3 +386,76 @@ class Graph(object):
graph.pop('metadata', None) graph.pop('metadata', None)
print(json.dumps(graph, indent=4)) print(json.dumps(graph, indent=4))
@CommandProvider
class CIBuild(object):
@Command('taskcluster-build', category='ci',
description="Create taskcluster try server build task")
@CommandArgument('--base-repository',
help='URL for "base" repository to clone')
@CommandArgument('--head-repository',
required=True,
help='URL for "head" repository to fetch revision from')
@CommandArgument('--head-ref',
help='Reference (this is same as rev usually for hg)')
@CommandArgument('--head-rev',
required=True,
help='Commit revision to use')
@CommandArgument('--mozharness-repository',
help='URL for custom mozharness repo')
@CommandArgument('--mozharness-rev',
help='Commit revision to use from mozharness repository')
@CommandArgument('--owner',
default='foobar@mozilla.com',
help='email address of who owns this graph')
@CommandArgument('build_task',
help='path to build task definition')
def create_ci_build(self, **params):
templates = Templates(ROOT)
# TODO handle git repos
head_repository = params['head_repository']
if not head_repository:
head_repository = get_hg_url()
head_rev = params['head_rev']
if not head_rev:
head_rev = get_latest_hg_revision(head_repository)
head_ref = params['head_ref'] or head_rev
mozharness = load_mozharness_info()
mozharness_repo = params['mozharness_repository']
if mozharness_repo is None:
mozharness_repo = mozharness['repo']
mozharness_rev = params['mozharness_rev']
if mozharness_rev is None:
mozharness_rev = mozharness['revision']
build_parameters = dict(gaia_info().items() + {
'docker_image': docker_image,
'owner': params['owner'],
'from_now': json_time_from_now,
'now': current_json_time(),
'base_repository': params['base_repository'] or head_repository,
'head_repository': head_repository,
'head_rev': head_rev,
'head_ref': head_ref,
'mozharness_repository': mozharness_repo,
'mozharness_ref': mozharness_rev,
'mozharness_rev': mozharness_rev
}.items())
try:
build_task = templates.load(params['build_task'], build_parameters)
except IOError:
sys.stderr.write(
"Could not load build task file. Ensure path is a relative " \
"path from testing/taskcluster"
)
sys.exit(1)
taskcluster_graph.build_task.validate(build_task)
print(json.dumps(build_task['task'], indent=4))

View File

@ -50,7 +50,7 @@ mkdir -p $HOME/artifacts-public
mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/ mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/
mv $WORKSPACE/B2G/upload/sources.xml $HOME/artifacts/sources.xml mv $WORKSPACE/B2G/upload/sources.xml $HOME/artifacts/sources.xml
#mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip
mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-arm.tar.gz mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-arm.tar.gz
mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip

View File

@ -48,7 +48,7 @@ mkdir -p $HOME/artifacts-public
mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/ mv $WORKSPACE/B2G/upload-public/$mar_file $HOME/artifacts-public/
mv $WORKSPACE/B2G/upload/sources.xml $HOME/artifacts/sources.xml mv $WORKSPACE/B2G/upload/sources.xml $HOME/artifacts/sources.xml
#mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip mv $WORKSPACE/B2G/upload/b2g-*.crashreporter-symbols.zip $HOME/artifacts/b2g-crashreporter-symbols.zip
mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-arm.tar.gz mv $WORKSPACE/B2G/upload/b2g-*.android-arm.tar.gz $HOME/artifacts/b2g-android-arm.tar.gz
mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip mv $WORKSPACE/B2G/upload/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip

View File

@ -106,29 +106,8 @@ GonkDisplayJB::GonkDisplayJB()
mAlloc = new GraphicBufferAlloc(); mAlloc = new GraphicBufferAlloc();
#if ANDROID_VERSION >= 21 CreateSurface(mSTClient, mDispSurface);
sp<IGraphicBufferProducer> producer;
sp<IGraphicBufferConsumer> consumer;
BufferQueue::createBufferQueue(&producer, &consumer, mAlloc);
#elif ANDROID_VERSION >= 19
sp<BufferQueue> consumer = new BufferQueue(mAlloc);
sp<IGraphicBufferProducer> producer = consumer;
#elif ANDROID_VERSION >= 18
sp<BufferQueue> consumer = new BufferQueue(true, mAlloc);
sp<IGraphicBufferProducer> producer = consumer;
#else
sp<BufferQueue> consumer = new BufferQueue(true, mAlloc);
#endif
mDispSurface = new FramebufferSurface(0, mWidth, mHeight, surfaceformat, consumer);
#if ANDROID_VERSION == 17
sp<SurfaceTextureClient> stc = new SurfaceTextureClient(
static_cast<sp<ISurfaceTexture> >(mDispSurface->getBufferQueue()));
#else
sp<Surface> stc = new Surface(producer);
#endif
mSTClient = stc;
mList = (hwc_display_contents_1_t *)malloc(sizeof(*mList) + (sizeof(hwc_layer_1_t)*2)); mList = (hwc_display_contents_1_t *)malloc(sizeof(*mList) + (sizeof(hwc_layer_1_t)*2));
uint32_t usage = GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER; uint32_t usage = GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER;
@ -148,7 +127,7 @@ GonkDisplayJB::GonkDisplayJB()
#endif #endif
// For devices w/ hwc v1.0 or no hwc, this buffer can not be created, // For devices w/ hwc v1.0 or no hwc, this buffer can not be created,
// only create this buffer for devices w/ hwc version > 1.0. // only create this buffer for devices w/ hwc version > 1.0.
mBootAnimBuffer = mAlloc->createGraphicBuffer(mWidth, mHeight, surfaceformat, usage, &err); CreateSurface(mBootAnimSTClient, mBootAnimDispSurface);
} }
ALOGI("Starting bootanimation with (%d) format framebuffer", surfaceformat); ALOGI("Starting bootanimation with (%d) format framebuffer", surfaceformat);
@ -164,6 +143,34 @@ GonkDisplayJB::~GonkDisplayJB()
free(mList); free(mList);
} }
void
GonkDisplayJB::CreateSurface(android::sp<ANativeWindow>& aNativeWindow,
android::sp<android::DisplaySurface>& aDisplaySurface)
{
#if ANDROID_VERSION >= 21
sp<IGraphicBufferProducer> producer;
sp<IGraphicBufferConsumer> consumer;
BufferQueue::createBufferQueue(&producer, &consumer, mAlloc);
#elif ANDROID_VERSION >= 19
sp<BufferQueue> consumer = new BufferQueue(mAlloc);
sp<IGraphicBufferProducer> producer = consumer;
#elif ANDROID_VERSION >= 18
sp<BufferQueue> consumer = new BufferQueue(true, mAlloc);
sp<IGraphicBufferProducer> producer = consumer;
#else
sp<BufferQueue> consumer = new BufferQueue(true, mAlloc);
#endif
aDisplaySurface = new FramebufferSurface(0, mWidth, mHeight, surfaceformat, consumer);
#if ANDROID_VERSION == 17
aNativeWindow = new SurfaceTextureClient(
static_cast<sp<ISurfaceTexture>>(aDisplaySurface->getBufferQueue()));
#else
aNativeWindow = new Surface(producer);
#endif
}
ANativeWindow* ANativeWindow*
GonkDisplayJB::GetNativeWindow() GonkDisplayJB::GetNativeWindow()
{ {
@ -311,12 +318,13 @@ GonkDisplayJB::Post(buffer_handle_t buf, int fence)
ANativeWindowBuffer* ANativeWindowBuffer*
GonkDisplayJB::DequeueBuffer() GonkDisplayJB::DequeueBuffer()
{ {
if (mBootAnimBuffer.get()) { // Check for bootAnim or normal display flow.
return static_cast<ANativeWindowBuffer*>(mBootAnimBuffer.get()); sp<ANativeWindow> nativeWindow =
} !mBootAnimSTClient.get() ? mSTClient : mBootAnimSTClient;
ANativeWindowBuffer *buf; ANativeWindowBuffer *buf;
int fenceFd = -1; int fenceFd = -1;
mSTClient->dequeueBuffer(mSTClient.get(), &buf, &fenceFd); nativeWindow->dequeueBuffer(nativeWindow.get(), &buf, &fenceFd);
sp<Fence> fence(new Fence(fenceFd)); sp<Fence> fence(new Fence(fenceFd));
#if ANDROID_VERSION == 17 #if ANDROID_VERSION == 17
fence->waitForever(1000, "GonkDisplayJB_DequeueBuffer"); fence->waitForever(1000, "GonkDisplayJB_DequeueBuffer");
@ -332,10 +340,16 @@ bool
GonkDisplayJB::QueueBuffer(ANativeWindowBuffer* buf) GonkDisplayJB::QueueBuffer(ANativeWindowBuffer* buf)
{ {
int error = 0; int error = 0;
if (!mBootAnimBuffer.get()) { bool success = false;
// Check for bootAnim or normal display flow.
if (!mBootAnimSTClient.get()) {
error = mSTClient->queueBuffer(mSTClient.get(), buf, -1); error = mSTClient->queueBuffer(mSTClient.get(), buf, -1);
success = Post(mDispSurface->lastHandle, mDispSurface->GetPrevDispAcquireFd());
} else {
error = mBootAnimSTClient->queueBuffer(mBootAnimSTClient.get(), buf, -1);
success = Post(mBootAnimDispSurface->lastHandle, mBootAnimDispSurface->GetPrevDispAcquireFd());
} }
bool success = Post(mDispSurface->lastHandle, mDispSurface->GetPrevDispAcquireFd());
return error == 0 && success; return error == 0 && success;
} }
@ -363,8 +377,9 @@ void
GonkDisplayJB::StopBootAnim() GonkDisplayJB::StopBootAnim()
{ {
StopBootAnimation(); StopBootAnimation();
if (mBootAnimBuffer.get()) { if (mBootAnimSTClient.get()) {
mBootAnimBuffer = nullptr; mBootAnimSTClient = nullptr;
mBootAnimDispSurface = nullptr;
} }
} }

View File

@ -56,6 +56,8 @@ public:
private: private:
void StopBootAnim(); void StopBootAnim();
void CreateSurface(android::sp<ANativeWindow>& aNativeWindow,
android::sp<android::DisplaySurface>& aDisplaySurface);
hw_module_t const* mModule; hw_module_t const* mModule;
hw_module_t const* mFBModule; hw_module_t const* mFBModule;
@ -64,8 +66,9 @@ private:
power_module_t* mPowerModule; power_module_t* mPowerModule;
android::sp<android::DisplaySurface> mDispSurface; android::sp<android::DisplaySurface> mDispSurface;
android::sp<ANativeWindow> mSTClient; android::sp<ANativeWindow> mSTClient;
android::sp<android::DisplaySurface> mBootAnimDispSurface;
android::sp<ANativeWindow> mBootAnimSTClient;
android::sp<android::IGraphicBufferAlloc> mAlloc; android::sp<android::IGraphicBufferAlloc> mAlloc;
android::sp<android::GraphicBuffer> mBootAnimBuffer;
hwc_display_contents_1_t* mList; hwc_display_contents_1_t* mList;
uint32_t mWidth; uint32_t mWidth;
uint32_t mHeight; uint32_t mHeight;