mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Merge b2ginbound to central, a=merge
--HG-- extra : commitid : LUnL6HF99Z8
This commit is contained in:
commit
efe440fad9
@ -105,9 +105,9 @@ function clearCache() {
|
||||
|
||||
function clearCacheAndReload() {
|
||||
// Reload the main frame with a cleared cache.
|
||||
debug('Reloading ' + getContentWindow().location);
|
||||
debug('Reloading ' + shell.contentBrowser.contentWindow.location);
|
||||
clearCache();
|
||||
getContentWindow().location.reload(true);
|
||||
shell.contentBrowser.contentWindow.location.reload(true);
|
||||
once('mozbrowserlocationchange').then(
|
||||
evt => {
|
||||
shell.sendEvent(window, "ContentStart");
|
||||
|
@ -15,10 +15,10 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -19,8 +19,8 @@
|
||||
<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="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
|
||||
|
@ -17,8 +17,8 @@
|
||||
</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="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
|
||||
|
@ -15,9 +15,9 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -15,9 +15,9 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -19,8 +19,8 @@
|
||||
<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="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="c72c9278ddc2f442d193474993d36e7f2cfb08c4"/>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "410e91ddabc7ba82a9b43b3711a3fdf2cb8de309",
|
||||
"git_revision": "1c6628ed1e40575e5ec3669ab6ef389d4ebeea65",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "1b985049f337d592c0de868cbe3e34e49ea560bd",
|
||||
"revision": "3725ee93c078cfa416c0ad67e5356d16302cdb48",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -15,10 +15,10 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -18,8 +18,8 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="5f931350fbc87c3df9db8b0ceb37734b8b471593"/>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="410e91ddabc7ba82a9b43b3711a3fdf2cb8de309"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="1c6628ed1e40575e5ec3669ab6ef389d4ebeea65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="956700d9754349b630a34551750ae6353614b6aa"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
|
@ -76,7 +76,7 @@ BluetoothMapFolder::GetFolderListingObjectString(nsAString& aString,
|
||||
const nsAString& key = iter.Key();
|
||||
folderListingObejct.Append("<folder name=\"");
|
||||
folderListingObejct.Append(NS_ConvertUTF16toUTF8(key).get());
|
||||
folderListingObejct.Append("\">");
|
||||
folderListingObejct.Append("\"/>");
|
||||
count++;
|
||||
}
|
||||
|
||||
|
@ -178,15 +178,16 @@ BluetoothProfileController::SetupProfiles(bool aAssignServiceClass)
|
||||
bool isRemoteControl = IS_REMOTE_CONTROL(mTarget.cod);
|
||||
bool isKeyboard = IS_KEYBOARD(mTarget.cod);
|
||||
bool isPointingDevice = IS_POINTING_DEVICE(mTarget.cod);
|
||||
bool isInvalid = IS_INVALID_COD(mTarget.cod);
|
||||
bool isInvalid = IS_INVALID(mTarget.cod);
|
||||
|
||||
// The value of CoD is invalid. Since the device didn't declare its class of
|
||||
// device properly, we assume the device may support all of these profiles.
|
||||
// Note the invalid CoD from bluedroid callback usually results from
|
||||
// NFC-triggered direct pairing for no EIR query records.
|
||||
if (isInvalid) {
|
||||
AddProfile(BluetoothHfpManager::Get());
|
||||
AddProfile(BluetoothA2dpManager::Get());
|
||||
AddProfile(BluetoothAvrcpManager::Get()); // register after A2DP
|
||||
AddProfile(BluetoothHidManager::Get());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,15 +54,17 @@ BEGIN_BLUETOOTH_NAMESPACE
|
||||
#define IS_POINTING_DEVICE(cod) ((GET_MINOR_DEVICE_CLASS(cod) & 0x20) >> 5)
|
||||
|
||||
/**
|
||||
* Check whether the value of CoD is invalid. (i.e. Bit 31 ~ Bit 24 != 0x0)
|
||||
* Check whether the value of CoD is invalid:
|
||||
* - Bit 31 ~ Bit 24 != 0x0, or
|
||||
* - CoD value is 0x1f00 (unclassified).
|
||||
*
|
||||
* According to Bluetooth core spec v4.1. Vol 2, Sec. 7.3, the data length of
|
||||
* CoD (class of device) is 3 bytes. The two least significant bits are used to
|
||||
* indicate 'format type'. The following 22 bits are used to indicate category
|
||||
* of service class and device type. The remaining 8 bits (Bit 31 ~ Bit 24)
|
||||
* should be unassigned bits, since BlueDroid uses uint32_t to store CoD.
|
||||
* CoD (class of device) is 3 bytes: the two least significant bits indicate
|
||||
* 'format type', and the following 22 bits indicate category of service class
|
||||
* and device type. As bluedroid stores CoD with uint32_t, the remaining 8 bits
|
||||
* (Bit 31 ~ Bit 24) should be unassigned.
|
||||
*/
|
||||
#define IS_INVALID_COD(cod) (cod >> 24)
|
||||
#define IS_INVALID(cod) ((cod) >> 24 || (cod) == 0x1f00)
|
||||
|
||||
class BluetoothProfileManagerBase;
|
||||
class BluetoothReplyRunnable;
|
||||
|
@ -54,7 +54,7 @@ BluetoothClassOfDevice::~BluetoothClassOfDevice()
|
||||
void
|
||||
BluetoothClassOfDevice::Reset()
|
||||
{
|
||||
mMajorServiceClass = 0x1; // LIMITED_DISCOVERABILITY
|
||||
mMajorServiceClass = 0;
|
||||
mMajorDeviceClass = 0x1F; // UNCATEGORIZED
|
||||
mMinorDeviceClass = 0;
|
||||
}
|
||||
|
@ -67,7 +67,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "cpmm",
|
||||
"nsISyncMessageSender");
|
||||
|
||||
function NfcContentHelper() {
|
||||
Services.obs.addObserver(this, NFC.TOPIC_MOZSETTINGS_CHANGED, false);
|
||||
Services.obs.addObserver(this, "xpcom-shutdown", false);
|
||||
|
||||
this._requestMap = [];
|
||||
@ -180,16 +179,6 @@ NfcContentHelper.prototype = {
|
||||
addEventListener: function addEventListener(listener, tabId) {
|
||||
let _window = listener.window;
|
||||
|
||||
// TODO Bug 1166210 - enable NFC debug for child process.
|
||||
if (!NFC.DEBUG_CONTENT_HELPER && _window.navigator.mozSettings) {
|
||||
let lock = _window.navigator.mozSettings.createLock();
|
||||
var nfcDebug = lock.get(NFC.SETTING_NFC_DEBUG);
|
||||
nfcDebug.onsuccess = function _nfcDebug() {
|
||||
DEBUG = nfcDebug.result[NFC.SETTING_NFC_DEBUG];
|
||||
updateDebug();
|
||||
};
|
||||
}
|
||||
|
||||
this.eventListeners[tabId] = listener;
|
||||
cpmm.sendAsyncMessage("NFC:AddEventListener", { tabId: tabId });
|
||||
},
|
||||
@ -252,16 +241,8 @@ NfcContentHelper.prototype = {
|
||||
observe: function observe(subject, topic, data) {
|
||||
if (topic == "xpcom-shutdown") {
|
||||
this.destroyDOMRequestHelper();
|
||||
Services.obs.removeObserver(this, NFC.TOPIC_MOZSETTINGS_CHANGED);
|
||||
Services.obs.removeObserver(this, "xpcom-shutdown");
|
||||
cpmm = null;
|
||||
} else if (topic == NFC.TOPIC_MOZSETTINGS_CHANGED) {
|
||||
if ("wrappedJSObject" in subject) {
|
||||
subject = subject.wrappedJSObject;
|
||||
}
|
||||
if (subject) {
|
||||
this.handle(subject.key, subject.value);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -293,15 +274,6 @@ NfcContentHelper.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
handle: function handle(name, result) {
|
||||
switch (name) {
|
||||
case NFC.SETTING_NFC_DEBUG:
|
||||
DEBUG = result;
|
||||
updateDebug();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
handleGeneralResponse: function handleGeneralResponse(result) {
|
||||
let requestId = result.requestId;
|
||||
let callback = this._requestMap[requestId];
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
package org.mozilla.b2gdroid;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.KeyguardManager;
|
||||
@ -45,6 +47,12 @@ public class Launcher extends FragmentActivity
|
||||
private Apps mApps;
|
||||
private SettingsMapper mSettings;
|
||||
|
||||
private static final long kHomeRepeat = 2;
|
||||
private static final long kHomeDelay = 500; // delay in ms to tap kHomeRepeat times.
|
||||
private long mFirstHome;
|
||||
private long mLastHome;
|
||||
private long mHomeCount;
|
||||
|
||||
/** ContextGetter */
|
||||
public Context getContext() {
|
||||
return this;
|
||||
@ -97,6 +105,10 @@ public class Launcher extends FragmentActivity
|
||||
"Launcher:Ready");
|
||||
|
||||
setContentView(R.layout.launcher);
|
||||
|
||||
mHomeCount = 0;
|
||||
mFirstHome = 0;
|
||||
mLastHome = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -139,10 +151,29 @@ public class Launcher extends FragmentActivity
|
||||
GeckoEvent e = GeckoEvent.createBroadcastEvent("Android:Launcher", obj.toString());
|
||||
GeckoAppShell.sendEventToGecko(e);
|
||||
} else if (Intent.ACTION_MAIN.equals(action)) {
|
||||
Log.d(LOGTAG, "Let's dispatch a 'home' key event");
|
||||
String message = "home-key";
|
||||
|
||||
// Check if we did a multiple home tap to trigger the task switcher.
|
||||
long now = (new Date()).getTime();
|
||||
if (now - mLastHome > kHomeDelay) {
|
||||
mHomeCount = 0;
|
||||
}
|
||||
if (mHomeCount == 0) {
|
||||
mFirstHome = now;
|
||||
}
|
||||
mHomeCount++;
|
||||
if (mHomeCount == kHomeRepeat) {
|
||||
mHomeCount = 0;
|
||||
if (now - mFirstHome < kHomeDelay) {
|
||||
message = "task-switcher";
|
||||
}
|
||||
}
|
||||
mLastHome = now;
|
||||
|
||||
Log.d(LOGTAG, "Let's dispatch a '" + message + "' key event");
|
||||
JSONObject obj = new JSONObject();
|
||||
try {
|
||||
obj.put("action", "home-key");
|
||||
obj.put("action", message);
|
||||
} catch(JSONException ex) {
|
||||
Log.wtf(LOGTAG, "Error building Android:Launcher message", ex);
|
||||
}
|
||||
|
@ -69,6 +69,9 @@ this.MessagesBridge = {
|
||||
window.dispatchEvent(new window.KeyboardEvent("keydown", { key: "Home" }));
|
||||
window.dispatchEvent(new window.KeyboardEvent("keyup", { key: "Home" }));
|
||||
break;
|
||||
case "task-switcher":
|
||||
window.dispatchEvent(new window.CustomEvent("taskmanagershow", {}));
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user