diff --git a/b2g/chrome/content/devtools/hud.js b/b2g/chrome/content/devtools/hud.js index 38169779fba9..506714ced4b8 100644 --- a/b2g/chrome/content/devtools/hud.js +++ b/b2g/chrome/content/devtools/hud.js @@ -56,8 +56,9 @@ let developerHUD = { }, init: function dwp_init() { - if (this._client) + if (this._client) { return; + } if (!DebuggerServer.initialized) { RemoteDebugger.initServer(); @@ -91,8 +92,9 @@ let developerHUD = { }, uninit: function dwp_uninit() { - if (!this._client) + if (!this._client) { return; + } for (let frame of this._targets.keys()) { this.untrackFrame(frame); @@ -109,8 +111,9 @@ let developerHUD = { * on an app frame. */ trackFrame: function dwp_trackFrame(frame) { - if (this._targets.has(frame)) + if (this._targets.has(frame)) { return; + } DebuggerServer.connectToChild(this._conn, frame).then(actor => { let target = new Target(frame, actor); @@ -339,10 +342,10 @@ let consoleWatcher = { if (pageError.warning || pageError.strict) { metric.name = 'warnings'; - output += 'warning ('; + output += 'Warning ('; } else { metric.name = 'errors'; - output += 'error ('; + output += 'Error ('; } if (this._security.indexOf(pageError.category) > -1) { @@ -359,12 +362,12 @@ let consoleWatcher = { case 'error': metric.name = 'errors'; - output += 'error (console)'; + output += 'Error (console)'; break; case 'warn': metric.name = 'warnings'; - output += 'warning (console)'; + output += 'Warning (console)'; break; default: @@ -378,7 +381,7 @@ let consoleWatcher = { let {start, end, sourceURL, interruptible} = packet; metric.interruptible = interruptible; let duration = Math.round((end - start) * 100) / 100; - output += 'reflow: ' + duration + 'ms'; + output += 'Reflow: ' + duration + 'ms'; if (sourceURL) { output += ' ' + this.formatSourceURL(packet); } @@ -425,6 +428,7 @@ let eventLoopLagWatcher = { if (this._active == value) { return; } + this._active = value; // Toggle the state of existing fronts. @@ -446,7 +450,7 @@ let eventLoopLagWatcher = { this._fronts.set(target, front); front.on('event-loop-lag', time => { - target.update({name: 'jank', value: time}, 'jank: ' + time + 'ms'); + target.update({name: 'jank', value: time}, 'Jank: ' + time + 'ms'); }); if (this._active) { @@ -500,7 +504,7 @@ let memoryWatcher = { update: function mw_update() { let watching = this._watching; - let active = watching.memory || watching.uss; + let active = watching.appmemory || watching.uss; if (this._active) { for (let target of this._fronts.keys()) { @@ -519,10 +523,11 @@ let memoryWatcher = { measure: function mw_measure(target) { let watch = this._watching; let front = this._fronts.get(target); + let format = this.formatMemory; if (watch.uss) { front.residentUnique().then(value => { - target.update({name: 'uss', value: value}); + target.update({name: 'uss', value: value}, 'USS: ' + format(value)); }, err => { console.error(err); }); @@ -531,36 +536,46 @@ let memoryWatcher = { if (watch.appmemory) { front.measure().then(data => { let total = 0; - if (watch.jsobjects) { - total += parseInt(data.jsObjectsSize); - } - if (watch.jsstrings) { - total += parseInt(data.jsStringsSize); - } - if (watch.jsother) { - total += parseInt(data.jsOtherSize); - } - if (watch.dom) { - total += parseInt(data.domSize); - } - if (watch.style) { - total += parseInt(data.styleSize); - } - if (watch.other) { - total += parseInt(data.otherSize); + let details = []; + + function item(name, condition, value) { + if (!condition) { + return; + } + + let v = parseInt(value); + total += v; + details.push(name + ': ' + format(v)); } + + item('JS objects', watch.jsobjects, data.jsObjectsSize); + item('JS strings', watch.jsstrings, data.jsStringsSize); + item('JS other', watch.jsother, data.jsOtherSize); + item('DOM', watch.dom, data.domSize); + item('Style', watch.style, data.styleSize); + item('Other', watch.other, data.otherSize); // TODO Also count images size (bug #976007). - target.update({name: 'memory', value: total}); + target.update({name: 'memory', value: total}, + 'App Memory: ' + format(total) + ' (' + details.join(', ') + ')'); }, err => { console.error(err); }); } - let timer = setTimeout(() => this.measure(target), 500); + let timer = setTimeout(() => this.measure(target), 800); this._timers.set(target, timer); }, + formatMemory: function mw_formatMemory(bytes) { + var prefix = ['','K','M','G','T','P','E','Z','Y']; + var i = 0; + for (; bytes > 1024 && i < prefix.length; ++i) { + bytes /= 1024; + } + return (Math.round(bytes * 100) / 100) + ' ' + prefix[i] + 'B'; + }, + trackTarget: function mw_trackTarget(target) { target.register('uss'); target.register('memory'); diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index d89fda492673..e5d6a0995555 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 abce62eb555c..eb0c31983d7c 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 20a44ce15a9b..fd6279290c46 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 dc5063779fb9..7cc42656506c 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/sources.xml b/b2g/config/emulator/sources.xml index abce62eb555c..eb0c31983d7c 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 7b00d9a83125..de55b583cfc0 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index bfe1795e6568..1dda1e9a3d5d 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 0a3053dbc26f..11b1e61879ce 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "ab9466a85acc108164bc17b9064387142b82d4da", + "revision": "eeeae73691f91cd5042660b0f19c84747ebc7be2", "repo_path": "/integration/gaia-central" } diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index d20b1da28dcd..fd63beac7d79 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 3369067f1a66..4e2295388725 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 273d5c237b77..e9e44f50ab23 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 0c7dd4b4fc81..0abd38a7c112 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/browser/components/loop/content/panel.html b/browser/components/loop/content/panel.html index 2e19a2c9a834..6b0f50371c22 100644 --- a/browser/components/loop/content/panel.html +++ b/browser/components/loop/content/panel.html @@ -5,7 +5,6 @@ - Loop Panel diff --git a/browser/components/loop/content/shared/css/common.css b/browser/components/loop/content/shared/css/common.css index eca3982f8818..11a4e7127370 100644 --- a/browser/components/loop/content/shared/css/common.css +++ b/browser/components/loop/content/shared/css/common.css @@ -233,7 +233,6 @@ p { /* Alerts/Notifications */ .notificationContainer { border-bottom: 2px solid #E9E9E9; - margin-bottom: 1em; } .messages > .notificationContainer > .alert { diff --git a/browser/components/loop/content/shared/css/panel.css b/browser/components/loop/content/shared/css/panel.css index 0ee995a7f491..69f27ef0b07c 100644 --- a/browser/components/loop/content/shared/css/panel.css +++ b/browser/components/loop/content/shared/css/panel.css @@ -25,6 +25,12 @@ body { /* Tabs and tab selection buttons */ +.tab-view-container { + background-image: url("../img/beta-ribbon.svg#beta-ribbon"); + background-size: 36px 36px; + background-repeat: no-repeat; +} + .tab-view { display: flex; flex-direction: row; @@ -93,6 +99,12 @@ body { .content-area header { font-weight: 700; + -moz-padding-start: 20px; +} + +.tab-view + .tab .content-area header { + /* The header shouldn't be indented if the tabs are present. */ + -moz-padding-start: 0; } .content-area label { diff --git a/browser/components/loop/content/shared/img/beta-ribbon.svg b/browser/components/loop/content/shared/img/beta-ribbon.svg new file mode 100644 index 000000000000..26bc8125dd8a --- /dev/null +++ b/browser/components/loop/content/shared/img/beta-ribbon.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/browser/components/loop/jar.mn b/browser/components/loop/jar.mn index 635d85708949..ae0e887aeb07 100644 --- a/browser/components/loop/jar.mn +++ b/browser/components/loop/jar.mn @@ -48,6 +48,7 @@ browser.jar: content/browser/loop/shared/img/svg/glyph-signin-16x16.svg (content/shared/img/svg/glyph-signin-16x16.svg) content/browser/loop/shared/img/svg/glyph-signout-16x16.svg (content/shared/img/svg/glyph-signout-16x16.svg) content/browser/loop/shared/img/audio-call-avatar.svg (content/shared/img/audio-call-avatar.svg) + content/browser/loop/shared/img/beta-ribbon.svg (content/shared/img/beta-ribbon.svg) content/browser/loop/shared/img/icons-10x10.svg (content/shared/img/icons-10x10.svg) content/browser/loop/shared/img/icons-14x14.svg (content/shared/img/icons-14x14.svg) content/browser/loop/shared/img/icons-16x16.svg (content/shared/img/icons-16x16.svg) diff --git a/browser/components/loop/standalone/content/index.html b/browser/components/loop/standalone/content/index.html index b4d01d6d9f0a..8fb04dc3fbda 100644 --- a/browser/components/loop/standalone/content/index.html +++ b/browser/components/loop/standalone/content/index.html @@ -5,7 +5,6 @@ - Loop diff --git a/browser/components/loop/standalone/content/js/webapp.js b/browser/components/loop/standalone/content/js/webapp.js index a3c2206d350a..e08f9d52da44 100644 --- a/browser/components/loop/standalone/content/js/webapp.js +++ b/browser/components/loop/standalone/content/js/webapp.js @@ -25,7 +25,7 @@ loop.webapp = (function($, _, OT, mozL10n) { var HomeView = React.createClass({displayName: 'HomeView', render: function() { return ( - React.DOM.p(null, mozL10n.get("welcome")) + React.DOM.p(null, mozL10n.get("welcome", {clientShortname: mozL10n.get("clientShortname2")})) ); } }); @@ -37,13 +37,13 @@ loop.webapp = (function($, _, OT, mozL10n) { render: function() { var useLatestFF = mozL10n.get("use_latest_firefox", { "firefoxBrandNameLink": React.renderComponentToStaticMarkup( - React.DOM.a({target: "_blank", href: "https://www.mozilla.org/firefox/"}, "Firefox") + React.DOM.a({target: "_blank", href: mozL10n.get("brand_website")}, mozL10n.get("brandShortname")) ) }); return ( React.DOM.div(null, React.DOM.h2(null, mozL10n.get("incompatible_browser")), - React.DOM.p(null, mozL10n.get("powered_by_webrtc")), + React.DOM.p(null, mozL10n.get("powered_by_webrtc", {clientShortname: mozL10n.get("clientShortname2")})), React.DOM.p({dangerouslySetInnerHTML: {__html: useLatestFF}}) ) ); @@ -58,8 +58,8 @@ loop.webapp = (function($, _, OT, mozL10n) { return ( React.DOM.div(null, React.DOM.h2(null, mozL10n.get("incompatible_device")), - React.DOM.p(null, mozL10n.get("sorry_device_unsupported")), - React.DOM.p(null, mozL10n.get("use_firefox_windows_mac_linux")) + React.DOM.p(null, mozL10n.get("sorry_device_unsupported", {clientShortname: mozL10n.get("clientShortname2")})), + React.DOM.p(null, mozL10n.get("use_firefox_windows_mac_linux", {brandShortname: mozL10n.get("brandShortname")})) ) ); } @@ -79,11 +79,11 @@ loop.webapp = (function($, _, OT, mozL10n) { } return ( React.DOM.div({className: "promote-firefox"}, - React.DOM.h3(null, mozL10n.get("promote_firefox_hello_heading")), + React.DOM.h3(null, mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})), React.DOM.p(null, React.DOM.a({className: "btn btn-large btn-accept", - href: "https://www.mozilla.org/firefox/"}, - mozL10n.get("get_firefox_button") + href: mozL10n.get("brand_website")}, + mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")}) ) ) ) @@ -232,7 +232,9 @@ loop.webapp = (function($, _, OT, mozL10n) { return ( React.DOM.header({className: "standalone-header header-box container-box"}, ConversationBranding(null), - React.DOM.div({className: "loop-logo", title: "Firefox WebRTC! logo"}), + React.DOM.div({className: "loop-logo", + title: mozL10n.get("client_alttext", + {clientShortname: mozL10n.get("clientShortname2")})}), React.DOM.h3({className: "call-url"}, conversationUrl ), @@ -248,7 +250,9 @@ loop.webapp = (function($, _, OT, mozL10n) { render: function() { return ( React.DOM.div({className: "standalone-footer container-box"}, - React.DOM.div({title: "Mozilla Logo", className: "footer-logo"}) + React.DOM.div({title: mozL10n.get("vendor_alttext", + {vendorShortname: mozL10n.get("vendorShortname")}), + className: "footer-logo"}) ) ); } @@ -454,10 +458,11 @@ loop.webapp = (function($, _, OT, mozL10n) { var privacyNoticeName = mozL10n.get("privacy_notice_link_text"); var tosHTML = mozL10n.get("legal_text_and_links", { - "terms_of_use_url": "" + + "terms_of_use_url": "" + tosLinkName + "", "privacy_notice_url": "" + privacyNoticeName + "" + mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "" }); var tosClasses = React.addons.classSet({ @@ -909,6 +914,7 @@ loop.webapp = (function($, _, OT, mozL10n) { // Set the 'lang' and 'dir' attributes to when the page is translated document.documentElement.lang = mozL10n.language.code; document.documentElement.dir = mozL10n.language.direction; + document.title = mozL10n.get("clientShortname2"); } return { diff --git a/browser/components/loop/standalone/content/js/webapp.jsx b/browser/components/loop/standalone/content/js/webapp.jsx index 3137dc481175..8d2e92e0c254 100644 --- a/browser/components/loop/standalone/content/js/webapp.jsx +++ b/browser/components/loop/standalone/content/js/webapp.jsx @@ -25,7 +25,7 @@ loop.webapp = (function($, _, OT, mozL10n) { var HomeView = React.createClass({ render: function() { return ( -

{mozL10n.get("welcome")}

+

{mozL10n.get("welcome", {clientShortname: mozL10n.get("clientShortname2")})}

); } }); @@ -37,13 +37,13 @@ loop.webapp = (function($, _, OT, mozL10n) { render: function() { var useLatestFF = mozL10n.get("use_latest_firefox", { "firefoxBrandNameLink": React.renderComponentToStaticMarkup( - Firefox + {mozL10n.get("brandShortname")} ) }); return (

{mozL10n.get("incompatible_browser")}

-

{mozL10n.get("powered_by_webrtc")}

+

{mozL10n.get("powered_by_webrtc", {clientShortname: mozL10n.get("clientShortname2")})}

); @@ -58,8 +58,8 @@ loop.webapp = (function($, _, OT, mozL10n) { return (

{mozL10n.get("incompatible_device")}

-

{mozL10n.get("sorry_device_unsupported")}

-

{mozL10n.get("use_firefox_windows_mac_linux")}

+

{mozL10n.get("sorry_device_unsupported", {clientShortname: mozL10n.get("clientShortname2")})}

+

{mozL10n.get("use_firefox_windows_mac_linux", {brandShortname: mozL10n.get("brandShortname")})}

); } @@ -79,11 +79,11 @@ loop.webapp = (function($, _, OT, mozL10n) { } return (
-

{mozL10n.get("promote_firefox_hello_heading")}

+

{mozL10n.get("promote_firefox_hello_heading", {brandShortname: mozL10n.get("brandShortname")})}

- {mozL10n.get("get_firefox_button")} + href={mozL10n.get("brand_website")}> + {mozL10n.get("get_firefox_button", {brandShortname: mozL10n.get("brandShortname")})}

@@ -232,7 +232,9 @@ loop.webapp = (function($, _, OT, mozL10n) { return (
-
+

{conversationUrl}

@@ -248,7 +250,9 @@ loop.webapp = (function($, _, OT, mozL10n) { render: function() { return (
-
+
); } @@ -454,10 +458,11 @@ loop.webapp = (function($, _, OT, mozL10n) { var privacyNoticeName = mozL10n.get("privacy_notice_link_text"); var tosHTML = mozL10n.get("legal_text_and_links", { - "terms_of_use_url": "" + + "terms_of_use_url": "" + tosLinkName + "", "privacy_notice_url": "" + privacyNoticeName + "" + mozL10n.get("privacy_website") + "'>" + privacyNoticeName + "" }); var tosClasses = React.addons.classSet({ @@ -909,6 +914,7 @@ loop.webapp = (function($, _, OT, mozL10n) { // Set the 'lang' and 'dir' attributes to when the page is translated document.documentElement.lang = mozL10n.language.code; document.documentElement.dir = mozL10n.language.direction; + document.title = mozL10n.get("clientShortname2"); } return { diff --git a/browser/components/loop/standalone/content/l10n/loop.en-US.properties b/browser/components/loop/standalone/content/l10n/loop.en-US.properties index e3d221ee95bd..188981770726 100644 --- a/browser/components/loop/standalone/content/l10n/loop.en-US.properties +++ b/browser/components/loop/standalone/content/l10n/loop.en-US.properties @@ -49,6 +49,14 @@ brandShortname=Firefox ## LOCALIZATION NOTE(clientShortname2): This should not be localized and ## should remain "Firefox Hello" for all locales. clientShortname2=Firefox Hello +## LOCALIZATION NOTE(vendorShortname): This should not be localized and +## should remain "Mozilla" for all locales. +vendorShortname=Mozilla + +## LOCALIZATION NOTE(client_alttext): {{clientShortname}} will be replaced with the +## value of the clientShortname2 string above. +client_alttext={{clientShortname}} logo +vendor_alttext={{vendorShortname}} logo ## LOCALIZATION NOTE (call_url_creation_date_label): Example output: (from May 26, 2014) call_url_creation_date_label=(from {{call_url_creation_date}}) @@ -107,3 +115,7 @@ rooms_room_full_call_to_action_nonFx_label=Download {{brandShortname}} to start rooms_room_full_call_to_action_label=Learn more about {{clientShortname}} ยป rooms_room_joined_label=Someone has joined the conversation! rooms_room_join_label=Join the conversation + +brand_website=https://www.mozilla.org/firefox/ +privacy_website=https://www.mozilla.org/privacy/ +legal_website=/legal/terms/ diff --git a/browser/components/loop/standalone/content/legal/terms/index.html b/browser/components/loop/standalone/content/legal/terms/index.html index b908acfa7b8d..94f9038115d1 100644 --- a/browser/components/loop/standalone/content/legal/terms/index.html +++ b/browser/components/loop/standalone/content/legal/terms/index.html @@ -7,7 +7,7 @@ - WebRTC: Terms of Service + Firefox Hello: Terms of Service @@ -21,7 +21,7 @@

You are using an outdated browser. Please upgrade your browser to improve your experience.

diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index d3fb3cbce5b8..65578af7cafe 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -1160,17 +1160,25 @@ DataConnectionHandler.prototype = { } }, + _compareDataCallOptions: function(dataCall, newDataCall) { + return dataCall.apnProfile.apn == newDataCall.apn && + dataCall.apnProfile.user == newDataCall.user && + dataCall.apnProfile.password == newDataCall.password && + dataCall.chappap == newDataCall.chappap && + dataCall.pdptype == newDataCall.pdptype; + }, + _deliverDataCallMessage: function(name, args) { for (let i = 0; i < this._dataCalls.length; i++) { let datacall = this._dataCalls[i]; - // Send message only to the DataCall that matches apn. + // Send message only to the DataCall that matches the data call options. // Currently, args always contain only one datacall info. - if (!args[0].apn || args[0].apn != datacall.apnProfile.apn) { + if (!this._compareDataCallOptions(datacall, args[0])) { continue; } // Do not deliver message to DataCall that contains cid but mistmaches // with the cid in the current message. - if (args[0].cid && datacall.linkInfo.cid && + if (args[0].cid !== undefined && datacall.linkInfo.cid != null && args[0].cid != datacall.linkInfo.cid) { continue; } @@ -1486,9 +1494,17 @@ DataConnectionHandler.prototype = { // Notify data call error only for data APN let networkInterface = this.dataNetworkInterfaces.get("default"); if (networkInterface && networkInterface.enabled) { - let apnSetting = networkInterface.apnSetting; - if (message.apn == apnSetting.apn) { - gMobileConnectionService.notifyDataError(this.clientId, message); + let dataCall = networkInterface.dataCall; + // If there is a cid, compare cid; otherwise it is probably an error on + // data call setup. + if (message.cid !== undefined) { + if (message.cid == dataCall.linkInfo.cid) { + gMobileConnectionService.notifyDataError(this.clientId, message); + } + } else { + if (this._compareDataCallOptions(dataCall, message)) { + gMobileConnectionService.notifyDataError(this.clientId, message); + } } } @@ -3894,6 +3910,12 @@ DataCall.prototype = { // Array to hold RILNetworkInterfaces that requested this DataCall. requestedNetworkIfaces: null, + // Holds the pdp type sent to ril worker. + pdptype: null, + + // Holds the authentication type sent to ril worker. + chappap: null, + dataCallError: function(message) { if (DEBUG) this.debug("Data call error on APN: " + message.apn); this.state = RIL.GECKO_NETWORK_STATE_DISCONNECTED; @@ -4012,10 +4034,18 @@ DataCall.prototype = { }, canHandleApn: function(apnSetting) { - // TODO: compare authtype? - return (this.apnProfile.apn == apnSetting.apn && - (this.apnProfile.user || '') == (apnSetting.user || '') && - (this.apnProfile.password || '') == (apnSetting.password || '')); + let isIdentical = this.apnProfile.apn == apnSetting.apn && + (this.apnProfile.user || '') == (apnSetting.user || '') && + (this.apnProfile.password || '') == (apnSetting.password || '') && + (this.apnProfile.authType || '') == (apnSetting.authtype || ''); + + if (RILQUIRKS_HAVE_IPV6) { + isIdentical = isIdentical && + (this.apnProfile.protocol || '') == (apnSetting.protocol || '') && + (this.apnProfile.roaming_protocol || '') == (apnSetting.roaming_protocol || ''); + } + + return isIdentical; }, reset: function() { @@ -4027,6 +4057,9 @@ DataCall.prototype = { this.linkInfo.gateways = []; this.state = RIL.GECKO_NETWORK_STATE_UNKNOWN; + + this.chappap = null; + this.pdptype = null; }, connect: function(networkInterface) { @@ -4079,7 +4112,7 @@ DataCall.prototype = { let radioTechType = dataInfo.type; let radioTechnology = RIL.GECKO_RADIO_TECH.indexOf(radioTechType); - let authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(this.apnProfile.authtype); + let authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(this.apnProfile.authType); // Use the default authType if the value in database is invalid. // For the case that user might not select the authentication type. if (authType == -1) { @@ -4088,6 +4121,8 @@ DataCall.prototype = { } authType = RIL.RIL_DATACALL_AUTH_TO_GECKO.indexOf(RIL.GECKO_DATACALL_AUTH_DEFAULT); } + this.chappap = authType; + let pdpType = RIL.GECKO_DATACALL_PDP_TYPE_IP; if (RILQUIRKS_HAVE_IPV6) { pdpType = !dataInfo.roaming @@ -4101,6 +4136,7 @@ DataCall.prototype = { pdpType = RIL.GECKO_DATACALL_PDP_TYPE_DEFAULT; } } + this.pdptype = pdpType; let radioInterface = this.gRIL.getRadioInterface(this.clientId); radioInterface.sendWorkerMessage("setupDataCall", { diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 1b5294f10b35..455ec31c4148 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -4128,10 +4128,8 @@ RilObject.prototype = { // can be removed if is the same as the current one. for each (let newDataCall in datacalls) { if (newDataCall.status != DATACALL_FAIL_NONE) { - if (newDataCallOptions) { - newDataCall.apn = newDataCallOptions.apn; - } - this._sendDataCallError(newDataCall, newDataCall.status); + this._sendDataCallError(newDataCallOptions || newDataCall, + newDataCall.status); } }