Merge b2ginbound to central, a=merge
authorWes Kocher <wkocher@mozilla.com>
Wed, 20 May 2015 18:25:05 -0700
changeset 244883 b9424d63fe3525ae297a7faf3b063e483bbd4108
parent 244882 bc3500c5afa0ee9121406061f67cd52dd33f9ba3 (current diff)
parent 244881 dbfb81f11bf7f576249702ee2a2bc4ca148d3133 (diff)
child 244884 1f6a0d22592701d5bc23621082ff9a0f8fde9ed4
child 244907 d017bfb96f62af16f6a9af6eadf105c959ac81e7
child 244935 d0a72997ef97767fdee0d773ef05abe3f8c9c1b0
push id60049
push userkwierso@gmail.com
push dateThu, 21 May 2015 01:30:42 +0000
treeherdermozilla-inbound@1f6a0d225927 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone41.0a1
first release with
nightly linux32
b9424d63fe35 / 41.0a1 / 20150521030204 / files
nightly linux64
b9424d63fe35 / 41.0a1 / 20150521030204 / files
nightly mac
b9424d63fe35 / 41.0a1 / 20150521030204 / files
nightly win32
b9424d63fe35 / 41.0a1 / 20150521030204 / files
nightly win64
b9424d63fe35 / 41.0a1 / 20150521030204 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge b2ginbound to central, a=merge
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -10,25 +10,25 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </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="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/>
+  <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
   <!-- 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"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="8b880805d454664b3eed11d0f053cdeafa1ff06e"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" revision="a1e239a0bb5cd1d69680bf1075883aa9a7bf2429"/>
   <project groups="linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" path="prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" revision="c7931763d41be602407ed9d71e2c0292c6597e00"/>
   <project groups="linux,x86" name="platform/prebuilts/python/linux-x86/2.7.5" path="prebuilts/python/linux-x86/2.7.5" revision="a32003194f707f66a2d8cdb913ed1869f1926c5d"/>
   <project name="device/common" path="device/common" revision="96d4d2006c4fcb2f19a3fa47ab10cb409faa017b"/>
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -10,25 +10,25 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </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="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/>
+  <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
   <!-- 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"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="8b880805d454664b3eed11d0f053cdeafa1ff06e"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" revision="a1e239a0bb5cd1d69680bf1075883aa9a7bf2429"/>
   <project groups="linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" path="prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" revision="c7931763d41be602407ed9d71e2c0292c6597e00"/>
   <project groups="linux,x86" name="platform/prebuilts/python/linux-x86/2.7.5" path="prebuilts/python/linux-x86/2.7.5" revision="83760d213fb3bec7b4117d266fcfbf6fe2ba14ab"/>
   <project name="device/common" path="device/common" revision="6a2995683de147791e516aae2ccb31fdfbe2ad30"/>
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
     <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="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="218a5637399d023f4326e12c8a486dad95403b6c"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -12,20 +12,20 @@
   <!--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="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="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="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
   <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="9025e50b9d29b3cabbbb21e1dd94d0d13121a17e"/>
   <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="b89fda71fcd0fa0cf969310e75be3ea33e048b44"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="2e7d5348f35575870b3c7e567a9a9f6d66f8d6c5"/>
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -10,25 +10,25 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </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="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/>
+  <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
   <!-- 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"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="1950e4760fa14688b83cdbb5acaa1af9f82ef434"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" revision="ac6eb97a37035c09fb5ede0852f0881e9aadf9ad"/>
   <project groups="linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" path="prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" revision="737f591c5f95477148d26602c7be56cbea0cdeb9"/>
   <project groups="linux,x86" name="platform/prebuilts/python/linux-x86/2.7.5" path="prebuilts/python/linux-x86/2.7.5" revision="51da9b1981be481b92a59a826d4d78dc73d0989a"/>
   <project name="device/common" path="device/common" revision="798a3664597e6041985feab9aef42e98d458bc3d"/>
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -10,25 +10,25 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </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="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/>
+  <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
   <!-- 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,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/arm/arm-eabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" revision="8af5ff6f5dced9eb5a8127459df6c75d24342204"/>
   <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="30915518fa7ea07166efedc191a4f40aef516fe7"/>
   <project groups="pdk,linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6" revision="96eee58e3389fb05a835310d6a06a6ba4486097a"/>
   <project groups="pdk,linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8" revision="7c8a46698171aa2e0be09edb43d15a6acf832770"/>
   <project groups="pdk,linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8" path="prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8" revision="24b2038be8a636fd4a5d21f0abae1e466b07bcf7"/>
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -14,17 +14,17 @@
   <!--original fetch url was git://github.com/apitrace/-->
   <remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
   <default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
   <!-- Gonk specific things and forks -->
   <project name="platform_build" path="build" remote="b2g" revision="173b3104bfcbd23fc9dccd4b0035fc49aae3d444">
     <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="b290c77ccb7ab0af599b3d8287b71b9970d8dcb0"/>
+  <project name="gaia.git" path="gaia" remote="mozillaorg" revision="5a7f87b1505ba89b586372cbbbe9507d1016c40c"/>
   <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="22664edc4c73e5fe8f5095ff1d5549db78a2bc10"/>
   <project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="218a5637399d023f4326e12c8a486dad95403b6c"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>
   <!-- Stock Android things -->
   <project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -10,25 +10,25 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </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="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/>
+  <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
   <!-- 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"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="8b880805d454664b3eed11d0f053cdeafa1ff06e"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7" revision="a1e239a0bb5cd1d69680bf1075883aa9a7bf2429"/>
   <project groups="linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" path="prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7" revision="c7931763d41be602407ed9d71e2c0292c6597e00"/>
   <project groups="linux,x86" name="platform/prebuilts/python/linux-x86/2.7.5" path="prebuilts/python/linux-x86/2.7.5" revision="a32003194f707f66a2d8cdb913ed1869f1926c5d"/>
   <project name="device/common" path="device/common" revision="96d4d2006c4fcb2f19a3fa47ab10cb409faa017b"/>
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
 {
     "git": {
-        "git_revision": "b290c77ccb7ab0af599b3d8287b71b9970d8dcb0", 
+        "git_revision": "5a7f87b1505ba89b586372cbbbe9507d1016c40c", 
         "remote": "https://git.mozilla.org/releases/gaia.git", 
         "branch": ""
     }, 
-    "revision": "87d96f3c66f704247d1996570748de07ca1aff07", 
+    "revision": "85b4fb5a2fd0040b3726a4f1e4218f2dbfd4edce", 
     "repo_path": "integration/gaia-central"
 }
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -12,20 +12,20 @@
   <!--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="4efd19d199ae52656604f794c5a77518400220fd">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </project>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="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="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
   <!-- Stock Android things -->
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.1" path="prebuilts/clang/linux-x86/3.1" revision="5c45f43419d5582949284eee9cef0c43d866e03b"/>
   <project groups="linux" name="platform/prebuilts/clang/linux-x86/3.2" path="prebuilts/clang/linux-x86/3.2" revision="3748b4168e7bd8d46457d4b6786003bc6a5223ce"/>
   <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="9025e50b9d29b3cabbbb21e1dd94d0d13121a17e"/>
   <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="b89fda71fcd0fa0cf969310e75be3ea33e048b44"/>
   <project groups="linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.7" revision="2e7d5348f35575870b3c7e567a9a9f6d66f8d6c5"/>
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -10,25 +10,25 @@
   <!--original fetch url was git://codeaurora.org/-->
   <remote fetch="https://git.mozilla.org/external/caf" name="caf"/>
   <!--original fetch url was https://git.mozilla.org/releases-->
   <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/>
   <!-- B2G specific things. -->
   <project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
     <copyfile dest="Makefile" src="core/root.mk"/>
   </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="gonk-misc" path="gonk-misc" remote="b2g" revision="fffc68521ebb1501d6b015c6d1c4a17a04fdb2e2"/>
   <project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
   <project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
   <project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
   <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="d75bd30437ac1465cdb8a35d21079a14cbf63c2d"/>
+  <project name="apitrace" path="external/apitrace" remote="apitrace" revision="deb1d684da56376a10d900e08d3f4139f3ace885"/>
   <!-- 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,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/arm/arm-eabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" revision="8af5ff6f5dced9eb5a8127459df6c75d24342204"/>
   <project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" path="prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8" revision="30915518fa7ea07166efedc191a4f40aef516fe7"/>
   <project groups="pdk,linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6" revision="96eee58e3389fb05a835310d6a06a6ba4486097a"/>
   <project groups="pdk,linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8" revision="7c8a46698171aa2e0be09edb43d15a6acf832770"/>
   <project groups="pdk,linux,x86" name="platform/prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8" path="prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8" revision="24b2038be8a636fd4a5d21f0abae1e466b07bcf7"/>
