From b6645d901ec2672ce9397729b7038315c9cb26b7 Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Mon, 7 Sep 2015 18:11:40 +1000 Subject: [PATCH 01/63] Bug 1186348 - don't initialize the sync identity (and thus don't spin the event loop) as Sync initialized. r=ckarlof --- browser/base/content/browser-syncui.js | 8 ++-- services/sync/modules/browserid_identity.js | 27 +++++++------ services/sync/modules/constants.js | 1 - services/sync/modules/identity.js | 14 +------ services/sync/modules/service.js | 42 ++++++++------------- services/sync/modules/status.js | 5 +-- 6 files changed, 39 insertions(+), 58 deletions(-) diff --git a/browser/base/content/browser-syncui.js b/browser/base/content/browser-syncui.js index 98b5dc46cb1c..61e164222afa 100644 --- a/browser/base/content/browser-syncui.js +++ b/browser/base/content/browser-syncui.js @@ -103,9 +103,11 @@ let gSyncUI = { // We want to treat "account needs verification" as "needs setup". So // "reach in" to Weave.Status._authManager to check whether we the signed-in // user is verified. - // Referencing Weave.Status spins a nested event loop to initialize the - // authManager, so this should always return a value directly. - // This only applies to fxAccounts-based Sync. + // NOTE: We used to have this _authManager hack to avoid a nested + // event-loop from querying Weave.Status.checkSetup() - while that's no + // longer true, we do still have the FxA-specific requirement of checking + // the verified state - so the hack remains. We should consider refactoring + // Sync's "check setup" capabilities to take this into account at some point... if (Weave.Status._authManager._signedInUser !== undefined) { // If we have a signed in user already, and that user is not verified, // revert to the "needs setup" state. diff --git a/services/sync/modules/browserid_identity.js b/services/sync/modules/browserid_identity.js index 921540ce6395..d26c9d02ee7a 100644 --- a/services/sync/modules/browserid_identity.js +++ b/services/sync/modules/browserid_identity.js @@ -104,12 +104,6 @@ this.BrowserIDManager.prototype = { // we don't consider the lack of a keybundle as a failure state. _shouldHaveSyncKeyBundle: false, - get readyToAuthenticate() { - // We are finished initializing when we *should* have a sync key bundle, - // although we might not actually have one due to auth failures etc. - return this._shouldHaveSyncKeyBundle; - }, - get needsCustomization() { try { return Services.prefs.getBoolPref(PREF_SYNC_SHOW_CUSTOMIZATION); @@ -122,7 +116,19 @@ this.BrowserIDManager.prototype = { for (let topic of OBSERVER_TOPICS) { Services.obs.addObserver(this, topic, false); } - return this.initializeWithCurrentIdentity(); + // and a background fetch of account data just so we can set this.account, + // so we have a username available before we've actually done a login. + // XXX - this is actually a hack just for tests and really shouldn't be + // necessary. Also, you'd think it would be safe to allow this.account to + // be set to null when there's no user logged in, but argue with the test + // suite, not with me :) + this._fxaService.getSignedInUser().then(accountData => { + if (accountData) { + this.account = accountData.email; + } + }).catch(err => { + // As above, this is only for tests so it is safe to ignore. + }); }, /** @@ -130,7 +136,7 @@ this.BrowserIDManager.prototype = { * the user is logged in, or is rejected if the login attempt has failed. */ ensureLoggedIn: function() { - if (!this._shouldHaveSyncKeyBundle) { + if (!this._shouldHaveSyncKeyBundle && this.whenReadyToAuthenticate) { // We are already in the process of logging in. return this.whenReadyToAuthenticate.promise; } @@ -160,7 +166,6 @@ this.BrowserIDManager.prototype = { } this.resetCredentials(); this._signedInUser = null; - return Promise.resolve(); }, offerSyncOptions: function () { @@ -294,7 +299,8 @@ this.BrowserIDManager.prototype = { // reauth with the server - in that case we will also get here, but // should have the same identity. // initializeWithCurrentIdentity will throw and log if these constraints - // aren't met, so just go ahead and do the init. + // aren't met (indirectly, via _updateSignedInUser()), so just go ahead + // and do the init. this.initializeWithCurrentIdentity(true); break; @@ -636,7 +642,6 @@ this.BrowserIDManager.prototype = { // that there is no authentication dance still under way. this._shouldHaveSyncKeyBundle = true; Weave.Status.login = this._authFailureReason; - Services.obs.notifyObservers(null, "weave:ui:login:error", null); throw err; }); }, diff --git a/services/sync/modules/constants.js b/services/sync/modules/constants.js index a86c64293ccf..875e64ac4e6e 100644 --- a/services/sync/modules/constants.js +++ b/services/sync/modules/constants.js @@ -122,7 +122,6 @@ LOGIN_FAILED_NETWORK_ERROR: "error.login.reason.network", LOGIN_FAILED_SERVER_ERROR: "error.login.reason.server", LOGIN_FAILED_INVALID_PASSPHRASE: "error.login.reason.recoverykey", LOGIN_FAILED_LOGIN_REJECTED: "error.login.reason.account", -LOGIN_FAILED_NOT_READY: "error.login.reason.initializing", // sync failure status codes METARECORD_DOWNLOAD_FAIL: "error.sync.reason.metarecord_download_fail", diff --git a/services/sync/modules/identity.js b/services/sync/modules/identity.js index ec5a54157349..5d7bf24f9378 100644 --- a/services/sync/modules/identity.js +++ b/services/sync/modules/identity.js @@ -85,18 +85,14 @@ IdentityManager.prototype = { _syncKeyBundle: null, /** - * Initialize the identity provider. Returns a promise that is resolved - * when initialization is complete and the provider can be queried for - * its state + * Initialize the identity provider. */ initialize: function() { // Nothing to do for this identity provider. - return Promise.resolve(); }, finalize: function() { // Nothing to do for this identity provider. - return Promise.resolve(); }, /** @@ -115,14 +111,6 @@ IdentityManager.prototype = { return Promise.resolve(); }, - /** - * Indicates if the identity manager is still initializing - */ - get readyToAuthenticate() { - // We initialize in a fully sync manner, so we are always finished. - return true; - }, - get account() { return Svc.Prefs.get("account", this.username); }, diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 0b0c33e3497e..b97d51cc5f5d 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -690,13 +690,6 @@ Sync11Service.prototype = { }, verifyLogin: function verifyLogin(allow40XRecovery = true) { - // If the identity isn't ready it might not know the username... - if (!this.identity.readyToAuthenticate) { - this._log.info("Not ready to authenticate in verifyLogin."); - this.status.login = LOGIN_FAILED_NOT_READY; - return false; - } - if (!this.identity.username) { this._log.warn("No username in verifyLogin."); this.status.login = LOGIN_FAILED_NO_USERNAME; @@ -943,25 +936,22 @@ Sync11Service.prototype = { return; } - this.identity.finalize().then( - () => { - // an observer so the FxA migration code can take some action before - // the new identity is created. - Svc.Obs.notify("weave:service:start-over:init-identity"); - this.identity.username = ""; - this.status.__authManager = null; - this.identity = Status._authManager; - this._clusterManager = this.identity.createClusterManager(this); - Svc.Obs.notify("weave:service:start-over:finish"); - } - ).then(null, - err => { - this._log.error("startOver failed to re-initialize the identity manager: " + err); - // Still send the observer notification so the current state is - // reflected in the UI. - Svc.Obs.notify("weave:service:start-over:finish"); - } - ); + try { + this.identity.finalize(); + // an observer so the FxA migration code can take some action before + // the new identity is created. + Svc.Obs.notify("weave:service:start-over:init-identity"); + this.identity.username = ""; + this.status.__authManager = null; + this.identity = Status._authManager; + this._clusterManager = this.identity.createClusterManager(this); + Svc.Obs.notify("weave:service:start-over:finish"); + } catch (err) { + this._log.error("startOver failed to re-initialize the identity manager: " + err); + // Still send the observer notification so the current state is + // reflected in the UI. + Svc.Obs.notify("weave:service:start-over:finish"); + } }, persistLogin: function persistLogin() { diff --git a/services/sync/modules/status.js b/services/sync/modules/status.js index 19dff9712496..708a96f6950c 100644 --- a/services/sync/modules/status.js +++ b/services/sync/modules/status.js @@ -30,10 +30,7 @@ this.Status = { .wrappedJSObject; let idClass = service.fxAccountsEnabled ? BrowserIDManager : IdentityManager; this.__authManager = new idClass(); - // .initialize returns a promise, so we need to spin until it resolves. - let cb = Async.makeSpinningCallback(); - this.__authManager.initialize().then(cb, cb); - cb.wait(); + this.__authManager.initialize(); return this.__authManager; }, From bd020f5c4c4ef3661bd150160f2ebdbad7bf633f Mon Sep 17 00:00:00 2001 From: rthyberg Date: Fri, 4 Sep 2015 01:56:00 +0200 Subject: [PATCH 02/63] Bug 1191825 - Don't log errors if we can't find an aborted-session ping on disk. r=gfritzsche --- toolkit/components/telemetry/TelemetryStorage.jsm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolkit/components/telemetry/TelemetryStorage.jsm b/toolkit/components/telemetry/TelemetryStorage.jsm index 0e26b5071b69..e3c2425734be 100644 --- a/toolkit/components/telemetry/TelemetryStorage.jsm +++ b/toolkit/components/telemetry/TelemetryStorage.jsm @@ -75,12 +75,13 @@ const UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12 * This is thrown by |TelemetryStorage.loadPingFile| when reading the ping * from the disk fails. */ -function PingReadError(message="Error reading the ping file") { +function PingReadError(message="Error reading the ping file", becauseNoSuchFile = false) { Error.call(this, message); let error = new Error(); this.name = "PingReadError"; this.message = message; this.stack = error.stack; + this.becauseNoSuchFile = becauseNoSuchFile; } PingReadError.prototype = Object.create(Error.prototype); PingReadError.prototype.constructor = PingReadError; @@ -1445,7 +1446,7 @@ let TelemetryStorageImpl = { array = yield OS.File.read(aFilePath, options); } catch(e) { this._log.trace("loadPingfile - unreadable ping " + aFilePath, e); - throw new PingReadError(e.message); + throw new PingReadError(e.message, e.becauseNoSuchFile); } let decoder = new TextDecoder(); From 144127e665f0e26e832b2b0a1b424f34b8c57fdc Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 28 Aug 2015 11:42:58 +0200 Subject: [PATCH 03/63] Bug 1174060 - 1 - Fix auto-removed animations that have the same name but different targets; r=miker --HG-- extra : commitid : iso5KFlELb extra : rebase_source : 7ce5662e57917deeeee4f87b76c0cf094b9dafe1 extra : histedit_source : 7233358162971ee0bd35a28a61aa11b39057893b --- toolkit/devtools/server/actors/animation.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/toolkit/devtools/server/actors/animation.js b/toolkit/devtools/server/actors/animation.js index d1a4de6e0361..c4f00a4fdf6b 100644 --- a/toolkit/devtools/server/actors/animation.js +++ b/toolkit/devtools/server/actors/animation.js @@ -689,11 +689,14 @@ let AnimationsActor = exports.AnimationsActor = ActorClass({ // already have, it means it's a transition that's re-starting. So send // a "removed" event for the one we already have. let index = this.actors.findIndex(a => { - return a.player.constructor === player.constructor && - ((a.isAnimation() && - a.player.animationName === player.animationName) || - (a.isTransition() && - a.player.transitionProperty === player.transitionProperty)); + let isSameType = a.player.constructor === player.constructor; + let isSameName = (a.isAnimation() && + a.player.animationName === player.animationName) || + (a.isTransition() && + a.player.transitionProperty === player.transitionProperty); + let isSameNode = a.player.effect.target === player.effect.target; + + return isSameType && isSameNode && isSameName; }); if (index !== -1) { eventData.push({ From 32543c8b98bfe47a1372a890cf28ab5580d91761 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Fri, 4 Sep 2015 17:43:41 +0200 Subject: [PATCH 04/63] Bug 1174060 - 2 - Display negative delays like normal delays; r=bgrins This ensure animations with negative delays are fully displayed in the animation-inspector panel, and that negative and positive delays look the same. --HG-- extra : commitid : AiGlhWuSJph extra : rebase_source : c79f7afb4bc8395c59f3777b34759c5548ad5ff1 extra : histedit_source : 47026fa2b10ef126394de306ac18519badc89b0f --- .../devtools/animationinspector/components.js | 21 ++++++++++++--- ...mation_timeline_takes_rate_into_account.js | 19 ++++++++----- .../shared/devtools/animationinspector.css | 27 +++++++------------ 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/browser/devtools/animationinspector/components.js b/browser/devtools/animationinspector/components.js index 462963c388ac..aa499e9cd1d0 100644 --- a/browser/devtools/animationinspector/components.js +++ b/browser/devtools/animationinspector/components.js @@ -567,7 +567,12 @@ let TimeScale = { addAnimation: function(state) { let {startTime, delay, duration, iterationCount, playbackRate} = state; - this.minStartTime = Math.min(this.minStartTime, startTime); + // Negative-delayed animations have their startTimes set such that we would + // be displaying the delay outside the time window if we didn't take it into + // account here. + let relevantDelay = delay < 0 ? delay / playbackRate : 0; + + this.minStartTime = Math.min(this.minStartTime, startTime + relevantDelay); let length = (delay / playbackRate) + ((duration / playbackRate) * (!iterationCount ? 1 : iterationCount)); @@ -953,23 +958,31 @@ AnimationsTimeline.prototype = { }); // The animation name is displayed over the iterations. + // Note that in case of negative delay, we push the name towards the right + // so the delay can be shown. createNode({ parent: iterations, attributes: { "class": "name", - "title": this.getAnimationTooltipText(state) + "title": this.getAnimationTooltipText(state), + "style": delay < 0 + ? "margin-left:" + + TimeScale.durationToDistance(Math.abs(delay), width) + "px" + : "" }, textContent: state.name }); // Delay. if (delay) { - let w = TimeScale.durationToDistance(delay / rate, width); + // Negative delays need to start at 0. + let x = TimeScale.durationToDistance((delay < 0 ? 0 : delay) / rate, width); + let w = TimeScale.durationToDistance(Math.abs(delay) / rate, width); createNode({ parent: iterations, attributes: { "class": "delay", - "style": `left:-${w}px; + "style": `left:-${x}px; width:${w}px;` } }); diff --git a/browser/devtools/animationinspector/test/browser_animation_timeline_takes_rate_into_account.js b/browser/devtools/animationinspector/test/browser_animation_timeline_takes_rate_into_account.js index 06202cc9974a..2e018aeef3a9 100644 --- a/browser/devtools/animationinspector/test/browser_animation_timeline_takes_rate_into_account.js +++ b/browser/devtools/animationinspector/test/browser_animation_timeline_takes_rate_into_account.js @@ -22,18 +22,23 @@ add_task(function*() { let timeBlocks = timelineEl.querySelectorAll(".time-block"); is(timeBlocks.length, 2, "2 animations are displayed"); - info("The first animation has its rate to 1, let's measure it"); + info("The first animation has its rate set to 1, let's measure it"); let el = timeBlocks[0]; - let duration = el.querySelector(".iterations").getBoundingClientRect().width; - let delay = el.querySelector(".delay").getBoundingClientRect().width; + let duration = parseInt(el.querySelector(".iterations").style.width, 10); + let delay = parseInt(el.querySelector(".delay").style.width, 10); info("The second animation has its rate set to 2, so should be shorter"); let el2 = timeBlocks[1]; - let duration2 = el2.querySelector(".iterations").getBoundingClientRect().width; - let delay2 = el2.querySelector(".delay").getBoundingClientRect().width; + let duration2 = parseInt(el2.querySelector(".iterations").style.width, 10); + let delay2 = parseInt(el2.querySelector(".delay").style.width, 10); - is(duration, 2 * duration2, "The duration width is correct"); - is(delay, 2 * delay2, "The delay width is correct"); + // The width are calculated by the animation-inspector dynamically depending + // on the size of the panel, and therefore depends on the test machine/OS. + // Let's not try to be too precise here and compare numbers. + let durationDelta = (2 * duration2) - duration; + ok(durationDelta <= 1, "The duration width is correct"); + let delayDelta = (2 * delay2) - delay; + ok(delayDelta <= 1, "The delay width is correct"); }); diff --git a/browser/themes/shared/devtools/animationinspector.css b/browser/themes/shared/devtools/animationinspector.css index 9bf9693a108f..a8c7495278cc 100644 --- a/browser/themes/shared/devtools/animationinspector.css +++ b/browser/themes/shared/devtools/animationinspector.css @@ -287,25 +287,16 @@ body { .animation-timeline .animation .delay { position: absolute; top: 0; + /* Make sure the delay covers up the animation border */ + transform: translate(-1px, -1px); height: 100%; - background-image: linear-gradient(to bottom, - transparent, - transparent 9px, - var(--timelime-border-color) 9px, - var(--timelime-border-color) 11px, - transparent 11px, - transparent); -} - -.animation-timeline .animation .delay::before { - position: absolute; - content: ""; - left: 0; - width: 2px; - height: 8px; - top: 50%; - margin-top: -4px; - background: var(--timelime-border-color); + background-image: repeating-linear-gradient(45deg, + transparent, + transparent 1px, + var(--theme-selection-color) 1px, + var(--theme-selection-color) 4px); + background-color: var(--timelime-border-color); + border: 1px solid var(--timelime-border-color); } /* Animation target node gutter, contains a preview of the dom node */ From 58175c20daff5e5bc38b3c3d9519e6c93977204c Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 3 Sep 2015 09:34:08 +0200 Subject: [PATCH 05/63] Bug 1174060 - 3 - Place the scrubber correctly when new animations are added; r=miker --HG-- extra : commitid : 2o0CZusihHn extra : rebase_source : e1e32416d36b30148ea98aa130e2bec95279d66e extra : histedit_source : 22674dc832f046fce62a54b24e2b22714c377e9c --- .../animation-controller.js | 19 +++++++++++++++++++ .../animationinspector/animation-panel.js | 3 ++- .../devtools/animationinspector/components.js | 7 +++---- toolkit/devtools/server/actors/animation.js | 9 ++++++++- 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/browser/devtools/animationinspector/animation-controller.js b/browser/devtools/animationinspector/animation-controller.js index ad6de4d35cfd..594cf71ab9c3 100644 --- a/browser/devtools/animationinspector/animation-controller.js +++ b/browser/devtools/animationinspector/animation-controller.js @@ -308,6 +308,25 @@ let AnimationsController = { this.emit(this.PLAYERS_UPDATED_EVENT, this.animationPlayers); }), + /** + * Get the latest known current time of document.timeline. + * This value is sent along with all AnimationPlayerActors' states, but it + * isn't updated after that, so this function loops over all know animations + * to find the highest value. + * @return {Number|Boolean} False is returned if this server version doesn't + * provide document's current time. + */ + get documentCurrentTime() { + let time = 0; + for (let {state} of this.animationPlayers) { + if (!state.documentCurrentTime) { + return false; + } + time = Math.max(time, state.documentCurrentTime); + } + return time; + }, + startAllAutoRefresh: function() { if (this.traits.isNewUI) { return; diff --git a/browser/devtools/animationinspector/animation-panel.js b/browser/devtools/animationinspector/animation-panel.js index dc94e9f7dd8f..22fc847a7786 100644 --- a/browser/devtools/animationinspector/animation-panel.js +++ b/browser/devtools/animationinspector/animation-panel.js @@ -183,7 +183,8 @@ let AnimationsPanel = { // Re-render the timeline component. if (this.animationsTimelineComponent) { this.animationsTimelineComponent.render( - AnimationsController.animationPlayers); + AnimationsController.animationPlayers, + AnimationsController.documentCurrentTime); } // If there are no players to show, show the error message instead and diff --git a/browser/devtools/animationinspector/components.js b/browser/devtools/animationinspector/components.js index aa499e9cd1d0..183b7c5f6f20 100644 --- a/browser/devtools/animationinspector/components.js +++ b/browser/devtools/animationinspector/components.js @@ -796,7 +796,7 @@ AnimationsTimeline.prototype = { this.emit("current-time-changed", time); }, - render: function(animations) { + render: function(animations, documentCurrentTime) { this.unrender(); this.animations = animations; @@ -854,12 +854,11 @@ AnimationsTimeline.prototype = { // doesn't provide it, hide the scrubber entirely). // Note that because the currentTime was sent via the protocol, some time // may have gone by since then, and so the scrubber might be a bit late. - let time = this.animations[0].state.documentCurrentTime; - if (!time) { + if (!documentCurrentTime) { this.scrubberEl.style.display = "none"; } else { this.scrubberEl.style.display = "block"; - this.startAnimatingScrubber(time); + this.startAnimatingScrubber(documentCurrentTime); } }, diff --git a/toolkit/devtools/server/actors/animation.js b/toolkit/devtools/server/actors/animation.js index c4f00a4fdf6b..80f862494a14 100644 --- a/toolkit/devtools/server/actors/animation.js +++ b/toolkit/devtools/server/actors/animation.js @@ -324,7 +324,14 @@ let AnimationPlayerActor = ActorClass({ */ onAnimationMutation: function(mutations) { let hasChanged = false; - for (let {changedAnimations} of mutations) { + for (let {removedAnimations, changedAnimations} of mutations) { + if (removedAnimations.length) { + // Reset the local copy of the state on removal, since the animation can + // be kept on the client and re-added, its state needs to be sent in + // full. + this.currentState = null; + } + if (!changedAnimations.length) { return; } From eb9897b7168caf00e60adbfc536261de9b2e0840 Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Wed, 2 Sep 2015 16:02:56 +0200 Subject: [PATCH 06/63] Bug 1174060 - 4 - Minor eslint changes to animation-inspector; r=ednapiranha --HG-- extra : commitid : I01lEzvCxVF extra : rebase_source : 387389832041b9afc58084f2802d3cabfd644ff4 extra : histedit_source : 4529d496b136de8caeeb7390bac9f0fdf49870aa --- .../animation-controller.js | 42 +++++++++++-------- .../animationinspector/animation-panel.js | 12 ++++-- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/browser/devtools/animationinspector/animation-controller.js b/browser/devtools/animationinspector/animation-controller.js index 594cf71ab9c3..a2972ba3404a 100644 --- a/browser/devtools/animationinspector/animation-controller.js +++ b/browser/devtools/animationinspector/animation-controller.js @@ -23,6 +23,7 @@ loader.lazyRequireGetter(this, "AnimationsFront", const STRINGS_URI = "chrome://browser/locale/devtools/animationinspector.properties"; const L10N = new ViewHelpers.L10N(STRINGS_URI); +const V3_UI_PREF = "devtools.inspector.animationInspectorV3"; // Global toolbox/inspector, set when startup is called. let gToolbox, gInspector; @@ -76,19 +77,20 @@ function destroy() { * @return {Object} An object with boolean properties. */ let getServerTraits = Task.async(function*(target) { - let config = [{ - name: "hasToggleAll", actor: "animations", method: "toggleAll" - }, { - name: "hasSetCurrentTime", actor: "animationplayer", method: "setCurrentTime" - }, { - name: "hasMutationEvents", actor: "animations", method: "stopAnimationPlayerUpdates" - }, { - name: "hasSetPlaybackRate", actor: "animationplayer", method: "setPlaybackRate" - }, { - name: "hasTargetNode", actor: "domwalker", method: "getNodeFromActor" - }, { - name: "hasSetCurrentTimes", actor: "animations", method: "setCurrentTimes" - }]; + let config = [ + { name: "hasToggleAll", actor: "animations", + method: "toggleAll" }, + { name: "hasSetCurrentTime", actor: "animationplayer", + method: "setCurrentTime" }, + { name: "hasMutationEvents", actor: "animations", + method: "stopAnimationPlayerUpdates" }, + { name: "hasSetPlaybackRate", actor: "animationplayer", + method: "setPlaybackRate" }, + { name: "hasTargetNode", actor: "domwalker", + method: "getNodeFromActor" }, + { name: "hasSetCurrentTimes", actor: "animations", + method: "setCurrentTimes" } + ]; let traits = {}; for (let {name, actor, method} of config) { @@ -96,7 +98,7 @@ let getServerTraits = Task.async(function*(target) { } // Special pref-based UI trait. - traits.isNewUI = Services.prefs.getBoolPref("devtools.inspector.animationInspectorV3"); + traits.isNewUI = Services.prefs.getBoolPref(V3_UI_PREF); return traits; }); @@ -114,7 +116,8 @@ let getServerTraits = Task.async(function*(target) { * * Usage example: * - * AnimationsController.on(AnimationsController.PLAYERS_UPDATED_EVENT, onPlayers); + * AnimationsController.on(AnimationsController.PLAYERS_UPDATED_EVENT, + * onPlayers); * function onPlayers() { * for (let player of AnimationsController.animationPlayers) { * // do something with player @@ -126,7 +129,8 @@ let AnimationsController = { initialize: Task.async(function*() { if (this.initialized) { - return this.initialized.promise; + yield this.initialized.promise; + return; } this.initialized = promise.defer(); @@ -157,7 +161,8 @@ let AnimationsController = { } if (this.destroyed) { - return this.destroyed.promise; + yield this.destroyed.promise; + return; } this.destroyed = promise.defer(); @@ -272,7 +277,8 @@ let AnimationsController = { refreshAnimationPlayers: Task.async(function*(nodeFront) { yield this.destroyAnimationPlayers(); - this.animationPlayers = yield this.animationsFront.getAnimationPlayersForNode(nodeFront); + this.animationPlayers = yield this.animationsFront + .getAnimationPlayersForNode(nodeFront); this.startAllAutoRefresh(); // Start listening for animation mutations only after the first method call diff --git a/browser/devtools/animationinspector/animation-panel.js b/browser/devtools/animationinspector/animation-panel.js index 22fc847a7786..862a4f6f74e9 100644 --- a/browser/devtools/animationinspector/animation-panel.js +++ b/browser/devtools/animationinspector/animation-panel.js @@ -30,7 +30,8 @@ let AnimationsPanel = { return; } if (this.initialized) { - return this.initialized.promise; + yield this.initialized.promise; + return; } this.initialized = promise.defer(); @@ -74,7 +75,8 @@ let AnimationsPanel = { } if (this.destroyed) { - return this.destroyed.promise; + yield this.destroyed.promise; + return; } this.destroyed = promise.defer(); @@ -157,7 +159,8 @@ let AnimationsPanel = { currentWidgetStateChange.push(btnClass.contains("paused") ? widget.play() : widget.pause()); } - yield promise.all(currentWidgetStateChange).catch(e => console.error(e)); + yield promise.all(currentWidgetStateChange) + .catch(error => console.error(error)); } } @@ -170,7 +173,8 @@ let AnimationsPanel = { }, onTimelineTimeChanged: function(e, time) { - AnimationsController.setCurrentTimeAll(time, true).catch(e => console.error(e)); + AnimationsController.setCurrentTimeAll(time, true) + .catch(error => console.error(error)); }, refreshAnimations: Task.async(function*() { From bd39ae98c2c2ca5062658d48a4fb44672ae9d61f Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Thu, 3 Sep 2015 11:05:52 +0200 Subject: [PATCH 07/63] Bug 1174060 - 5 - Reverts typo introduced by bug 1180134 that overrided the background-image; r=tromey --HG-- extra : commitid : Jjfpg0JpSaj extra : rebase_source : 3c324a9b76b2989ce1f0423fe81ac85c36f6c94e extra : histedit_source : 87c7dbe8bb94a2719c7c5182d7d583f974ebbcb4 --- browser/themes/shared/devtools/animationinspector.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/themes/shared/devtools/animationinspector.css b/browser/themes/shared/devtools/animationinspector.css index a8c7495278cc..19a8b58b023e 100644 --- a/browser/themes/shared/devtools/animationinspector.css +++ b/browser/themes/shared/devtools/animationinspector.css @@ -238,7 +238,7 @@ body { border: 1px solid var(--timelime-border-color); /* The background color is set independently */ - background: var(--timeline-background-color); + background-color: var(--timeline-background-color); } .animation-timeline .animation .cssanimation { From 4e38c090861ac510ddc01c9856877def2cbe24c3 Mon Sep 17 00:00:00 2001 From: Martyn Haigh Date: Thu, 3 Sep 2015 18:47:58 +0100 Subject: [PATCH 08/63] Bug 1201619 - Fix some tab tray dimen issues; r=mcomella --HG-- extra : commitid : 43AU3BziOs9 extra : rebase_source : 553263b949dffd07f9794b3c59ec5f032e4920ec extra : amend_source : 363fe6bafcf872b86c2b42d1ac95920851a5e284 --- .../android/base/resources/values-sw360dp/dimens.xml | 10 ++++++++++ .../android/base/resources/values-sw400dp/dimens.xml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 mobile/android/base/resources/values-sw360dp/dimens.xml diff --git a/mobile/android/base/resources/values-sw360dp/dimens.xml b/mobile/android/base/resources/values-sw360dp/dimens.xml new file mode 100644 index 000000000000..e7cd79abb3ee --- /dev/null +++ b/mobile/android/base/resources/values-sw360dp/dimens.xml @@ -0,0 +1,10 @@ + + + + + 156dip + 110dip + 148dip + diff --git a/mobile/android/base/resources/values-sw400dp/dimens.xml b/mobile/android/base/resources/values-sw400dp/dimens.xml index edec69fa7821..94567a220154 100644 --- a/mobile/android/base/resources/values-sw400dp/dimens.xml +++ b/mobile/android/base/resources/values-sw400dp/dimens.xml @@ -4,7 +4,7 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - 174dip + 176dip 120dip 168dip From 40e617bca3869d152fef29dc8445db8e5e484f53 Mon Sep 17 00:00:00 2001 From: Ed Lee Date: Fri, 28 Aug 2015 01:39:59 -0700 Subject: [PATCH 09/63] Bug 1198841 - Brief message to invite someone to join when joining a room with someone already there [r=Standard8] --- .../components/loop/content/js/roomViews.js | 14 +++++- .../components/loop/content/js/roomViews.jsx | 14 +++++- .../loop/content/shared/js/activeRoomStore.js | 15 +++++- .../loop/test/desktop-local/roomViews_test.js | 47 ++++++++++++++++++- .../loop/test/shared/activeRoomStore_test.js | 27 +++++++++++ 5 files changed, 113 insertions(+), 4 deletions(-) diff --git a/browser/components/loop/content/js/roomViews.js b/browser/components/loop/content/js/roomViews.js index 8e3bfc050924..4aa052326dfd 100644 --- a/browser/components/loop/content/js/roomViews.js +++ b/browser/components/loop/content/js/roomViews.js @@ -593,8 +593,20 @@ loop.roomViews = (function(mozL10n) { })); }, + /** + * Determine if the invitation controls should be shown. + * + * @return {Boolean} True if there's no guests. + */ _shouldRenderInvitationOverlay: function() { - return (this.state.roomState !== ROOM_STATES.HAS_PARTICIPANTS); + var hasGuests = typeof this.state.participants === "object" && + this.state.participants.filter(function(participant) { + return !participant.owner; + }).length > 0; + + // Don't show if the room has participants whether from the room state or + // there being non-owner guests in the participants array. + return this.state.roomState !== ROOM_STATES.HAS_PARTICIPANTS && !hasGuests; }, /** diff --git a/browser/components/loop/content/js/roomViews.jsx b/browser/components/loop/content/js/roomViews.jsx index a10991507ee6..662b0765366e 100644 --- a/browser/components/loop/content/js/roomViews.jsx +++ b/browser/components/loop/content/js/roomViews.jsx @@ -593,8 +593,20 @@ loop.roomViews = (function(mozL10n) { })); }, + /** + * Determine if the invitation controls should be shown. + * + * @return {Boolean} True if there's no guests. + */ _shouldRenderInvitationOverlay: function() { - return (this.state.roomState !== ROOM_STATES.HAS_PARTICIPANTS); + var hasGuests = typeof this.state.participants === "object" && + this.state.participants.filter(function(participant) { + return !participant.owner; + }).length > 0; + + // Don't show if the room has participants whether from the room state or + // there being non-owner guests in the participants array. + return this.state.roomState !== ROOM_STATES.HAS_PARTICIPANTS && !hasGuests; }, /** diff --git a/browser/components/loop/content/shared/js/activeRoomStore.js b/browser/components/loop/content/shared/js/activeRoomStore.js index 74670a9e680f..8eb8ac7dae70 100644 --- a/browser/components/loop/content/shared/js/activeRoomStore.js +++ b/browser/components/loop/content/shared/js/activeRoomStore.js @@ -51,6 +51,7 @@ loop.store.ActiveRoomStore = (function() { var OPTIONAL_ROOMINFO_FIELDS = { urls: "roomContextUrls", description: "roomDescription", + participants: "participants", roomInfoFailure: "roomInfoFailure", roomName: "roomName", roomState: "roomState" @@ -296,6 +297,7 @@ loop.store.ActiveRoomStore = (function() { } this.dispatchAction(new sharedActions.SetupRoomInfo({ + participants: roomData.participants, roomToken: actionData.roomToken, roomContextUrls: roomData.decryptedContext.urls, roomDescription: roomData.decryptedContext.description, @@ -418,6 +420,7 @@ loop.store.ActiveRoomStore = (function() { } this.setStoreState({ + participants: actionData.participants, roomContextUrls: actionData.roomContextUrls, roomDescription: actionData.roomDescription, roomName: actionData.roomName, @@ -449,7 +452,7 @@ loop.store.ActiveRoomStore = (function() { // Iterate over the optional fields that _may_ be present on the actionData // object. Object.keys(OPTIONAL_ROOMINFO_FIELDS).forEach(function(field) { - if (actionData[field]) { + if (actionData[field] !== undefined) { newState[OPTIONAL_ROOMINFO_FIELDS[field]] = actionData[field]; } }); @@ -478,6 +481,7 @@ loop.store.ActiveRoomStore = (function() { this.dispatchAction(new sharedActions.UpdateRoomInfo({ urls: roomData.decryptedContext.urls, description: roomData.decryptedContext.description, + participants: roomData.participants, roomName: roomData.decryptedContext.roomName, roomUrl: roomData.roomUrl })); @@ -792,7 +796,16 @@ loop.store.ActiveRoomStore = (function() { * one participantleaves. */ remotePeerDisconnected: function() { + // Update the participants to just the owner. + var participants = this.getStoreState("participants"); + if (participants) { + participants = participants.filter(function(participant) { + return participant.owner; + }); + } + this.setStoreState({ + participants: participants, roomState: ROOM_STATES.SESSION_CONNECTED, remoteSrcVideoObject: null }); diff --git a/browser/components/loop/test/desktop-local/roomViews_test.js b/browser/components/loop/test/desktop-local/roomViews_test.js index 510468455172..0607a8f3bb27 100644 --- a/browser/components/loop/test/desktop-local/roomViews_test.js +++ b/browser/components/loop/test/desktop-local/roomViews_test.js @@ -470,8 +470,51 @@ describe("loop.roomViews", function () { view = mountTestComponent(); + expect(TestUtils.findRenderedComponentWithType(view, + loop.roomViews.DesktopRoomInvitationView).getDOMNode()).to.not.eql(null); + }); + + it("should render the DesktopRoomInvitationView if roomState is `JOINED` with just owner", + function() { + activeRoomStore.setStoreState({ + participants: [{owner: true}], + roomState: ROOM_STATES.JOINED + }); + + view = mountTestComponent(); + + expect(TestUtils.findRenderedComponentWithType(view, + loop.roomViews.DesktopRoomInvitationView).getDOMNode()).to.not.eql(null); + }); + + it("should render the DesktopRoomConversationView if roomState is `JOINED` with remote participant", + function() { + activeRoomStore.setStoreState({ + participants: [{}], + roomState: ROOM_STATES.JOINED + }); + + view = mountTestComponent(); + TestUtils.findRenderedComponentWithType(view, - loop.roomViews.DesktopRoomInvitationView); + loop.roomViews.DesktopRoomConversationView); + expect(TestUtils.findRenderedComponentWithType(view, + loop.roomViews.DesktopRoomInvitationView).getDOMNode()).to.eql(null); + }); + + it("should render the DesktopRoomConversationView if roomState is `JOINED` with participants", + function() { + activeRoomStore.setStoreState({ + participants: [{owner: true}, {}], + roomState: ROOM_STATES.JOINED + }); + + view = mountTestComponent(); + + TestUtils.findRenderedComponentWithType(view, + loop.roomViews.DesktopRoomConversationView); + expect(TestUtils.findRenderedComponentWithType(view, + loop.roomViews.DesktopRoomInvitationView).getDOMNode()).to.eql(null); }); it("should render the DesktopRoomConversationView if roomState is `HAS_PARTICIPANTS`", @@ -482,6 +525,8 @@ describe("loop.roomViews", function () { TestUtils.findRenderedComponentWithType(view, loop.roomViews.DesktopRoomConversationView); + expect(TestUtils.findRenderedComponentWithType(view, + loop.roomViews.DesktopRoomInvitationView).getDOMNode()).to.eql(null); }); it("should call onCallTerminated when the call ended", function() { diff --git a/browser/components/loop/test/shared/activeRoomStore_test.js b/browser/components/loop/test/shared/activeRoomStore_test.js index 845e2f5468cb..74024929bc91 100644 --- a/browser/components/loop/test/shared/activeRoomStore_test.js +++ b/browser/components/loop/test/shared/activeRoomStore_test.js @@ -310,6 +310,7 @@ describe("loop.store.ActiveRoomStore", function () { decryptedContext: { roomName: "Monkeys" }, + participants: [], roomUrl: "http://invalid" }; @@ -350,6 +351,7 @@ describe("loop.store.ActiveRoomStore", function () { new sharedActions.SetupRoomInfo({ roomContextUrls: undefined, roomDescription: undefined, + participants: [], roomToken: fakeToken, roomName: fakeRoomData.decryptedContext.roomName, roomUrl: fakeRoomData.roomUrl, @@ -1277,6 +1279,30 @@ describe("loop.store.ActiveRoomStore", function () { expect(store.getStoreState().remoteSrcVideoObject).eql(null); }); + + it("should remove non-owner participants", function() { + store.setStoreState({ + participants: [{owner: true}, {}] + }); + + store.remotePeerDisconnected(); + + var participants = store.getStoreState().participants; + expect(participants).to.have.length.of(1); + expect(participants[0].owner).eql(true); + }); + + it("should keep the owner participant", function() { + store.setStoreState({ + participants: [{owner: true}] + }); + + store.remotePeerDisconnected(); + + var participants = store.getStoreState().participants; + expect(participants).to.have.length.of(1); + expect(participants[0].owner).eql(true); + }); }); describe("#connectionStatus", function() { @@ -1518,6 +1544,7 @@ describe("loop.store.ActiveRoomStore", function () { sinon.assert.calledWithExactly(dispatcher.dispatch, new sharedActions.UpdateRoomInfo({ description: "fakeDescription", + participants: undefined, roomName: fakeRoomData.decryptedContext.roomName, roomUrl: fakeRoomData.roomUrl, urls: { From 6847b2f8a0bcb2a5756b5cc57d22fc210dcac796 Mon Sep 17 00:00:00 2001 From: Ed Lee Date: Wed, 2 Sep 2015 00:14:27 -0700 Subject: [PATCH 10/63] Bug 1194622 - Provide indication of loading when waiting for the room list [r=Standard8] --- browser/components/loop/content/css/panel.css | 15 ++++++++++++--- browser/components/loop/content/js/panel.js | 19 +++++++++++++++++++ browser/components/loop/content/js/panel.jsx | 19 +++++++++++++++++++ .../components/loop/content/js/roomStore.js | 2 +- .../content/shared/img/animated-spinner.svg | 1 + browser/components/loop/jar.mn | 1 + .../loop/test/desktop-local/panel_test.js | 7 +++++++ .../loop/test/desktop-local/roomStore_test.js | 2 +- 8 files changed, 61 insertions(+), 5 deletions(-) create mode 100644 browser/components/loop/content/shared/img/animated-spinner.svg diff --git a/browser/components/loop/content/css/panel.css b/browser/components/loop/content/css/panel.css index 048633cb6d99..167ee48dcbaf 100644 --- a/browser/components/loop/content/css/panel.css +++ b/browser/components/loop/content/css/panel.css @@ -293,6 +293,15 @@ html[dir="rtl"] .tab-view li:nth-child(2).selected ~ .slide-bar { font-size: 2.2rem; } +.room-list-loading { + margin: 5rem 15px; + text-align: center; +} + +.room-list-loading > img { + width: 66px; +} + /* Rooms */ .rooms { @@ -321,10 +330,10 @@ html[dir="rtl"] .tab-view li:nth-child(2).selected ~ .slide-bar { } .new-room-view > .context { + border-top: 1px solid #ebebeb; flex: 1; - border-radius: 3px 3px 0 0; - margin: 1rem 0 .5rem; - padding: 1rem 15px; + margin: .5rem 0; + padding: .5rem 15px 1rem; } .new-room-view > .context > .context-enabled { diff --git a/browser/components/loop/content/js/panel.js b/browser/components/loop/content/js/panel.js index 785b4762a74d..206cb83eee98 100644 --- a/browser/components/loop/content/js/panel.js +++ b/browser/components/loop/content/js/panel.js @@ -809,6 +809,21 @@ loop.panel = (function(_, mozL10n) { mozL10n.get("display_name_guest"); }, + /** + * Let the user know we're loading rooms + * @returns {Object} React render + */ + _renderLoadingRoomsView: function() { + return ( + React.createElement("div", {className: "room-list"}, + React.createElement("div", {className: "room-list-loading"}, + React.createElement("img", {src: "loop/shared/img/animated-spinner.svg"}) + ), + this._renderNewRoomButton() + ) + ); + }, + _renderNoRoomsView: function() { return ( React.createElement("div", {className: "room-list"}, @@ -841,6 +856,10 @@ loop.panel = (function(_, mozL10n) { console.error("RoomList error", this.state.error); } + if (this.state.pendingInitialRetrieval) { + return this._renderLoadingRoomsView(); + } + if (!this.state.rooms.length) { return this._renderNoRoomsView(); } diff --git a/browser/components/loop/content/js/panel.jsx b/browser/components/loop/content/js/panel.jsx index 9d3ec0cc85a2..6d4ca7e7cd89 100644 --- a/browser/components/loop/content/js/panel.jsx +++ b/browser/components/loop/content/js/panel.jsx @@ -809,6 +809,21 @@ loop.panel = (function(_, mozL10n) { mozL10n.get("display_name_guest"); }, + /** + * Let the user know we're loading rooms + * @returns {Object} React render + */ + _renderLoadingRoomsView: function() { + return ( +
+
+ +
+ {this._renderNewRoomButton()} +
+ ); + }, + _renderNoRoomsView: function() { return (
@@ -841,6 +856,10 @@ loop.panel = (function(_, mozL10n) { console.error("RoomList error", this.state.error); } + if (this.state.pendingInitialRetrieval) { + return this._renderLoadingRoomsView(); + } + if (!this.state.rooms.length) { return this._renderNoRoomsView(); } diff --git a/browser/components/loop/content/js/roomStore.js b/browser/components/loop/content/js/roomStore.js index bf480d883cb6..af0ca28971df 100644 --- a/browser/components/loop/content/js/roomStore.js +++ b/browser/components/loop/content/js/roomStore.js @@ -114,7 +114,7 @@ loop.store = loop.store || {}; activeRoom: this.activeRoomStore ? this.activeRoomStore.getStoreState() : {}, error: null, pendingCreation: false, - pendingInitialRetrieval: false, + pendingInitialRetrieval: true, rooms: [], savingContext: false }; diff --git a/browser/components/loop/content/shared/img/animated-spinner.svg b/browser/components/loop/content/shared/img/animated-spinner.svg new file mode 100644 index 000000000000..289c174f66e7 --- /dev/null +++ b/browser/components/loop/content/shared/img/animated-spinner.svg @@ -0,0 +1 @@ + diff --git a/browser/components/loop/jar.mn b/browser/components/loop/jar.mn index e118c46e0018..f479f2602c2a 100644 --- a/browser/components/loop/jar.mn +++ b/browser/components/loop/jar.mn @@ -94,6 +94,7 @@ browser.jar: content/browser/loop/shared/img/empty_contacts.svg (content/shared/img/empty_contacts.svg) content/browser/loop/shared/img/empty_conversations.svg (content/shared/img/empty_conversations.svg) content/browser/loop/shared/img/empty_search.svg (content/shared/img/empty_search.svg) + content/browser/loop/shared/img/animated-spinner.svg (content/shared/img/animated-spinner.svg) content/browser/loop/shared/img/avatars.svg (content/shared/img/avatars.svg) content/browser/loop/shared/img/firefox-avatar.svg (content/shared/img/firefox-avatar.svg) diff --git a/browser/components/loop/test/desktop-local/panel_test.js b/browser/components/loop/test/desktop-local/panel_test.js index 934983135af2..9459613bef5a 100644 --- a/browser/components/loop/test/desktop-local/panel_test.js +++ b/browser/components/loop/test/desktop-local/panel_test.js @@ -850,6 +850,13 @@ describe("loop.panel", function() { sinon.assert.calledWithExactly(document.mozL10n.get, "no_conversations_message_heading"); }); + + it("should display a loading animation when rooms are pending", function() { + var view = createTestComponent(); + roomStore.setStoreState({pendingInitialRetrieval: true}); + + expect(view.getDOMNode().querySelectorAll(".room-list-loading").length).to.eql(1); + }); }); describe("loop.panel.NewRoomView", function() { diff --git a/browser/components/loop/test/desktop-local/roomStore_test.js b/browser/components/loop/test/desktop-local/roomStore_test.js index 234289f167d6..1fa7cf7904a3 100644 --- a/browser/components/loop/test/desktop-local/roomStore_test.js +++ b/browser/components/loop/test/desktop-local/roomStore_test.js @@ -69,7 +69,7 @@ describe("loop.store.RoomStore", function () { var defaultStoreState = { error: undefined, pendingCreation: false, - pendingInitialRetrieval: false, + pendingInitialRetrieval: true, rooms: [], activeRoom: {} }; From 61f54ec056f94aa6f39281eb37ddb5bb51660982 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 00:02:21 -0700 Subject: [PATCH 11/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c80c9d5d4af5 Author: Yi-Fan Liao Desc: Merge pull request #31690 from danhuang1202/1190158_browser_app_on_home_screen Bug 1190158 - [Browser app] Firefox Browser app on the main home screen, r=rexboy ======== https://hg.mozilla.org/integration/gaia-central/rev/755eb64d6fdc Author: danhuang1202 Desc: Bug 1190158 - [Browser app] Firefox Browser app on the main home screen * add browser in deck * add two type in default-card.json: isFillIcon and isEnableWave --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 9bca3d82f4d8..f431d92f0ed7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "891798f1e345bc2b69e71de42bd524a90b1745c4", + "git_revision": "ae7be73107b1331a18b55e038c57a891de62d308", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "8c6b450b2f9f4606f164c33513a023e59271e1e4", + "revision": "c80c9d5d4af5633924c00a1f47e658f174d76207", "repo_path": "integration/gaia-central" } From e3c2a6e1c0b2a6dcc469243c093740f4f0d3521f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 00:05:03 -0700 Subject: [PATCH 12/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index d6ea54b5c536..cce84e5d9f49 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index f3f0919ee38c..9b4b84ea58c4 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 5c1cd8c6a7db..6d18eea1dcf2 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 7e9a44332477..268973ffac85 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 7a230ee3272c..e9449d1298bf 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index e82efd95ccbe..4d1e647d3313 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 5c1cd8c6a7db..6d18eea1dcf2 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 8907204aa674..f22ace43d2a7 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index bc6d8afc9045..72cf2c90da3e 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 41347c8be6fd..ce7a82d49814 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 5fcb9a7a4cce87a3666d399b2193b9128059b92b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 02:32:17 -0700 Subject: [PATCH 13/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ======== https://hg.mozilla.org/integration/gaia-central/rev/f466b2c8226f Author: Fernando Jiménez Moreno Desc: Merge pull request #31618 from ferjm/bug1163732.contactsl10n Bug 1163732 - [Contacts] Losing connection while importing contacts f… ======== https://hg.mozilla.org/integration/gaia-central/rev/32d30afbf0e7 Author: Fernando Jiménez Moreno Desc: Bug 1163732 - [Contacts] Losing connection while importing contacts from Gmail or Outlook will show the user a screen with 'Confirmation title' and an 'Action 1' button. r=borjasalguero --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index f431d92f0ed7..542609b08572 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "ae7be73107b1331a18b55e038c57a891de62d308", + "git_revision": "a613f3389a23133e05333cd0a7712979b3178717", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "c80c9d5d4af5633924c00a1f47e658f174d76207", + "revision": "f466b2c8226f1036eba324e19d5d6d1a9afa1470", "repo_path": "integration/gaia-central" } From 2e987a39b7ecbcbde4219c00977a29152fab2b01 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 02:35:01 -0700 Subject: [PATCH 14/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index cce84e5d9f49..fe76b98bac1e 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 9b4b84ea58c4..c71ec2aaa416 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 6d18eea1dcf2..a544b000d7d0 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 268973ffac85..94077774c294 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e9449d1298bf..7cbc0cc1f732 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 4d1e647d3313..7b5878ca9e42 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 6d18eea1dcf2..a544b000d7d0 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index f22ace43d2a7..be65758b5931 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 72cf2c90da3e..54a0d2db7164 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index ce7a82d49814..daa83071d8e9 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 4b25230557123a660e091201b2f36a8f5c986dce Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 03:40:13 -0700 Subject: [PATCH 15/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4f372ac5877e Author: Martijn Desc: Merge pull request #31676 from mwargers/1201268 Bug 1201268 - Fix failure in test_browser_clear_browsing_history.py ======== https://hg.mozilla.org/integration/gaia-central/rev/d1122f924a05 Author: Martijn Wargers Desc: Bug 1201268 - Fix failure in test_browser_clear_browsing_history.py --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 542609b08572..f00799cff6bc 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "a613f3389a23133e05333cd0a7712979b3178717", + "git_revision": "aebecea113503792e0ff8009d53b76728f6ca131", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "f466b2c8226f1036eba324e19d5d6d1a9afa1470", + "revision": "4f372ac5877e006a766c0d844e1be1167e37ee3f", "repo_path": "integration/gaia-central" } From 8f568121fd8f8fbaf244c12355becf7acafe4650 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 03:43:28 -0700 Subject: [PATCH 16/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index fe76b98bac1e..8a41c7448b89 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index c71ec2aaa416..280497ffb959 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a544b000d7d0..e05c412b29b9 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 94077774c294..0f6be802d855 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 7cbc0cc1f732..e74aa39f6d3b 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 7b5878ca9e42..89dbcc683dff 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a544b000d7d0..e05c412b29b9 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index be65758b5931..e48514424434 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 54a0d2db7164..629140405821 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index daa83071d8e9..24bc92f08f36 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From ff2ee72e17804f21bab67a35dd0512c41014c8c7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 06:40:17 -0700 Subject: [PATCH 17/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/74ac17573f5c Author: Fernando Campo Desc: Merge pull request #31445 from fcampo/import-vcard-loader-1184070 Bug 1184070 - [NGA] use new VCard loader for IMPORT activities (r=francisco) ======== https://hg.mozilla.org/integration/gaia-central/rev/1ad723a3fcab Author: Fernando Campo Desc: Bug 1184070 - [NGA]use new VCard loader for IMPORT activities --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index f00799cff6bc..116067c256e7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "aebecea113503792e0ff8009d53b76728f6ca131", + "git_revision": "464bb7df027439b06f6f80eab5f01eb10a15c89e", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "4f372ac5877e006a766c0d844e1be1167e37ee3f", + "revision": "74ac17573f5c95cb70f6a1f334b8a79d55774af9", "repo_path": "integration/gaia-central" } From d2d8ae6247bfa914412db927fe95b551ec56ee82 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 06:43:32 -0700 Subject: [PATCH 18/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 8a41c7448b89..3930e32602fc 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 280497ffb959..a3edf266aaab 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index e05c412b29b9..73d7131bd797 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 0f6be802d855..827c8eaa446a 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index e74aa39f6d3b..3d2d76df933e 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 89dbcc683dff..7e4eb32043e3 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index e05c412b29b9..73d7131bd797 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index e48514424434..3c7dabeddf3d 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 629140405821..e9f45907964d 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 24bc92f08f36..7022c4ccb4ba 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 58eb79a3c747899c53b48677fffc873d765500e2 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 07:50:16 -0700 Subject: [PATCH 19/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f38189e58048 Author: Martijn Desc: Merge pull request #31535 from mwargers/1198264 Bug 1198264 - Check in regression test for bug 1190791 ======== https://hg.mozilla.org/integration/gaia-central/rev/57c8308884ec Author: Martijn Wargers Desc: Bug 1198264 - Check in regression test for bug 1190791 --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 116067c256e7..3c4580dfbda9 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "464bb7df027439b06f6f80eab5f01eb10a15c89e", + "git_revision": "876ba1b656d924b3e47e207330367dfc41486151", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "74ac17573f5c95cb70f6a1f334b8a79d55774af9", + "revision": "f38189e580487f6d17e982c51182166eb733a3c9", "repo_path": "integration/gaia-central" } From e7f9d48ca4aa99533205ec5455f5aafeb55c2df9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 07:52:58 -0700 Subject: [PATCH 20/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 3930e32602fc..648e806e9bc8 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a3edf266aaab..1da91b85fd2e 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 73d7131bd797..7e420d7bceb5 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 827c8eaa446a..6b33a7eaf165 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 3d2d76df933e..453b0c735547 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 7e4eb32043e3..a9abcf80b7f4 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 73d7131bd797..7e420d7bceb5 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 3c7dabeddf3d..18cf65bf2db2 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index e9f45907964d..f5c615a296f4 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 7022c4ccb4ba..8afa1e5320f3 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 6bc159d4444b5bf8ac291e64327fc6f62ca4692e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 08:45:18 -0700 Subject: [PATCH 21/63] Bumping gaia.json for 15 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4a8813212f91 Author: Chris Lord Desc: Merge pull request #31725 from Cwiiis/bug1202190-new-homescreen-drop-icon-at-end Bug 1202190 - Fix dropping icons at end of apps grid. r=gmarty ======== https://hg.mozilla.org/integration/gaia-central/rev/6c93e6b84bb0 Author: Chris Lord Desc: Bug 1202190 - Fix dropping icons at end of apps grid. r=gmarty ======== https://hg.mozilla.org/integration/gaia-central/rev/f463ad0f94c6 Author: Carsten Book Desc: Merge pull request #31115 from cr/lockscreentouch Bug 1187979 - Improve Inputpad's touch and visual feeback. r=gweng ======== https://hg.mozilla.org/integration/gaia-central/rev/6ff46a505baf Author: Christiane Ruetten Desc: Fixing linter whine ======== https://hg.mozilla.org/integration/gaia-central/rev/aa0ff751addc Author: Christiane Ruetten Desc: Adapting and improving InputPad tests This is a major rewrite of InputPad tests, mostly triggered by the restructuring. It also adds tests for previously uncovered code like the keyi input handling, password checking, the emergency dialer, and event handling in general. ======== https://hg.mozilla.org/integration/gaia-central/rev/f0ff8ff55386 Author: Christiane Ruetten Desc: Rewriting event handling and helper functions This is a minor rewrite of InputPad's event handling and a major rewrite of its helper functions. The event handler now delegates do separate handlers for each touch/click event, creating a more compact function design. Much of the internal state logic has been moved away to be encapsulated in the helper functions. The set of helper functions was restructured and rewritten to capture more shared code between event handlers, to have consistent arguments, and with unit testing in mind. Helpers now consistently take keypad anchor elements as arguments where possible. They were also rewritten to properly handle null arguments which result when events land outside of the keypad. ======== https://hg.mozilla.org/integration/gaia-central/rev/564ab745ebbf Author: Christiane Ruetten Desc: Added comments and gweng's changes ======== https://hg.mozilla.org/integration/gaia-central/rev/6ab7d4221cf4 Author: Christiane Ruetten Desc: Work around eslint whining about unsafe innerHTML ======== https://hg.mozilla.org/integration/gaia-central/rev/7c064d566eec Author: Christiane Ruetten Desc: Prevent vibrate on pending error timeout ======== https://hg.mozilla.org/integration/gaia-central/rev/56a039ae115f Author: Christiane Ruetten Desc: Linter fix for Inputpad test ======== https://hg.mozilla.org/integration/gaia-central/rev/33aaab73d445 Author: Christiane Ruetten Desc: Improving InputPad tests ======== https://hg.mozilla.org/integration/gaia-central/rev/4e67fe574b31 Author: Christiane Ruetten Desc: Fix DOM node comparison ======== https://hg.mozilla.org/integration/gaia-central/rev/aab3b048ec8d Author: Christiane Ruetten Desc: Improve visual and touch feedback of Inputpad Inputpad looks and feels wonky compared to the slick lock and feel of the keyboard panel used while setting the pass code in Settings. Much of the reason comes from that it only vibrates on key release, the other that it does not behave well when the user is sliding a finger over the keys. There is also a considerable delay between touching a key and a visual reaction to the extent that it's skipped when typing mildly fast. This patch addresses all of the above: - make InputPad vibrate instantly on touch - make InputPad respect user's touchmove - visualize key presses instantly ======== https://hg.mozilla.org/integration/gaia-central/rev/502a5ae6645d Author: Carsten Book Desc: Merge pull request #31187 from TheoChevalier/bug1189532-add-bm-mg Bug 1189532 - Add Bambara (bm) and Malagasy (mg) locales to master. r=stas ======== https://hg.mozilla.org/integration/gaia-central/rev/8f1b63bbe9f7 Author: TheoChevalier Desc: Bug 1189532 - Add Bambara (bm) and Malagasy (mg) locales to master and 2.2 builds --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 3c4580dfbda9..e159c3ede0e7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "876ba1b656d924b3e47e207330367dfc41486151", + "git_revision": "d068ae4d95a291396abd6ed40b8a125a9b5b5a51", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "f38189e580487f6d17e982c51182166eb733a3c9", + "revision": "4a8813212f9142964056d461f5417f8eb9afd221", "repo_path": "integration/gaia-central" } From ae3c97b090bbfae643ca8cad409b646fe6dae4a4 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 08:48:01 -0700 Subject: [PATCH 22/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 648e806e9bc8..2451f1a2e91f 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 1da91b85fd2e..5fcfe0b82c8f 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 7e420d7bceb5..226ad695d16b 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 6b33a7eaf165..2d222f0dad85 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 453b0c735547..607b265778ef 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index a9abcf80b7f4..36b18756013d 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 7e420d7bceb5..226ad695d16b 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 18cf65bf2db2..6c29eaa8476b 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index f5c615a296f4..f92c6469454e 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 8afa1e5320f3..40e9ecd3d5f0 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 73b5de8b44ef03083d2cd00cc7ecc9d3af0872b4 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 10:00:22 -0700 Subject: [PATCH 23/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/63c1855f751d Author: Chris Lord Desc: Merge pull request #31720 from Cwiiis/bug1169002-followup-new-homescreen-pinned-pages-localization Bug 1169002 - Followup, don't use mozL10n.once/get. r=gandalf ======== https://hg.mozilla.org/integration/gaia-central/rev/333e7fe20be4 Author: Chris Lord Desc: Bug 1169002 - Followup, don't use mozL10n.once/get. r=gandalf --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index e159c3ede0e7..31f46e0bbbbe 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "d068ae4d95a291396abd6ed40b8a125a9b5b5a51", + "git_revision": "58adcef3f0628951a156631ccab2d8b35c9d61da", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "4a8813212f9142964056d461f5417f8eb9afd221", + "revision": "63c1855f751d7ed7ff43d960a39de815c7505d13", "repo_path": "integration/gaia-central" } From 7c7f7e8ca3286ea6605e392499c00a5f63a38fd5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 10:03:03 -0700 Subject: [PATCH 24/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 2451f1a2e91f..7db432b677ee 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 5fcfe0b82c8f..a1af10ec7e69 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 226ad695d16b..c657877722b4 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 2d222f0dad85..a29782745645 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 607b265778ef..d8a7e3cb2d50 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 36b18756013d..6533fbcf9f3a 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 226ad695d16b..c657877722b4 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6c29eaa8476b..33c4dfef118e 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index f92c6469454e..13abaa451df6 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 40e9ecd3d5f0..f971e01c1480 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From bbbe1a6fb75f91dd7fafca2c432e349fc4cec960 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 11:07:47 -0700 Subject: [PATCH 25/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/f9783146b2e4 Author: Martijn Desc: Merge pull request #31663 from mwargers/1201248 Bug 1201248 - [Aries] Failures on the Aries device running test_add_new_contact.py ======== https://hg.mozilla.org/integration/gaia-central/rev/80b4325497f6 Author: Martijn Wargers Desc: Bug 1201248 - [Aries] Failures on the Aries device running test_add_new_contact.py --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 31f46e0bbbbe..be7a0eaf0a65 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "58adcef3f0628951a156631ccab2d8b35c9d61da", + "git_revision": "192d458727219a79631c8b12124d04e9c4ef2575", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "63c1855f751d7ed7ff43d960a39de815c7505d13", + "revision": "f9783146b2e41593108fb6ebadd1d9ee02b68797", "repo_path": "integration/gaia-central" } From e153216fe7ece1a6aee512c5c56524f832e437e2 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 11:10:39 -0700 Subject: [PATCH 26/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 7db432b677ee..52c7cea40b6d 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a1af10ec7e69..a446132bdcae 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index c657877722b4..e04ad4e1bcb6 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index a29782745645..b7919b07c1cc 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index d8a7e3cb2d50..40d548bee018 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 6533fbcf9f3a..ff02a30c1d04 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index c657877722b4..e04ad4e1bcb6 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 33c4dfef118e..73f94696d434 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 13abaa451df6..4f53dc356405 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index f971e01c1480..2c1bc4e5468c 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From ea297285189b2243ef8e9733d1fac60ceed7df09 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 15:00:18 -0700 Subject: [PATCH 27/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/06221ba07bae Author: Martijn Desc: Merge pull request #31516 from mwargers/1196456 Bug 1196456 - Dogfood test - [Storage] SD card memory settings ======== https://hg.mozilla.org/integration/gaia-central/rev/cc79e9bfcdb2 Author: Martijn Wargers Desc: Bug 1196456 - Dogfood test - [Storage] SD card memory settings --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index be7a0eaf0a65..cd335d524bf7 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "192d458727219a79631c8b12124d04e9c4ef2575", + "git_revision": "6a43fae6688011483d8b28da56c42db68b945683", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "f9783146b2e41593108fb6ebadd1d9ee02b68797", + "revision": "06221ba07bae661b296f9abd53b749510c83ead2", "repo_path": "integration/gaia-central" } From 6ec778048302b1c52e07eeff3e3d9934604524e3 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 15:03:00 -0700 Subject: [PATCH 28/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 52c7cea40b6d..48b0bbf1b052 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index a446132bdcae..e840ca6e5944 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index e04ad4e1bcb6..e3f56c15dff6 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index b7919b07c1cc..f80a0d50d150 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 40d548bee018..3ea4a8c5159a 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index ff02a30c1d04..e0571db328e4 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index e04ad4e1bcb6..e3f56c15dff6 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 73f94696d434..6849ab8969f6 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 4f53dc356405..f8c63db81d01 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 2c1bc4e5468c..b2670e6fb0d2 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 170331418b4e4cb65f825606dab73ddf9a475f44 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 18:20:18 -0700 Subject: [PATCH 29/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/c00c26b77830 Author: John Hu Desc: Merge pull request #31695 from danhuang1202/1201825_land_smart_icon Bug 1201825 - [stingray] land smart icon in gaia, r=johnhu ======== https://hg.mozilla.org/integration/gaia-central/rev/09fa1ecd9746 Author: danhuang1202 Desc: Bug 1201825 - [stingray] land smart icon in gaia, r=johnhu * land smart-icon(tag: 0.0.1) in tv_apps/smart-home/bower_components/ --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index cd335d524bf7..66c46347cdfc 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "6a43fae6688011483d8b28da56c42db68b945683", + "git_revision": "27e1b00a2cdb0d84b65e486afb1f7c88c5649e1b", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "06221ba07bae661b296f9abd53b749510c83ead2", + "revision": "c00c26b778301d3de3f0271e746ef20780f54fb4", "repo_path": "integration/gaia-central" } From 2a9db6e1b738b26f78236186d05f9bd380e4d1b7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 18:23:00 -0700 Subject: [PATCH 30/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index 48b0bbf1b052..a3e74405ed04 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index e840ca6e5944..d3682a11fb58 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index e3f56c15dff6..ec1c092247b3 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index f80a0d50d150..aab373d5ea25 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 3ea4a8c5159a..f94b7a2d4b35 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index e0571db328e4..38df3acff15e 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index e3f56c15dff6..ec1c092247b3 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6849ab8969f6..06e673baab8d 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index f8c63db81d01..b5f4a66e376f 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index b2670e6fb0d2..1592c358caf3 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From 6576fbda418e7f0295c877d33f742436903a5986 Mon Sep 17 00:00:00 2001 From: Ben Tian Date: Tue, 8 Sep 2015 11:15:49 +0800 Subject: [PATCH 31/63] Bug 1191715 - Store local pointer of thread to shutdwon to avoid reentry crash, f=jesup, r=shuang --- dom/bluetooth/bluedroid/BluetoothOppManager.cpp | 12 +++++++----- dom/bluetooth/bluez/BluetoothOppManager.cpp | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp index 1652794e1f11..12da8c793a5b 100644 --- a/dom/bluetooth/bluedroid/BluetoothOppManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothOppManager.cpp @@ -380,7 +380,6 @@ BluetoothOppManager::StartSendingNextFile() { MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(!IsConnected()); MOZ_ASSERT(!mBatches.IsEmpty()); MOZ_ASSERT((int)mBatches[0].mBlobs.Length() > mCurrentBlobIndex + 1); @@ -473,6 +472,7 @@ bool BluetoothOppManager::ProcessNextBatch() { MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(!IsConnected()); // Remove the processed batch. // A batch is processed if we've incremented mCurrentBlobIndex for it. @@ -605,9 +605,11 @@ BluetoothOppManager::AfterOppDisconnected() mOutputStream = nullptr; } - if (mReadFileThread) { - mReadFileThread->Shutdown(); - mReadFileThread = nullptr; + // Store local pointer of |mReadFileThread| to avoid shutdown reentry crash + // See bug 1191715 comment 19 for more details. + nsCOMPtr thread = mReadFileThread.forget(); + if (thread) { + thread->Shutdown(); } // Release the mount lock if file transfer completed @@ -790,7 +792,7 @@ BluetoothOppManager::RetrieveSentFileName() } /** - * We try our best to get the file extention to avoid interoperability issues. + * We try our best to get the file extension to avoid interoperability issues. * However, once we found that we are unable to get suitable extension or * information about the content type, sending a pre-defined file name without * extension would be fine. diff --git a/dom/bluetooth/bluez/BluetoothOppManager.cpp b/dom/bluetooth/bluez/BluetoothOppManager.cpp index bce5adbd8204..ed459314b96d 100644 --- a/dom/bluetooth/bluez/BluetoothOppManager.cpp +++ b/dom/bluetooth/bluez/BluetoothOppManager.cpp @@ -367,7 +367,6 @@ BluetoothOppManager::StartSendingNextFile() { MOZ_ASSERT(NS_IsMainThread()); - MOZ_ASSERT(!IsConnected()); MOZ_ASSERT(!mBatches.IsEmpty()); MOZ_ASSERT((int)mBatches[0].mBlobs.Length() > mCurrentBlobIndex + 1); @@ -460,6 +459,7 @@ bool BluetoothOppManager::ProcessNextBatch() { MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(!IsConnected()); // Remove the processed batch. // A batch is processed if we've incremented mCurrentBlobIndex for it. @@ -592,9 +592,11 @@ BluetoothOppManager::AfterOppDisconnected() mOutputStream = nullptr; } - if (mReadFileThread) { - mReadFileThread->Shutdown(); - mReadFileThread = nullptr; + // Store local pointer of |mReadFileThread| to avoid shutdown reentry crash + // See bug 1191715 comment 19 for more details. + nsCOMPtr thread = mReadFileThread.forget(); + if (thread) { + thread->Shutdown(); } // Release the mount lock if file transfer completed @@ -777,7 +779,7 @@ BluetoothOppManager::RetrieveSentFileName() } /** - * We try our best to get the file extention to avoid interoperability issues. + * We try our best to get the file extension to avoid interoperability issues. * However, once we found that we are unable to get suitable extension or * information about the content type, sending a pre-defined file name without * extension would be fine. From 691ea61dcae4cd7ddd3a2d3787d9d6a24952f9d4 Mon Sep 17 00:00:00 2001 From: Shawn Huang Date: Tue, 8 Sep 2015 11:39:13 +0800 Subject: [PATCH 32/63] Bug 1166645 - Implement MAP profile manager connection related function, r=btian --- .../bluedroid/BluetoothMapFolder.cpp | 94 ++ dom/bluetooth/bluedroid/BluetoothMapFolder.h | 41 + .../bluedroid/BluetoothMapSmsManager.cpp | 915 ++++++++++++++++++ .../bluedroid/BluetoothMapSmsManager.h | 150 +++ .../bluedroid/BluetoothServiceBluedroid.cpp | 7 + dom/bluetooth/common/ObexBase.cpp | 8 + dom/bluetooth/common/ObexBase.h | 2 + dom/bluetooth/moz.build | 2 + 8 files changed, 1219 insertions(+) create mode 100644 dom/bluetooth/bluedroid/BluetoothMapFolder.cpp create mode 100644 dom/bluetooth/bluedroid/BluetoothMapFolder.h create mode 100644 dom/bluetooth/bluedroid/BluetoothMapSmsManager.cpp create mode 100644 dom/bluetooth/bluedroid/BluetoothMapSmsManager.h diff --git a/dom/bluetooth/bluedroid/BluetoothMapFolder.cpp b/dom/bluetooth/bluedroid/BluetoothMapFolder.cpp new file mode 100644 index 000000000000..95d77e3e688b --- /dev/null +++ b/dom/bluetooth/bluedroid/BluetoothMapFolder.cpp @@ -0,0 +1,94 @@ +/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "base/basictypes.h" +#include "BluetoothMapFolder.h" + +BEGIN_BLUETOOTH_NAMESPACE + +BluetoothMapFolder::~BluetoothMapFolder() +{ } + +BluetoothMapFolder::BluetoothMapFolder(const nsAString& aFolderName, + BluetoothMapFolder* aParent) + : mName(aFolderName) + , mParent(aParent) +{ +} + +BluetoothMapFolder* +BluetoothMapFolder::AddSubFolder(const nsAString& aFolderName) +{ + nsRefPtr folder = new BluetoothMapFolder(aFolderName, + this); + mSubFolders.Put(nsString(aFolderName), folder); + + return folder; +} + +BluetoothMapFolder* +BluetoothMapFolder::GetSubFolder(const nsAString& aFolderName) +{ + BluetoothMapFolder* subfolder; + mSubFolders.Get(aFolderName, &subfolder); + + return subfolder; +} + +BluetoothMapFolder* +BluetoothMapFolder::GetParentFolder() +{ + return mParent; +} + +int +BluetoothMapFolder::GetSubFolderCount() +{ + return mSubFolders.Count(); +} + +void +BluetoothMapFolder::GetFolderListingObjectString(nsAString& aString, + uint16_t aMaxListCount, + uint16_t aStartOffset) +{ + const char* folderListingPrefix = + "\n" + "\n" + "\n"; + const char* folderListingSuffix = ""; + + // Based on Element Specification, 9.1.1, IrObex 1.2 + nsAutoCString folderListingObejct(folderListingPrefix); + + int count = 0; + for (auto iter = mSubFolders.Iter(); !iter.Done(); iter.Next()) { + if (count < aStartOffset) { + continue; + } + + if (count > aMaxListCount) { + break; + } + + const nsAString& key = iter.Key(); + folderListingObejct.Append(""); + count++; + } + + folderListingObejct.Append(folderListingSuffix); + aString = NS_ConvertUTF8toUTF16(folderListingObejct); +} + +void +BluetoothMapFolder::DumpFolderInfo() +{ + BT_LOGR("Folder name: %s, subfolder counts: %d", + NS_ConvertUTF16toUTF8(mName).get(), mSubFolders.Count()); +} + +END_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth/bluedroid/BluetoothMapFolder.h b/dom/bluetooth/bluedroid/BluetoothMapFolder.h new file mode 100644 index 000000000000..8df70e3816c7 --- /dev/null +++ b/dom/bluetooth/bluedroid/BluetoothMapFolder.h @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothMapFolder_h +#define mozilla_dom_bluetooth_bluedroid_BluetoothMapFolder_h + +#include "BluetoothCommon.h" +#include "nsAutoPtr.h" +#include "nsRefPtrHashtable.h" +#include "nsTArray.h" + +BEGIN_BLUETOOTH_NAMESPACE + +/* This class maps MAP virtual folder structures */ +class BluetoothMapFolder +{ +public: + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothMapFolder) + + BluetoothMapFolder(const nsAString& aFolderName, BluetoothMapFolder* aParent); + // Add virtual folder to subfolders + BluetoothMapFolder* AddSubFolder(const nsAString& aFolderName); + BluetoothMapFolder* GetSubFolder(const nsAString& aFolderName); + BluetoothMapFolder* GetParentFolder(); + int GetSubFolderCount(); + // Format folder listing object string + void GetFolderListingObjectString(nsAString& aString, uint16_t aMaxListCount, + uint16_t aStartOffset); + void DumpFolderInfo(); +private: + ~BluetoothMapFolder(); + nsString mName; + nsRefPtr mParent; + nsRefPtrHashtable mSubFolders; +}; + +END_BLUETOOTH_NAMESPACE +#endif //mozilla_dom_bluetooth_bluedroid_BluetoothMapFolder_h diff --git a/dom/bluetooth/bluedroid/BluetoothMapSmsManager.cpp b/dom/bluetooth/bluedroid/BluetoothMapSmsManager.cpp new file mode 100644 index 000000000000..fd8c07258d77 --- /dev/null +++ b/dom/bluetooth/bluedroid/BluetoothMapSmsManager.cpp @@ -0,0 +1,915 @@ +/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "base/basictypes.h" +#include "BluetoothMapSmsManager.h" + +#include "BluetoothService.h" +#include "BluetoothSocket.h" +#include "BluetoothUuid.h" +#include "ObexBase.h" + +#include "mozilla/RefPtr.h" +#include "mozilla/Services.h" +#include "mozilla/StaticPtr.h" +#include "nsAutoPtr.h" +#include "nsIObserver.h" +#include "nsIObserverService.h" + +USING_BLUETOOTH_NAMESPACE +using namespace mozilla; +using namespace mozilla::dom; +using namespace mozilla::ipc; + +namespace { + // UUID of Map Mas + static const BluetoothUuid kMapMas = { + { + 0x00, 0x00, 0x11, 0x32, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB + } + }; + // UUID of Map Mns + static const BluetoothUuid kMapMns = { + { + 0x00, 0x00, 0x11, 0x33, 0x00, 0x00, 0x10, 0x00, + 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB + } + }; + // UUID used in Map OBEX MAS target header + static const BluetoothUuid kMapMasObexTarget = { + { + 0xBB, 0x58, 0x2B, 0x40, 0x42, 0x0C, 0x11, 0xDB, + 0xB0, 0xDE, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66 + } + }; + + // UUID used in Map OBEX MNS target header + static const BluetoothUuid kMapMnsObexTarget = { + { + 0xBB, 0x58, 0x2B, 0x41, 0x42, 0x0C, 0x11, 0xDB, + 0xB0, 0xDE, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66 + } + }; + + StaticRefPtr sMapSmsManager; + static bool sInShutdown = false; +} + +BEGIN_BLUETOOTH_NAMESPACE + +NS_IMETHODIMP +BluetoothMapSmsManager::Observe(nsISupports* aSubject, + const char* aTopic, + const char16_t* aData) +{ + MOZ_ASSERT(sMapSmsManager); + + if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) { + HandleShutdown(); + return NS_OK; + } + + MOZ_ASSERT(false, "MapSmsManager got unexpected topic!"); + return NS_ERROR_UNEXPECTED; +} + +void +BluetoothMapSmsManager::HandleShutdown() +{ + MOZ_ASSERT(NS_IsMainThread()); + + sInShutdown = true; + Disconnect(nullptr); + sMapSmsManager = nullptr; +} + +BluetoothMapSmsManager::BluetoothMapSmsManager() : mMasConnected(false), + mMnsConnected(false), + mNtfRequired(false) +{ + mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE); + BuildDefaultFolderStructure(); +} + +BluetoothMapSmsManager::~BluetoothMapSmsManager() +{ + nsCOMPtr obs = services::GetObserverService(); + if (NS_WARN_IF(!obs)) { + return; + } + + NS_WARN_IF(NS_FAILED( + obs->RemoveObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID))); +} + +bool +BluetoothMapSmsManager::Init() +{ + nsCOMPtr obs = services::GetObserverService(); + if (NS_WARN_IF(!obs)) { + return false; + } + + if (NS_WARN_IF(NS_FAILED( + obs->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false)))) { + return false; + } + + /** + * We don't start listening here as BluetoothServiceBluedroid calls Listen() + * immediately when BT stops. + * + * If we start listening here, the listening fails when device boots up since + * Listen() is called again and restarts server socket. The restart causes + * absence of read events when device boots up. + */ + + return true; +} + +//static +BluetoothMapSmsManager* +BluetoothMapSmsManager::Get() +{ + MOZ_ASSERT(NS_IsMainThread()); + + // Exit early if sMapSmsManager already exists + if (sMapSmsManager) { + return sMapSmsManager; + } + + // Do not create a new instance if we're in shutdown + if (NS_WARN_IF(sInShutdown)) { + return nullptr; + } + + // Create a new instance, register, and return + BluetoothMapSmsManager *manager = new BluetoothMapSmsManager(); + if (NS_WARN_IF(!manager->Init())) { + return nullptr; + } + + sMapSmsManager = manager; + + return sMapSmsManager; +} + +bool +BluetoothMapSmsManager::Listen() +{ + MOZ_ASSERT(NS_IsMainThread()); + + // Fail to listen if |mMasSocket| already exists + if (NS_WARN_IF(mMasSocket)) { + return false; + } + + /** + * Restart server socket since its underlying fd becomes invalid when + * BT stops; otherwise no more read events would be received even if + * BT restarts. + */ + if (mMasServerSocket) { + mMasServerSocket->Close(); + mMasServerSocket = nullptr; + } + + mMasServerSocket = new BluetoothSocket(this); + + nsString sdpString; +#if ANDROID_VERSION >= 21 + /** + * The way bluedroid handles MAP SDP record is very hacky. + * In Lollipop version, SDP string format would be instanceId + msg type + * + msg name. See add_maps_sdp in btif/src/btif_sock_sdp.c + */ + // MAS instance id + sdpString.AppendPrintf("%02x", SDP_SMS_MMS_INSTANCE_ID); + // Supported message type + sdpString.AppendPrintf("%02x", SDP_MESSAGE_TYPE_SMS_GSM | + SDP_MESSAGE_TYPE_SMS_CDMA | + SDP_MESSAGE_TYPE_MMS); +#endif + /** + * SDP service name, we don't assign RFCOMM channel directly + * bluedroid automatically assign channel number randomly. + */ + sdpString.AppendLiteral("SMS/MMS Message Access"); + nsresult rv = mMasServerSocket->Listen(sdpString, kMapMas, + BluetoothSocketType::RFCOMM, -1, false, + true); + if (NS_FAILED(rv)) { + mMasServerSocket = nullptr; + return false; + } + + return true; +} + +void +BluetoothMapSmsManager::MnsDataHandler(UnixSocketBuffer* aMessage) +{ + // Ensure valid access to data[0], i.e., opCode + int receivedLength = aMessage->GetSize(); + if (receivedLength < 1) { + BT_LOGR("Receive empty response packet"); + return; + } + + const uint8_t* data = aMessage->GetData(); + uint8_t opCode = data[0]; + if (opCode != ObexResponseCode::Success) { + BT_LOGR("Unexpected OpCode: %x", opCode); + if (mLastCommand == ObexRequestCode::Put || + mLastCommand == ObexRequestCode::Abort || + mLastCommand == ObexRequestCode::PutFinal) { + SendMnsDisconnectRequest(); + } + } +} + +void +BluetoothMapSmsManager::MasDataHandler(UnixSocketBuffer* aMessage) +{ + /** + * Ensure + * - valid access to data[0], i.e., opCode + * - received packet length smaller than max packet length + */ + int receivedLength = aMessage->GetSize(); + if (receivedLength < 1 || receivedLength > MAX_PACKET_LENGTH) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + + const uint8_t* data = aMessage->GetData(); + uint8_t opCode = data[0]; + ObexHeaderSet pktHeaders; + nsString type; + switch (opCode) { + case ObexRequestCode::Connect: + // Section 3.3.1 "Connect", IrOBEX 1.2 + // [opcode:1][length:2][version:1][flags:1][MaxPktSizeWeCanReceive:2] + // [Headers:var] + if (receivedLength < 7 || + !ParseHeaders(&data[7], receivedLength - 7, &pktHeaders)) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + + // "Establishing an OBEX Session" + // The OBEX header target shall equal to MAS obex target UUID. + if (!CompareHeaderTarget(pktHeaders)) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + + mRemoteMaxPacketLength = ((static_cast(data[5]) << 8) | data[6]); + + if (mRemoteMaxPacketLength < 255) { + BT_LOGR("Remote maximum packet length %d", mRemoteMaxPacketLength); + mRemoteMaxPacketLength = 0; + ReplyError(ObexResponseCode::BadRequest); + return; + } + + ReplyToConnect(); + AfterMapSmsConnected(); + break; + case ObexRequestCode::Disconnect: + case ObexRequestCode::Abort: + // Section 3.3.2 "Disconnect" and Section 3.3.5 "Abort", IrOBEX 1.2 + // The format of request packet of "Disconnect" and "Abort" are the same + // [opcode:1][length:2][Headers:var] + if (receivedLength < 3 || + !ParseHeaders(&data[3], receivedLength - 3, &pktHeaders)) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + + ReplyToDisconnectOrAbort(); + AfterMapSmsDisconnected(); + break; + case ObexRequestCode::SetPath: { + // Section 3.3.6 "SetPath", IrOBEX 1.2 + // [opcode:1][length:2][flags:1][contants:1][Headers:var] + if (receivedLength < 5 || + !ParseHeaders(&data[5], receivedLength - 5, &pktHeaders)) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + + uint8_t response = SetPath(data[3], pktHeaders); + if (response != ObexResponseCode::Success) { + ReplyError(response); + return; + } + + ReplyToSetPath(); + } + break; + case ObexRequestCode::Put: + case ObexRequestCode::PutFinal: + // Section 3.3.3 "Put", IrOBEX 1.2 + // [opcode:1][length:2][Headers:var] + if (receivedLength < 3 || + !ParseHeaders(&data[3], receivedLength - 3, &pktHeaders)) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + + if (pktHeaders.Has(ObexHeaderId::Type)) { + pktHeaders.GetContentType(type); + BT_LOGR("Type: %s", NS_ConvertUTF16toUTF8(type).get()); + ReplyToPut(); + + if (type.EqualsLiteral("x-bt/MAP-NotificationRegistration")) { + HandleNotificationRegistration(pktHeaders); + } else if (type.EqualsLiteral("x-bt/MAP-event-report")) { + HandleEventReport(pktHeaders); + } else if (type.EqualsLiteral("x-bt/messageStatus")) { + HandleMessageStatus(pktHeaders); + } + } + break; + case ObexRequestCode::Get: + case ObexRequestCode::GetFinal: { + // [opcode:1][length:2][Headers:var] + if (receivedLength < 3 || + !ParseHeaders(&data[3], receivedLength - 3, &pktHeaders)) { + ReplyError(ObexResponseCode::BadRequest); + return; + } + pktHeaders.GetContentType(type); + if (type.EqualsLiteral("x-obex/folder-listing")) { + HandleSmsMmsFolderListing(pktHeaders); + } else if (type.EqualsLiteral("x-bt/MAP-msg-listing")) { + // TODO: Implement this feature in Bug 1166675 + } else if (type.EqualsLiteral("x-bt/message")) { + // TODO: Implement this feature in Bug 1166679 + } else { + BT_LOGR("Unknown MAP request type: %s", + NS_ConvertUTF16toUTF8(type).get()); + } + } + break; + default: + ReplyError(ObexResponseCode::NotImplemented); + BT_LOGR("Unrecognized ObexRequestCode %x", opCode); + break; + } +} + +// Virtual function of class SocketConsumer +void +BluetoothMapSmsManager::ReceiveSocketData(BluetoothSocket* aSocket, + nsAutoPtr& aMessage) +{ + MOZ_ASSERT(NS_IsMainThread()); + + if (aSocket == mMnsSocket) { + MnsDataHandler(aMessage); + } else { + MasDataHandler(aMessage); + } +} + +bool +BluetoothMapSmsManager::CompareHeaderTarget(const ObexHeaderSet& aHeader) +{ + if (!aHeader.Has(ObexHeaderId::Target)) { + BT_LOGR("No ObexHeaderId::Target in header"); + return false; + } + + uint8_t* targetPtr; + int targetLength; + aHeader.GetTarget(&targetPtr, &targetLength); + + if (targetLength != sizeof(BluetoothUuid)) { + BT_LOGR("Length mismatch: %d != 16", targetLength); + return false; + } + + for (uint8_t i = 0; i < sizeof(BluetoothUuid); i++) { + if (targetPtr[i] != kMapMasObexTarget.mUuid[i]) { + BT_LOGR("UUID mismatch: received target[%d]=0x%x != 0x%x", + i, targetPtr[i], kMapMasObexTarget.mUuid[i]); + return false; + } + } + + return true; +} + +uint8_t +BluetoothMapSmsManager::SetPath(uint8_t flags, + const ObexHeaderSet& aHeader) +{ + // Section 5.2 "SetPath Function", MapSms 1.2 + // flags bit 1 must be 1 and bit 2~7 be 0 + if ((flags >> 1) != 1) { + BT_LOGR("Illegal flags [0x%x]: bits 1~7 must be 0x01", flags); + return ObexResponseCode::BadRequest; + } + + /** + * Three cases: + * 1) Go up 1 level - flags bit 0 is 1 + * 2) Go back to root - flags bit 0 is 0 AND name header is empty + * 3) Go down 1 level - flags bit 0 is 0 AND name header is not empty, + * where name header is the name of child folder + */ + if (flags & 1) { + // Go up 1 level + BluetoothMapFolder* parent = mCurrentFolder->GetParentFolder(); + if (!parent) { + mCurrentFolder = parent; + BT_LOGR("MAS SetPath Go up 1 level"); + } + } else { + MOZ_ASSERT(aHeader.Has(ObexHeaderId::Name)); + + nsString childFolderName; + aHeader.GetName(childFolderName); + + if (childFolderName.IsEmpty()) { + // Go back to root + mCurrentFolder = mRootFolder; + BT_LOGR("MAS SetPath Go back to root"); + } else { + // Go down 1 level + BluetoothMapFolder* child = mCurrentFolder->GetSubFolder(childFolderName); + if (!child) { + BT_LOGR("Illegal sub-folder name [%s]", + NS_ConvertUTF16toUTF8(childFolderName).get()); + return ObexResponseCode::NotFound; + } + + mCurrentFolder = child; + BT_LOGR("MAS SetPath Go down to 1 level"); + } + } + + mCurrentFolder->DumpFolderInfo(); + + return ObexResponseCode::Success; +} + +void +BluetoothMapSmsManager::AfterMapSmsConnected() +{ + mMasConnected = true; +} + +void +BluetoothMapSmsManager::AfterMapSmsDisconnected() +{ + mMasConnected = false; + // To ensure we close MNS connection + DestroyMnsObexConnection(); +} + +bool +BluetoothMapSmsManager::IsConnected() +{ + return mMasConnected; +} + +void +BluetoothMapSmsManager::GetAddress(nsAString& aDeviceAddress) +{ + return mMasSocket->GetAddress(aDeviceAddress); +} + +void +BluetoothMapSmsManager::ReplyToConnect() +{ + if (mMasConnected) { + return; + } + + // Section 3.3.1 "Connect", IrOBEX 1.2 + // [opcode:1][length:2][version:1][flags:1][MaxPktSizeWeCanReceive:2] + // [Headers:var] + uint8_t req[255]; + int index = 7; + + req[3] = 0x10; // version=1.0 + req[4] = 0x00; // flag=0x00 + req[5] = BluetoothMapSmsManager::MAX_PACKET_LENGTH >> 8; + req[6] = (uint8_t)BluetoothMapSmsManager::MAX_PACKET_LENGTH; + + // Section 6.4 "Establishing an OBEX Session", MapSms 1.2 + // Headers: [Who:16][Connection ID] + index += AppendHeaderWho(&req[index], 255, kMapMasObexTarget.mUuid, + sizeof(BluetoothUuid)); + index += AppendHeaderConnectionId(&req[index], 0x01); + SendMasObexData(req, ObexResponseCode::Success, index); +} + +void +BluetoothMapSmsManager::ReplyToDisconnectOrAbort() +{ + if (!mMasConnected) { + return; + } + + // Section 3.3.2 "Disconnect" and Section 3.3.5 "Abort", IrOBEX 1.2 + // The format of response packet of "Disconnect" and "Abort" are the same + // [opcode:1][length:2][Headers:var] + uint8_t req[255]; + int index = 3; + + SendMasObexData(req, ObexResponseCode::Success, index); +} + +void +BluetoothMapSmsManager::ReplyToSetPath() +{ + if (!mMasConnected) { + return; + } + + // Section 3.3.6 "SetPath", IrOBEX 1.2 + // [opcode:1][length:2][Headers:var] + uint8_t req[255]; + int index = 3; + + SendMasObexData(req, ObexResponseCode::Success, index); +} + +void +BluetoothMapSmsManager::ReplyToPut() +{ + if (!mMasConnected) { + return; + } + + // Section 3.3.3.2 "PutResponse", IrOBEX 1.2 + // [opcode:1][length:2][Headers:var] + uint8_t req[255]; + int index = 3; + + SendMasObexData(req, ObexResponseCode::Success, index); +} + +void +BluetoothMapSmsManager::CreateMnsObexConnection() +{ + if (mMnsSocket) { + return; + } + + mMnsSocket = new BluetoothSocket(this); + // Already encrypted in previous session + mMnsSocket->Connect(mDeviceAddress, kMapMns, + BluetoothSocketType::RFCOMM, -1, false, false); +} + +void +BluetoothMapSmsManager::DestroyMnsObexConnection() +{ + if (!mMnsSocket) { + return; + } + + mMnsSocket->Close(); + mMnsSocket = nullptr; + mNtfRequired = false; +} + +void +BluetoothMapSmsManager::SendMnsConnectRequest() +{ + MOZ_ASSERT(mMnsSocket); + + // Section 3.3.1 "Connect", IrOBEX 1.2 + // [opcode:1][length:2][version:1][flags:1][MaxPktSizeWeCanReceive:2] + // [Headers:var] + uint8_t req[255]; + int index = 7; + + req[3] = 0x10; // version=1.0 + req[4] = 0x00; // flag=0x00 + req[5] = BluetoothMapSmsManager::MAX_PACKET_LENGTH >> 8; + req[6] = (uint8_t)BluetoothMapSmsManager::MAX_PACKET_LENGTH; + + index += AppendHeaderTarget(&req[index], 255, kMapMnsObexTarget.mUuid, + sizeof(BluetoothUuid)); + SendMnsObexData(req, ObexRequestCode::Connect, index); +} + +void +BluetoothMapSmsManager::SendMnsDisconnectRequest() +{ + MOZ_ASSERT(mMnsSocket); + + if (!mMasConnected) { + return; + } + + // Section 3.3.2 "Disconnect", IrOBEX 1.2 + // [opcode:1][length:2][Headers:var] + uint8_t req[255]; + int index = 3; + + SendMnsObexData(req, ObexRequestCode::Disconnect, index); +} + +void +BluetoothMapSmsManager::HandleSmsMmsFolderListing(const ObexHeaderSet& aHeader) +{ + MOZ_ASSERT(NS_IsMainThread()); + + uint8_t buf[64]; + uint16_t maxListCount = 0; + + if (aHeader.GetAppParameter(Map::AppParametersTagId::MaxListCount, + buf, 64)) { + maxListCount = *((uint16_t *)buf); + // convert big endian to little endian + maxListCount = (maxListCount >> 8) | (maxListCount << 8); + } + + uint16_t startOffset = 0; + if (aHeader.GetAppParameter(Map::AppParametersTagId::StartOffset, + buf, 64)) { + startOffset = *((uint16_t *)buf); + // convert big endian to little endian + startOffset = (startOffset >> 8) | (startOffset << 8); + } + + // Folder listing size + int foldersize = mCurrentFolder->GetSubFolderCount(); + + // Convert little endian to big endian + uint8_t folderListingSizeValue[2]; + folderListingSizeValue[0] = (foldersize & 0xFF00) >> 8; + folderListingSizeValue[1] = (foldersize & 0x00FF); + + // Section 3.3.4 "GetResponse", IrOBEX 1.2 + // [opcode:1][length:2][FolderListingSize:4][Headers:var] where + // Application Parameter [FolderListingSize:4] = [tagId:1][length:1][value: 2] + uint8_t appParameter[4]; + AppendAppParameter(appParameter, sizeof(appParameter), + (uint8_t)Map::AppParametersTagId::FolderListingSize, + folderListingSizeValue, sizeof(folderListingSizeValue)); + + uint8_t resp[255]; + int index = 3; + index += AppendHeaderAppParameters(&resp[index], 255, appParameter, + sizeof(appParameter)); + + /* + * MCE wants to query sub-folder size FolderListingSize AppParameter shall + * be used in the response if the value of MaxListCount in the request is 0. + * If MaxListCount = 0, the MSE shall ignore all other applications + * parameters that may be presented in the request. The response shall + * contain any Body header. + */ + if (maxListCount) { + nsString output; + mCurrentFolder->GetFolderListingObjectString(output, maxListCount, + startOffset); + index += AppendHeaderBody(&resp[index], + mRemoteMaxPacketLength - index, + reinterpret_cast( + NS_ConvertUTF16toUTF8(output).get()), + NS_ConvertUTF16toUTF8(output).Length()); + + index += AppendHeaderEndOfBody(&resp[index]); + } + + SendMasObexData(resp, ObexResponseCode::Success, index); +} + +void +BluetoothMapSmsManager::BuildDefaultFolderStructure() +{ + /* MAP specification defines virtual folders structure + * / + * /telecom + * /telecom/msg + * /telecom/msg/inbox + * /telecom/msg/draft + * /telecom/msg/outbox + * /telecom/msg/sent + * /telecom/msg/deleted + */ + mRootFolder = new BluetoothMapFolder(NS_LITERAL_STRING("root"), nullptr); + BluetoothMapFolder* folder = + mRootFolder->AddSubFolder(NS_LITERAL_STRING("telecom")); + folder = folder->AddSubFolder(NS_LITERAL_STRING("msg")); + + // Add mandatory folders + folder->AddSubFolder(NS_LITERAL_STRING("inbox")); + folder->AddSubFolder(NS_LITERAL_STRING("sent")); + folder->AddSubFolder(NS_LITERAL_STRING("deleted")); + folder->AddSubFolder(NS_LITERAL_STRING("outbox")); + folder->AddSubFolder(NS_LITERAL_STRING("draft")); + mCurrentFolder = mRootFolder; +} + +void +BluetoothMapSmsManager::HandleNotificationRegistration( + const ObexHeaderSet& aHeader) +{ + MOZ_ASSERT(NS_IsMainThread()); + + uint8_t buf[64]; + if (!aHeader.GetAppParameter(Map::AppParametersTagId::NotificationStatus, + buf, 64)) { + return; + } + + bool ntfRequired = static_cast(buf[0]); + if (mNtfRequired == ntfRequired) { + // Ignore request + return; + } + + mNtfRequired = ntfRequired; + /* + * Initialization sequence for a MAP session that uses both the Messsage + * Access service and the Message Notification service. The MNS connection + * shall be established by the first SetNotificationRegistration set to ON + * during MAP session. Only one MNS connection per device pair. + * Section 6.4.2, MAP + * If the Message Access connection is disconnected after Message Notification + * connection establishment, this will automatically indicate a MAS + * Notification-Deregistration for this MAS instance. + */ + if (mNtfRequired) { + CreateMnsObexConnection(); + } else { + /* + * TODO: we shall check multiple MAS instances unregister notification to + * drop MNS connection, but now we only support SMS/MMS, so drop connection + * directly. + */ + DestroyMnsObexConnection(); + } +} + +void +BluetoothMapSmsManager::HandleEventReport(const ObexHeaderSet& aHeader) +{ + // TODO: Handle event report in Bug 1166666 +} + +void +BluetoothMapSmsManager::HandleMessageStatus(const ObexHeaderSet& aHeader) +{ + // TODO: Handle MessageStatus update in Bug 1186836 +} + +void +BluetoothMapSmsManager::ReplyError(uint8_t aError) +{ + BT_LOGR("[0x%x]", aError); + + // Section 3.2 "Response Format", IrOBEX 1.2 + // [opcode:1][length:2][Headers:var] + uint8_t req[255]; + int index = 3; + + SendMasObexData(req, aError, index); +} + +void +BluetoothMapSmsManager::SendMasObexData(uint8_t* aData, uint8_t aOpcode, + int aSize) +{ + SetObexPacketInfo(aData, aOpcode, aSize); + mMasSocket->SendSocketData(new UnixSocketRawData(aData, aSize)); +} + +void +BluetoothMapSmsManager::SendMnsObexData(uint8_t* aData, uint8_t aOpcode, + int aSize) +{ + mLastCommand = aOpcode; + SetObexPacketInfo(aData, aOpcode, aSize); + mMnsSocket->SendSocketData(new UnixSocketRawData(aData, aSize)); +} + +void +BluetoothMapSmsManager::OnSocketConnectSuccess(BluetoothSocket* aSocket) +{ + MOZ_ASSERT(aSocket); + + // MNS socket is connected + if (aSocket == mMnsSocket) { + mMnsConnected = true; + SendMnsConnectRequest(); + return; + } + // MAS socket is connected + // Close server socket as only one session is allowed at a time + mMasServerSocket.swap(mMasSocket); + + // Cache device address since we can't get socket address when a remote + // device disconnect with us. + mMasSocket->GetAddress(mDeviceAddress); +} + +void +BluetoothMapSmsManager::OnSocketConnectError(BluetoothSocket* aSocket) +{ + // MNS socket connection error + if (aSocket == mMnsSocket) { + mMnsConnected = false; + mMnsSocket = nullptr; + return; + } + + // MAS socket connection error + mMasServerSocket = nullptr; + mMasSocket = nullptr; +} + +void +BluetoothMapSmsManager::OnSocketDisconnect(BluetoothSocket* aSocket) +{ + MOZ_ASSERT(aSocket); + + // MNS socket is disconnected + if (aSocket == mMnsSocket) { + mMnsConnected = false; + mMnsSocket = nullptr; + BT_LOGR("MNS socket disconnected"); + return; + } + + // MAS server socket is closed + if (aSocket != mMasSocket) { + // Do nothing when a listening server socket is closed. + return; + } + + // MAS socket is disconnected + AfterMapSmsDisconnected(); + mDeviceAddress.AssignLiteral(BLUETOOTH_ADDRESS_NONE); + mMasSocket = nullptr; + + Listen(); +} + +void +BluetoothMapSmsManager::Disconnect(BluetoothProfileController* aController) +{ + if (!mMasSocket) { + BT_WARNING("%s: No ongoing connection to disconnect", __FUNCTION__); + return; + } + + mMasSocket->Close(); +} + +NS_IMPL_ISUPPORTS(BluetoothMapSmsManager, nsIObserver) + +void +BluetoothMapSmsManager::Connect(const nsAString& aDeviceAddress, + BluetoothProfileController* aController) +{ + MOZ_ASSERT(false); +} + +void +BluetoothMapSmsManager::OnGetServiceChannel(const nsAString& aDeviceAddress, + const nsAString& aServiceUuid, + int aChannel) +{ + MOZ_ASSERT(false); +} + +void +BluetoothMapSmsManager::OnUpdateSdpRecords(const nsAString& aDeviceAddress) +{ + MOZ_ASSERT(false); +} + +void +BluetoothMapSmsManager::OnConnect(const nsAString& aErrorStr) +{ + MOZ_ASSERT(false); +} + +void +BluetoothMapSmsManager::OnDisconnect(const nsAString& aErrorStr) +{ + MOZ_ASSERT(false); +} + +void +BluetoothMapSmsManager::Reset() +{ + MOZ_ASSERT(false); +} + +END_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth/bluedroid/BluetoothMapSmsManager.h b/dom/bluetooth/bluedroid/BluetoothMapSmsManager.h new file mode 100644 index 000000000000..e07d02581a77 --- /dev/null +++ b/dom/bluetooth/bluedroid/BluetoothMapSmsManager.h @@ -0,0 +1,150 @@ +/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothMapSmsManager_h +#define mozilla_dom_bluetooth_bluedroid_BluetoothMapSmsManager_h + +#include "BluetoothCommon.h" +#include "BluetoothMapFolder.h" +#include "BluetoothProfileManagerBase.h" +#include "BluetoothSocketObserver.h" +#include "mozilla/ipc/SocketBase.h" + +BEGIN_BLUETOOTH_NAMESPACE + +struct Map { + enum AppParametersTagId { + MaxListCount = 0x1, + StartOffset = 0x2, + FilterMessageType = 0x3, + FilterPeriodBegin = 0x4, + FilterPeriodEnd = 0x5, + FilterReadStatus = 0x6, + FilterRecipient = 0x7, + FilterOriginator = 0x8, + FilterPriority = 0x9, + Attachment = 0x0A, + Transparent = 0x0B, + Retry = 0x0C, + NewMessage = 0x0D, + NotificationStatus = 0x0E, + MASInstanceId = 0x0F, + ParameterMask = 0x10, + FolderListingSize = 0x11, + MessagesListingSize = 0x12, + SubjectLength = 0x13, + Charset = 0x14, + FractionRequest = 0x15, + FractionDeliver = 0x16, + StatusIndicator = 0x17, + StatusValue = 0x18, + MSETime = 0x19 + }; +}; + +class BluetoothNamedValue; +class BluetoothSocket; +class ObexHeaderSet; + +/* + * BluetoothMapSmsManager acts as Message Server Equipment (MSE) and runs both + * MAS server and MNS client to exchange SMS/MMS message. + */ + +class BluetoothMapSmsManager : public BluetoothSocketObserver + , public BluetoothProfileManagerBase +{ +public: + BT_DECL_PROFILE_MGR_BASE + BT_DECL_SOCKET_OBSERVER + virtual void GetName(nsACString& aName) + { + aName.AssignLiteral("MapSms"); + } + + static const int MAX_PACKET_LENGTH = 0xFFFE; + static const int MAX_INSTANCE_ID = 255; + // SDP record for SupportedMessageTypes + static const int SDP_MESSAGE_TYPE_EMAIL = 0x01; + static const int SDP_MESSAGE_TYPE_SMS_GSM = 0x02; + static const int SDP_MESSAGE_TYPE_SMS_CDMA = 0x04; + static const int SDP_MESSAGE_TYPE_MMS = 0x08; + // By defualt SMS/MMS is default supported + static const int SDP_SMS_MMS_INSTANCE_ID = 0; + + static BluetoothMapSmsManager* Get(); + bool Listen(); + +protected: + virtual ~BluetoothMapSmsManager(); + +private: + BluetoothMapSmsManager(); + bool Init(); + void HandleShutdown(); + + void ReplyToConnect(); + void ReplyToDisconnectOrAbort(); + void ReplyToSetPath(); + void ReplyToPut(); + void ReplyError(uint8_t aError); + + void HandleNotificationRegistration(const ObexHeaderSet& aHeader); + void HandleEventReport(const ObexHeaderSet& aHeader); + void HandleMessageStatus(const ObexHeaderSet& aHeader); + void HandleSmsMmsFolderListing(const ObexHeaderSet& aHeader); + void SendMasObexData(uint8_t* aData, uint8_t aOpcode, int aSize); + void SendMnsObexData(uint8_t* aData, uint8_t aOpcode, int aSize); + + uint8_t SetPath(uint8_t flags, const ObexHeaderSet& aHeader); + bool CompareHeaderTarget(const ObexHeaderSet& aHeader); + void AfterMapSmsConnected(); + void AfterMapSmsDisconnected(); + void CreateMnsObexConnection(); + void DestroyMnsObexConnection(); + void SendMnsConnectRequest(); + void SendMnsDisconnectRequest(); + void MnsDataHandler(mozilla::ipc::UnixSocketBuffer* aMessage); + void MasDataHandler(mozilla::ipc::UnixSocketBuffer* aMessage); + /* + * Build mandatory folders + */ + void BuildDefaultFolderStructure(); + /** + * Current virtual folder path + */ + BluetoothMapFolder* mCurrentFolder; + nsRefPtr mRootFolder; + + /* + * Record the last command + */ + int mLastCommand; + // MAS OBEX session status. Set when MAS OBEX session is established. + bool mMasConnected; + // MNS OBEX session status. Set when MNS OBEX session is established. + bool mMnsConnected; + bool mNtfRequired; + nsString mDeviceAddress; + unsigned int mRemoteMaxPacketLength; + + // If a connection has been established, mMasSocket will be the socket + // communicating with the remote socket. We maintain the invariant that if + // mMasSocket is non-null, mServerSocket must be null (and vice versa). + nsRefPtr mMasSocket; + + // Server socket. Once an inbound connection is established, it will hand + // over the ownership to mMasSocket, and get a new server socket while Listen() + // is called. + nsRefPtr mMasServerSocket; + + // Message notification service client socket + nsRefPtr mMnsSocket; +}; + +END_BLUETOOTH_NAMESPACE + +#endif //mozilla_dom_bluetooth_bluedroid_BluetoothMapSmsManager_h diff --git a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp index ec95adef5ed7..78b757f0bdfc 100644 --- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp +++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp @@ -23,6 +23,7 @@ #include "BluetoothGattManager.h" #include "BluetoothHfpManager.h" #include "BluetoothHidManager.h" +#include "BluetoothMapSmsManager.h" #include "BluetoothOppManager.h" #include "BluetoothPbapManager.h" #include "BluetoothProfileController.h" @@ -301,6 +302,7 @@ BluetoothServiceBluedroid::StopInternal(BluetoothReplyRunnable* aRunnable) BluetoothA2dpManager::Get(), BluetoothOppManager::Get(), BluetoothPbapManager::Get(), + BluetoothMapSmsManager::Get(), BluetoothHidManager::Get() }; @@ -1520,6 +1522,11 @@ BluetoothServiceBluedroid::AdapterStateChangedNotification(bool aState) if (!pbap || !pbap->Listen()) { BT_LOGR("Fail to start BluetoothPbapManager listening"); } + + BluetoothMapSmsManager* map = BluetoothMapSmsManager::Get(); + if (!map || !map->Listen()) { + BT_LOGR("Fail to start BluetoothMapSmsManager listening"); + } } // Resolve promise if existed diff --git a/dom/bluetooth/common/ObexBase.cpp b/dom/bluetooth/common/ObexBase.cpp index 822442825736..b81012591fc0 100644 --- a/dom/bluetooth/common/ObexBase.cpp +++ b/dom/bluetooth/common/ObexBase.cpp @@ -65,6 +65,14 @@ AppendHeaderBody(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aBody, aBody, aLength); } +int +AppendHeaderTarget(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aTarget, + int aLength) +{ + return AppendHeader(ObexHeaderId::Target, aRetBuf, aBufferSize, + aTarget, aLength); +} + int AppendHeaderWho(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aWho, int aLength) diff --git a/dom/bluetooth/common/ObexBase.h b/dom/bluetooth/common/ObexBase.h index 6e166cf2c9ac..7937f5df6e06 100644 --- a/dom/bluetooth/common/ObexBase.h +++ b/dom/bluetooth/common/ObexBase.h @@ -343,6 +343,8 @@ int AppendHeaderName(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aName, int aLength); int AppendHeaderBody(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aBody, int aLength); +int AppendHeaderTarget(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aTarget, + int aLength); int AppendHeaderWho(uint8_t* aRetBuf, int aBufferSize, const uint8_t* aWho, int aLength); int AppendHeaderAppParameters(uint8_t* aRetBuf, int aBufferSize, diff --git a/dom/bluetooth/moz.build b/dom/bluetooth/moz.build index 221bef176820..48cc87235ae7 100644 --- a/dom/bluetooth/moz.build +++ b/dom/bluetooth/moz.build @@ -81,6 +81,8 @@ if CONFIG['MOZ_B2G_BT']: 'bluedroid/BluetoothDaemonSetupInterface.cpp', 'bluedroid/BluetoothDaemonSocketInterface.cpp', 'bluedroid/BluetoothGattManager.cpp', + 'bluedroid/BluetoothMapFolder.cpp', + 'bluedroid/BluetoothMapSmsManager.cpp', 'bluedroid/BluetoothOppManager.cpp', 'bluedroid/BluetoothPbapManager.cpp', 'bluedroid/BluetoothServiceBluedroid.cpp', From 20270cba0ebf216a073d6b6b74d5f1707285e2eb Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 22:55:14 -0700 Subject: [PATCH 33/63] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/138ffdfeab62 Author: Kevin Grandon Desc: Merge pull request #31708 from KevinGrandon/bug_1202162_settings_findmydevice_switch Bug 1202162 - [Settings] Convert find my device switch to use gaia-switch ======== https://hg.mozilla.org/integration/gaia-central/rev/ffc41fa18ea0 Author: Kevin Grandon Desc: Bug 1202162 - [Settings] Convert find my device switch to use gaia-switch r=gasolin --- b2g/config/gaia.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 66c46347cdfc..66891f6bc698 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,9 +1,9 @@ { "git": { - "git_revision": "27e1b00a2cdb0d84b65e486afb1f7c88c5649e1b", + "git_revision": "dc7932eb0a524e2305ec97399882790535d3f1fd", "remote": "https://git.mozilla.org/releases/gaia.git", "branch": "" }, - "revision": "c00c26b778301d3de3f0271e746ef20780f54fb4", + "revision": "138ffdfeab6201e795b9f95087bad8a7bd94c783", "repo_path": "integration/gaia-central" } From b0e9b791e64b34f10ed23e63d43f98d3347cddef Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 7 Sep 2015 22:57:54 -0700 Subject: [PATCH 34/63] Bumping manifests a=b2g-bump --- b2g/config/aries/sources.xml | 2 +- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator-l/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/nexus-5-l/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml index a3e74405ed04..f57ac757d596 100644 --- a/b2g/config/aries/sources.xml +++ b/b2g/config/aries/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index d3682a11fb58..edb545199f37 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index ec1c092247b3..d3909eb65e87 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index aab373d5ea25..e8b8d651f32a 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index f94b7a2d4b35..93c399ac4b46 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml index 38df3acff15e..064b606ce21a 100644 --- a/b2g/config/emulator-l/sources.xml +++ b/b2g/config/emulator-l/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index ec1c092247b3..d3909eb65e87 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 06e673baab8d..7521f92c8de7 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index b5f4a66e376f..fffbf31ba420 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml index 1592c358caf3..7fdd84f0ee8e 100644 --- a/b2g/config/nexus-5-l/sources.xml +++ b/b2g/config/nexus-5-l/sources.xml @@ -15,7 +15,7 @@ - + From a94a444a5296af10116de8957503b563bfd6e1ab Mon Sep 17 00:00:00 2001 From: Gregor Wagner Date: Mon, 7 Sep 2015 03:51:00 +0200 Subject: [PATCH 35/63] Bug 1202374 - "Can't open apps any more". r=lissyx+mozillians --- dom/settings/SettingsManager.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dom/settings/SettingsManager.js b/dom/settings/SettingsManager.js index 9de0953c44ac..b74135d2f663 100644 --- a/dom/settings/SettingsManager.js +++ b/dom/settings/SettingsManager.js @@ -381,6 +381,7 @@ SettingsManager.prototype = { debug("WARNING: MORE THAN " + kObserverSoftLimit + " OBSERVERS FOR " + aName + ": " + length + " FROM" + (new Error).stack); #ifdef DEBUG + debug("JS STOPS EXECUTING AT THIS POINT IN DEBUG BUILDS!"); throw Components.results.NS_ERROR_ABORT; #endif } From bc034be4a8a43cad2d57b59f5e0c0ff567c0be48 Mon Sep 17 00:00:00 2001 From: Tim Huang Date: Thu, 3 Sep 2015 19:29:00 +0200 Subject: [PATCH 36/63] Bug 1175057 - Fix the problem of the script timeout by ensuring it associates to the right ap. r=hchang --- dom/wifi/test/marionette/head.js | 7 ++++- .../test/marionette/test_wifi_static_ip.js | 30 +++++++++++++++++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/dom/wifi/test/marionette/head.js b/dom/wifi/test/marionette/head.js index 2006e65c5c4b..837bfdabbbf9 100644 --- a/dom/wifi/test/marionette/head.js +++ b/dom/wifi/test/marionette/head.js @@ -776,7 +776,12 @@ let gTestSuite = (function() { .then(() => runEmulatorShellSafe(['hostapd', '-B', configFileName])) .then(function (reply) { // It may fail at the first time due to the previous ungracefully terminated one. - if (reply[0] === 'bind(PF_UNIX): Address already in use') { + if (reply.length === 0) { + // The hostapd starts successfully + return; + } + + if (reply[0].indexOf('bind(PF_UNIX): Address already in use') !== -1) { return startOneHostapd(aIndex); } }); diff --git a/dom/wifi/test/marionette/test_wifi_static_ip.js b/dom/wifi/test/marionette/test_wifi_static_ip.js index dfb9ff07787b..90436b6fe031 100644 --- a/dom/wifi/test/marionette/test_wifi_static_ip.js +++ b/dom/wifi/test/marionette/test_wifi_static_ip.js @@ -14,6 +14,8 @@ const STATIC_IP_CONFIG = { dns2: "8.8.4.4", }; +const TESTING_HOSTAPD = [{ ssid: 'ap0' }]; + function testAssociateWithStaticIp(aNetwork, aStaticIpConfig) { return gTestSuite.setStaticIpMode(aNetwork, aStaticIpConfig) .then(() => gTestSuite.testAssociate(aNetwork)) @@ -32,10 +34,32 @@ function testAssociateWithStaticIp(aNetwork, aStaticIpConfig) { }); } +function findDesireNetwork(aNetworks) { + let i = gTestSuite.getFirstIndexBySsid(TESTING_HOSTAPD[0].ssid, aNetworks); + + if (-1 !== i) { + return aNetworks[i]; + } + + return aNetworks[0]; +} + // Start test. -gTestSuite.doTest(function() { +gTestSuite.doTestWithoutStockAp(function() { return gTestSuite.ensureWifiEnabled(true) + + // Start custom hostapd for testing. + .then(() => gTestSuite.startHostapds(TESTING_HOSTAPD)) + .then(() => gTestSuite.verifyNumOfProcesses('hostapd', + TESTING_HOSTAPD.length)) + + // Perform a wifi scan, and then run the static ip test .then(() => gTestSuite.requestWifiScan()) - .then((aNetworks) => testAssociateWithStaticIp(aNetworks[0], - STATIC_IP_CONFIG)); + .then((aNetworks) => findDesireNetwork(aNetworks)) + .then((aNetwork) => testAssociateWithStaticIp(aNetwork, + STATIC_IP_CONFIG)) + + // Kill running hostapd. + .then(gTestSuite.killAllHostapd) + .then(() => gTestSuite.verifyNumOfProcesses('hostapd', 0)); }); From c1365324808dc131e16bc0de4d9f9da1481c2472 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Mon, 7 Sep 2015 23:07:22 +0200 Subject: [PATCH 37/63] Bug 1182046 - undeclared variables in nsLivemarkService.js. r=ttaubert --HG-- extra : commitid : 7xgBC4cccws --- toolkit/components/places/nsLivemarkService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/components/places/nsLivemarkService.js b/toolkit/components/places/nsLivemarkService.js index 58ed8d59431a..945012f28b24 100644 --- a/toolkit/components/places/nsLivemarkService.js +++ b/toolkit/components/places/nsLivemarkService.js @@ -652,8 +652,8 @@ Livemark.prototype = { let nodes = this._nodes.get(container); for (let node of nodes) { // Workaround for bug 449811. - localObserver = observer; - localNode = node; + let localObserver = observer; + let localNode = node; if (!aURI || node.uri == aURI.spec) { Services.tm.mainThread.dispatch(() => { localObserver.nodeHistoryDetailsChanged(localNode, 0, aVisitedStatus); From fedbe9692e2c9451ae8a36479efe0f5cf50f5609 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Mon, 7 Sep 2015 23:07:23 +0200 Subject: [PATCH 38/63] Bug 1181605 - search suggestions in the awesome bar should use the "keyword" purpose. r=adw --HG-- extra : commitid : 653rWuG0wdn --- browser/base/content/urlbarBindings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml index 0e4f359b7172..ecb7ba23095a 100644 --- a/browser/base/content/urlbarBindings.xml +++ b/browser/base/content/urlbarBindings.xml @@ -340,7 +340,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. let engine = Services.search.getEngineByName(action.params.engineName); let query = action.params.searchSuggestion || action.params.searchQuery; - let submission = engine.getSubmission(query); + let submission = engine.getSubmission(query, null, "keyword"); url = submission.uri.spec; postData = submission.postData; @@ -1390,7 +1390,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. let engine = Services.search.getEngineByName(action.params.engineName); let query = action.params.searchSuggestion || action.params.searchQuery; - let submission = engine.getSubmission(query); + let submission = engine.getSubmission(query, null, "keyword"); url = submission.uri.spec; options.postData = submission.postData; break; From 73d5db95c5b8cb66286020ce98928dd2cd08bb9e Mon Sep 17 00:00:00 2001 From: Edouard Oger Date: Tue, 8 Sep 2015 09:21:29 +1000 Subject: [PATCH 39/63] Bug 992388 - Restyle FxA verification emails errors/success alert and migration prompt in sync preferences. r=markh --- .../components/preferences/in-content/sync.js | 74 +++++++++++---- .../preferences/in-content/sync.xul | 48 +++++----- .../in-content/tests/browser_bug731866.js | 5 +- .../en-US/chrome/browser/accounts.properties | 3 + .../shared/incontentprefs/preferences.inc.css | 95 +++++++++++++++++++ 5 files changed, 177 insertions(+), 48 deletions(-) diff --git a/browser/components/preferences/in-content/sync.js b/browser/components/preferences/in-content/sync.js index 5b817261fb5a..6999ddae856d 100644 --- a/browser/components/preferences/in-content/sync.js +++ b/browser/components/preferences/in-content/sync.js @@ -186,6 +186,17 @@ let gSyncPane = { } }, + _closeSyncStatusMessageBox: function() { + document.getElementById("syncStatusMessage").removeAttribute("message-type"); + document.getElementById("syncStatusMessageTitle").textContent = ""; + document.getElementById("syncStatusMessageDescription").textContent = ""; + let learnMoreLink = document.getElementById("learnMoreLink"); + if (learnMoreLink) { + learnMoreLink.parentNode.removeChild(learnMoreLink); + } + document.getElementById("sync-migration-buttons-deck").hidden = true; + }, + _setupEventListeners: function() { function setEventListener(aId, aEventType, aCallback) { @@ -193,6 +204,9 @@ let gSyncPane = { .addEventListener(aEventType, aCallback.bind(gSyncPane)); } + setEventListener("syncStatusMessageClose", "command", function () { + gSyncPane._closeSyncStatusMessageBox(); + }); setEventListener("noAccountSetup", "click", function (aEvent) { aEvent.stopPropagation(); gSyncPane.openSetup(null); @@ -431,16 +445,17 @@ let gSyncPane = { }, updateMigrationState: function(subject, state) { + this._closeSyncStatusMessageBox(); let selIndex; + let sb = this._accountsStringBundle; switch (state) { case fxaMigrator.STATE_USER_FXA: { - let sb = this._accountsStringBundle; // There are 2 cases here - no email address means it is an offer on // the first device (so the user is prompted to create an account). // If there is an email address it is the "join the party" flow, so the // user is prompted to sign in with the address they previously used. let email = subject ? subject.QueryInterface(Components.interfaces.nsISupportsString).data : null; - let elt = document.getElementById("sync-migrate-upgrade-description"); + let elt = document.getElementById("syncStatusMessageDescription"); elt.textContent = email ? sb.formatStringFromName("signInAfterUpgradeOnOtherDevice.description", [email], 1) : @@ -449,11 +464,12 @@ let gSyncPane = { // The "Learn more" link. if (!email) { let learnMoreLink = document.createElement("label"); + learnMoreLink.id = "learnMoreLink"; learnMoreLink.className = "text-link"; let { text, href } = fxaMigrator.learnMoreLink; learnMoreLink.setAttribute("value", text); learnMoreLink.href = href; - elt.appendChild(learnMoreLink); + elt.parentNode.insertBefore(learnMoreLink, elt.nextSibling); } // The "upgrade" button. @@ -481,7 +497,7 @@ let gSyncPane = { let sb = this._accountsStringBundle; let email = subject.QueryInterface(Components.interfaces.nsISupportsString).data; let label = sb.formatStringFromName("needVerifiedUserLong", [email], 1); - let elt = document.getElementById("sync-migrate-verify-label"); + let elt = document.getElementById("syncStatusMessageDescription"); elt.setAttribute("value", label); // The "resend" button. let button = document.getElementById("sync-migrate-resend"); @@ -501,8 +517,8 @@ let gSyncPane = { document.getElementById("sync-migration").hidden = true; return; } - document.getElementById("sync-migration").hidden = false; - document.getElementById("sync-migration-deck").selectedIndex = selIndex; + document.getElementById("sync-migration-buttons-deck").selectedIndex = selIndex; + document.getElementById("syncStatusMessage").setAttribute("message-type", "migration"); }, // Called whenever one of the sync engine preferences is changed. @@ -678,23 +694,39 @@ let gSyncPane = { }, verifyFirefoxAccount: function() { - fxAccounts.resendVerificationEmail().then(() => { - fxAccounts.getSignedInUser().then(data => { - let sb = this._accountsStringBundle; - let title = sb.GetStringFromName("verificationSentTitle"); - let heading = sb.formatStringFromName("verificationSentHeading", - [data.email], 1); - let description = sb.GetStringFromName("verificationSentDescription"); + this._closeSyncStatusMessageBox(); + let changesyncStatusMessage = (data) => { + let isError = !data; + let syncStatusMessage = document.getElementById("syncStatusMessage"); + let syncStatusMessageTitle = document.getElementById("syncStatusMessageTitle"); + let syncStatusMessageDescription = document.getElementById("syncStatusMessageDescription"); + let maybeNot = isError ? "Not" : ""; + let sb = this._accountsStringBundle; + let title = sb.GetStringFromName("verification" + maybeNot + "SentTitle"); + let email = !isError && data ? data.email : ""; + let description = sb.formatStringFromName("verification" + maybeNot + "SentFull", [email], 1) - let factory = Cc["@mozilla.org/prompter;1"] - .getService(Ci.nsIPromptFactory); - let prompt = factory.getPrompt(window, Ci.nsIPrompt); - let bag = prompt.QueryInterface(Ci.nsIWritablePropertyBag2); - bag.setPropertyAsBool("allowTabModal", true); + syncStatusMessageTitle.textContent = title; + syncStatusMessageDescription.textContent = description; + let messageType = isError ? "verify-error" : "verify-success"; + syncStatusMessage.setAttribute("message-type", messageType); + } - prompt.alert(title, heading + "\n\n" + description); - }); - }); + let onError = () => { + changesyncStatusMessage(); + }; + + let onSuccess = data => { + if (data) { + changesyncStatusMessage(data); + } else { + onError(); + } + }; + + fxAccounts.resendVerificationEmail() + .then(fxAccounts.getSignedInUser, onError) + .then(onSuccess, onError); }, openOldSyncSupportPage: function() { diff --git a/browser/components/preferences/in-content/sync.xul b/browser/components/preferences/in-content/sync.xul index 2c7fd4eec90b..8dbfbbe1c84e 100644 --- a/browser/components/preferences/in-content/sync.xul +++ b/browser/components/preferences/in-content/sync.xul @@ -38,31 +38,29 @@ -