From 0964370427d3d86f49888038dc143b169561386e Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 21 Aug 2013 14:16:26 -0700 Subject: [PATCH 1/7] Bumping gaia.json for 1 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/b698259d6f77 Author: Mike Pennisi Desc: Revert "Bug 905273 - [Messages] Recipients list pull down animation is inefficient r=julienw" This reverts commit c71f1e95b410e330a81d8bb448a6d52800055f54 due to a regression in the rendering of so-called "zero-width" contacts. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 6d43740aa507..46c1c9cac614 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "e4f586d6a2c7a8ff3a676d2ddfecc5b2de94f429", + "revision": "b698259d6f77bc294510399feca5743ea4b10dde", "repo_path": "/integration/gaia-central" } From 7ac4e3a007cddb6b4dea63728d4a2e4da9afa870 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 21 Aug 2013 14:40:21 -0700 Subject: [PATCH 2/7] Bumping gaia.json for 1 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/98bed50f82ab Author: Mike Pennisi Desc: Bug 905273 - [Messages] Recipients list pull down animation is inefficient r=julienw In order to use the more efficient `transform` attribute for animating the pull-down, the element responsibilities must be altered. The top-level "#messages-to-field" serves as a basis for positioning the "#to-label" and "#messages-contact-pick-button". It is no longer animated, and because of this, it no longer draws the component's background or border. A new element, "#messages-recipients-list-container" has been introduced to take the responsibilities previously fulfilled by the "#messages-to-field". Animation is implemented via the `transform` attribute. In order to prevent unecessarily scrolling in "multiline" mode, the rendering of the recipients has been simplified. The JavaScript `generateHeightRule` function no longer has to reset the height of the widget: all elements are now rendered at full height. The method has been simplified to simply set the "#message-recipients-list" element's `max-height` in order to trigger the rendering of a scroll bar when the number of recipients causes overflow in multi-line mode. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 46c1c9cac614..00290384de88 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "b698259d6f77bc294510399feca5743ea4b10dde", + "revision": "98bed50f82ab1ee81ecd52b07c1caada4a9edb93", "repo_path": "/integration/gaia-central" } From bca6a513863c3736c9cfdbd206ba7e62c59cbb84 Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 21 Aug 2013 16:00:25 -0700 Subject: [PATCH 3/7] Bumping gaia.json for 3 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/fd3f3b5f3921 Author: David Flanagan Desc: Merge pull request #11579 from cctuan/903348 Bug 903348 - [Gallery] HD Video play icon is blurry r=davidflanagan ======== https://hg.mozilla.org/integration/gaia-central/rev/da0d8a586221 Author: cctuan Desc: Bug 903348 - [Gallery] HD Video play icon is blurry ======== https://hg.mozilla.org/integration/gaia-central/rev/e32c81b5c0d2 Author: b2gautomation Desc: Bug 907941 - gaia-ui-tests-pushbot (see bug) --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 00290384de88..3ce19aa19e28 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "98bed50f82ab1ee81ecd52b07c1caada4a9edb93", + "revision": "fd3f3b5f392158c405a13d1782fdd47856a3b652", "repo_path": "/integration/gaia-central" } From 2a442bbb08d1541b2458d0dec8c64ab0577a9b8b Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 21 Aug 2013 17:05:22 -0700 Subject: [PATCH 4/7] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/f27ca07e00e6 Author: James Lal Desc: Merge pull request #11670 from lightsofapollo/fix-the-ting update test-agent ======== https://hg.mozilla.org/integration/gaia-central/rev/17c2f8096a8a Author: James Lal Desc: update test-agent --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 3ce19aa19e28..76c44f6cd48a 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "fd3f3b5f392158c405a13d1782fdd47856a3b652", + "revision": "f27ca07e00e6bb6002214aaf9c2019f4f4c9e29d", "repo_path": "/integration/gaia-central" } From 82c211d9d68ad2ee5f9ca932fcba7950f8bd08ca Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Wed, 21 Aug 2013 22:00:21 -0700 Subject: [PATCH 5/7] Bumping gaia.json for 4 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/4cfbd89887bd Author: Alive.Kuo Desc: Merge pull request #11680 from alivedise/bugzilla/907470/modal-dialog-select-one-style Bug 907470 - Fix modal dialog select one style, r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/82bb81e4f579 Author: Alive Kuo Desc: Bug 907470 - Fix modal dialog select one style ======== https://hg.mozilla.org/integration/gaia-central/rev/7c775cb0b78c Author: Alive.Kuo Desc: Merge pull request #11679 from alivedise/bugzilla/904971/screen-manager-unit-test-fail Bug 904971 - Fix unit test of screen manager, r=timdream ======== https://hg.mozilla.org/integration/gaia-central/rev/e460c4bd2041 Author: Alive Kuo Desc: Bug 907669 - Fix unit test of screen manager --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 76c44f6cd48a..7568c8b0cf96 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "f27ca07e00e6bb6002214aaf9c2019f4f4c9e29d", + "revision": "4cfbd89887bd8f8453bb7c5906f75086b974c97f", "repo_path": "/integration/gaia-central" } From e6ff81ded8c2dc8134bb9544b9808d649af1e201 Mon Sep 17 00:00:00 2001 From: Vincent Chang Date: Mon, 29 Jul 2013 17:59:53 +0800 Subject: [PATCH 6/7] Bug 897871 - Wifi - Improve wifi startup time. r=mrbkap --- dom/wifi/WifiWorker.js | 273 +++++++++++++++++++++++------------------ 1 file changed, 152 insertions(+), 121 deletions(-) diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js index 2dacfa3fb0ab..62f573b9ee2b 100644 --- a/dom/wifi/WifiWorker.js +++ b/dom/wifi/WifiWorker.js @@ -10,6 +10,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); +Cu.import("resource://gre/modules/systemlibs.js"); var DEBUG = false; // set to true to show debug messages. @@ -67,6 +68,15 @@ const WIFI_SECURITY_TYPE_WPA2_PSK = "wpa2-psk"; const NETWORK_INTERFACE_UP = "up"; const NETWORK_INTERFACE_DOWN = "down"; +const DEFAULT_WLAN_INTERFACE = "wlan0"; + +const DRIVER_READY_WAIT = 2000; + +const SUPP_PROP = "init.svc.wpa_supplicant"; +const WPA_SUPPLICANT = "wpa_supplicant"; +const DHCP_PROP = "init.svc.dhcpcd"; +const DHCP = "dhcpcd"; + XPCOMUtils.defineLazyServiceGetter(this, "gNetworkManager", "@mozilla.org/network/manager;1", "nsINetworkManager"); @@ -84,21 +94,29 @@ XPCOMUtils.defineLazyServiceGetter(this, "gSettingsService", // expected results). var WifiManager = (function() { function getStartupPrefs() { - Cu.import("resource://gre/modules/systemlibs.js"); return { sdkVersion: parseInt(libcutils.property_get("ro.build.version.sdk"), 10), unloadDriverEnabled: libcutils.property_get("ro.moz.wifi.unloaddriver") === "1", - schedScanRecovery: libcutils.property_get("ro.moz.wifi.sched_scan_recover") === "false" ? false : true + schedScanRecovery: libcutils.property_get("ro.moz.wifi.sched_scan_recover") === "false" ? false : true, + driverDelay: libcutils.property_get("ro.moz.wifi.driverDelay"), + ifname: libcutils.property_get("wifi.interface") }; } - let {sdkVersion, unloadDriverEnabled, schedScanRecovery} = getStartupPrefs(); + let {sdkVersion, unloadDriverEnabled, schedScanRecovery, driverDelay, ifname} = getStartupPrefs(); var controlWorker = new ChromeWorker(WIFIWORKER_WORKER); var eventWorker = new ChromeWorker(WIFIWORKER_WORKER); var manager = {}; + manager.ifname = ifname; + // Emulator build runs to here. + // The debug() should only be used after WifiManager. + if (!ifname) { + manager.ifname = DEFAULT_WLAN_INTERFACE; + } manager.schedScanRecovery = schedScanRecovery; + manager.driverDelay = driverDelay ? parseInt(driverDelay, 10) : DRIVER_READY_WAIT; // Callbacks to invoke when a reply arrives from the controlWorker. var controlCallbacks = Object.create(null); @@ -711,12 +729,38 @@ var WifiManager = (function() { }); } + function stopProcess(service, process, callback) { + var count = 0; + var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + function tick() { + let result = libcutils.property_get(service); + if (result === null) { + callback(); + return; + } + if (result === "stopped" || ++count >= 5) { + // Either we succeeded or ran out of time. + timer = null; + callback(); + return; + } + + // Else it's still running, continue waiting. + timer.initWithCallback(tick, 1000, Ci.nsITimer.TYPE_ONE_SHOT); + } + + setProperty("ctl.stop", process, tick); + } + function stopDhcp(ifname, callback) { - controlMessage({ cmd: "dhcp_stop", ifname: ifname }, function(data) { - dhcpInfo = null; - notify("dhcplost"); - callback(!data.status); - }); + // This function does exactly what dhcp_stop does. Unforunately, if we call + // this function twice before the previous callback is returned. We may block + // our self waiting for the callback. It slows down the wifi startup procedure. + // Therefore, we have to roll our own version here. + let dhcpService = DHCP_PROP + "_" + ifname; + let suffix = (ifname.substr(0, 3) === "p2p") ? "p2p" : ifname; + let processName = DHCP + "_" + suffix; + stopProcess(dhcpService, processName, callback); } function releaseDhcpLease(ifname, callback) { @@ -1114,34 +1158,13 @@ var WifiManager = (function() { return true; } - const SUPP_PROP = "init.svc.wpa_supplicant"; function killSupplicant(callback) { // It is interesting to note that this function does exactly what // wifi_stop_supplicant does. Unforunately, on the Galaxy S2, Samsung // changed that function in a way that means that it doesn't recognize // wpa_supplicant as already running. Therefore, we have to roll our own // version here. - var count = 0; - var timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - function tick() { - getProperty(SUPP_PROP, "stopped", function (result) { - if (result === null) { - callback(); - return; - } - if (result === "stopped" || ++count >= 5) { - // Either we succeeded or ran out of time. - timer = null; - callback(); - return; - } - - // Else it's still running, continue waiting. - timer.initWithCallback(tick, 1000, Ci.nsITimer.TYPE_ONE_SHOT); - }); - } - - setProperty("ctl.stop", "wpa_supplicant", tick); + stopProcess(SUPP_PROP, WPA_SUPPLICANT, callback); } function didConnectSupplicant(callback) { @@ -1159,10 +1182,24 @@ var WifiManager = (function() { } function prepareForStartup(callback) { + let status = libcutils.property_get(DHCP_PROP + "_" + manager.ifname); + if (status !== "running") { + tryStopSupplicant(); + return; + } manager.connectionDropped(function() { - // Ignore any errors and kill any currently-running supplicants. On some - // phones, stopSupplicant won't work for a supplicant that we didn't - // start, so we hand-roll it here. + tryStopSupplicant(); + }); + + // Ignore any errors and kill any currently-running supplicants. On some + // phones, stopSupplicant won't work for a supplicant that we didn't + // start, so we hand-roll it here. + function tryStopSupplicant () { + let status = libcutils.property_get(SUPP_PROP); + if (status !== "running") { + callback(); + return; + } suppressEvents = true; killSupplicant(function() { disableInterface(manager.ifname, function (ok) { @@ -1170,7 +1207,7 @@ var WifiManager = (function() { callback(); }); }); - }); + } } // Initial state. @@ -1182,7 +1219,6 @@ var WifiManager = (function() { manager.authenticationFailuresCount = 0; manager.loopDetectionCount = 0; - const DRIVER_READY_WAIT = 2000; var waitForDriverReadyTimer = null; function cancelWaitForDriverReadyTimer() { if (waitForDriverReadyTimer) { @@ -1193,7 +1229,7 @@ var WifiManager = (function() { function createWaitForDriverReadyTimer(onTimeout) { waitForDriverReadyTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); waitForDriverReadyTimer.initWithCallback(onTimeout, - DRIVER_READY_WAIT, + manager.driverDelay, Ci.nsITimer.TYPE_ONE_SHOT); }; @@ -1206,71 +1242,64 @@ var WifiManager = (function() { if (enable) { manager.state = "INITIALIZING"; - // Kill any existing connections if necessary. - getProperty("wifi.interface", "tiwlan0", function (ifname) { - if (!ifname) { - callback(-1); - manager.state = "UNINITIALIZED"; - return; - } - manager.ifname = ifname; - - // Register as network interface. - WifiNetworkInterface.name = ifname; - if (!WifiNetworkInterface.registered) { - gNetworkManager.registerNetworkInterface(WifiNetworkInterface); - WifiNetworkInterface.registered = true; - } - WifiNetworkInterface.state = Ci.nsINetworkInterface.NETWORK_STATE_DISCONNECTED; - WifiNetworkInterface.ip = null; - WifiNetworkInterface.netmask = null; - WifiNetworkInterface.broadcast = null; - WifiNetworkInterface.gateway = null; - WifiNetworkInterface.dns1 = null; - WifiNetworkInterface.dns2 = null; - Services.obs.notifyObservers(WifiNetworkInterface, - kNetworkInterfaceStateChangedTopic, - null); - - prepareForStartup(function() { - loadDriver(function (status) { + // Register as network interface. + WifiNetworkInterface.name = manager.ifname; + if (!WifiNetworkInterface.registered) { + gNetworkManager.registerNetworkInterface(WifiNetworkInterface); + WifiNetworkInterface.registered = true; + } + WifiNetworkInterface.state = Ci.nsINetworkInterface.NETWORK_STATE_DISCONNECTED; + WifiNetworkInterface.ip = null; + WifiNetworkInterface.netmask = null; + WifiNetworkInterface.broadcast = null; + WifiNetworkInterface.gateway = null; + WifiNetworkInterface.dns1 = null; + WifiNetworkInterface.dns2 = null; + Services.obs.notifyObservers(WifiNetworkInterface, + kNetworkInterfaceStateChangedTopic, + null); + prepareForStartup(function() { + loadDriver(function (status) { + if (status < 0) { + callback(status); + manager.state = "UNINITIALIZED"; + return; + } + gNetworkManager.setWifiOperationMode(manager.ifname, + WIFI_FIRMWARE_STATION, + function (status) { if (status) { callback(status); manager.state = "UNINITIALIZED"; return; } - gNetworkManager.setWifiOperationMode(ifname, - WIFI_FIRMWARE_STATION, - function (status) { - if (status < 0) { - callback(status); - manager.state = "UNINITIALIZED"; - return; - } - function doStartSupplicant() { - cancelWaitForDriverReadyTimer(); - startSupplicant(function (status) { - if (status < 0) { - unloadDriver(function() { - callback(status); - }); - manager.state = "UNINITIALIZED"; - return; - } + function doStartSupplicant() { + cancelWaitForDriverReadyTimer(); + startSupplicant(function (status) { + if (status < 0) { + unloadDriver(function() { + callback(status); - manager.supplicantStarted = true; - enableInterface(ifname, function (ok) { - callback(ok ? 0 : -1); }); - }); - } + manager.state = "UNINITIALIZED"; + return; + } - // Driver startup on certain platforms takes longer than it takes for us - // to return from loadDriver, so wait 2 seconds before starting - // the supplicant to give it a chance to start. + manager.supplicantStarted = true; + enableInterface(manager.ifname, function (ok) { + callback(ok ? 0 : -1); + }); + }); + } + // Driver startup on certain platforms takes longer than it takes for us + // to return from loadDriver, so wait 2 seconds before starting + // the supplicant to give it a chance to start. + if (manager.driverDelay > 0) { createWaitForDriverReadyTimer(doStartSupplicant); - }); + } else { + doStartSupplicant(); + } }); }); }); @@ -1297,42 +1326,34 @@ var WifiManager = (function() { manager.setWifiApEnabled = function(enabled, configuration, callback) { if (enabled) { manager.tetheringState = "INITIALIZING"; - getProperty("wifi.interface", "tiwlan0", function (ifname) { - if (!ifname) { + loadDriver(function (status) { + if (status < 0) { callback(); manager.tetheringState = "UNINITIALIZED"; return; } - manager.ifname = ifname; - loadDriver(function (status) { - if (status < 0) { + + function doStartWifiTethering() { + cancelWaitForDriverReadyTimer(); + WifiNetworkInterface.name = manager.ifname; + gNetworkManager.setWifiTethering(enabled, WifiNetworkInterface, + configuration, function(result) { + if (result) { + manager.tetheringState = "UNINITIALIZED"; + } else { + manager.tetheringState = "COMPLETED"; + } + // Pop out current request. callback(); - manager.tetheringState = "UNINITIALIZED"; - return; - } + // Should we fire a dom event if we fail to set wifi tethering ? + debug("Enable Wifi tethering result: " + (result ? result : "successfully")); + }); + } - function doStartWifiTethering() { - cancelWaitForDriverReadyTimer(); - WifiNetworkInterface.name = manager.ifname; - gNetworkManager.setWifiTethering(enabled, WifiNetworkInterface, - configuration, function(result) { - if (result) { - manager.tetheringState = "UNINITIALIZED"; - } else { - manager.tetheringState = "COMPLETED"; - } - // Pop out current request. - callback(); - // Should we fire a dom event if we fail to set wifi tethering ? - debug("Enable Wifi tethering result: " + (result ? result : "successfully")); - }); - } - - // Driver startup on certain platforms takes longer than it takes - // for us to return from loadDriver, so wait 2 seconds before - // turning on Wifi tethering. - createWaitForDriverReadyTimer(doStartWifiTethering); - }); + // Driver startup on certain platforms takes longer than it takes + // for us to return from loadDriver, so wait 2 seconds before + // turning on Wifi tethering. + createWaitForDriverReadyTimer(doStartWifiTethering); }); } else { gNetworkManager.setWifiTethering(enabled, WifiNetworkInterface, @@ -2160,6 +2181,16 @@ function WifiWorker() { self.currentNetwork.bssid = WifiManager.connectionInfo.bssid; break; case "DISCONNECTED": + // wpa_supplicant may give us a "DISCONNECTED" event even if + // we are already in "DISCONNECTED" state. + if (this.prevState === "INITIALIZING" || + this.prevState === "DISCONNECTED" || + this.prevState === "INTERFACE_DISABLED" || + this.prevState === "INACTIVE" || + this.prevState === "UNINITIALIZED") { + return; + } + self._fireEvent("ondisconnect", {}); self.currentNetwork = null; self.ipAddress = ""; From ad4db4419f687d88b0d9f07a7b953ddb6608054e Mon Sep 17 00:00:00 2001 From: Gaia Pushbot Date: Thu, 22 Aug 2013 00:25:23 -0700 Subject: [PATCH 7/7] Bumping gaia.json for 2 gaia-central revision(s) ======== https://hg.mozilla.org/integration/gaia-central/rev/5de9f5b9b2f8 Author: Julien Wajsberg Desc: Merge pull request #11639 from julienw/fix-travis-2 Bug 905775 - Firefox is failing silently in recent travis builds during `make test-agent-test` step r=ochameau ======== https://hg.mozilla.org/integration/gaia-central/rev/538469b832ad Author: Julien Wajsberg Desc: Bug 905775 - Firefox is failing silently in recent travis builds during `make test-agent-test` step This turns off the desktop extensions for the tests, and enabled the touch events in DEBUG mode, so that the tests can actually use touch events. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 7568c8b0cf96..c994a7ff1cab 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "4cfbd89887bd8f8453bb7c5906f75086b974c97f", + "revision": "5de9f5b9b2f843825f13bd3667dc0fbf2e04e5f3", "repo_path": "/integration/gaia-central" }