--- a/dom/activities/Activity.cpp
+++ b/dom/activities/Activity.cpp
@@ -63,20 +63,28 @@ Activity::Initialize(nsPIDOMWindow* aWin
   }
 
   // Instantiate a JS proxy that will do the child <-> parent communication
   // with the JS implementation of the backend.
   nsresult rv;
   mProxy = do_CreateInstance("@mozilla.org/dom/activities/proxy;1", &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);
-  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);
   return NS_OK;
 }
 
 Activity::~Activity()
 {
   if (mProxy) {
--- a/dom/bluetooth/BluetoothRilListener.cpp
+++ b/dom/bluetooth/BluetoothRilListener.cpp
@@ -198,26 +198,33 @@ nsresult
 TelephonyListener::HandleCallInfo(nsITelephonyCallInfo* aInfo, bool aSend)
 {
   BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
   NS_ENSURE_TRUE(hfp, NS_ERROR_FAILURE);
 
   uint32_t callIndex;
   uint16_t callState;
   nsAutoString number;
+  nsAutoString disconnectedReason;
   bool isOutgoing;
   bool isConference;
 
   aInfo->GetCallIndex(&callIndex);
   aInfo->GetCallState(&callState);
   aInfo->GetNumber(number);
+  aInfo->GetDisconnectedReason(disconnectedReason);
   aInfo->GetIsOutgoing(&isOutgoing);
   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);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyListener::CallStateChanged(uint32_t aLength,
                                     nsITelephonyCallInfo** aAllInfo)
 {
@@ -229,40 +236,16 @@ TelephonyListener::CallStateChanged(uint
 
 NS_IMETHODIMP
 TelephonyListener::EnumerateCallState(nsITelephonyCallInfo* aInfo)
 {
   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
 TelephonyListener::ConferenceCallStateChanged(uint16_t aCallState)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyListener::EnumerateCallStateComplete()
 {
--- a/dom/nfc/tests/marionette/head.js
+++ b/dom/nfc/tests/marionette/head.js
@@ -189,31 +189,74 @@ let SNEP = (function() {
     put: put,
     SAP_NDEF: 4
   };
 }());
 
 function toggleNFC(enabled) {
   let deferred = Promise.defer();
 
-  let promise;
-  if (enabled) {
-    promise = nfc.startPoll();
-  } else {
-    promise = nfc.powerOff();
-  }
+  // In bug 1109592, nfcd will only run when nfc is enabled.
+  // The way we activate/deactivate nfcd is by using set property "ctl.start" & "ctl.stop".
+  // In emulator it seems sometimes enable/disable NFC too quick will cause nfcd won't starat,
+  // So here we use a simple workaround to delay enable or disable for 100ms, bug 1164786 is
+  // created to track this issue.
+  setTimeout(function() {
+    let promise;
+    if (enabled) {
+      promise = nfc.startPoll();
+    } else {
+      promise = nfc.powerOff();
+    }
+
+    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();
 
-  promise.then(() => {
+  sysMsgHelper.waitForTechDiscovered(function() {
+    deferred.resolve();
+  });
+
+  NCI.activateRE(re);
+
+  return deferred.promise;
+}
+
+function deactivateAndWaitForTechLost() {
+  let deferred = Promise.defer();
+
+  sysMsgHelper.waitForTechLost(function() {
     deferred.resolve();
-  }).catch(() => {
-    ok(false, 'operation failed, error ' + req.error.name);
-    deferred.reject();
-    finish();
   });
 
+  NCI.deactivate();
+
+  return deferred.promise;
+}
+
+function deactivateAndWaitForPeerLost() {
+  let deferred = Promise.defer();
+
+  nfc.onpeerlost = function() {
+    deferred.resolve();
+  };
+
+  NCI.deactivate();
+
   return deferred.promise;
 }
 
 function clearPendingMessages(type) {
   if (!window.navigator.mozHasPendingMessage(type)) {
     return;
   }
 
--- a/dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js
+++ b/dom/nfc/tests/marionette/test_nfc_checkP2PRegistration.js
@@ -1,133 +1,118 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 'use strict';
 
 /* globals log, is, ok, runTests, toggleNFC, runNextTest,
    SpecialPowers, nfc */
 
-const MARIONETTE_TIMEOUT = 30000;
+const MARIONETTE_TIMEOUT = 60000;
 const MARIONETTE_HEAD_JS = 'head.js';
 
 const MANIFEST_URL = 'app://system.gaiamobile.org/manifest.webapp';
 const FAKE_MANIFEST_URL = 'app://fake.gaiamobile.org/manifest.webapp';
 
 /**
  * Failure scenarion without onpeerread handler registration
  * Nfc not enabled -> no session token.
  */
 function testNoTargetNoSessionToken() {
   log('testNoTargetNoSessionToken');
-  fireCheckP2PReg(MANIFEST_URL)
+  nfc.checkP2PRegistration(MANIFEST_URL)
   .then((result) => {
     is(result, false, 'No target, no sesionToken, result should be false');
     runNextTest();
   })
   .catch(handleRejectedPromise);
 }
 
 /**
  * Failure scenario onpeerready handler registered but Nfc not enabled
  * -> no session token.
  */
 function testWithTargetNoSessionToken() {
   log('testWithTargetNoSessionToken');
   registerOnpeerready()
-  .then(() => fireCheckP2PReg(MANIFEST_URL))
+  .then(() => nfc.checkP2PRegistration(MANIFEST_URL))
   .then((result) => {
     is(result, false,
       'session token is available and it shouldnt be');
     nfc.onpeerready = null;
     runNextTest();
   })
   .catch(handleRejectedPromise);
 }
 
 /**
  * Success scenario, nfc enabled, activated RE0 (p2p ndef is received,
  * creates session token) opeerreadyhandler registered.
  */
 function testWithSessionTokenWithTarget() {
   log('testWithSessionTokenWithTarget');
   toggleNFC(true)
-  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
+  .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
   .then(registerOnpeerready)
-  .then(() => fireCheckP2PReg(MANIFEST_URL))
+  .then(() => nfc.checkP2PRegistration(MANIFEST_URL))
   .then((result) => {
     is(result, true, 'should be true, onpeerready reg, sessionToken set');
     nfc.onpeerready = null;
-    return toggleNFC(false);
+    return deactivateAndWaitForTechLost().then(() => toggleNFC(false));
   })
   .then(runNextTest)
   .catch(handleRejectedPromiseWithNfcOn);
 }
 
 /**
  * Failure scenario, nfc enabled, activated RE0 (p2p ndef is received,
  * creates session token) opeerready handler not registered.
  */
 function testWithSessionTokenNoTarget() {
   log('testWithSessionTokenNoTarget');
   toggleNFC(true)
-  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
-  .then(() => fireCheckP2PReg(MANIFEST_URL))
+  .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
+  .then(() => nfc.checkP2PRegistration(MANIFEST_URL))
   .then((result) => {
     is(result, false,
       'session token  avilable but onpeerready not registered');
-    return toggleNFC(false);
+    return deactivateAndWaitForTechLost().then(() => toggleNFC(false));
   })
   .then(runNextTest)
   .catch(handleRejectedPromiseWithNfcOn);
 }
 
 /**
  * Failure scenario, nfc enabled, re0 activated, onpeerready registered,
  * checking wrong manifest url.
  */
 function testWithSessionTokenWrongTarget() {
   log('testWithSessionTokenWrongTarget');
   toggleNFC(true)
-  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
+  .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
   .then(registerOnpeerready)
-  .then(() => fireCheckP2PReg(FAKE_MANIFEST_URL))
+  .then(() => nfc.checkP2PRegistration(FAKE_MANIFEST_URL))
   .then((result) => {
     is(result, false, 'should be false, fake manifest, sessionToken set');
     nfc.onpeerready = null;
-    return toggleNFC(false);
+    return deactivateAndWaitForTechLost().then(() => toggleNFC(false));
   })
   .then(runNextTest)
   .catch(handleRejectedPromiseWithNfcOn);
 }
 
 function registerOnpeerready() {
   nfc.onpeerready = function() {
     ok(false, 'onpeerready callback cannot be fired');
   };
   let d = Promise.defer();
   d.resolve();
   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() {
    ok(false, 'Promise rejected. This should not happen');
    nfc.onpeerready = null;
    runNextTest();
 }
 
 function handleRejectedPromiseWithNfcOn() {
   ok(false, 'Promise rejected. This should not happen. Turning off nfc');
--- a/dom/nfc/tests/marionette/test_nfc_error_messages.js
+++ b/dom/nfc/tests/marionette/test_nfc_error_messages.js
@@ -20,57 +20,59 @@ let nfcPeers = [];
  * Enables nfc and RE0 then registers onpeerready callback and once
  * it's fired it creates mozNFCPeer and stores it for later.
  * After disabling nfc tries to do mozNFCPeer.sendNDEF which should
  * fail with NfcNotEnabledError.
  */
 function testNfcNotEnabledError() {
   log('testNfcNotEnabledError');
   toggleNFC(true)
-  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
+  .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
   .then(registerAndFireOnpeerready)
+  .then(() => deactivateAndWaitForPeerLost())
   .then(() => toggleNFC(false))
   .then(() => sendNDEFExpectError(nfcPeers[0]))
   .then(endTest)
   .catch(handleRejectedPromise);
 }
 
 /**
  * Enables nfc and RE0, register onpeerready callback, once it's fired
  * it creates and stores mozNFCPeer. Disables nfc, enables nfc and
  * once again registers and fires new onpeerready callback and stores
  * mozNfcPeer. Than fires sendNDEF on the first stored peer which
  * should have invalid session token and we should get NfcBadSessionIdError
  */
 function testNfcBadSessionIdError() {
   log('testNfcBadSessionIdError');
   toggleNFC(true)
-  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
+  .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
   .then(registerAndFireOnpeerready)
   .then(() => NCI.deactivate())
-  .then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0))
+  .then(() => activateAndwaitForTechDiscovered(emulator.P2P_RE_INDEX_0))
   .then(registerAndFireOnpeerready)
   // we have 2 peers in nfcPeers array, peer0 has old/invalid session token
   .then(() => sendNDEFExpectError(nfcPeers[0]))
+  .then(() => deactivateAndWaitForPeerLost())
   .then(() => toggleNFC(false))
   .then(endTest)
   .catch(handleRejectedPromise);
 }
 
 /**
  * Enables nfc and RE0, registers tech-discovered msg handler, once it's
  * fired set tech-lost handler and disables nfc. In both handlers checks
  * if error message is not present.
  */
 function testNoErrorInTechMsg() {
   log('testNoErrorInTechMsg');
 
   let techDiscoveredHandler = function(msg) {
     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');
 
     setAndFireTechLostHandler()
     .then(() => toggleNFC(false))
     .then(endTest)
     .catch(handleRejectedPromise);
   };
 
@@ -103,48 +105,48 @@ function registerAndFireOnpeerready() {
 
   nfc.notifyUserAcceptedP2P(MANIFEST_URL);
   return deferred.promise;
 }
 
 function sendNDEFExpectError(peer) {
   let deferred = Promise.defer();
 
-  try {
-    peer.sendNDEF(NDEF_MESSAGE);
+  peer.sendNDEF(NDEF_MESSAGE)
+  .then(() => {
     deferred.reject();
-  } catch (e) {
+  }).catch((e) => {
     ok(true, 'this should happen ' + e);
     deferred.resolve();
-  }
+  });
 
   return deferred.promise;
 }
 
 function setAndFireTechLostHandler() {
   let deferred = Promise.defer();
 
   let techLostHandler = function(msg) {
     ok('Message handler for nfc-manager-tech-lost');
-    is(msg.type, 'techLost');
     is(msg.errorMsg, undefined, 'Should not get error msg in tech lost');
 
     deferred.resolve();
   };
 
   sysMsgHelper.waitForTechLost(techLostHandler);
 
   // triggers tech-lost
   NCI.deactivate();
   return deferred.promise;
 }
 
 let tests = [
   testNfcNotEnabledError,
-  testNfcBadSessionIdError,
+// This testcase is temporarily removed due to Bug 1055959, will reopen when it is fixed
+//  testNfcBadSessionIdError
   testNoErrorInTechMsg
 ];
 
 /**
  * nfc-manager for mozNfc.checkP2PRegistration(manifestUrl)
  *  -> "NFC:CheckP2PRegistration" IPC
  * nfc-share to set/unset onpeerready
  *  -> "NFC:RegisterPeerTarget", "NFC:UnregisterPeerTarget" IPC
--- a/dom/nfc/tests/marionette/test_nfc_manager_tech_discovered.js
+++ b/dom/nfc/tests/marionette/test_nfc_manager_tech_discovered.js
@@ -1,19 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-MARIONETTE_TIMEOUT = 30000;
+MARIONETTE_TIMEOUT = 60000;
 MARIONETTE_HEAD_JS = 'head.js';
 
 function handleTechnologyDiscoveredRE0(msg) {
   log('Received \'nfc-manager-tech-discovered\'');
-  is(msg.type, 'techDiscovered', 'check for correct message type');
-  is(msg.isP2P, 'P2P', 'check for correct tech type');
-  toggleNFC(false).then(runNextTest);
+  ok(msg.peer, 'check for correct tech type');
+  deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
 }
 
 function testActivateRE0() {
   log('Running \'testActivateRE0\'');
   sysMsgHelper.waitForTechDiscovered(handleTechnologyDiscoveredRE0);
 
   toggleNFC(true).then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0));
 }
--- a/dom/nfc/tests/marionette/test_nfc_manager_tech_discovered_ndef.js
+++ b/dom/nfc/tests/marionette/test_nfc_manager_tech_discovered_ndef.js
@@ -1,35 +1,34 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-MARIONETTE_TIMEOUT = 30000;
+MARIONETTE_TIMEOUT = 60000;
 MARIONETTE_HEAD_JS = 'head.js';
 
 let tnf = NDEF.TNF_WELL_KNOWN;
 let type = "U";
 let id = "";
 let payload = "https://www.example.com";
 
 let ndef = null;
 
 function handleSnep(msg) {
   ok(msg.records != null, "msg.records should have values");
   // validate received NDEF message against reference
   let ndef = [new MozNDEFRecord({tnf: tnf,
                                  type: NfcUtils.fromUTF8(type),
                                  payload: NfcUtils.fromUTF8(payload)})];
   NDEF.compare(ndef, msg.records);
-  toggleNFC(false).then(runNextTest);
+  deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
 }
 
 function handleTechnologyDiscoveredRE0(msg) {
   log("Received 'nfc-manager-tech-discovered'");
-  is(msg.type, "techDiscovered", "check for correct message type");
-  is(msg.isP2P, "P2P", "check for correct tech type");
+  ok(msg.peer, "check for correct tech type");
 
   sysMsgHelper.waitForTechDiscovered(handleSnep);
   SNEP.put(SNEP.SAP_NDEF, SNEP.SAP_NDEF, 0, tnf, btoa(type), btoa(id), btoa(payload));
 }
 
 function testReceiveNDEF() {
   log("Running 'testReceiveNDEF'");
   sysMsgHelper.waitForTechDiscovered(handleTechnologyDiscoveredRE0);
--- a/dom/nfc/tests/marionette/test_nfc_manager_tech_lost.js
+++ b/dom/nfc/tests/marionette/test_nfc_manager_tech_lost.js
@@ -1,25 +1,24 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 MARIONETTE_TIMEOUT = 30000;
 MARIONETTE_HEAD_JS = 'head.js';
 
 function handleTechnologyLost(msg) {
   log('Received \'nfc-manager-tech-lost\'');
-  is(msg.type, 'techLost', 'check for correct message type');
+  ok(true);
 
   toggleNFC(false).then(runNextTest)
 }
 
 function handleTechnologyDiscoveredRE0(msg) {
   log('Received \'nfc-manager-tech-discovered\'');
-  is(msg.type, 'techDiscovered', 'check for correct message type');
-  is(msg.isP2P, 'P2P', 'check for correct tech type');
+  ok(msg.peer, 'check for correct tech type');
 
   NCI.deactivate();
 }
 
 function testTechLost() {
   log('Running \'testTechLost\'');
   sysMsgHelper.waitForTechDiscovered(handleTechnologyDiscoveredRE0);
   sysMsgHelper.waitForTechLost(handleTechnologyLost);
--- a/dom/nfc/tests/marionette/test_nfc_peer.js
+++ b/dom/nfc/tests/marionette/test_nfc_peer.js
@@ -23,40 +23,33 @@ function peerLostCb(evt) {
   // reset callback.
   nfc.onpeerready = null;
   nfc.onpeerlost = null;
   toggleNFC(false).then(runNextTest);
 }
 
 function handleTechnologyDiscoveredRE0(msg) {
   log("Received \'nfc-manager-tech-discovered\'");
-  is(msg.type, "techDiscovered", "check for correct message type");
-  is(msg.isP2P, "P2P", "check for correct tech type");
+  ok(msg.peer, "check for correct tech type");
 
   nfc.onpeerready = peerReadyCb;
   nfc.onpeerlost = peerLostCb;
 
   nfc.notifyUserAcceptedP2P(MANIFEST_URL);
 }
 
 function handleTechnologyDiscoveredRE0ForP2PRegFailure(msg) {
   log("Received \'nfc-manager-tech-discovered\'");
-  is(msg.type, "techDiscovered", "check for correct message type");
-  is(msg.isP2P, "P2P", "check for correct tech type");
+  ok(msg.peer, "check for correct tech type");
 
   nfc.onpeerready = peerReadyCb;
 
-  let promise = nfc.checkP2PRegistration(INCORRECT_MANIFEST_URL);
-  promise.then(evt => {
-    is(request.result, false, "check for P2P registration result");
-
-    nfc.onpeerready = null;
-    NCI.deactivate().then(() => toggleNFC(false)).then(runNextTest);
-  }).catch(() => {
-    ok(false, "checkP2PRegistration failed.");
+  nfc.checkP2PRegistration(INCORRECT_MANIFEST_URL)
+  .then((result) => {
+    is(result, false, "check for P2P registration result");
 
     nfc.onpeerready = null;
     NCI.deactivate().then(() => toggleNFC(false)).then(runNextTest);
   });
 }
 
 function testPeerReady() {
   sysMsgHelper.waitForTechDiscovered(handleTechnologyDiscoveredRE0);
@@ -145,29 +138,29 @@ function testPeerShouldThrow() {
   nfc.onpeerready = function (evt) {
     log("testPeerShouldThrow peerready");
     peer = evt.peer;
     NCI.deactivate();
   };
 
   nfc.onpeerlost = function () {
     log("testPeerShouldThrow peerlost");
-    try {
-      peer.sendNDEF(ndef);
+    peer.sendNDEF(ndef)
+    .then(() => {
       ok(false, "sendNDEF should throw error");
-    } catch (e) {
+    }).catch((e) => {
       ok(true, "Exception expected " + e);
-    }
+    });
 
-    try {
-      peer.sendFile(new Blob());
+    peer.sendFile(new Blob())
+    .then(() => {
       ok(false, "sendfile should throw error");
-    } catch (e) {
+    }).catch((e) => {
       ok(true, "Exception expected" + e);
-    }
+    });
 
     nfc.onpeerready = null;
     nfc.onpeerlost = null;
     toggleNFC(false).then(runNextTest);
   };
 
   sysMsgHelper.waitForTechDiscovered(function() {
     log("testPeerShouldThrow techDiscovered");
--- a/dom/nfc/tests/marionette/test_nfc_peer_sendFile.js
+++ b/dom/nfc/tests/marionette/test_nfc_peer_sendFile.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-MARIONETTE_TIMEOUT = 30000;
+MARIONETTE_TIMEOUT = 60000;
 MARIONETTE_HEAD_JS = "head.js";
 
 let MANIFEST_URL = "app://system.gaiamobile.org/manifest.webapp";
 
 function sendFile(msg) {
   log("sendFile msg="+JSON.stringify(msg));
   ok(msg.peer instanceof MozNFCPeer, "should get a MozNFCPeer");
   ok(msg.blob instanceof Blob, "should get a Blob");
@@ -18,31 +18,28 @@ function sendFile(msg) {
 function testSendFile() {
   nfc.onpeerready = function(evt) {
     let peer = evt.peer;
     peer.sendFile(new Blob());
     sysMsgHelper.waitForSendFile(sendFile);
   };
 
   sysMsgHelper.waitForTechDiscovered(function(msg) {
-    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.checkP2PRegistration(MANIFEST_URL).then(result => {
+      if (result) {
+        nfc.notifyUserAcceptedP2P(MANIFEST_URL);
+      } else {
+        ok(false, "checkP2PRegistration failed.");
+        deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
+      }
+    });
   });
 
   toggleNFC(true).then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0));
 }
 
 let tests = [
   testSendFile
 ];
 
 SpecialPowers.pushPermissions(
-  [{"type": "nfc", "allow": true,
-                   "read": true, 'write': true, context: document},
+  [{"type": "nfc-share", "allow": true, context: document},
    {"type": "nfc-manager", 'allow': true, context: document}], runTests);
--- a/dom/nfc/tests/marionette/test_nfc_peer_sendndef.js
+++ b/dom/nfc/tests/marionette/test_nfc_peer_sendndef.js
@@ -1,12 +1,12 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-MARIONETTE_TIMEOUT = 30000;
+MARIONETTE_TIMEOUT = 60000;
 MARIONETTE_HEAD_JS = "head.js";
 
 let url = "https://www.example.com";
 
 function sendNDEF(peer) {
   let tnf = NDEF.TNF_WELL_KNOWN;
   let type = new Uint8Array(NfcUtils.fromUTF8("U"));
   let payload = new Uint8Array(NfcUtils.fromUTF8(url));
@@ -16,28 +16,27 @@ function sendNDEF(peer) {
   promise.then(() => {
     log("Successfully sent NDEF message");
 
     let cmd = "nfc snep put -1 -1"; /* read last SNEP PUT from emulator */
     log("Executing \'" + cmd + "\'");
     emulator.run(cmd, function(result) {
       is(result.pop(), "OK", "check SNEP PUT result");
       NDEF.compare(ndef, NDEF.parseString(result.pop()));
-      toggleNFC(false).then(runNextTest);
+      deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
     });
   }).catch(() => {
     ok(false, "Failed to send NDEF message, error \'" + this.error + "\'");
-    toggleNFC(false).then(runNextTest);
+    deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
   });
 }
 
 function handleTechnologyDiscoveredRE0(msg) {
   log("Received \'nfc-manager-tech-discovered\' " + JSON.stringify(msg));
-  is(msg.type, "techDiscovered", "check for correct message type");
-  is(msg.isP2P, "check for \'P2P\' in tech list");
+  ok(msg.peer, "techDiscovered", "check for correct message type");
   sendNDEF(msg.peer);
 }
 
 function testOnPeerReadyRE0() {
   log("Running \'testOnPeerReadyRE0\'");
   sysMsgHelper.waitForTechDiscovered(handleTechnologyDiscoveredRE0);
   toggleNFC(true).then(() => NCI.activateRE(emulator.P2P_RE_INDEX_0));
 }
--- a/dom/nfc/tests/marionette/test_nfc_read_tag.js
+++ b/dom/nfc/tests/marionette/test_nfc_read_tag.js
@@ -1,54 +1,54 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
-MARIONETTE_TIMEOUT = 30000;
+MARIONETTE_TIMEOUT = 60000;
 MARIONETTE_HEAD_JS = "head.js";
 
 let url = "http://www.mozilla.org";
 
 function testUrlTagDiscover(re) {
   log("Running \'testUrlTagDiscover\'");
   // TODO : Make flag value readable.
   let flag = 0xd0;
   let tnf = NDEF.TNF_WELL_KNOWN;
   let type = "U";
   let payload = url;
 
   sysMsgHelper.waitForTechDiscovered(function(msg) {
     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);
 
     is(tnf, records[0].tnf, "check for TNF field in NDEF");
-    is(type, NfcUtils.toUTF8(records[0].type), "check for type field in NDEF");
-    is(payload, NfcUtils.toUTF8(records[0].payload), "check for payload field in NDEF");
+    is(type, NfcUtils.toUTF8(Cu.waiveXrays(records[0].type)), "check for type 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)
   .then(() => TAG.setData(re, flag, tnf, btoa(type), btoa(payload)))
   .then(() => NCI.activateRE(re));
 }
 
 function testEmptyTagDiscover(re) {
   log("Running \'testEmptyTagDiscover\'");
 
   sysMsgHelper.waitForTechDiscovered(function(msg) {
     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;
     ok(records == null);
 
-    toggleNFC(false).then(runNextTest);
+    deactivateAndWaitForTechLost().then(() => toggleNFC(false)).then(runNextTest);
   });
 
   toggleNFC(true)
   .then(() => TAG.clearData(re))
   .then(() => NCI.activateRE(re));
 }
 
 function testUrlT1TDiscover() {
--- a/dom/settings/tests/test_settings_events.html
+++ b/dom/settings/tests/test_settings_events.html
@@ -7,20 +7,24 @@ https://bugzilla.mozilla.org/show_bug.cg
   <title>Test for Bug 678695</title>
   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=678695">Mozilla Bug 678695</a>
 <p id="display"></p>
 <div id="content" style="display: none">
-  
+
 </div>
 <pre id="test">
 <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 **/
 
 var e = new MozSettingsEvent("settingchanged", {settingName: "a", settingValue: 1});
 ok(e, "Should have settings event!");
 is(e.settingName, "a", "Name should be a.");
 is(e.settingValue, 1, "Value should be 1.");
 
--- a/dom/system/gonk/NetworkService.js
+++ b/dom/system/gonk/NetworkService.js
@@ -644,16 +644,27 @@ NetworkService.prototype = {
       ifname: interfaceName
     };
 
     this.controlMessage(params, function(result) {
       callback.dhcpRequestResult(!result.error, result.error ? null : result);
     });
   },
 
+  stopDhcp: function(interfaceName, callback) {
+    let params = {
+      cmd: "stopDhcp",
+      ifname: interfaceName
+    };
+
+    this.controlMessage(params, function(result) {
+      callback.nativeCommandResult(!result.error);
+    });
+  },
+
   enableInterface: function(interfaceName, callback) {
     let params = {
       cmd: "enableInterface",
       ifname: interfaceName
     };
 
     this.controlMessage(params, function(result) {
       callback.nativeCommandResult(!result.error);
--- a/dom/system/gonk/NetworkUtils.cpp
+++ b/dom/system/gonk/NetworkUtils.cpp
@@ -1610,16 +1610,17 @@ void NetworkUtils::ExecuteCommand(Networ
     BUILD_ENTRY(setWifiOperationMode),
     BUILD_ENTRY(setDhcpServer),
     BUILD_ENTRY(setWifiTethering),
     BUILD_ENTRY(setUSBTethering),
     BUILD_ENTRY(enableUsbRndis),
     BUILD_ENTRY(updateUpStream),
     BUILD_ENTRY(configureInterface),
     BUILD_ENTRY(dhcpRequest),
+    BUILD_ENTRY(stopDhcp),
     BUILD_ENTRY(enableInterface),
     BUILD_ENTRY(disableInterface),
     BUILD_ENTRY(resetConnections),
     BUILD_ENTRY(createNetwork),
     BUILD_ENTRY(destroyNetwork),
     BUILD_ENTRY(getNetId),
 
     #undef BUILD_ENTRY
@@ -1828,16 +1829,21 @@ CommandResult NetworkUtils::configureInt
     aOptions.mIpaddr,
     aOptions.mMask,
     aOptions.mGateway_long,
     aOptions.mDns1_long,
     aOptions.mDns2_long
   );
 }
 
+CommandResult NetworkUtils::stopDhcp(NetworkParams& aOptions)
+{
+  return mNetUtils->do_dhcp_stop(GET_CHAR(mIfname));
+}
+
 CommandResult NetworkUtils::dhcpRequest(NetworkParams& aOptions) {
     mozilla::dom::NetworkResultOptions result;
 
     NS_ConvertUTF16toUTF8 autoIfname(aOptions.mIfname);
     char ipaddr[PROPERTY_VALUE_MAX];
     char gateway[PROPERTY_VALUE_MAX];
     uint32_t prefixLength;
     char dns1[PROPERTY_VALUE_MAX];
--- a/dom/system/gonk/NetworkUtils.h
+++ b/dom/system/gonk/NetworkUtils.h
@@ -282,16 +282,17 @@ public:
   MessageCallback getMessageCallback() { return mMessageCallback; }
 
 private:
   /**
    * Commands supported by NetworkUtils.
    */
   CommandResult configureInterface(NetworkParams& aOptions);
   CommandResult dhcpRequest(NetworkParams& aOptions);
+  CommandResult stopDhcp(NetworkParams& aOptions);
   CommandResult enableInterface(NetworkParams& aOptions);
   CommandResult disableInterface(NetworkParams& aOptions);
   CommandResult resetConnections(NetworkParams& aOptions);
   CommandResult setDefaultRoute(NetworkParams& aOptions);
   CommandResult addHostRoute(NetworkParams& aOptions);
   CommandResult removeDefaultRoute(NetworkParams& aOptions);
   CommandResult removeHostRoute(NetworkParams& aOptions);
   CommandResult removeNetworkRoute(NetworkParams& aOptions);
--- a/dom/system/gonk/nsINetworkService.idl
+++ b/dom/system/gonk/nsINetworkService.idl
@@ -154,17 +154,17 @@ interface nsIDhcpRequestCallback : nsISu
    */
   void dhcpRequestResult(in boolean success, in jsval dhcpInfo);
 };
 
 
 /**
  * Provide network services.
  */
-[scriptable, uuid(8216224c-a4e0-43fa-9662-3f2446b500c6)]
+[scriptable, uuid(214c0810-fd41-11e4-b939-0800200c9a66)]
 interface nsINetworkService : nsISupports
 {
   const long MODIFY_ROUTE_ADD    = 0;
   const long MODIFY_ROUTE_REMOVE = 1;
 
   /**
    * Enable or disable Wifi Tethering
    *
@@ -413,16 +413,28 @@ interface nsINetworkService : nsISupport
    *
    * @param callback
    *        Callback to notify the result of the DHCP request.
    */
   void dhcpRequest(in DOMString interfaceName,
                    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.
    *
    * @param networkInterface
    *        The network interface name which we want to enable.
    *
    * @param callback
    *        Callback to notify the result of disabling network interface.
    */
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -370,20 +370,24 @@ Telephony::HandleCallInfo(nsITelephonyCa
     call->UpdateSwitchable(isSwitchable);
     call->UpdateMergeable(isMergeable);
 
     nsAutoString number;
     aInfo->GetNumber(number);
     nsRefPtr<TelephonyCallId> id = call->Id();
     id->UpdateNumber(number);
 
+    nsAutoString disconnectedReason;
+    aInfo->GetDisconnectedReason(disconnectedReason);
+
     // State changed.
     if (call->CallState() != callState) {
       if (callState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
-        call->ChangeStateInternal(callState, true);
+        call->UpdateDisconnectedReason(disconnectedReason);
+        call->ChangeState(nsITelephonyService::CALL_STATE_DISCONNECTED);
         return NS_OK;
       }
 
       // We don't fire the statechange event on a call in conference here.
       // Instead, the event will be fired later in
       // TelephonyCallGroup::ChangeState(). Thus the sequence of firing the
       // statechange events is guaranteed: first on TelephonyCallGroup then on
       // individual TelephonyCall objects.
@@ -683,36 +687,16 @@ Telephony::SupplementaryServiceNotificat
       return NS_ERROR_UNEXPECTED;
   }
 
   NS_ENSURE_SUCCESS(rv, rv);
   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
 Telephony::NotifyCdmaCallWaiting(uint32_t aServiceId, const nsAString& aNumber,
                                  uint16_t aNumberPresentation,
                                  const nsAString& aName,
                                  uint16_t aNamePresentation)
 {
   MOZ_ASSERT(mCalls.Length() == 1);
 
   nsRefPtr<TelephonyCall> callToNotify = mCalls[0];
--- a/dom/telephony/TelephonyCall.cpp
+++ b/dom/telephony/TelephonyCall.cpp
@@ -114,17 +114,16 @@ TelephonyCall::ChangeStateInternal(uint1
   if (aCallState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
     NS_ASSERTION(mLive, "Should be live!");
     mLive = false;
     if (mGroup) {
       mGroup->RemoveCall(this);
     } else {
       mTelephony->RemoveCall(this);
     }
-    UpdateDisconnectedReason(NS_LITERAL_STRING("NormalCallClearingError"));
   } else if (!mLive) {
     mLive = true;
     if (mGroup) {
       mGroup->AddCall(this);
     } else {
       mTelephony->AddCall(this);
     }
   }
@@ -191,26 +190,33 @@ TelephonyCall::NotifyError(const nsAStri
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to dispatch error event!");
   }
 }
 
 void
 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'");
 
-  if (mDisconnectedReason.IsNull()) {
-    // There is no 'Error' suffix in the corresponding enum. We should skip
-    // that part for comparison.
-    CONVERT_STRING_TO_NULLABLE_ENUM(
-        Substring(aDisconnectedReason, 0, aDisconnectedReason.Length() - 5),
-        TelephonyCallDisconnectedReason,
-        mDisconnectedReason);
+  if (!mDisconnectedReason.IsNull()) {
+    return;
+  }
+
+  // There is no 'Error' suffix in the corresponding enum. We should skip
+  // that part for comparison.
+  CONVERT_STRING_TO_NULLABLE_ENUM(
+      Substring(aDisconnectedReason, 0, aDisconnectedReason.Length() - 5),
+      TelephonyCallDisconnectedReason,
+      mDisconnectedReason);
+
+  if (!aDisconnectedReason.EqualsLiteral("NormalCallClearingError")) {
+    NotifyError(aDisconnectedReason);
   }
 }
 
 void
 TelephonyCall::ChangeGroup(TelephonyCallGroup* aGroup)
 {
   mGroup = aGroup;
 
--- a/dom/telephony/TelephonyCallInfo.cpp
+++ b/dom/telephony/TelephonyCallInfo.cpp
@@ -10,32 +10,38 @@ namespace mozilla {
 namespace dom {
 namespace telephony {
 
 NS_IMPL_ISUPPORTS(TelephonyCallInfo, nsITelephonyCallInfo)
 
 TelephonyCallInfo::TelephonyCallInfo(uint32_t aClientId,
                                      uint32_t aCallIndex,
                                      uint16_t aCallState,
+                                     const nsAString& aDisconnectedReason,
+
                                      const nsAString& aNumber,
                                      uint16_t aNumberPresentation,
                                      const nsAString& aName,
                                      uint16_t aNamePresentation,
+
                                      bool aIsOutgoing,
                                      bool aIsEmergency,
                                      bool aIsConference,
                                      bool aIsSwitchable,
                                      bool aIsMergeable)
   : mClientId(aClientId),
     mCallIndex(aCallIndex),
     mCallState(aCallState),
+    mDisconnectedReason(aDisconnectedReason),
+
     mNumber(aNumber),
     mNumberPresentation(aNumberPresentation),
     mName(aName),
     mNamePresentation(aNamePresentation),
+
     mIsOutgoing(aIsOutgoing),
     mIsEmergency(aIsEmergency),
     mIsConference(aIsConference),
     mIsSwitchable(aIsSwitchable),
     mIsMergeable(aIsMergeable)
 {
 }
 
@@ -56,16 +62,23 @@ TelephonyCallInfo::GetCallIndex(uint32_t
 NS_IMETHODIMP
 TelephonyCallInfo::GetCallState(uint16_t* aCallState)
 {
   *aCallState = mCallState;
   return NS_OK;
 }
 
 NS_IMETHODIMP
+TelephonyCallInfo::GetDisconnectedReason(nsAString& aDisconnectedReason)
+{
+  aDisconnectedReason = mDisconnectedReason;
+  return NS_OK;
+}
+
+NS_IMETHODIMP
 TelephonyCallInfo::GetNumber(nsAString& aNumber)
 {
   aNumber = mNumber;
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TelephonyCallInfo::GetNumberPresentation(uint16_t* aNumberPresentation)
--- a/dom/telephony/TelephonyCallInfo.h
+++ b/dom/telephony/TelephonyCallInfo.h
@@ -16,36 +16,48 @@ namespace dom {
 namespace telephony {
 
 class TelephonyCallInfo final : public nsITelephonyCallInfo
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSITELEPHONYCALLINFO
 
-  TelephonyCallInfo(uint32_t aClientId, uint32_t aCallIndex,
-                    uint16_t aCallState, const nsAString& aNumber,
-                    uint16_t aNumberPresentation, const nsAString& aName,
-                    uint16_t aNamePresentation, bool aIsOutgoing,
-                    bool aIsEmergency, bool aIsConference,
-                    bool aIsSwitchable, bool aIsMergeable);
+  TelephonyCallInfo(uint32_t aClientId,
+                    uint32_t aCallIndex,
+                    uint16_t aCallState,
+                    const nsAString& aDisconnectedReason,
+
+                    const nsAString& aNumber,
+                    uint16_t aNumberPresentation,
+                    const nsAString& aName,
+                    uint16_t aNamePresentation,
+
+                    bool aIsOutgoing,
+                    bool aIsEmergency,
+                    bool aIsConference,
+                    bool aIsSwitchable,
+                    bool aIsMergeable);
 
 private:
   // Don't try to use the default constructor.
   TelephonyCallInfo() {}
 
   ~TelephonyCallInfo() {}
 
   uint32_t mClientId;
   uint32_t mCallIndex;
   uint16_t mCallState;
+  nsString mDisconnectedReason;
+
   nsString mNumber;
   uint16_t mNumberPresentation;
   nsString mName;
   uint16_t mNamePresentation;
+
   bool mIsOutgoing;
   bool mIsEmergency;
   bool mIsConference;
   bool mIsSwitchable;
   bool mIsMergeable;
 };
 
 } // namespace telephony
--- a/dom/telephony/gonk/TelephonyService.js
+++ b/dom/telephony/gonk/TelephonyService.js
@@ -119,20 +119,23 @@ MobileCallForwardingOptions.prototype = 
   timeSeconds: -1,
   serviceClass: nsIMobileConnection.ICC_SERVICE_CLASS_NONE
 };
 
 function TelephonyCallInfo(aCall) {
   this.clientId = aCall.clientId;
   this.callIndex = aCall.callIndex;
   this.callState = aCall.state;
+  this.disconnectedReason = aCall.disconnectedReason || "";
+
   this.number = aCall.number;
   this.numberPresentation = aCall.numberPresentation;
   this.name = aCall.name;
   this.namePresentation = aCall.namePresentation;
+
   this.isOutgoing = aCall.isOutgoing;
   this.isEmergency = aCall.isEmergency;
   this.isConference = aCall.isConference;
   this.isSwitchable = aCall.isSwitchable;
   this.isMergeable = aCall.isMergeable;
 }
 TelephonyCallInfo.prototype = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyCallInfo]),
@@ -143,20 +146,23 @@ TelephonyCallInfo.prototype = {
     interfaces:       [Ci.nsITelephonyCallInfo]
   }),
 
   // nsITelephonyCallInfo
 
   clientId: 0,
   callIndex: 0,
   callState: nsITelephonyService.CALL_STATE_UNKNOWN,
+  disconnectedReason: "",
+
   number: "",
   numberPresentation: nsITelephonyService.CALL_PRESENTATION_ALLOWED,
   name: "",
   namePresentation: nsITelephonyService.CALL_PRESENTATION_ALLOWED,
+
   isOutgoing: true,
   isEmergency: false,
   isConference: false,
   isSwitchable: true,
   isMergeable: true
 };
 
 function Call(aClientId, aCallIndex) {
@@ -1433,20 +1439,16 @@ TelephonyService.prototype = {
     this._cdmaCallWaitingNumber = null;
   },
 
   /**
    * Disconnect calls by updating their states. Sometimes, it may cause other
    * calls being disconnected as well.
    *
    * @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,
                              aFailCause = RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
     if (DEBUG) debug("_disconnectCalls: " + JSON.stringify(aCalls));
 
     // Child cannot live without parent. Let's find all the calls that need to
     // be disconnected.
     let disconnectedCalls = aCalls.slice();
@@ -1460,32 +1462,26 @@ TelephonyService.prototype = {
 
     // Store unique value in the list.
     disconnectedCalls = [...Set(disconnectedCalls)];
 
     let callsForStateChanged = [];
 
     disconnectedCalls.forEach(call => {
       call.state = nsITelephonyService.CALL_STATE_DISCONNECTED;
-      call.failCause = aFailCause;
+      call.disconnectedReason = aFailCause;
 
       if (call.parentId) {
         let parentCall = this._currentCalls[aClientId][call.parentId];
         delete parentCall.childId;
       }
 
       this._notifyCallEnded(call);
 
-      if (call.hangUpLocal || !call.failCause ||
-          call.failCause === RIL.GECKO_CALL_ERROR_NORMAL_CALL_CLEARING) {
-        callsForStateChanged.push(call);
-      } else {
-        this._notifyAllListeners("notifyError",
-                                 [aClientId, call.callIndex, call.failCause]);
-      }
+      callsForStateChanged.push(call);
 
       delete this._currentCalls[aClientId][call.callIndex];
     });
 
     return callsForStateChanged;
   },
 
   /**
--- a/dom/telephony/ipc/PTelephony.ipdl
+++ b/dom/telephony/ipc/PTelephony.ipdl
@@ -120,18 +120,16 @@ union IPCTelephonyRequest
   SendTonesRequest;
 };
 
 sync protocol PTelephony {
   manager PContent;
   manages PTelephonyRequest;
 
 child:
-  NotifyCallError(uint32_t aClientId, int32_t aCallIndex, nsString aError);
-
   NotifyCallStateChanged(nsTelephonyCallInfo[] aAllInfo);
 
   NotifyCdmaCallWaiting(uint32_t aClientId, IPCCdmaWaitingCallData aData);
 
   NotifyConferenceCallStateChanged(uint16_t aCallState);
 
   NotifyConferenceError(nsString aName, nsString aMessage);
 
--- a/dom/telephony/ipc/TelephonyChild.cpp
+++ b/dom/telephony/ipc/TelephonyChild.cpp
@@ -43,27 +43,16 @@ TelephonyChild::AllocPTelephonyRequestCh
 bool
 TelephonyChild::DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor)
 {
   delete aActor;
   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
 TelephonyChild::RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo)
 {
   uint32_t length = aAllInfo.Length();
   nsTArray<nsCOMPtr<nsITelephonyCallInfo>> results;
   for (uint32_t i = 0; i < length; ++i) {
     // Use dont_AddRef here because this instance has already been AddRef-ed in
     // TelephonyIPCSerializer.h
     nsCOMPtr<nsITelephonyCallInfo> info = dont_AddRef(aAllInfo[i]);
--- a/dom/telephony/ipc/TelephonyChild.h
+++ b/dom/telephony/ipc/TelephonyChild.h
@@ -30,20 +30,16 @@ protected:
 
   virtual PTelephonyRequestChild*
   AllocPTelephonyRequestChild(const IPCTelephonyRequest& aRequest) override;
 
   virtual bool
   DeallocPTelephonyRequestChild(PTelephonyRequestChild* aActor) override;
 
   virtual bool
-  RecvNotifyCallError(const uint32_t& aClientId, const int32_t& aCallIndex,
-                      const nsString& aError) override;
-
-  virtual bool
   RecvNotifyCallStateChanged(nsTArray<nsITelephonyCallInfo*>&& aAllInfo) override;
 
   virtual bool
   RecvNotifyCdmaCallWaiting(const uint32_t& aClientId,
                             const IPCCdmaWaitingCallData& aData) override;
 
   virtual bool
   RecvNotifyConferenceCallStateChanged(const uint16_t& aCallState) override;
--- a/dom/telephony/ipc/TelephonyIPCSerializer.h
+++ b/dom/telephony/ipc/TelephonyIPCSerializer.h
@@ -32,46 +32,55 @@ struct ParamTraits<nsITelephonyCallInfo*
     // If it is a null object, then we are done.
     if (isNull) {
       return;
     }
 
     uint32_t clientId;
     uint32_t callIndex;
     uint16_t callState;
+    nsString disconnectedReason;
+
     nsString number;
     uint16_t numberPresentation;
     nsString name;
     uint16_t namePresentation;
+
     bool isOutgoing;
     bool isEmergency;
     bool isConference;
     bool isSwitchable;
     bool isMergeable;
 
     aParam->GetClientId(&clientId);
     aParam->GetCallIndex(&callIndex);
     aParam->GetCallState(&callState);
+    aParam->GetDisconnectedReason(disconnectedReason);
+
     aParam->GetNumber(number);
     aParam->GetNumberPresentation(&numberPresentation);
     aParam->GetName(name);
     aParam->GetNamePresentation(&namePresentation);
+
     aParam->GetIsOutgoing(&isOutgoing);
     aParam->GetIsEmergency(&isEmergency);
     aParam->GetIsConference(&isConference);
     aParam->GetIsSwitchable(&isSwitchable);
     aParam->GetIsMergeable(&isMergeable);
 
     WriteParam(aMsg, clientId);
     WriteParam(aMsg, callIndex);
     WriteParam(aMsg, callState);
+    WriteParam(aMsg, disconnectedReason);
+
     WriteParam(aMsg, number);
     WriteParam(aMsg, numberPresentation);
     WriteParam(aMsg, name);
     WriteParam(aMsg, namePresentation);
+
     WriteParam(aMsg, isOutgoing);
     WriteParam(aMsg, isEmergency);
     WriteParam(aMsg, isConference);
     WriteParam(aMsg, isSwitchable);
     WriteParam(aMsg, isMergeable);
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
@@ -85,47 +94,64 @@ struct ParamTraits<nsITelephonyCallInfo*
     if (isNull) {
       *aResult = nullptr;
       return true;
     }
 
     uint32_t clientId;
     uint32_t callIndex;
     uint16_t callState;
+    nsString disconnectedReason;
+
     nsString number;
     uint16_t numberPresentation;
     nsString name;
     uint16_t namePresentation;
+
     bool isOutgoing;
     bool isEmergency;
     bool isConference;
     bool isSwitchable;
     bool isMergeable;
 
     // It's not important to us where it fails, but rather if it fails
     if (!(ReadParam(aMsg, aIter, &clientId) &&
           ReadParam(aMsg, aIter, &callIndex) &&
           ReadParam(aMsg, aIter, &callState) &&
+          ReadParam(aMsg, aIter, &disconnectedReason) &&
+
           ReadParam(aMsg, aIter, &number) &&
           ReadParam(aMsg, aIter, &numberPresentation) &&
           ReadParam(aMsg, aIter, &name) &&
           ReadParam(aMsg, aIter, &namePresentation) &&
+
           ReadParam(aMsg, aIter, &isOutgoing) &&
           ReadParam(aMsg, aIter, &isEmergency) &&
           ReadParam(aMsg, aIter, &isConference) &&
           ReadParam(aMsg, aIter, &isSwitchable) &&
           ReadParam(aMsg, aIter, &isMergeable))) {
       return false;
     }
 
     nsCOMPtr<nsITelephonyCallInfo> info =
-        new TelephonyCallInfo(clientId, callIndex, callState, number,
-                              numberPresentation, name, namePresentation,
-                              isOutgoing, isEmergency, isConference,
-                              isSwitchable, isMergeable);
+        new TelephonyCallInfo(clientId,
+                              callIndex,
+                              callState,
+                              disconnectedReason,
+
+                              number,
+                              numberPresentation,
+                              name,
+                              namePresentation,
+
+                              isOutgoing,
+                              isEmergency,
+                              isConference,
+                              isSwitchable,
+                              isMergeable);
 
     info.forget(aResult);
 
     return true;
   }
 };
 
 
--- a/dom/telephony/ipc/TelephonyIPCService.cpp
+++ b/dom/telephony/ipc/TelephonyIPCService.cpp
@@ -417,26 +417,16 @@ TelephonyIPCService::NotifyConferenceErr
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->NotifyConferenceError(aName, aMessage);
   }
   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
 TelephonyIPCService::SupplementaryServiceNotification(uint32_t aClientId,
                                                        int32_t aCallIndex,
                                                        uint16_t aNotification)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->SupplementaryServiceNotification(aClientId, aCallIndex,
                                                     aNotification);
   }
--- a/dom/telephony/ipc/TelephonyParent.cpp
+++ b/dom/telephony/ipc/TelephonyParent.cpp
@@ -327,27 +327,16 @@ TelephonyParent::NotifyConferenceError(c
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
   return SendNotifyConferenceError(nsString(aName), nsString(aMessage)) ? NS_OK
                                                                         : 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
 TelephonyParent::SupplementaryServiceNotification(uint32_t aClientId,
                                                   int32_t aCallIndex,
                                                   uint16_t aNotification)
 {
   NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
 
   return SendNotifySupplementaryService(aClientId, aCallIndex, aNotification)
       ? NS_OK : NS_ERROR_FAILURE;
@@ -427,24 +416,16 @@ TelephonyRequestParent::NotifyCdmaCallWa
 NS_IMETHODIMP
 TelephonyRequestParent::NotifyConferenceError(const nsAString& aName,
                                               const nsAString& aMessage)
 {
   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
 TelephonyRequestParent::SupplementaryServiceNotification(uint32_t aClientId,
                                                          int32_t aCallIndex,
                                                          uint16_t aNotification)
 {
   MOZ_CRASH("Not a TelephonyParent!");
 }
 
 // nsITelephonyDialCallback
--- a/dom/telephony/nsITelephonyCallInfo.idl
+++ b/dom/telephony/nsITelephonyCallInfo.idl
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
-[scriptable, uuid(3ea2d155-8ea2-42be-85d7-bd8ede8afc40)]
+[scriptable, uuid(e5e1be26-a3d4-49b3-8d9f-c1df5192b364)]
 interface nsITelephonyCallInfo : nsISupports
 {
   /**
    * Indicate the RIL client, 0 ~ (number of client - 1).
    */
   readonly attribute unsigned long clientId;
 
   /**
@@ -18,16 +18,24 @@ interface nsITelephonyCallInfo : nsISupp
   readonly attribute unsigned long callIndex;
 
   /**
    * One of the nsITelephonyService::CALL_STATE_* values.
    */
   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.
    */
   readonly attribute DOMString number;
 
   /**
    * Presentation of the call number.
    * One of the nsITelephonyService::CALL_PRESENTATION_* values.
    */
--- a/dom/telephony/nsITelephonyService.idl
+++ b/dom/telephony/nsITelephonyService.idl
@@ -2,17 +2,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIMobileCallForwardingOptions;
 interface nsITelephonyCallInfo;
 
-[scriptable, uuid(37fb45bb-ae10-4cfd-b24e-d656a9787a0a)]
+[scriptable, uuid(80faf34e-286b-4487-bd55-135bd92668b9)]
 interface nsITelephonyListener : nsISupports
 {
   /**
    * Called when enumeration asked by nsITelephonyService::enumerateCalls
    * is completed.
    */
   void enumerateCallStateComplete();
 
@@ -50,30 +50,16 @@ interface nsITelephonyListener : nsISupp
    * @param notification
    *        One of the nsITelephonyService::NOTIFICATION_* values.
    */
   void supplementaryServiceNotification(in unsigned long clientId,
                                         in long callIndex,
                                         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.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param number
    *        Number of the other party.
    * @param numberPresentation
    *        Presentation of the call number.
--- a/testing/docker/phone-builder/Dockerfile
+++ b/testing/docker/phone-builder/Dockerfile
@@ -1,14 +1,17 @@
-FROM          quay.io/mozilla/builder:0.5.4
+FROM          quay.io/mozilla/builder:0.5.5
 MAINTAINER    Wander Lairson Costa <wcosta@mozilla.com>
 
+ENV           SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE /home/worker/socorro.token
+
 # Add utilities and configuration
 ADD           bin                   /home/worker/bin
 ADD           config                /home/worker/.aws/config
+ADD           socorro.token         /home/worker/socorro.token
 
 RUN           yum install -y bc lzop
 RUN           pip install awscli
 RUN           npm install -g bower gulp apm grunt-cli
 
 # Set a default command useful for debugging
 ENTRYPOINT ["validate_task.py"]
 
--- a/testing/docker/phone-builder/VERSION
+++ b/testing/docker/phone-builder/VERSION
@@ -1,1 +1,1 @@
-0.0.13
+0.0.14
--- a/testing/docker/phone-builder/build.sh
+++ b/testing/docker/phone-builder/build.sh
@@ -1,30 +1,37 @@
 #! /bin/bash -e
 
-while getopts "t:i:k:" arg; do
+while getopts "t:i:k:s:" arg; do
   case $arg in
     t)
       TAG=$OPTARG
       ;;
     i)
       KEY_ID=$OPTARG
       ;;
     k)
       SECRET_KEY=$OPTARG
       ;;
+    s)
+      SOCORRO_TOKEN=$OPTARG
+      ;;
   esac
 done
 
 pushd $(dirname $0)
 
 test $TAG
 test $KEY_ID
 test $SECRET_KEY
+test $SOCORRO_TOKEN
 
 (echo '[default]'
 echo "aws_access_key_id = $KEY_ID"
 echo "aws_secret_access_key = $SECRET_KEY") > config
 
+echo $SOCORRO_TOKEN > socorro.token
+
 docker build -t $TAG .
 rm -f config
+rm -f socorro.token
 
 popd
--- a/testing/taskcluster/mach_commands.py
+++ b/testing/taskcluster/mach_commands.py
@@ -381,8 +381,81 @@ class Graph(object):
         graph['scopes'] = list(set(graph['scopes']))
 
         # When we are extending the graph remove extra fields...
         if params['ci'] is True:
             graph.pop('scopes', None)
             graph.pop('metadata', None)
 
         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))
--- a/testing/taskcluster/scripts/phone-builder/build-lightsaber-nightly.sh
+++ b/testing/taskcluster/scripts/phone-builder/build-lightsaber-nightly.sh
@@ -45,14 +45,14 @@ fi
 rm -rf $WORKSPACE/B2G/backup-*
 rm -f balrog_credentials
 
 mkdir -p $HOME/artifacts
 mkdir -p $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/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/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
 mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip
 ccache -s
 
--- a/testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
+++ b/testing/taskcluster/scripts/phone-builder/build-phone-nightly.sh
@@ -43,14 +43,14 @@ fi
 rm -rf $WORKSPACE/B2G/backup-*
 rm -f balrog_credentials
 
 mkdir -p $HOME/artifacts
 mkdir -p $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/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/${TARGET}.zip $HOME/artifacts/${TARGET}.zip
 mv $WORKSPACE/B2G/upload/gaia.zip $HOME/artifacts/gaia.zip
 ccache -s
 
--- a/widget/gonk/libdisplay/GonkDisplayJB.cpp
+++ b/widget/gonk/libdisplay/GonkDisplayJB.cpp
@@ -101,39 +101,18 @@ GonkDisplayJB::GonkDisplayJB()
     err = hw_get_module(POWER_HARDWARE_MODULE_ID,
                                            (hw_module_t const**)&mPowerModule);
     if (!err)
         mPowerModule->init(mPowerModule);
     ALOGW_IF(err, "Couldn't load %s module (%s)", POWER_HARDWARE_MODULE_ID, strerror(-err));
 
     mAlloc = new GraphicBufferAlloc();
 
-#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
+    CreateSurface(mSTClient, mDispSurface);
 
-    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));
 
     uint32_t usage = GRALLOC_USAGE_HW_FB | GRALLOC_USAGE_HW_RENDER | GRALLOC_USAGE_HW_COMPOSER;
     if (mFBDevice) {
         // If device uses fb, they can not use single buffer for boot animation
         mSTClient->perform(mSTClient.get(), NATIVE_WINDOW_SET_BUFFER_COUNT, 2);
         mSTClient->perform(mSTClient.get(), NATIVE_WINDOW_SET_USAGE, usage);
     } else if (mHwc) {
@@ -143,32 +122,60 @@ GonkDisplayJB::GonkDisplayJB()
         } else {
             mHwc->blank(mHwc, HWC_DISPLAY_PRIMARY, 0);
         }
 #else
         mHwc->blank(mHwc, HWC_DISPLAY_PRIMARY, 0);
 #endif
         // 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.
-        mBootAnimBuffer = mAlloc->createGraphicBuffer(mWidth, mHeight, surfaceformat, usage, &err);
+        CreateSurface(mBootAnimSTClient, mBootAnimDispSurface);
     }
 
     ALOGI("Starting bootanimation with (%d) format framebuffer", surfaceformat);
     StartBootAnimation();
 }
 
 GonkDisplayJB::~GonkDisplayJB()
 {
     if (mHwc)
         hwc_close_1(mHwc);
     if (mFBDevice)
         framebuffer_close(mFBDevice);
     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*
 GonkDisplayJB::GetNativeWindow()
 {
     StopBootAnim();
 
     return mSTClient.get();
 }
 
@@ -306,41 +313,48 @@ GonkDisplayJB::Post(buffer_handle_t buf,
     if (mList->retireFenceFd >= 0)
         close(mList->retireFenceFd);
     return !err;
 }
 
 ANativeWindowBuffer*
 GonkDisplayJB::DequeueBuffer()
 {
-    if (mBootAnimBuffer.get()) {
-        return static_cast<ANativeWindowBuffer*>(mBootAnimBuffer.get());
-    }
+    // Check for bootAnim or normal display flow.
+    sp<ANativeWindow> nativeWindow =
+        !mBootAnimSTClient.get() ? mSTClient : mBootAnimSTClient;
+
     ANativeWindowBuffer *buf;
     int fenceFd = -1;
-    mSTClient->dequeueBuffer(mSTClient.get(), &buf, &fenceFd);
+    nativeWindow->dequeueBuffer(nativeWindow.get(), &buf, &fenceFd);
     sp<Fence> fence(new Fence(fenceFd));
 #if ANDROID_VERSION == 17
     fence->waitForever(1000, "GonkDisplayJB_DequeueBuffer");
     // 1000 is what Android uses. It is a warning timeout in ms.
     // This timeout was removed in ANDROID_VERSION 18.
 #else
     fence->waitForever("GonkDisplayJB_DequeueBuffer");
 #endif
     return buf;
 }
 
 bool
 GonkDisplayJB::QueueBuffer(ANativeWindowBuffer* buf)
 {
     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);
+        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;
 }
 
 void
 GonkDisplayJB::UpdateDispSurface(EGLDisplay dpy, EGLSurface sur)
 {
     StopBootAnim();
 
@@ -358,18 +372,19 @@ GonkDisplayJB::GetPrevDispAcquireFd()
 {
     return mDispSurface->GetPrevDispAcquireFd();
 }
 
 void
 GonkDisplayJB::StopBootAnim()
 {
     StopBootAnimation();
-    if (mBootAnimBuffer.get()) {
-        mBootAnimBuffer = nullptr;
+    if (mBootAnimSTClient.get()) {
+        mBootAnimSTClient = nullptr;
+        mBootAnimDispSurface = nullptr;
     }
 }
 
 __attribute__ ((visibility ("default")))
 GonkDisplay*
 GetGonkDisplay()
 {
     if (!sGonkDisplay)
--- a/widget/gonk/libdisplay/GonkDisplayJB.h
+++ b/widget/gonk/libdisplay/GonkDisplayJB.h
@@ -51,26 +51,29 @@ public:
     virtual void SetDispReleaseFd(int fd);
 
     virtual int GetPrevDispAcquireFd();
 
     bool Post(buffer_handle_t buf, int fence);
 
 private:
     void StopBootAnim();
+    void CreateSurface(android::sp<ANativeWindow>& aNativeWindow,
+                       android::sp<android::DisplaySurface>& aDisplaySurface);
 
     hw_module_t const*        mModule;
     hw_module_t const*        mFBModule;
     hwc_composer_device_1_t*  mHwc;
     framebuffer_device_t*     mFBDevice;
     power_module_t*           mPowerModule;
     android::sp<android::DisplaySurface> mDispSurface;
     android::sp<ANativeWindow> mSTClient;
+    android::sp<android::DisplaySurface> mBootAnimDispSurface;
+    android::sp<ANativeWindow> mBootAnimSTClient;
     android::sp<android::IGraphicBufferAlloc> mAlloc;
-    android::sp<android::GraphicBuffer> mBootAnimBuffer;
     hwc_display_contents_1_t* mList;
     uint32_t mWidth;
     uint32_t mHeight;
     OnEnabledCallbackType mEnabledCallback;
 };
 
 }