зеркало из https://github.com/mozilla/gecko-dev.git
Merge b2ginbound to m-c a=merge
This commit is contained in:
Коммит
5b9076b1f0
|
@ -0,0 +1,157 @@
|
|||
<?xml version="1.0" ?><manifest>
|
||||
<!--original fetch url was https://android.googlesource.com/-->
|
||||
<remote fetch="https://git.mozilla.org/external/aosp" name="aosp"/>
|
||||
<!--original fetch url was git://github.com/mozilla-b2g/-->
|
||||
<remote fetch="https://git.mozilla.org/b2g" name="b2g"/>
|
||||
<!--original fetch url was git://github.com/mozilla/-->
|
||||
<remote fetch="https://git.mozilla.org/b2g" name="mozilla"/>
|
||||
<!--original fetch url was git://github.com/apitrace/-->
|
||||
<remote fetch="https://git.mozilla.org/external/apitrace" name="apitrace"/>
|
||||
<!--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="a8ace1361d702eef293e48f2ea525dac686daa86">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<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="0627790166dccd8dd370fa7d9f434ed9fc027fb4"/>
|
||||
<!-- 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"/>
|
||||
<project name="device/sample" path="device/sample" revision="9c19bbbe0793ebdc427277dc37f9bb4ae20bccb2"/>
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="18f1b5e28734183ff8073fe86dc46bc4ebba8a59"/>
|
||||
<project name="platform/bionic" path="bionic" revision="e36fba720d5327bf5532dfcde013239080f38b56"/>
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="dc8da21282a0c68328d05268433d19b0f2f6a15c"/>
|
||||
<project name="platform/external/aac" path="external/aac" revision="fa3eba16446cc8f2f5e2dfc20d86a49dbd37299e"/>
|
||||
<project name="platform/external/bison" path="external/bison" revision="c2418b886165add7f5a31fc5609f0ce2d004a90e"/>
|
||||
<project name="platform/external/bsdiff" path="external/bsdiff" revision="23e322ab19fb7d74c2c37e40ce364d9f709bdcee"/>
|
||||
<project name="platform/external/bzip2" path="external/bzip2" revision="1cb636bd8e9e5cdfd5d5b2909a122f6e80db62de"/>
|
||||
<project name="platform/external/checkpolicy" path="external/checkpolicy" revision="0d73ef7049feee794f14cf1af88d05dae8139914"/>
|
||||
<project name="platform/external/dhcpcd" path="external/dhcpcd" revision="84b7252b0a9d0edc9a1db1e0c518771d26b23058"/>
|
||||
<project name="platform/external/dnsmasq" path="external/dnsmasq" revision="a0f273e289166fa488bba261b2d431c9503aed0d"/>
|
||||
<project name="platform/external/dropbear" path="external/dropbear" revision="a34ddbe3819bc465968f3676c734b405e655f8b7"/>
|
||||
<project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="164ce36fe92b78b92575e56abd101209631b48fc"/>
|
||||
<project name="platform/external/elfutils" path="external/elfutils" revision="b23b2dfb354b3ccf5d1c5d39815f02e7048cf516"/>
|
||||
<project name="platform/external/expat" path="external/expat" revision="0af0cb3bc7519e567bd9daff3dcd315ab0134a99"/>
|
||||
<project name="platform/external/fdlibm" path="external/fdlibm" revision="0da5f683c9ddc9442af3b389b4220e91ccffb320"/>
|
||||
<project name="platform/external/flac" path="external/flac" revision="b38b3d2c53c22f542fd764f9d60ef19b49d42e1b"/>
|
||||
<project name="platform/external/freetype" path="external/freetype" revision="899c67b6cfcd2010784fbf08c5415af16c526e0c"/>
|
||||
<project name="platform/external/gcc-demangle" path="external/gcc-demangle" revision="9241386b62c353302c2f9eccda0672685b252b4d"/>
|
||||
<project name="platform/external/genext2fs" path="external/genext2fs" revision="e11a9c7fe6f1cef99aad2f25afaea37b72fe9f93"/>
|
||||
<project name="platform/external/giflib" path="external/giflib" revision="9aef3ea079a57c98a9207f8c3b95a5dc08ee74b5"/>
|
||||
<project name="platform/external/gtest" path="external/gtest" revision="0f1ce3dd0b880b6ae0cf7f5413702b8ef542efb2"/>
|
||||
<project name="platform/external/harfbuzz" path="external/harfbuzz" revision="858f2d28ac741ef139f74bdbdbcefa7560f17c91"/>
|
||||
<project name="platform/external/harfbuzz_ng" path="external/harfbuzz_ng" revision="3309edccdbc2a92eb03a285abb27c1c1c4a88e43"/>
|
||||
<project name="platform/external/iproute2" path="external/iproute2" revision="1778c5571f3b9ed213a03ecc80adf74f570b4916"/>
|
||||
<project name="platform/external/ipsec-tools" path="external/ipsec-tools" revision="f4cb1ee4b00abbfb6f968dc25818c23b4b47e584"/>
|
||||
<project name="platform/external/iptables" path="external/iptables" revision="ceedcd308d47976e31eda76a8852edd7f92837de"/>
|
||||
<project name="platform/external/jack" path="external/jack" revision="5ceb2025ac5d25ed48183ac2d3dac4691fe761fb"/>
|
||||
<project name="platform/external/jhead" path="external/jhead" revision="31b17e69a87e4caa50f9c6b1a47c84ef75f79d83"/>
|
||||
<project name="platform/external/jpeg" path="external/jpeg" revision="1808bfd1060d2fde90478691a4da8ead0cb0a345"/>
|
||||
<project name="platform/external/junit" path="external/junit" revision="01da89f7f8a8f9852e0ec1a490e7d2a0ee3785d5"/>
|
||||
<project name="platform/external/libgsm" path="external/libgsm" revision="50761abed8f4734970874165b386cfd4d9599db4"/>
|
||||
<project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/>
|
||||
<project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="9e987ccb716624d658f98abc7db2097e11e3d8ed"/>
|
||||
<project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/>
|
||||
<project name="platform/external/libogg" path="external/libogg" revision="ec0b24fb1468abe37be4164a6feb16568e036bde"/>
|
||||
<project name="platform/external/libpcap" path="external/libpcap" revision="3a7bce5dda6a8db92c9248846d0255e68c3a5b2a"/>
|
||||
<project name="platform/external/libpng" path="external/libpng" revision="cdf9c7fe4febaa4a7b3917d56d4180960e48800f"/>
|
||||
<project name="platform/external/libselinux" path="external/libselinux" revision="1e2cf2c4a2d15a9b1ca2d353b99fb6884413ffe1"/>
|
||||
<project name="platform/external/libsepol" path="external/libsepol" revision="edc447a138ec77236f1cbfd36c1211a38ba21418"/>
|
||||
<project name="platform/external/libvpx" path="external/libvpx" revision="ca9281af0bfe816f1ae2fc3e8771524164a0a03c"/>
|
||||
<project name="platform/external/mdnsresponder" path="external/mdnsresponder" revision="c46f53f5e072f23051c4eedef730386f7634dc11"/>
|
||||
<project name="platform/external/mksh" path="external/mksh" revision="f8c396c4d446a038358106a301b329607a04633d"/>
|
||||
<project name="platform/external/netcat" path="external/netcat" revision="444644cfa9a2f3002863caa168fb2d6b34dfd1e8"/>
|
||||
<project name="platform/external/openssl" path="external/openssl" revision="bb8428f762b3632f493572c4f73957e1281ade79"/>
|
||||
<project name="platform/external/protobuf" path="external/protobuf" revision="48ee66d295979372ed0234cefda42385daae8312"/>
|
||||
<project name="platform/external/safe-iop" path="external/safe-iop" revision="aa0725fb1da35e47676b6da30009322eb5ed59be"/>
|
||||
<project name="platform/external/scrypt" path="external/scrypt" revision="eb05b73c3bba21fff55529813109de4bad5ddbd1"/>
|
||||
<project name="platform/external/sepolicy" path="external/sepolicy" revision="6f50b84072d4920ce331226837ba794be72ea2b1"/>
|
||||
<project name="platform/external/sfntly" path="external/sfntly" revision="30d4e1f3d81ad9f7a1aa14ce6d2ceb5df56c15cd"/>
|
||||
<project name="platform/external/skia" path="external/skia" revision="84a7058ba19c80ababd8c7c9eb379bf0babcc9ce"/>
|
||||
<project name="platform/external/sonivox" path="external/sonivox" revision="9fb2c53165b1512aa57db0bf1c757e3215e28eb8"/>
|
||||
<project name="platform/external/speex" path="external/speex" revision="fb7db5853ffb841a4d32fea8b5c3a43e6b875cae"/>
|
||||
<project name="platform/external/sqlite" path="external/sqlite" revision="ac0e0d5f866fbce0ebf00d0ddd615464849aa83b"/>
|
||||
<project name="platform/external/stlport" path="external/stlport" revision="628e14d37c5b239839a466e81c74bf66255b770b"/>
|
||||
<project name="platform/external/strace" path="external/strace" revision="1a4e05d53dec658a061acb9869cb1eb1342cd09d"/>
|
||||
<project name="platform/external/svox" path="external/svox" revision="b3c3bf3c1be35f3d455671de9f6d7b9bca3ce73a"/>
|
||||
<project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/>
|
||||
<project name="platform/external/tcpdump" path="external/tcpdump" revision="841663c88f0692202d57def239267e28cf832cdc"/>
|
||||
<project name="platform/external/tinyalsa" path="external/tinyalsa" revision="c1b682efcd3b3eac3101408231b58ea92c668756"/>
|
||||
<project name="platform/external/tinycompress" path="external/tinycompress" revision="a85e245a09c028d36cbf04f233be10bc583691f5"/>
|
||||
<project name="platform/external/tinyxml" path="external/tinyxml" revision="494e448824844d866e805831d1d5f5acb654065c"/>
|
||||
<project name="platform/external/tinyxml2" path="external/tinyxml2" revision="ead7a211773b9366466c6512cf945bc9dd1490a5"/>
|
||||
<project name="platform/external/tremolo" path="external/tremolo" revision="78772d5dde5a06eefae281b0dde224fcac46c4ff"/>
|
||||
<project name="platform/external/webp" path="external/webp" revision="513e97bd307573e2adc776eb5368bd129aceaa4a"/>
|
||||
<project name="platform/external/webrtc" path="external/webrtc" revision="446452f84e9cc4c75d8e80f6f05e24793397a19d"/>
|
||||
<project name="platform/external/yaffs2" path="external/yaffs2" revision="a2cff2275e1b501ff478b03757d6e4f05fddc2db"/>
|
||||
<project name="platform/external/zlib" path="external/zlib" revision="6eb3570ff8fa71bd83bb375b4bf09804c6089fed"/>
|
||||
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="dbbe673145107e99883f62bafd70c5f43f11065c"/>
|
||||
<project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="f0c3b4edf597c40aae4ea311575f39c8bcf203df"/>
|
||||
<project name="platform/libcore" path="libcore" revision="baf7d8068dd501cfa338d3a8b1b87216d6ce0571"/>
|
||||
<project name="platform/libnativehelper" path="libnativehelper" revision="50c4430e32849530ced32680fd6ee98963b3f7ac"/>
|
||||
<project name="platform/ndk" path="ndk" revision="e58ef003be4306bb53a8c11331146f39e4eab31f"/>
|
||||
<project name="platform_prebuilts_misc" path="prebuilts/misc" remote="b2g" revision="23404f05422c6bf3c39573325a4f4909167671b4"/>
|
||||
<project name="platform/prebuilts/ndk" path="prebuilts/ndk" revision="c792f0bd9fff7aea2887c60bbb3a9bbdb534ffa3"/>
|
||||
<project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="6a1bb59af65b6485b1090522f66fac95c3f9e22c"/>
|
||||
<project name="platform/prebuilts/sdk" path="prebuilts/sdk" revision="69d524e80cdf3981006627c65ac85f3a871238a3"/>
|
||||
<project name="platform/prebuilts/tools" path="prebuilts/tools" revision="5a48c04c4bb5f079bc757e29864a42427378e051"/>
|
||||
<project name="platform_system_bluetoothd" path="system/bluetoothd" remote="b2g" revision="48d2332e6d8400cdc0de273ceff2abe8aaababf8"/>
|
||||
<project name="platform/system/extras" path="system/extras" revision="576f57b6510de59c08568b53c0fb60588be8689e"/>
|
||||
<project name="platform_system_libfdio" path="system/libfdio" remote="b2g" revision="3c5405863d2002f665ef2b901abb3853c420129b"/>
|
||||
<project name="platform/system/netd" path="system/netd" revision="a6531f7befb49b1c81bc0de7e51c5482b308e1c5"/>
|
||||
<project name="platform/system/security" path="system/security" revision="ee8068b9e7bfb2770635062fc9c2035be2142bd8"/>
|
||||
<project name="platform/system/vold" path="system/vold" revision="42fa2a0f14f965970a4b629a176bbd2666edf017"/>
|
||||
<project name="platform/external/curl" path="external/curl" revision="e68addd988448959ea8157c5de637346b4180c33"/>
|
||||
<project name="platform/external/icu4c" path="external/icu4c" revision="d3ec7428eb276db43b7ed0544e09344a6014806c"/>
|
||||
<project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="76c4bf4bc430a1b8317f2f21ef735867733e50cc"/>
|
||||
<project name="platform/system/media" path="system/media" revision="c1332c21c608f4932a6d7e83450411cde53315ef"/>
|
||||
<default remote="caf" revision="LNX.LA.3.5.2.1.1" sync-j="4"/>
|
||||
<!-- Platform common things -->
|
||||
<project name="device-shinano-common" path="device/sony/shinano-common" remote="b2g" revision="f4e8f3b19fedc7e08c455de93fe4cef90744c169"/>
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="1bb28abbc215f45220620af5cd60a8ac1be93722"/>
|
||||
<project name="device/qcom/common" path="device/qcom/common" revision="2501e5940ba69ece7654ff85611c76ae5bda299c"/>
|
||||
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="5ada05ac150f643ef19e87015df7e106b88effe7"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="d61fc97258c8b0c362430dd2eb195dcc4d266f14"/>
|
||||
<project name="init_sh" path="external/init_sh" remote="b2g" revision="3bdd26e092db9c47c5beb04b4809a35f8f767b8a"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="0a01977f34d6e86fe23d6c0ec75e96ba988bbebb"/>
|
||||
<project name="platform_external_libnfc-pn547" path="external/libnfc-pn547" remote="b2g" revision="5bb999b84b8adc14f6bea004d523ba258dea8188"/>
|
||||
<project name="timekeep" path="external/timekeep" remote="b2g" revision="58e9fd70a62d2c0ebf9bc2bd99439dcc5be8cad8"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="5b71e40213f650459e95d35b6f14af7e88d8ab62"/>
|
||||
<project name="platform_frameworks_av" path="frameworks/av" remote="b2g" revision="a920312eb6299b6cc11f7136254c4b0ba7a663be"/>
|
||||
<project name="platform/frameworks/base" path="frameworks/base" revision="da8e6bc53c8bc669da0bb627904d08aa293f2497"/>
|
||||
<project name="platform/frameworks/native" path="frameworks/native" revision="a46a9f1ac0ed5662d614c277cbb14eb3f332f365"/>
|
||||
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="7196881a0e9dd7bfbbcf0af64c8064e70f0fa094"/>
|
||||
<project name="platform/hardware/broadcom/wlan" path="hardware/broadcom/wlan" revision="15a9b66de9b7d84c7ea63df3a834f095bca9e493"/>
|
||||
<project name="platform/hardware/qcom/audio" path="hardware/qcom/audio" revision="8d7676dfb68ee0cd069affedd5d1e97316a184ba"/>
|
||||
<project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="2a1ded216a91bf62a72b1640cf01ab4998f37028"/>
|
||||
<project name="platform/hardware/qcom/display" path="hardware/qcom/display" revision="a74adcf8d88320d936daa8d20ce88ca0107fb916"/>
|
||||
<project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="9883ea57b0668d8f60dba025d4522dfa69a1fbfa"/>
|
||||
<project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="a558dc844bf5144fc38603fd8f4df8d9557052a5"/>
|
||||
<project name="platform/hardware/qcom/wlan" path="hardware/qcom/wlan" revision="57ee1320ed7b4a1a1274d8f3f6c177cd6b9becb2"/>
|
||||
<project name="platform/hardware/ril" path="hardware/ril" revision="12b1977cc704b35f2e9db2bb423fa405348bc2f3"/>
|
||||
<project name="platform/system/bluetooth" path="system/bluetooth" revision="985bf15264d865fe7b9c5b45f61c451cbaafa43d"/>
|
||||
<project name="platform/system/core" path="system/core" revision="42839aedcf70bf6bc92a3b7ea4a5cc9bf9aef3f9"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="d82e00fb6380b4f6cea7a96213913ee9eb441239"/>
|
||||
<project name="platform/system/qcom" path="system/qcom" revision="63e3f6f176caad587d42bba4c16b66d953fb23c2"/>
|
||||
<project name="platform/vendor/qcom/copper" path="device/qcom/msm8974" revision="ec7bc1a26610922156d7d412b4d3de6b4adb93da"/>
|
||||
<project name="vendor_broadcom_wlan" path="vendor/broadcom/wlan" remote="b2g" revision="114b9491a8a919687da4e22fbd89fab511d6d8d7"/>
|
||||
<!-- Shinano specific things -->
|
||||
<project name="device-shinano" path="device/sony/shinano" remote="b2g" revision="65bdce6f5851d4fb760aa84eec0db2adca49fabf"/>
|
||||
<!-- Aries specific things -->
|
||||
<project name="device-aries" path="device/sony/aries" remote="b2g" revision="3af1ede0d0956cfbf9c549df7cd9a6807a9efdf2"/>
|
||||
</manifest>
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="a8ace1361d702eef293e48f2ea525dac686daa86">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="dbbe673145107e99883f62bafd70c5f43f11065c"/>
|
||||
<project name="platform/frameworks/wilhelm" path="frameworks/wilhelm" revision="aac6c4bb59a6577c97cbda68699829b507b7490d"/>
|
||||
<project name="platform/hardware/libhardware" path="hardware/libhardware" revision="fbeca55f4695dd07c0291213403533b8fbca4885"/>
|
||||
<project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="92605aa35361ae4ae1e473781e40c1f6929f4ec4"/>
|
||||
<project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="68b0c269fd1889f47ecfb9119c05281e9b6db0af"/>
|
||||
<project name="platform/libcore" path="libcore" revision="e195beab082c09217318fc19250caeaf4c1bd800"/>
|
||||
<project name="platform/libnativehelper" path="libnativehelper" revision="feeb36c2bd4adfe285f98f5de92e0f3771b2c115"/>
|
||||
<project name="platform/ndk" path="ndk" revision="e58ef003be4306bb53a8c11331146f39e4eab31f"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</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="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0627790166dccd8dd370fa7d9f434ed9fc027fb4"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="a8ace1361d702eef293e48f2ea525dac686daa86">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<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="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="a8ace1361d702eef293e48f2ea525dac686daa86">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="c5b3aa4fc662d961eba79ef24d1378a243109e29"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0627790166dccd8dd370fa7d9f434ed9fc027fb4"/>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"git": {
|
||||
"git_revision": "338f66e6a96491d2f5854b188c6b141ceb690d97",
|
||||
"git_revision": "8897e1810aa6426ca483269af76ce2bfd2029d25",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "4af68748acbc181bdc6ec5a78d33f2ef1af8c905",
|
||||
"revision": "de53fb4a9b7df74c088632907e3766fe24e9372a",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</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="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0627790166dccd8dd370fa7d9f434ed9fc027fb4"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<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="338f66e6a96491d2f5854b188c6b141ceb690d97"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="8897e1810aa6426ca483269af76ce2bfd2029d25"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
|
|
@ -8,36 +8,81 @@
|
|||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
//
|
||||
// Internal functions
|
||||
//
|
||||
|
||||
/**
|
||||
* Append byte array and length to header
|
||||
*/
|
||||
int
|
||||
AppendHeaderName(uint8_t* aRetBuf, int aBufferSize, const char* aName,
|
||||
int aLength)
|
||||
AppendHeader(uint8_t aHeaderId, uint8_t* aRetBuf, int aBufferSize,
|
||||
const uint8_t* aData, int aLength)
|
||||
{
|
||||
int headerLength = aLength + 3;
|
||||
|
||||
aRetBuf[0] = ObexHeaderId::Name;
|
||||
aRetBuf[0] = aHeaderId;
|
||||
aRetBuf[1] = (headerLength & 0xFF00) >> 8;
|
||||
aRetBuf[2] = headerLength & 0x00FF;
|
||||
|
||||
memcpy(&aRetBuf[3], aName, (aLength < aBufferSize - 3)? aLength
|
||||
memcpy(&aRetBuf[3], aData, (aLength < aBufferSize - 3) ? aLength
|
||||
: aBufferSize - 3);
|
||||
|
||||
return headerLength;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append 4-byte integer to header
|
||||
*/
|
||||
int
|
||||
AppendHeaderBody(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aData,
|
||||
AppendHeader(uint8_t aHeaderId, uint8_t* aRetBuf, int aValue)
|
||||
{
|
||||
aRetBuf[0] = aHeaderId;
|
||||
aRetBuf[1] = (aValue & 0xFF000000) >> 24;
|
||||
aRetBuf[2] = (aValue & 0x00FF0000) >> 16;
|
||||
aRetBuf[3] = (aValue & 0x0000FF00) >> 8;
|
||||
aRetBuf[4] = aValue & 0x000000FF;
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
//
|
||||
// Exposed functions
|
||||
//
|
||||
|
||||
int
|
||||
AppendHeaderName(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aName,
|
||||
int aLength)
|
||||
{
|
||||
int headerLength = aLength + 3;
|
||||
return AppendHeader(ObexHeaderId::Name, aRetBuf, aBufferSize,
|
||||
aName, aLength);
|
||||
}
|
||||
|
||||
aRetBuf[0] = ObexHeaderId::Body;
|
||||
aRetBuf[1] = (headerLength & 0xFF00) >> 8;
|
||||
aRetBuf[2] = headerLength & 0x00FF;
|
||||
int
|
||||
AppendHeaderBody(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aBody,
|
||||
int aLength)
|
||||
{
|
||||
return AppendHeader(ObexHeaderId::Body, aRetBuf, aBufferSize,
|
||||
aBody, aLength);
|
||||
}
|
||||
|
||||
memcpy(&aRetBuf[3], aData, (aLength < aBufferSize - 3)? aLength
|
||||
: aBufferSize - 3);
|
||||
int
|
||||
AppendHeaderWho(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aWho,
|
||||
int aLength)
|
||||
{
|
||||
return AppendHeader(ObexHeaderId::Who, aRetBuf, aBufferSize,
|
||||
aWho, aLength);
|
||||
}
|
||||
|
||||
return headerLength;
|
||||
int
|
||||
AppendHeaderLength(uint8_t* aRetBuf, int aObjectLength)
|
||||
{
|
||||
return AppendHeader(ObexHeaderId::Length, aRetBuf, aObjectLength);
|
||||
}
|
||||
|
||||
int
|
||||
AppendHeaderConnectionId(uint8_t* aRetBuf, int aConnectionId)
|
||||
{
|
||||
return AppendHeader(ObexHeaderId::ConnectionId, aRetBuf, aConnectionId);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -50,30 +95,6 @@ AppendHeaderEndOfBody(uint8_t* aRetBuf)
|
|||
return 3;
|
||||
}
|
||||
|
||||
int
|
||||
AppendHeaderLength(uint8_t* aRetBuf, int aObjectLength)
|
||||
{
|
||||
aRetBuf[0] = ObexHeaderId::Length;
|
||||
aRetBuf[1] = (aObjectLength & 0xFF000000) >> 24;
|
||||
aRetBuf[2] = (aObjectLength & 0x00FF0000) >> 16;
|
||||
aRetBuf[3] = (aObjectLength & 0x0000FF00) >> 8;
|
||||
aRetBuf[4] = aObjectLength & 0x000000FF;
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
int
|
||||
AppendHeaderConnectionId(uint8_t* aRetBuf, int aConnectionId)
|
||||
{
|
||||
aRetBuf[0] = ObexHeaderId::ConnectionId;
|
||||
aRetBuf[1] = (aConnectionId & 0xFF000000) >> 24;
|
||||
aRetBuf[2] = (aConnectionId & 0x00FF0000) >> 16;
|
||||
aRetBuf[3] = (aConnectionId & 0x0000FF00) >> 8;
|
||||
aRetBuf[4] = aConnectionId & 0x000000FF;
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
void
|
||||
SetObexPacketInfo(uint8_t* aRetBuf, uint8_t aOpcode, int aPacketLength)
|
||||
{
|
||||
|
@ -119,7 +140,7 @@ ParseHeaders(const uint8_t* aHeaderStart,
|
|||
break;
|
||||
}
|
||||
|
||||
// Length check to prevent from memory pollusion.
|
||||
// Length check to prevent from memory pollution.
|
||||
if (ptr + contentLength > aHeaderStart + aTotalLength) {
|
||||
// Severe error occurred. We can't even believe the received data, so
|
||||
// clear all headers.
|
||||
|
|
|
@ -199,24 +199,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void GetBodyLength(int* aRetBodyLength) const
|
||||
{
|
||||
int length = mHeaders.Length();
|
||||
*aRetBodyLength = 0;
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
if (mHeaders[i]->mId == ObexHeaderId::Body ||
|
||||
mHeaders[i]->mId == ObexHeaderId::EndOfBody) {
|
||||
*aRetBodyLength = mHeaders[i]->mDataLength;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GetBody(uint8_t** aRetBody) const
|
||||
void GetBody(uint8_t** aRetBody, int* aRetBodyLength) const
|
||||
{
|
||||
int length = mHeaders.Length();
|
||||
*aRetBody = nullptr;
|
||||
*aRetBodyLength = 0;
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
if (mHeaders[i]->mId == ObexHeaderId::Body ||
|
||||
|
@ -224,6 +211,24 @@ public:
|
|||
uint8_t* ptr = mHeaders[i]->mData.get();
|
||||
*aRetBody = new uint8_t[mHeaders[i]->mDataLength];
|
||||
memcpy(*aRetBody, ptr, mHeaders[i]->mDataLength);
|
||||
*aRetBodyLength = mHeaders[i]->mDataLength;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GetTarget(uint8_t** aRetTarget, int* aRetTargetLength) const
|
||||
{
|
||||
int length = mHeaders.Length();
|
||||
*aRetTarget = nullptr;
|
||||
*aRetTargetLength = 0;
|
||||
|
||||
for (int i = 0; i < length; ++i) {
|
||||
if (mHeaders[i]->mId == ObexHeaderId::Target) {
|
||||
uint8_t* ptr = mHeaders[i]->mData.get();
|
||||
*aRetTarget = new uint8_t[mHeaders[i]->mDataLength];
|
||||
memcpy(*aRetTarget, ptr, mHeaders[i]->mDataLength);
|
||||
*aRetTargetLength = mHeaders[i]->mDataLength;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -251,13 +256,15 @@ private:
|
|||
nsTArray<nsAutoPtr<ObexHeader> > mHeaders;
|
||||
};
|
||||
|
||||
int AppendHeaderName(uint8_t* aRetBuf, int aBufferSize, const char* aName,
|
||||
int AppendHeaderName(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aName,
|
||||
int aLength);
|
||||
int AppendHeaderBody(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aData,
|
||||
int AppendHeaderBody(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aBody,
|
||||
int aLength);
|
||||
int AppendHeaderWho(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aWho,
|
||||
int aLength);
|
||||
int AppendHeaderEndOfBody(uint8_t* aRetBuf);
|
||||
int AppendHeaderLength(uint8_t* aRetBuf, int aObjectLength);
|
||||
int AppendHeaderConnectionId(uint8_t* aRetBuf, int aConnectionId);
|
||||
int AppendHeaderEndOfBody(uint8_t* aRetBuf);
|
||||
void SetObexPacketInfo(uint8_t* aRetBuf, uint8_t aOpcode, int aPacketLength);
|
||||
|
||||
/**
|
||||
|
|
|
@ -742,10 +742,8 @@ BluetoothOppManager::ExtractPacketHeaders(const ObexHeaderSet& aHeader)
|
|||
if (aHeader.Has(ObexHeaderId::Body) ||
|
||||
aHeader.Has(ObexHeaderId::EndOfBody)) {
|
||||
uint8_t* bodyPtr;
|
||||
aHeader.GetBody(&bodyPtr);
|
||||
aHeader.GetBody(&bodyPtr, &mBodySegmentLength);
|
||||
mBodySegment = bodyPtr;
|
||||
|
||||
aHeader.GetBodyLength(&mBodySegmentLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1203,7 +1201,7 @@ BluetoothOppManager::SendPutHeaderRequest(const nsAString& aFileName,
|
|||
|
||||
int index = 3;
|
||||
index += AppendHeaderName(&req[index], mRemoteMaxPacketLength - index,
|
||||
(char*)fileName, (len + 1) * 2);
|
||||
fileName, (len + 1) * 2);
|
||||
index += AppendHeaderLength(&req[index], aFileSize);
|
||||
|
||||
// This is final put packet if file size equals to 0
|
||||
|
|
|
@ -0,0 +1,445 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "BluetoothPbapManager.h"
|
||||
|
||||
#include "BluetoothService.h"
|
||||
#include "BluetoothSocket.h"
|
||||
#include "BluetoothUuid.h"
|
||||
#include "ObexBase.h"
|
||||
|
||||
#include "mozilla/RefPtr.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
||||
USING_BLUETOOTH_NAMESPACE
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::ipc;
|
||||
|
||||
namespace {
|
||||
// UUID of PBAP PSE
|
||||
static const BluetoothUuid kPbapPSE = {
|
||||
{
|
||||
0x00, 0x00, 0x11, 0x2F, 0x00, 0x00, 0x10, 0x00,
|
||||
0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB
|
||||
}
|
||||
};
|
||||
|
||||
// UUID used in PBAP OBEX target header
|
||||
static const BluetoothUuid kPbapObexTarget = {
|
||||
{
|
||||
0x79, 0x61, 0x35, 0xF0, 0xF0, 0xC5, 0x11, 0xD8,
|
||||
0x09, 0x66, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66
|
||||
}
|
||||
};
|
||||
|
||||
StaticRefPtr<BluetoothPbapManager> sPbapManager;
|
||||
static bool sInShutdown = false;
|
||||
}
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
NS_IMETHODIMP
|
||||
BluetoothPbapManager::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const char16_t* aData)
|
||||
{
|
||||
MOZ_ASSERT(sPbapManager);
|
||||
|
||||
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
HandleShutdown();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(false, "PbapManager got unexpected topic!");
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::HandleShutdown()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
sInShutdown = true;
|
||||
Disconnect(nullptr);
|
||||
sPbapManager = nullptr;
|
||||
}
|
||||
|
||||
BluetoothPbapManager::BluetoothPbapManager() : mConnected(false)
|
||||
{
|
||||
mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE);
|
||||
}
|
||||
|
||||
BluetoothPbapManager::~BluetoothPbapManager()
|
||||
{
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
if (NS_WARN_IF(!obs)) {
|
||||
return;
|
||||
}
|
||||
|
||||
NS_WARN_IF(NS_FAILED(
|
||||
obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID)));
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothPbapManager::Init()
|
||||
{
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
if (NS_WARN_IF(!obs)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(NS_FAILED(
|
||||
obs->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false)))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* We don't start listening here as BluetoothServiceBluedroid calls Listen()
|
||||
* immediately when BT stops.
|
||||
*
|
||||
* If we start listening here, the listening fails when device boots up since
|
||||
* Listen() is called again and restarts server socket. The restart causes
|
||||
* absence of read events when device boots up.
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//static
|
||||
BluetoothPbapManager*
|
||||
BluetoothPbapManager::Get()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// Exit early if sPbapManager already exists
|
||||
if (sPbapManager) {
|
||||
return sPbapManager;
|
||||
}
|
||||
|
||||
// Do not create a new instance if we're in shutdown
|
||||
if (NS_WARN_IF(sInShutdown)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Create a new instance, register, and return
|
||||
BluetoothPbapManager *manager = new BluetoothPbapManager();
|
||||
if (NS_WARN_IF(!manager->Init())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
sPbapManager = manager;
|
||||
return sPbapManager;
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothPbapManager::Listen()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// Fail to listen if |mSocket| already exists
|
||||
if (NS_WARN_IF(mSocket)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restart server socket since its underlying fd becomes invalid when
|
||||
* BT stops; otherwise no more read events would be received even if
|
||||
* BT restarts.
|
||||
*/
|
||||
if (mServerSocket) {
|
||||
mServerSocket->CloseSocket();
|
||||
mServerSocket = nullptr;
|
||||
}
|
||||
|
||||
mServerSocket =
|
||||
new BluetoothSocket(this, BluetoothSocketType::RFCOMM, false, true);
|
||||
|
||||
if (NS_WARN_IF(!mServerSocket->ListenSocket(
|
||||
NS_LITERAL_STRING("OBEX Phonebook Access Server"),
|
||||
kPbapPSE,
|
||||
BluetoothReservedChannels::CHANNEL_PBAP_PSE))) {
|
||||
mServerSocket = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
BT_LOGR("PBAP socket is listening");
|
||||
return true;
|
||||
}
|
||||
|
||||
// Virtual function of class SocketConsumer
|
||||
void
|
||||
BluetoothPbapManager::ReceiveSocketData(BluetoothSocket* aSocket,
|
||||
nsAutoPtr<UnixSocketBuffer>& aMessage)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
const uint8_t* data = aMessage->GetData();
|
||||
int receivedLength = aMessage->GetSize();
|
||||
uint8_t opCode = data[0];
|
||||
|
||||
ObexHeaderSet pktHeaders(opCode);
|
||||
switch (opCode) {
|
||||
case ObexRequestCode::Connect:
|
||||
// Section 3.3.1 "Connect", IrOBEX 1.2
|
||||
// [opcode:1][length:2][version:1][flags:1][MaxPktSizeWeCanReceive:2]
|
||||
// [Headers:var]
|
||||
if (!ParseHeaders(&data[7], receivedLength - 7, &pktHeaders)) {
|
||||
ReplyError(ObexResponseCode::BadRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
// Section 6.4 "Establishing an OBEX Session", PBAP 1.2
|
||||
// The OBEX header target shall equal to kPbapObexTarget.
|
||||
if (!CompareHeaderTarget(pktHeaders)) {
|
||||
ReplyError(ObexResponseCode::BadRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
ReplyToConnect();
|
||||
AfterPbapConnected();
|
||||
break;
|
||||
case ObexRequestCode::Disconnect:
|
||||
case ObexRequestCode::Abort:
|
||||
// Section 3.3.2 "Disconnect" and Section 3.3.5 "Abort", IrOBEX 1.2
|
||||
// The format of request packet of "Disconnect" and "Abort" are the same
|
||||
// [opcode:1][length:2][Headers:var]
|
||||
if (!ParseHeaders(&data[3], receivedLength - 3, &pktHeaders)) {
|
||||
ReplyError(ObexResponseCode::BadRequest);
|
||||
return;
|
||||
}
|
||||
|
||||
ReplyToDisconnectOrAbort();
|
||||
AfterPbapDisconnected();
|
||||
break;
|
||||
case ObexRequestCode::Put:
|
||||
case ObexRequestCode::PutFinal:
|
||||
case ObexRequestCode::Get:
|
||||
case ObexRequestCode::GetFinal:
|
||||
case ObexRequestCode::SetPath:
|
||||
ReplyError(ObexResponseCode::BadRequest);
|
||||
BT_LOGR("Unsupported ObexRequestCode %x", opCode);
|
||||
break;
|
||||
default:
|
||||
ReplyError(ObexResponseCode::NotImplemented);
|
||||
BT_LOGR("Unrecognized ObexRequestCode %x", opCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothPbapManager::CompareHeaderTarget(const ObexHeaderSet& aHeader)
|
||||
{
|
||||
if (!aHeader.Has(ObexHeaderId::Target)) {
|
||||
BT_LOGR("No ObexHeaderId::Target in header");
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t* targetPtr;
|
||||
int targetLength;
|
||||
aHeader.GetTarget(&targetPtr, &targetLength);
|
||||
|
||||
if (targetLength != sizeof(BluetoothUuid)) {
|
||||
BT_LOGR("Length mismatch: %d != 16", targetLength);
|
||||
return false;
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < sizeof(BluetoothUuid); i++) {
|
||||
if (targetPtr[i] != kPbapObexTarget.mUuid[i]) {
|
||||
BT_LOGR("UUID mismatch: received target[%d]=0x%x != 0x%x",
|
||||
i, targetPtr[i], kPbapObexTarget.mUuid[i]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::AfterPbapConnected()
|
||||
{
|
||||
mConnected = true;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::AfterPbapDisconnected()
|
||||
{
|
||||
mConnected = false;
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothPbapManager::IsConnected()
|
||||
{
|
||||
return mConnected;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::GetAddress(nsAString& aDeviceAddress)
|
||||
{
|
||||
return mSocket->GetAddress(aDeviceAddress);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToConnect()
|
||||
{
|
||||
if (mConnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Section 3.3.1 "Connect", IrOBEX 1.2
|
||||
// [opcode:1][length:2][version:1][flags:1][MaxPktSizeWeCanReceive:2]
|
||||
// [Headers:var]
|
||||
uint8_t req[255];
|
||||
int index = 7;
|
||||
|
||||
req[3] = 0x10; // version=1.0
|
||||
req[4] = 0x00; // flag=0x00
|
||||
req[5] = BluetoothPbapManager::MAX_PACKET_LENGTH >> 8;
|
||||
req[6] = (uint8_t)BluetoothPbapManager::MAX_PACKET_LENGTH;
|
||||
|
||||
// Section 6.4 "Establishing an OBEX Session", PBAP 1.2
|
||||
// Headers: [Who:16][Connection ID]
|
||||
index += AppendHeaderWho(&req[index], 255, kPbapObexTarget.mUuid,
|
||||
sizeof(BluetoothUuid));
|
||||
index += AppendHeaderConnectionId(&req[index], 0x01);
|
||||
|
||||
SendObexData(req, ObexResponseCode::Success, index);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyToDisconnectOrAbort()
|
||||
{
|
||||
if (!mConnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Section 3.3.2 "Disconnect" and Section 3.3.5 "Abort", IrOBEX 1.2
|
||||
// The format of response packet of "Disconnect" and "Abort" are the same
|
||||
// [opcode:1][length:2][Headers:var]
|
||||
uint8_t req[255];
|
||||
int index = 3;
|
||||
|
||||
SendObexData(req, ObexResponseCode::Success, index);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::ReplyError(uint8_t aError)
|
||||
{
|
||||
BT_LOGR("[0x%x]", aError);
|
||||
|
||||
// Section 3.2 "Response Format", IrOBEX 1.2
|
||||
// [opcode:1][length:2][Headers:var]
|
||||
uint8_t req[255];
|
||||
int index = 3;
|
||||
|
||||
SendObexData(req, aError, index);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::SendObexData(uint8_t* aData, uint8_t aOpcode, int aSize)
|
||||
{
|
||||
SetObexPacketInfo(aData, aOpcode, aSize);
|
||||
mSocket->SendSocketData(new UnixSocketRawData(aData, aSize));
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnSocketConnectSuccess(BluetoothSocket* aSocket)
|
||||
{
|
||||
MOZ_ASSERT(aSocket);
|
||||
MOZ_ASSERT(aSocket == mServerSocket);
|
||||
MOZ_ASSERT(!mSocket);
|
||||
|
||||
BT_LOGR("PBAP socket is connected");
|
||||
|
||||
// Close server socket as only one session is allowed at a time
|
||||
mServerSocket.swap(mSocket);
|
||||
|
||||
// Cache device address since we can't get socket address when a remote
|
||||
// device disconnect with us.
|
||||
mSocket->GetAddress(mDeviceAddress);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnSocketConnectError(BluetoothSocket* aSocket)
|
||||
{
|
||||
mServerSocket = nullptr;
|
||||
mSocket = nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnSocketDisconnect(BluetoothSocket* aSocket)
|
||||
{
|
||||
MOZ_ASSERT(aSocket);
|
||||
|
||||
if (aSocket != mSocket) {
|
||||
// Do nothing when a listening server socket is closed.
|
||||
return;
|
||||
}
|
||||
|
||||
AfterPbapDisconnected();
|
||||
mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE);
|
||||
mSocket = nullptr;
|
||||
|
||||
Listen();
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::Disconnect(BluetoothProfileController* aController)
|
||||
{
|
||||
if (mSocket) {
|
||||
mSocket->CloseSocket();
|
||||
} else {
|
||||
BT_WARNING("%s: No ongoing connection to disconnect", __FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(BluetoothPbapManager, nsIObserver)
|
||||
|
||||
void
|
||||
BluetoothPbapManager::Connect(const nsAString& aDeviceAddress,
|
||||
BluetoothProfileController* aController)
|
||||
{
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnGetServiceChannel(const nsAString& aDeviceAddress,
|
||||
const nsAString& aServiceUuid,
|
||||
int aChannel)
|
||||
{
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnUpdateSdpRecords(const nsAString& aDeviceAddress)
|
||||
{
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnConnect(const nsAString& aErrorStr)
|
||||
{
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::OnDisconnect(const nsAString& aErrorStr)
|
||||
{
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothPbapManager::Reset()
|
||||
{
|
||||
MOZ_ASSERT(false);
|
||||
}
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
|
@ -0,0 +1,72 @@
|
|||
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
||||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef mozilla_dom_bluetooth_bluetoothpbapmanager_h__
|
||||
#define mozilla_dom_bluetooth_bluetoothpbapmanager_h__
|
||||
|
||||
#include "BluetoothCommon.h"
|
||||
#include "BluetoothProfileManagerBase.h"
|
||||
#include "BluetoothSocketObserver.h"
|
||||
#include "mozilla/ipc/SocketBase.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
class BluetoothSocket;
|
||||
class ObexHeaderSet;
|
||||
|
||||
class BluetoothPbapManager : public BluetoothSocketObserver
|
||||
, public BluetoothProfileManagerBase
|
||||
{
|
||||
public:
|
||||
BT_DECL_PROFILE_MGR_BASE
|
||||
BT_DECL_SOCKET_OBSERVER
|
||||
virtual void GetName(nsACString& aName)
|
||||
{
|
||||
aName.AssignLiteral("PBAP");
|
||||
}
|
||||
|
||||
static const int MAX_PACKET_LENGTH = 0xFFFE;
|
||||
|
||||
static BluetoothPbapManager* Get();
|
||||
bool Listen();
|
||||
|
||||
protected:
|
||||
virtual ~BluetoothPbapManager();
|
||||
|
||||
private:
|
||||
BluetoothPbapManager();
|
||||
bool Init();
|
||||
void HandleShutdown();
|
||||
|
||||
void ReplyToConnect();
|
||||
void ReplyToDisconnectOrAbort();
|
||||
void ReplyError(uint8_t aError);
|
||||
void SendObexData(uint8_t* aData, uint8_t aOpcode, int aSize);
|
||||
|
||||
bool CompareHeaderTarget(const ObexHeaderSet& aHeader);
|
||||
void AfterPbapConnected();
|
||||
void AfterPbapDisconnected();
|
||||
|
||||
/**
|
||||
* OBEX session status. Set when OBEX session is established.
|
||||
*/
|
||||
bool mConnected;
|
||||
nsString mDeviceAddress;
|
||||
|
||||
// If a connection has been established, mSocket will be the socket
|
||||
// communicating with the remote socket. We maintain the invariant that if
|
||||
// mSocket is non-null, mServerSocket must be null (and vice versa).
|
||||
nsRefPtr<BluetoothSocket> mSocket;
|
||||
|
||||
// Server socket. Once an inbound connection is established, it will hand
|
||||
// over the ownership to mSocket, and get a new server socket while Listen()
|
||||
// is called.
|
||||
nsRefPtr<BluetoothSocket> mServerSocket;
|
||||
};
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
||||
#endif
|
|
@ -31,6 +31,7 @@
|
|||
// TODO: Support HID
|
||||
#endif
|
||||
#include "BluetoothOppManager.h"
|
||||
#include "BluetoothPbapManager.h"
|
||||
#include "BluetoothProfileController.h"
|
||||
#include "BluetoothReplyRunnable.h"
|
||||
#include "BluetoothUtils.h"
|
||||
|
@ -333,35 +334,30 @@ BluetoothServiceBluedroid::StopInternal(BluetoothReplyRunnable* aRunnable)
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
BluetoothProfileManagerBase* profile;
|
||||
profile = BluetoothHfpManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
} else {
|
||||
profile->Reset();
|
||||
static BluetoothProfileManagerBase* sProfiles[] = {
|
||||
BluetoothHfpManager::Get(),
|
||||
BluetoothA2dpManager::Get(),
|
||||
BluetoothOppManager::Get(),
|
||||
BluetoothPbapManager::Get(),
|
||||
BluetoothHidManager::Get()
|
||||
};
|
||||
|
||||
// Disconnect all connected profiles
|
||||
for (uint8_t i = 0; i < MOZ_ARRAY_LENGTH(sProfiles); i++) {
|
||||
nsCString profileName;
|
||||
sProfiles[i]->GetName(profileName);
|
||||
|
||||
if (NS_WARN_IF(!sProfiles[i])) {
|
||||
BT_LOGR("Profile manager [%s] is null", profileName.get());
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
profile = BluetoothOppManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
if (sProfiles[i]->IsConnected()) {
|
||||
sProfiles[i]->Disconnect(nullptr);
|
||||
} else if (!profileName.EqualsLiteral("OPP") &&
|
||||
!profileName.EqualsLiteral("PBAP")) {
|
||||
sProfiles[i]->Reset();
|
||||
}
|
||||
|
||||
profile = BluetoothA2dpManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
} else {
|
||||
profile->Reset();
|
||||
}
|
||||
|
||||
profile = BluetoothHidManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
} else {
|
||||
profile->Reset();
|
||||
}
|
||||
|
||||
// aRunnable will be a nullptr during starup and shutdown
|
||||
|
@ -2253,11 +2249,16 @@ BluetoothServiceBluedroid::AdapterStateChangedNotification(bool aState)
|
|||
BluetoothNamedValue(NS_ConvertUTF8toUTF16("Discoverable"), false),
|
||||
new SetAdapterPropertyDiscoverableResultHandler());
|
||||
|
||||
// Trigger BluetoothOppManager to listen
|
||||
// Trigger OPP & PBAP managers to listen
|
||||
BluetoothOppManager* opp = BluetoothOppManager::Get();
|
||||
if (!opp || !opp->Listen()) {
|
||||
BT_LOGR("Fail to start BluetoothOppManager listening");
|
||||
}
|
||||
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap || !pbap->Listen()) {
|
||||
BT_LOGR("Fail to start BluetoothPbapManager listening");
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve promise if existed
|
||||
|
@ -2318,12 +2319,18 @@ BluetoothServiceBluedroid::AdapterStateChangedNotification(bool aState)
|
|||
bs->AdapterAddedReceived();
|
||||
bs->TryFiringAdapterAdded();
|
||||
|
||||
// Trigger BluetoothOppManager to listen
|
||||
// Trigger OPP & PBAP managers to listen
|
||||
BluetoothOppManager* opp = BluetoothOppManager::Get();
|
||||
if (!opp || !opp->Listen()) {
|
||||
BT_LOGR("Fail to start BluetoothOppManager listening");
|
||||
}
|
||||
|
||||
BluetoothPbapManager* pbap = BluetoothPbapManager::Get();
|
||||
if (!pbap || !pbap->Listen()) {
|
||||
BT_LOGR("Fail to start BluetoothPbapManager listening");
|
||||
}
|
||||
}
|
||||
|
||||
// After ProfileManagers deinit and cleanup, now restarts bluetooth daemon
|
||||
if (sIsRestart && !aState) {
|
||||
BT_LOGR("sIsRestart and off, now restart");
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
#include "BluetoothManager.h"
|
||||
#include "BluetoothOppManager.h"
|
||||
#include "BluetoothParent.h"
|
||||
#if defined(MOZ_B2G_BT_BLUEDROID)
|
||||
#include "BluetoothPbapManager.h"
|
||||
#endif
|
||||
#include "BluetoothReplyRunnable.h"
|
||||
#include "BluetoothServiceChildProcess.h"
|
||||
#include "BluetoothUtils.h"
|
||||
|
@ -408,35 +411,32 @@ BluetoothService::StopBluetooth(bool aIsStartup)
|
|||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
BluetoothProfileManagerBase* profile;
|
||||
profile = BluetoothHfpManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
} else {
|
||||
profile->Reset();
|
||||
static BluetoothProfileManagerBase* sProfiles[] = {
|
||||
BluetoothHfpManager::Get(),
|
||||
BluetoothA2dpManager::Get(),
|
||||
BluetoothOppManager::Get(),
|
||||
#if defined(MOZ_B2G_BT_BLUEDROID)
|
||||
BluetoothPbapManager::Get(),
|
||||
#endif
|
||||
BluetoothHidManager::Get()
|
||||
};
|
||||
|
||||
// Disconnect all connected profiles
|
||||
for (uint8_t i = 0; i < MOZ_ARRAY_LENGTH(sProfiles); i++) {
|
||||
nsCString profileName;
|
||||
sProfiles[i]->GetName(profileName);
|
||||
|
||||
if (NS_WARN_IF(!sProfiles[i])) {
|
||||
BT_LOGR("Profile manager [%s] is null", profileName.get());
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
profile = BluetoothOppManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
if (sProfiles[i]->IsConnected()) {
|
||||
sProfiles[i]->Disconnect(nullptr);
|
||||
} else if (!profileName.EqualsLiteral("OPP") &&
|
||||
!profileName.EqualsLiteral("PBAP")) {
|
||||
sProfiles[i]->Reset();
|
||||
}
|
||||
|
||||
profile = BluetoothA2dpManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
} else {
|
||||
profile->Reset();
|
||||
}
|
||||
|
||||
profile = BluetoothHidManager::Get();
|
||||
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
|
||||
if (profile->IsConnected()) {
|
||||
profile->Disconnect(nullptr);
|
||||
} else {
|
||||
profile->Reset();
|
||||
}
|
||||
|
||||
mAdapterAddedReceived = false;
|
||||
|
|
|
@ -394,7 +394,6 @@ protected:
|
|||
static BluetoothService*
|
||||
Create();
|
||||
|
||||
|
||||
typedef nsClassHashtable<nsStringHashKey, BluetoothSignalObserverList >
|
||||
BluetoothSignalObserverTable;
|
||||
|
||||
|
|
|
@ -714,10 +714,8 @@ BluetoothOppManager::ExtractPacketHeaders(const ObexHeaderSet& aHeader)
|
|||
if (aHeader.Has(ObexHeaderId::Body) ||
|
||||
aHeader.Has(ObexHeaderId::EndOfBody)) {
|
||||
uint8_t* bodyPtr;
|
||||
aHeader.GetBody(&bodyPtr);
|
||||
aHeader.GetBody(&bodyPtr, &mBodySegmentLength);
|
||||
mBodySegment = bodyPtr;
|
||||
|
||||
aHeader.GetBodyLength(&mBodySegmentLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1170,7 +1168,7 @@ BluetoothOppManager::SendPutHeaderRequest(const nsAString& aFileName,
|
|||
|
||||
int index = 3;
|
||||
index += AppendHeaderName(&req[index], mRemoteMaxPacketLength - index,
|
||||
(char*)fileName, (len + 1) * 2);
|
||||
fileName, (len + 1) * 2);
|
||||
index += AppendHeaderLength(&req[index], aFileSize);
|
||||
|
||||
// This is final put packet if file size equals to 0
|
||||
|
|
|
@ -104,6 +104,7 @@ if CONFIG['MOZ_B2G_BT']:
|
|||
'bluedroid/BluetoothHALInterface.cpp',
|
||||
'bluedroid/BluetoothHandsfreeHALInterface.cpp',
|
||||
'bluedroid/BluetoothOppManager.cpp',
|
||||
'bluedroid/BluetoothPbapManager.cpp',
|
||||
'bluedroid/BluetoothServiceBluedroid.cpp',
|
||||
'bluedroid/BluetoothSocket.cpp',
|
||||
'bluedroid/BluetoothSocketHALInterface.cpp',
|
||||
|
|
|
@ -632,6 +632,7 @@ GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo)
|
|||
if (aBatteryInfo->charging() != previousCharging){
|
||||
aBatteryInfo->remainingTime() = dom::battery::kUnknownRemainingTime;
|
||||
memset(&lastLevelChange, 0, sizeof(struct timespec));
|
||||
remainingTime = 0.0;
|
||||
}
|
||||
|
||||
if (aBatteryInfo->charging()) {
|
||||
|
@ -668,7 +669,37 @@ GetCurrentBatteryInformation(hal::BatteryInformation* aBatteryInfo)
|
|||
}
|
||||
|
||||
} else {
|
||||
if (aBatteryInfo->level() == 0.0) {
|
||||
aBatteryInfo->remainingTime() = dom::battery::kDefaultRemainingTime;
|
||||
} else if (aBatteryInfo->level() != previousLevel){
|
||||
if (lastLevelChange.tv_sec != 0) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
dtime = now.tv_sec - lastLevelChange.tv_sec;
|
||||
dlevel = previousLevel - aBatteryInfo->level();
|
||||
|
||||
if (dlevel <= 0.0) {
|
||||
aBatteryInfo->remainingTime() = dom::battery::kUnknownRemainingTime;
|
||||
} else {
|
||||
remainingTime = (double) round(dtime / dlevel * aBatteryInfo->level());
|
||||
aBatteryInfo->remainingTime() = remainingTime;
|
||||
}
|
||||
|
||||
lastLevelChange = now;
|
||||
} else { // lastLevelChange.tv_sec == 0
|
||||
clock_gettime(CLOCK_MONOTONIC, &lastLevelChange);
|
||||
aBatteryInfo->remainingTime() = dom::battery::kUnknownRemainingTime;
|
||||
}
|
||||
|
||||
} else {
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
dtime = now.tv_sec - lastLevelChange.tv_sec;
|
||||
if (dtime < remainingTime) {
|
||||
aBatteryInfo->remainingTime() = round(remainingTime - dtime);
|
||||
} else {
|
||||
aBatteryInfo->remainingTime() = dom::battery::kUnknownRemainingTime;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
previousCharging = aBatteryInfo->charging();
|
||||
|
|
|
@ -18,6 +18,7 @@ RUN chmod u+x /usr/local/bin/linux64-minidump_stackwalk
|
|||
RUN apt-get install -y python-pip && pip install virtualenv;
|
||||
RUN mkdir Documents; mkdir Pictures; mkdir Music; mkdir Videos; mkdir artifacts
|
||||
RUN npm install -g taskcluster-vcs@2.3.4
|
||||
RUN npm install -g taskcluster-npm-cache@1.1.12
|
||||
RUN rm -Rf .cache && mkdir -p .cache
|
||||
ENV PATH $PATH:/home/worker/bin
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.2.15
|
||||
0.3.3
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"repo": "https://hg.mozilla.org/build/mozharness",
|
||||
"revision": "4d260376921f"
|
||||
"revision": "af7f8a8bf40d"
|
||||
}
|
||||
|
|
|
@ -3498,7 +3498,7 @@ Checker.prototype = {
|
|||
let buildType = sysLibs.libcutils.property_get("ro.build.type");
|
||||
url = url.replace(/%PRODUCT_MODEL%/g,
|
||||
sysLibs.libcutils.property_get("ro.product.model"));
|
||||
if (buildType == "user") {
|
||||
if (buildType == "user" || buildType == "userdebug") {
|
||||
url = url.replace(/%PRODUCT_DEVICE%/g, productDevice);
|
||||
} else {
|
||||
url = url.replace(/%PRODUCT_DEVICE%/g, productDevice + "-" + buildType);
|
||||
|
|
Загрузка…
Ссылка в новой задаче