зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to inbound a=merge
This commit is contained in:
Коммит
51dc9deec5
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<!-- 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"/>
|
||||
|
@ -129,7 +129,7 @@
|
|||
<!-- Stock Android things -->
|
||||
<project name="platform/external/icu4c" path="external/icu4c" revision="2bb01561780583cc37bc667f0ea79f48a122d8a2"/>
|
||||
<!-- dolphin specific things -->
|
||||
<project name="device/sprd" path="device/sprd" revision="a229a5650aab7ff9ce47d1ca2c998ffbf6119ed7"/>
|
||||
<project name="device/sprd" path="device/sprd" revision="de8bac99d1af4326cbd96bcb9fe76a95b7f41c8a"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="4e58336019b5cbcfd134caf55b142236cf986618"/>
|
||||
<project name="platform/frameworks/av" path="frameworks/av" revision="4387fe988e5a1001f29ce05fcfda03ed2d32137b"/>
|
||||
<project name="platform/hardware/akm" path="hardware/akm" revision="6d3be412647b0eab0adff8a2768736cf4eb68039"/>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<!-- 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"/>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="d5d3f93914558b6f168447b805cd799c8233e300"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="6fa7a4936414ceb4055fd27f7a30e76790f834fb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="e0c735ec89df011ea7dd435087a9045ecff9ff9e">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<!-- 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"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "8db023189f8d58a474eaf31d25cbd56b711c5567",
|
||||
"revision": "563db4265b0e312e0cae52479d55e55a0e6a1b5a",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
<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="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="334532c0fcb809ac1c8bcd64a8eb9357967acf36"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="fce979e88240aba9f106c41b299151d3676bed99"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8aee09c106f479f36c57b2a29af72d455e359211"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8aefd1be86268fed59946173a9f5ebabce4b8e29"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="abc4f384bc4bb9c709d4f526176ab41eff3f14fe"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
|
|
@ -94,18 +94,6 @@ ASSERT_ICC_CONTACT_TYPE_EQUALITY(Sdn, CARD_CONTACT_TYPE_SDN);
|
|||
|
||||
#undef ASSERT_ICC_CONTACT_TYPE_EQUALITY
|
||||
|
||||
/**
|
||||
* Enum IccMvnoType
|
||||
*/
|
||||
#define ASSERT_ICC_MVNO_TYPE_EQUALITY(webidlState, xpidlState) \
|
||||
ASSERT_EQUALITY(IccMvnoType, webidlState, xpidlState)
|
||||
|
||||
ASSERT_ICC_MVNO_TYPE_EQUALITY(Imsi, CARD_MVNO_TYPE_IMSI);
|
||||
ASSERT_ICC_MVNO_TYPE_EQUALITY(Spn, CARD_MVNO_TYPE_SPN);
|
||||
ASSERT_ICC_MVNO_TYPE_EQUALITY(Gid, CARD_MVNO_TYPE_GID);
|
||||
|
||||
#undef ASSERT_ICC_MVNO_TYPE_EQUALITY
|
||||
|
||||
#undef ASSERT_EQUALITY
|
||||
|
||||
} // namespace icc
|
||||
|
|
|
@ -384,7 +384,8 @@ Icc::UpdateContact(const JSContext* aCx, IccContactType aContactType,
|
|||
}
|
||||
|
||||
already_AddRefed<DOMRequest>
|
||||
Icc::MatchMvno(IccMvnoType aMvnoType, const nsAString& aMvnoData,
|
||||
Icc::MatchMvno(const nsAString& aMvnoType,
|
||||
const nsAString& aMvnoData,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
if (!mProvider) {
|
||||
|
@ -394,8 +395,8 @@ Icc::MatchMvno(IccMvnoType aMvnoType, const nsAString& aMvnoData,
|
|||
|
||||
nsRefPtr<nsIDOMDOMRequest> request;
|
||||
nsresult rv = mProvider->MatchMvno(mClientId, GetOwner(),
|
||||
static_cast<uint32_t>(aMvnoType),
|
||||
aMvnoData, getter_AddRefs(request));
|
||||
aMvnoType, aMvnoData,
|
||||
getter_AddRefs(request));
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
return nullptr;
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<DOMRequest>
|
||||
MatchMvno(IccMvnoType aMvnoType, const nsAString& aMatchData,
|
||||
MatchMvno(const nsAString& aMvnoType, const nsAString& aMatchData,
|
||||
ErrorResult& aRv);
|
||||
|
||||
IMPL_EVENT_HANDLER(iccinfochange)
|
||||
|
|
|
@ -20,7 +20,7 @@ interface nsIIccListener : nsISupports
|
|||
/**
|
||||
* XPCOM component (in the content process) that provides the ICC information.
|
||||
*/
|
||||
[scriptable, uuid(c3e3c1a9-6ac4-4916-a777-7d49ffd89c46)]
|
||||
[scriptable, uuid(937213c3-f64e-4f58-b4e0-3010f219d0c3)]
|
||||
interface nsIIccProvider : nsISupports
|
||||
{
|
||||
// MUST match enum IccCardState in MozIcc.webidl!
|
||||
|
@ -85,11 +85,6 @@ interface nsIIccProvider : nsISupports
|
|||
const unsigned long CARD_CONTACT_TYPE_FDN = 1;
|
||||
const unsigned long CARD_CONTACT_TYPE_SDN = 2;
|
||||
|
||||
// MUST match with enum IccMvnoType in MozIcc.webidl
|
||||
const unsigned long CARD_MVNO_TYPE_IMSI = 0;
|
||||
const unsigned long CARD_MVNO_TYPE_SPN = 1;
|
||||
const unsigned long CARD_MVNO_TYPE_GID = 2;
|
||||
|
||||
/**
|
||||
* Called when a content process registers receiving unsolicited messages from
|
||||
* RadioInterfaceLayer in the chrome process. Only a content process that has
|
||||
|
@ -187,6 +182,6 @@ interface nsIIccProvider : nsISupports
|
|||
*/
|
||||
nsIDOMDOMRequest matchMvno(in unsigned long clientId,
|
||||
in nsIDOMWindow window,
|
||||
in unsigned long mvnoType,
|
||||
in DOMString mvnoType,
|
||||
in DOMString mvnoData);
|
||||
};
|
||||
|
|
|
@ -1993,20 +1993,20 @@ RadioInterface.prototype = {
|
|||
matchMvno: function(target, message) {
|
||||
if (DEBUG) this.debug("matchMvno: " + JSON.stringify(message));
|
||||
|
||||
if (!message || !message.mvnoData) {
|
||||
if (!message || !message.mvnoType || !message.mvnoData) {
|
||||
message.errorMsg = RIL.GECKO_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (!message.errorMsg) {
|
||||
switch (message.mvnoType) {
|
||||
case RIL.GECKO_CARDMVNO_TYPE_IMSI:
|
||||
case "imsi":
|
||||
if (!this.rilContext.imsi) {
|
||||
message.errorMsg = RIL.GECKO_ERROR_GENERIC_FAILURE;
|
||||
break;
|
||||
}
|
||||
message.result = this.isImsiMatches(message.mvnoData);
|
||||
break;
|
||||
case RIL.GECKO_CARDMVNO_TYPE_SPN:
|
||||
case "spn":
|
||||
let spn = this.rilContext.iccInfo && this.rilContext.iccInfo.spn;
|
||||
if (!spn) {
|
||||
message.errorMsg = RIL.GECKO_ERROR_GENERIC_FAILURE;
|
||||
|
@ -2014,7 +2014,7 @@ RadioInterface.prototype = {
|
|||
}
|
||||
message.result = spn == message.mvnoData;
|
||||
break;
|
||||
case RIL.GECKO_CARDMVNO_TYPE_GID:
|
||||
case "gid":
|
||||
this.workerMessenger.send("getGID1", null, (function(response) {
|
||||
let gid = response.gid1;
|
||||
let mvnoDataLength = message.mvnoData.length;
|
||||
|
|
|
@ -2645,11 +2645,6 @@ this.GECKO_CARDCONTACT_TYPE_ADN = 0;
|
|||
this.GECKO_CARDCONTACT_TYPE_FDN = 1;
|
||||
this.GECKO_CARDCONTACT_TYPE_SDN = 2;
|
||||
|
||||
// See nsIIccProvider::CARD_MVNO_TYPE_*
|
||||
this.GECKO_CARDMVNO_TYPE_IMSI = 0;
|
||||
this.GECKO_CARDMVNO_TYPE_SPN = 1;
|
||||
this.GECKO_CARDMVNO_TYPE_GID = 2;
|
||||
|
||||
// See ril.h RIL_PersoSubstate
|
||||
this.PERSONSUBSTATE = {};
|
||||
PERSONSUBSTATE[CARD_PERSOSUBSTATE_UNKNOWN] = GECKO_CARDSTATE_UNKNOWN;
|
||||
|
|
|
@ -82,13 +82,6 @@ enum IccContactType
|
|||
"sdn" // Service Dialling Number.
|
||||
};
|
||||
|
||||
enum IccMvnoType
|
||||
{
|
||||
"imsi",
|
||||
"spn",
|
||||
"gid"
|
||||
};
|
||||
|
||||
dictionary IccUnlockCardLockOptions
|
||||
{
|
||||
required IccLockType lockType;
|
||||
|
@ -322,13 +315,17 @@ interface MozIcc : EventTarget
|
|||
*
|
||||
* @param mvnoType
|
||||
* Mvno type to use to compare the match data.
|
||||
* Currently, we only support 'imsi'.
|
||||
* @param matchData
|
||||
* Data to be compared with ICC's field.
|
||||
*
|
||||
* @return a DOMRequest.
|
||||
* The request's result will be a boolean indicating the matching
|
||||
* result.
|
||||
*
|
||||
* TODO: change param mvnoType to WebIDL enum after Bug 864489 -
|
||||
* B2G RIL: use ipdl as IPC in MozIccManager
|
||||
*/
|
||||
[Throws]
|
||||
DOMRequest matchMvno(IccMvnoType mvnoType, DOMString matchData);
|
||||
DOMRequest matchMvno(DOMString mvnoType, DOMString matchData);
|
||||
};
|
||||
|
|
|
@ -1422,7 +1422,6 @@ public abstract class GeckoApp
|
|||
LayerView layerView = (LayerView) findViewById(R.id.layer_view);
|
||||
layerView.initializeView(EventDispatcher.getInstance());
|
||||
mLayerView = layerView;
|
||||
GeckoAppShell.setLayerView(layerView);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
|
||||
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, layerView.getLayerClientObject()));
|
||||
|
||||
|
|
|
@ -122,6 +122,9 @@ public class GeckoView extends LayerView
|
|||
}
|
||||
|
||||
private void init(Context context, String url, boolean doInit) {
|
||||
// Perform common initialization for Fennec/GeckoView.
|
||||
GeckoAppShell.setLayerView(this);
|
||||
|
||||
// TODO: Fennec currently takes care of its own initialization, so this
|
||||
// flag is a hack used in Fennec to prevent GeckoView initialization.
|
||||
// This should go away once Fennec also uses GeckoView for
|
||||
|
@ -185,7 +188,6 @@ public class GeckoView extends LayerView
|
|||
GeckoProfile profile = GeckoProfile.get(context).forceCreate();
|
||||
BrowserDB.initialize(profile.getName());
|
||||
|
||||
GeckoAppShell.setLayerView(this);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createObjectEvent(
|
||||
GeckoEvent.ACTION_OBJECT_LAYER_CLIENT, getLayerClientObject()));
|
||||
GeckoThread.createAndStart();
|
||||
|
|
|
@ -318,7 +318,6 @@ public class LayerView extends FrameLayout implements Tabs.OnTabsChangedListener
|
|||
|
||||
public void setInputConnectionHandler(InputConnectionHandler inputConnectionHandler) {
|
||||
mInputConnectionHandler = inputConnectionHandler;
|
||||
mLayerClient.forceRedraw(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -15,6 +15,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.util.SparseArray;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
|
@ -90,6 +91,9 @@ public class GeckoMenu extends ListView
|
|||
// List of all menu items.
|
||||
private final List<GeckoMenuItem> mItems;
|
||||
|
||||
// Quick lookup array used to make a fast path in findItem.
|
||||
private final SparseArray<MenuItem> mItemsById;
|
||||
|
||||
// Map of "always" action-items in action-bar and their views.
|
||||
private final Map<GeckoMenuItem, View> mPrimaryActionItems;
|
||||
|
||||
|
@ -134,6 +138,7 @@ public class GeckoMenu extends ListView
|
|||
setOnItemClickListener(this);
|
||||
|
||||
mItems = new ArrayList<GeckoMenuItem>();
|
||||
mItemsById = new SparseArray<MenuItem>();
|
||||
mPrimaryActionItems = new HashMap<GeckoMenuItem, View>();
|
||||
mSecondaryActionItems = new HashMap<GeckoMenuItem, View>();
|
||||
|
||||
|
@ -362,15 +367,24 @@ public class GeckoMenu extends ListView
|
|||
|
||||
@Override
|
||||
public MenuItem findItem(int id) {
|
||||
assertOnUiThread();
|
||||
MenuItem quickItem = mItemsById.get(id);
|
||||
if (quickItem != null) {
|
||||
return quickItem;
|
||||
}
|
||||
|
||||
for (GeckoMenuItem menuItem : mItems) {
|
||||
if (menuItem.getItemId() == id) {
|
||||
mItemsById.put(id, menuItem);
|
||||
return menuItem;
|
||||
} else if (menuItem.hasSubMenu()) {
|
||||
if (!menuItem.hasActionProvider()) {
|
||||
SubMenu subMenu = menuItem.getSubMenu();
|
||||
MenuItem item = subMenu.findItem(id);
|
||||
if (item != null)
|
||||
if (item != null) {
|
||||
mItemsById.put(id, item);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -424,6 +438,9 @@ public class GeckoMenu extends ListView
|
|||
if (item == null)
|
||||
return;
|
||||
|
||||
// Remove it from the cache.
|
||||
mItemsById.remove(id);
|
||||
|
||||
// Remove it from any sub-menu.
|
||||
for (GeckoMenuItem menuItem : mItems) {
|
||||
if (menuItem.hasSubMenu()) {
|
||||
|
@ -811,6 +828,7 @@ public class GeckoMenu extends ListView
|
|||
}
|
||||
|
||||
public void clear() {
|
||||
mItemsById.clear();
|
||||
mItems.clear();
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
|
|
@ -156,6 +156,16 @@ public class GeckoMenuInflater extends MenuInflater {
|
|||
}
|
||||
|
||||
public void setValues(ParsedItem item, MenuItem menuItem) {
|
||||
// We are blocking any presenter updates during inflation.
|
||||
GeckoMenuItem geckoItem = null;
|
||||
if (menuItem instanceof GeckoMenuItem) {
|
||||
geckoItem = (GeckoMenuItem) menuItem;
|
||||
}
|
||||
|
||||
if (geckoItem != null) {
|
||||
geckoItem.stopDispatchingChanges();
|
||||
}
|
||||
|
||||
menuItem.setChecked(item.checked)
|
||||
.setVisible(item.visible)
|
||||
.setEnabled(item.enabled)
|
||||
|
@ -165,5 +175,11 @@ public class GeckoMenuInflater extends MenuInflater {
|
|||
if (Versions.feature11Plus) {
|
||||
menuItem.setShowAsAction(item.showAsAction);
|
||||
}
|
||||
|
||||
if (geckoItem != null) {
|
||||
// We don't need to allow presenter updates during inflation,
|
||||
// so we use the weak form of re-enabling changes.
|
||||
geckoItem.resumeDispatchingChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,18 +52,52 @@ public class GeckoMenuItem implements MenuItem {
|
|||
final GeckoMenu mMenu;
|
||||
OnShowAsActionChangedListener mShowAsActionChangedListener;
|
||||
|
||||
private volatile boolean mShouldDispatchChanges = true;
|
||||
private volatile boolean mDidChange;
|
||||
|
||||
public GeckoMenuItem(GeckoMenu menu, int id, int order, int titleRes) {
|
||||
mMenu = menu;
|
||||
mId = id;
|
||||
mOrder = order;
|
||||
setTitle(titleRes);
|
||||
mTitle = mMenu.getResources().getString(titleRes);
|
||||
}
|
||||
|
||||
public GeckoMenuItem(GeckoMenu menu, int id, int order, CharSequence title) {
|
||||
mMenu = menu;
|
||||
mId = id;
|
||||
mOrder = order;
|
||||
setTitle(title);
|
||||
mTitle = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop dispatching item changed events to presenters until
|
||||
* [start|resume]DispatchingItemsChanged() is called. Useful when
|
||||
* many menu operations are going to be performed as a batch.
|
||||
*/
|
||||
public void stopDispatchingChanges() {
|
||||
mDidChange = false;
|
||||
mShouldDispatchChanges = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume dispatching item changed events to presenters. This method
|
||||
* will NOT call onItemChanged if any menu operations were queued.
|
||||
* Only future menu operations will call onItemChanged. Useful for
|
||||
* sequelching presenter updates.
|
||||
*/
|
||||
public void resumeDispatchingChanges() {
|
||||
mShouldDispatchChanges = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start dispatching item changed events to presenters. This method
|
||||
* will call onItemChanged if any menu operations were queued.
|
||||
*/
|
||||
public void startDispatchingChanges() {
|
||||
if (mDidChange) {
|
||||
mMenu.onItemChanged(this);
|
||||
}
|
||||
mShouldDispatchChanges = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -247,7 +281,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setCheckable(boolean checkable) {
|
||||
if (mCheckable != checkable) {
|
||||
mCheckable = checkable;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -256,7 +294,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setChecked(boolean checked) {
|
||||
if (mChecked != checked) {
|
||||
mChecked = checked;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -265,7 +307,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setEnabled(boolean enabled) {
|
||||
if (mEnabled != enabled) {
|
||||
mEnabled = enabled;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -274,7 +320,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setIcon(Drawable icon) {
|
||||
if (mIcon != icon) {
|
||||
mIcon = icon;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -283,7 +333,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setIcon(int iconRes) {
|
||||
if (mIconRes != iconRes) {
|
||||
mIconRes = iconRes;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -367,7 +421,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setTitle(CharSequence title) {
|
||||
if (!TextUtils.equals(mTitle, title)) {
|
||||
mTitle = title;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
@ -388,7 +446,11 @@ public class GeckoMenuItem implements MenuItem {
|
|||
public MenuItem setVisible(boolean visible) {
|
||||
if (mVisible != visible) {
|
||||
mVisible = visible;
|
||||
mMenu.onItemChanged(this);
|
||||
if (mShouldDispatchChanges) {
|
||||
mMenu.onItemChanged(this);
|
||||
} else {
|
||||
mDidChange = true;
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -473,6 +473,8 @@ gbjar.sources += [
|
|||
'widget/Divider.java',
|
||||
'widget/DoorHanger.java',
|
||||
'widget/EllipsisTextView.java',
|
||||
'widget/FadedMultiColorTextView.java',
|
||||
'widget/FadedSingleColorTextView.java',
|
||||
'widget/FadedTextView.java',
|
||||
'widget/FaviconView.java',
|
||||
'widget/FloatingHintEditText.java',
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- These colors are defined from the drawables url_bar_entry_default_* -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:gecko="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item gecko:state_private="true" android:color="#080A0B"/>
|
||||
|
||||
<item android:color="#FFFFFF"/>
|
||||
|
||||
</selector>
|
|
@ -14,7 +14,7 @@
|
|||
android:scaleType="centerInside"
|
||||
android:duplicateParentState="true"/>
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView
|
||||
<org.mozilla.gecko.widget.FadedSingleColorTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="match_parent"
|
||||
|
|
|
@ -21,17 +21,18 @@
|
|||
android:paddingRight="@dimen/new_tablet_tab_highlight_stroke_width"
|
||||
android:paddingBottom="@dimen/new_tablet_tab_highlight_stroke_width">
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView android:id="@+id/title"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
style="@style/TabLayoutItemTextAppearance"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/new_tablet_tab_item_title"
|
||||
android:singleLine="true"
|
||||
android:duplicateParentState="true"
|
||||
gecko:fadeWidth="15dp"
|
||||
android:paddingRight="5dp"/>
|
||||
<org.mozilla.gecko.widget.FadedSingleColorTextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
style="@style/TabLayoutItemTextAppearance"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/new_tablet_tab_item_title"
|
||||
android:singleLine="true"
|
||||
android:duplicateParentState="true"
|
||||
gecko:fadeWidth="15dp"
|
||||
android:paddingRight="5dp"/>
|
||||
|
||||
|
||||
<!-- Use of baselineAlignBottom only supported from API 11+ - if this needs to work on lower API versions
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView
|
||||
<org.mozilla.gecko.widget.FadedSingleColorTextView
|
||||
android:id="@+id/client"
|
||||
style="@style/Widget.TwoLinePageRow.Title"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView
|
||||
<org.mozilla.gecko.widget.FadedSingleColorTextView
|
||||
android:id="@+id/tab_history_title"
|
||||
style="@style/Widget.TwoLinePageRow.Title"
|
||||
android:layout_centerVertical="true"
|
||||
|
|
|
@ -25,13 +25,15 @@
|
|||
android:contentDescription="@string/site_security"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView android:id="@+id/url_bar_title"
|
||||
style="@style/UrlBar.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0"
|
||||
gecko:fadeWidth="40dip"
|
||||
gecko:autoUpdateTheme="false"/>
|
||||
<org.mozilla.gecko.widget.FadedMultiColorTextView
|
||||
android:id="@+id/url_bar_title"
|
||||
style="@style/UrlBar.Title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1.0"
|
||||
gecko:fadeWidth="40dip"
|
||||
gecko:fadeBackgroundColor="@color/toolbar_display_layout_bg"
|
||||
gecko:autoUpdateTheme="false"/>
|
||||
|
||||
<org.mozilla.gecko.toolbar.PageActionLayout android:id="@+id/page_action_layout"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"/>
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView
|
||||
<org.mozilla.gecko.widget.FadedSingleColorTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/Widget.TopSitesGridItemTitle"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
android:orientation="vertical"
|
||||
android:paddingRight="25dp">
|
||||
|
||||
<org.mozilla.gecko.widget.FadedTextView
|
||||
<org.mozilla.gecko.widget.FadedSingleColorTextView
|
||||
android:id="@+id/title"
|
||||
style="@style/Widget.TwoLinePageRow.Title"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -146,6 +146,12 @@
|
|||
<attr name="fadeWidth" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="FadedMultiColorTextView">
|
||||
<!-- The background color we should be fading over. Useful because the
|
||||
background is full alpha and we need to copy the background underneath. -->
|
||||
<attr name="fadeBackgroundColor" format="dimension"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="BookmarkFolderView">
|
||||
<attr name="state_open" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.mozilla.gecko.tests.helpers.DeviceHelper;
|
|||
import org.mozilla.gecko.tests.helpers.WaitHelper;
|
||||
import org.mozilla.gecko.util.HardwareUtils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
@ -163,14 +164,14 @@ public class AppMenuComponent extends BaseComponent {
|
|||
|
||||
final List<MenuItemActionBar> menuItemActionBarList = RobotiumUtils.filterViews(MenuItemActionBar.class, views);
|
||||
for (MenuItemActionBar menuItem : menuItemActionBarList) {
|
||||
if (menuItem.getContentDescription().equals(text)) {
|
||||
if (TextUtils.equals(menuItem.getContentDescription(), text)) {
|
||||
return menuItem;
|
||||
}
|
||||
}
|
||||
|
||||
final List<MenuItemDefault> menuItemDefaultList = RobotiumUtils.filterViews(MenuItemDefault.class, views);
|
||||
for (MenuItemDefault menuItem : menuItemDefaultList) {
|
||||
if (menuItem.getText().equals(text)) {
|
||||
if (TextUtils.equals(menuItem.getText(), text)) {
|
||||
return menuItem;
|
||||
}
|
||||
}
|
||||
|
@ -181,7 +182,7 @@ public class AppMenuComponent extends BaseComponent {
|
|||
// TextView with the appropriate text.
|
||||
final List<TextView> textViewList = RobotiumUtils.filterViews(TextView.class, views);
|
||||
for (TextView textView : textViewList) {
|
||||
if (textView.getText().equals(text)) {
|
||||
if (TextUtils.equals(textView.getText(), text)) {
|
||||
View relativeLayout = (View) textView.getParent();
|
||||
View listMenuItemView = (View)relativeLayout.getParent();
|
||||
return listMenuItemView;
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
* 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/. */
|
||||
|
||||
package org.mozilla.gecko.widget;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* Fades the end of the text by gecko:fadeWidth amount,
|
||||
* if the text is too long and requires an ellipsis.
|
||||
*
|
||||
* This implementation is an improvement over Android's built-in fadingEdge
|
||||
* but potentially slower than the {@link org.mozilla.gecko.widget.FadedSingleColorTextView}.
|
||||
* It works for text of multiple colors but only one background color. It works by
|
||||
* drawing a gradient rectangle with the background color over the text, fading it out.
|
||||
*/
|
||||
public class FadedMultiColorTextView extends FadedTextView {
|
||||
private final ColorStateList fadeBackgroundColorList;
|
||||
|
||||
private final Paint fadePaint;
|
||||
private FadedTextGradient backgroundGradient;
|
||||
|
||||
public FadedMultiColorTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
fadePaint = new Paint();
|
||||
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FadedMultiColorTextView);
|
||||
fadeBackgroundColorList =
|
||||
a.getColorStateList(R.styleable.FadedMultiColorTextView_fadeBackgroundColor);
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
super.onDraw(canvas);
|
||||
|
||||
final boolean needsEllipsis = needsEllipsis();
|
||||
if (needsEllipsis) {
|
||||
final int right = getWidth() - getCompoundPaddingRight();
|
||||
final float left = right - fadeWidth;
|
||||
|
||||
updateGradientShader(needsEllipsis, right);
|
||||
|
||||
final float center = getHeight() / 2;
|
||||
final float top = center - getTextSize();
|
||||
final float bottom = center + getTextSize();
|
||||
|
||||
canvas.drawRect(left, top, right, bottom, fadePaint);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateGradientShader(final boolean needsEllipsis, final int gradientEndRight) {
|
||||
final int backgroundColor =
|
||||
fadeBackgroundColorList.getColorForState(getDrawableState(), Color.RED);
|
||||
|
||||
final boolean needsNewGradient = (backgroundGradient == null ||
|
||||
backgroundGradient.getBackgroundColor() != backgroundColor ||
|
||||
backgroundGradient.getEndRight() != gradientEndRight);
|
||||
|
||||
if (needsEllipsis && needsNewGradient) {
|
||||
backgroundGradient = new FadedTextGradient(gradientEndRight, fadeWidth, backgroundColor);
|
||||
fadePaint.setShader(backgroundGradient);
|
||||
}
|
||||
}
|
||||
|
||||
private static class FadedTextGradient extends LinearGradient {
|
||||
private final int endRight;
|
||||
private final int backgroundColor;
|
||||
|
||||
public FadedTextGradient(final int gradientEndRight, final int fadeWidth,
|
||||
final int backgroundColor) {
|
||||
super(gradientEndRight - fadeWidth, 0, gradientEndRight, 0,
|
||||
getColorWithZeroedAlpha(backgroundColor), backgroundColor, Shader.TileMode.CLAMP);
|
||||
|
||||
this.endRight = gradientEndRight;
|
||||
this.backgroundColor = backgroundColor;
|
||||
}
|
||||
|
||||
private static int getColorWithZeroedAlpha(final int color) {
|
||||
return Color.argb(0, Color.red(color), Color.green(color), Color.blue(color));
|
||||
}
|
||||
|
||||
public int getEndRight() {
|
||||
return endRight;
|
||||
}
|
||||
|
||||
public int getBackgroundColor() {
|
||||
return backgroundColor;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
|
||||
* 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/. */
|
||||
|
||||
package org.mozilla.gecko.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Shader;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* Fades the end of the text by gecko:fadeWidth amount,
|
||||
* if the text is too long and requires an ellipsis.
|
||||
*
|
||||
* This implementation is an improvement over Android's built-in fadingEdge
|
||||
* and the fastest of Fennec's implementations. However, it only works for
|
||||
* text of one color. It works by applying a linear gradient directly to the text.
|
||||
*/
|
||||
public class FadedSingleColorTextView extends FadedTextView {
|
||||
// Shader for the fading edge.
|
||||
private FadedTextGradient mTextGradient;
|
||||
|
||||
public FadedSingleColorTextView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
private void updateGradientShader() {
|
||||
final int color = getCurrentTextColor();
|
||||
final int width = getAvailableWidth();
|
||||
|
||||
final boolean needsNewGradient = (mTextGradient == null ||
|
||||
mTextGradient.getColor() != color ||
|
||||
mTextGradient.getWidth() != width);
|
||||
|
||||
final boolean needsEllipsis = needsEllipsis();
|
||||
if (needsEllipsis && needsNewGradient) {
|
||||
mTextGradient = new FadedTextGradient(width, fadeWidth, color);
|
||||
}
|
||||
|
||||
getPaint().setShader(needsEllipsis ? mTextGradient : null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
updateGradientShader();
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
|
||||
private static class FadedTextGradient extends LinearGradient {
|
||||
private final int mWidth;
|
||||
private final int mColor;
|
||||
|
||||
public FadedTextGradient(int width, int fadeWidth, int color) {
|
||||
super(0, 0, width, 0,
|
||||
new int[] { color, color, 0x0 },
|
||||
new float[] { 0, ((float) (width - fadeWidth) / width), 1.0f },
|
||||
Shader.TileMode.CLAMP);
|
||||
|
||||
mWidth = width;
|
||||
mColor = color;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return mColor;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,48 +7,35 @@ package org.mozilla.gecko.widget;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.LinearGradient;
|
||||
import android.graphics.Shader;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.Layout;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.widget.ThemedTextView;
|
||||
|
||||
/**
|
||||
* FadedTextView fades the ends of the text by fadeWidth amount,
|
||||
* if the text is too long and requires an ellipsis.
|
||||
* An implementation of FadedTextView should fade the end of the text
|
||||
* by gecko:fadeWidth amount, if the text is too long and requires an ellipsis.
|
||||
*/
|
||||
public class FadedTextView extends ThemedTextView {
|
||||
|
||||
public abstract class FadedTextView extends ThemedTextView {
|
||||
// Width of the fade effect from end of the view.
|
||||
private final int mFadeWidth;
|
||||
protected final int fadeWidth;
|
||||
|
||||
// Shader for the fading edge.
|
||||
private FadedTextGradient mTextGradient;
|
||||
|
||||
public FadedTextView(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public FadedTextView(Context context, AttributeSet attrs) {
|
||||
public FadedTextView(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
setSingleLine(true);
|
||||
setEllipsize(null);
|
||||
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FadedTextView);
|
||||
mFadeWidth = a.getDimensionPixelSize(R.styleable.FadedTextView_fadeWidth, 0);
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.FadedTextView);
|
||||
fadeWidth = a.getDimensionPixelSize(R.styleable.FadedTextView_fadeWidth, 0);
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
private int getAvailableWidth() {
|
||||
protected int getAvailableWidth() {
|
||||
return getWidth() - getCompoundPaddingLeft() - getCompoundPaddingRight();
|
||||
}
|
||||
|
||||
private boolean needsEllipsis() {
|
||||
protected boolean needsEllipsis() {
|
||||
final int width = getAvailableWidth();
|
||||
if (width <= 0) {
|
||||
return false;
|
||||
|
@ -57,49 +44,4 @@ public class FadedTextView extends ThemedTextView {
|
|||
final Layout layout = getLayout();
|
||||
return (layout != null && layout.getLineWidth(0) > width);
|
||||
}
|
||||
|
||||
private void updateGradientShader() {
|
||||
final int color = getCurrentTextColor();
|
||||
final int width = getAvailableWidth();
|
||||
|
||||
final boolean needsNewGradient = (mTextGradient == null ||
|
||||
mTextGradient.getColor() != color ||
|
||||
mTextGradient.getWidth() != width);
|
||||
|
||||
final boolean needsEllipsis = needsEllipsis();
|
||||
if (needsEllipsis && needsNewGradient) {
|
||||
mTextGradient = new FadedTextGradient(width, mFadeWidth, color);
|
||||
}
|
||||
|
||||
getPaint().setShader(needsEllipsis ? mTextGradient : null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
updateGradientShader();
|
||||
super.onDraw(canvas);
|
||||
}
|
||||
|
||||
private static class FadedTextGradient extends LinearGradient {
|
||||
private final int mWidth;
|
||||
private final int mColor;
|
||||
|
||||
public FadedTextGradient(int width, int fadeWidth, int color) {
|
||||
super(0, 0, width, 0,
|
||||
new int[] { color, color, 0x0 },
|
||||
new float[] { 0, ((float) (width - fadeWidth) / width), 1.0f },
|
||||
Shader.TileMode.CLAMP);
|
||||
|
||||
mWidth = width;
|
||||
mColor = color;
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return mWidth;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return mColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5011,8 +5011,11 @@ AddonInstall.prototype = {
|
|||
cancel: function AI_cancel() {
|
||||
switch (this.state) {
|
||||
case AddonManager.STATE_DOWNLOADING:
|
||||
if (this.channel)
|
||||
if (this.channel) {
|
||||
logger.debug("Cancelling download of " + this.sourceURI.spec);
|
||||
this.channel.cancel(Cr.NS_BINDING_ABORTED);
|
||||
}
|
||||
break;
|
||||
case AddonManager.STATE_AVAILABLE:
|
||||
case AddonManager.STATE_DOWNLOADED:
|
||||
logger.debug("Cancelling download of " + this.sourceURI.spec);
|
||||
|
@ -5499,8 +5502,20 @@ AddonInstall.prototype = {
|
|||
this.badCerthandler = null;
|
||||
Services.obs.removeObserver(this, "network:offline-about-to-go-offline");
|
||||
|
||||
// If the download was cancelled then all events will have already been sent
|
||||
// If the download was cancelled then update the state and send events
|
||||
if (aStatus == Cr.NS_BINDING_ABORTED) {
|
||||
if (this.state == AddonManager.STATE_DOWNLOADING) {
|
||||
logger.debug("Cancelled download of " + this.sourceURI.spec);
|
||||
this.state = AddonManager.STATE_CANCELLED;
|
||||
XPIProvider.removeActiveInstall(this);
|
||||
AddonManagerPrivate.callInstallListeners("onDownloadCancelled",
|
||||
this.listeners, this.wrapper);
|
||||
// If a listener restarted the download then there is no need to
|
||||
// remove the temporary file
|
||||
if (this.state != AddonManager.STATE_CANCELLED)
|
||||
return;
|
||||
}
|
||||
|
||||
this.removeTemporaryFile();
|
||||
if (this.restartDownload)
|
||||
this.openChannel();
|
||||
|
|
|
@ -564,17 +564,21 @@ function run_test_9() {
|
|||
function check_test_9(install) {
|
||||
prepare_test({}, [
|
||||
"onDownloadCancelled"
|
||||
]);
|
||||
], function() {
|
||||
let file = install.file;
|
||||
|
||||
// Allow the file removal to complete
|
||||
do_execute_soon(function() {
|
||||
AddonManager.getAllInstalls(function(activeInstalls) {
|
||||
do_check_eq(activeInstalls.length, 0);
|
||||
do_check_false(file.exists());
|
||||
|
||||
run_test_10();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
install.cancel();
|
||||
|
||||
ensure_test_completed();
|
||||
|
||||
AddonManager.getAllInstalls(function(activeInstalls) {
|
||||
do_check_eq(activeInstalls.length, 0);
|
||||
|
||||
run_test_10();
|
||||
});
|
||||
}
|
||||
|
||||
// Tests that after cancelling a pending install it is removed from the active
|
||||
|
@ -1013,28 +1017,31 @@ function run_test_14() {
|
|||
function check_test_14(install) {
|
||||
prepare_test({ }, [
|
||||
"onDownloadCancelled"
|
||||
]);
|
||||
], function() {
|
||||
let file = install.file;
|
||||
|
||||
install.cancel();
|
||||
install.addListener({
|
||||
onDownloadProgress: function() {
|
||||
do_throw("Download should not have continued");
|
||||
},
|
||||
onDownloadEnded: function() {
|
||||
do_throw("Download should not have continued");
|
||||
}
|
||||
});
|
||||
|
||||
ensure_test_completed();
|
||||
// Allow the listener to return to see if it continues downloading. The
|
||||
// The listener only really tests if we give it time to see progress, the
|
||||
// file check isn't ideal either
|
||||
do_execute_soon(function() {
|
||||
do_check_false(file.exists());
|
||||
|
||||
install.addListener({
|
||||
onDownloadProgress: function() {
|
||||
do_throw("Download should not have continued");
|
||||
},
|
||||
onDownloadEnded: function() {
|
||||
do_throw("Download should not have continued");
|
||||
}
|
||||
run_test_15();
|
||||
});
|
||||
});
|
||||
|
||||
// Allow the listener to return to see if it continues downloading. The
|
||||
// The listener only really tests if we give it time to see progress, the
|
||||
// file check isn't ideal either
|
||||
// Wait for the channel to be ready to cancel
|
||||
do_execute_soon(function() {
|
||||
do_check_eq(install.file, null);
|
||||
|
||||
run_test_15();
|
||||
install.cancel();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1633,7 +1640,10 @@ function check_test_27(aInstall) {
|
|||
"onInstallEnded"
|
||||
], finish_test_27);
|
||||
|
||||
let file = aInstall.file;
|
||||
aInstall.install();
|
||||
do_check_neq(file.path, aInstall.file.path);
|
||||
do_check_false(file.exists());
|
||||
}
|
||||
|
||||
function finish_test_27(aInstall) {
|
||||
|
|
|
@ -553,17 +553,21 @@ function run_test_9() {
|
|||
function check_test_9(install) {
|
||||
prepare_test({}, [
|
||||
"onDownloadCancelled"
|
||||
]);
|
||||
], function() {
|
||||
let file = install.file;
|
||||
|
||||
// Allow the file removal to complete
|
||||
do_execute_soon(function() {
|
||||
AddonManager.getAllInstalls(function(activeInstalls) {
|
||||
do_check_eq(activeInstalls.length, 0);
|
||||
do_check_false(file.exists());
|
||||
|
||||
run_test_10();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
install.cancel();
|
||||
|
||||
ensure_test_completed();
|
||||
|
||||
AddonManager.getAllInstalls(function(activeInstalls) {
|
||||
do_check_eq(activeInstalls.length, 0);
|
||||
|
||||
run_test_10();
|
||||
});
|
||||
}
|
||||
|
||||
// Tests that after cancelling a pending install it is removed from the active
|
||||
|
@ -1004,28 +1008,31 @@ function run_test_14() {
|
|||
function check_test_14(install) {
|
||||
prepare_test({ }, [
|
||||
"onDownloadCancelled"
|
||||
]);
|
||||
], function() {
|
||||
let file = install.file;
|
||||
|
||||
install.cancel();
|
||||
install.addListener({
|
||||
onDownloadProgress: function() {
|
||||
do_throw("Download should not have continued");
|
||||
},
|
||||
onDownloadEnded: function() {
|
||||
do_throw("Download should not have continued");
|
||||
}
|
||||
});
|
||||
|
||||
ensure_test_completed();
|
||||
// Allow the listener to return to see if it continues downloading. The
|
||||
// The listener only really tests if we give it time to see progress, the
|
||||
// file check isn't ideal either
|
||||
do_execute_soon(function() {
|
||||
do_check_false(file.exists());
|
||||
|
||||
install.addListener({
|
||||
onDownloadProgress: function() {
|
||||
do_throw("Download should not have continued");
|
||||
},
|
||||
onDownloadEnded: function() {
|
||||
do_throw("Download should not have continued");
|
||||
}
|
||||
run_test_15();
|
||||
});
|
||||
});
|
||||
|
||||
// Allow the listener to return to see if it continues downloading. The
|
||||
// The listener only really tests if we give it time to see progress, the
|
||||
// file check isn't ideal either
|
||||
// Wait for the channel to be ready to cancel
|
||||
do_execute_soon(function() {
|
||||
do_check_eq(install.file, null);
|
||||
|
||||
run_test_15();
|
||||
install.cancel();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1624,7 +1631,10 @@ function check_test_27(aInstall) {
|
|||
"onInstallEnded"
|
||||
], finish_test_27);
|
||||
|
||||
let file = aInstall.file;
|
||||
aInstall.install();
|
||||
do_check_neq(file.path, aInstall.file.path);
|
||||
do_check_false(file.exists());
|
||||
}
|
||||
|
||||
function finish_test_27(aInstall) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче