diff --git a/b2g/app/Makefile.in b/b2g/app/Makefile.in index 3433a394adb7..3427021a2a85 100644 --- a/b2g/app/Makefile.in +++ b/b2g/app/Makefile.in @@ -20,7 +20,7 @@ LIBS += \ $(DEPTH)/widget/gonk/libdisplay/$(LIB_PREFIX)display.$(LIB_SUFFIX) \ $(MOZ_ZLIB_LIBS) \ $(NULL) -ifeq ($(ANDROID_VERSION),$(findstring $(ANDROID_VERSION),17 18)) +ifeq ($(ANDROID_VERSION),$(findstring $(ANDROID_VERSION),17 18 19)) LIBS += \ -lgui \ -lsuspend \ diff --git a/b2g/components/DirectoryProvider.js b/b2g/components/DirectoryProvider.js index 56afee171f4b..3e9f81eca680 100644 --- a/b2g/components/DirectoryProvider.js +++ b/b2g/components/DirectoryProvider.js @@ -86,13 +86,15 @@ DirectoryProvider.prototype = { // getUpdateDir will set persistent to false since it may toggle between // /data/local/ and /mnt/sdcard based on free space and/or availability // of the sdcard. - return this.getUpdateDir(persistent, UPDATES_DIR); + // before download, check if free space is 2.1 times of update.mar + return this.getUpdateDir(persistent, UPDATES_DIR, 2.1); } if (prop == XRE_OS_UPDATE_APPLY_TO_DIR) { // getUpdateDir will set persistent to false since it may toggle between // /data/local/ and /mnt/sdcard based on free space and/or availability // of the sdcard. - return this.getUpdateDir(persistent, FOTA_DIR); + // before apply, check if free space is 1.1 times of update.mar + return this.getUpdateDir(persistent, FOTA_DIR, 1.1); } #else // In desktop builds, coreAppsDir is the same as the profile directory. @@ -171,7 +173,7 @@ DirectoryProvider.prototype = { return null; }, - getUpdateDir: function dp_getUpdateDir(persistent, subdir) { + getUpdateDir: function dp_getUpdateDir(persistent, subdir, multiple) { let defaultUpdateDir = this.getDefaultUpdateDir(); persistent.value = false; @@ -189,7 +191,7 @@ DirectoryProvider.prototype = { return defaultUpdateDir; } - let requiredSpace = selectedPatch.size * 2; + let requiredSpace = selectedPatch.size * multiple; let updateDir = this.findUpdateDirWithFreeSpace(requiredSpace, subdir); if (updateDir) { return updateDir; diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index d31f332aaf50..c3a4805915eb 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -1,4 +1,4 @@ { - "revision": "458c7c1031a8ee2666b8b4c62301bacd74833332", + "revision": "449764bc60bafa78cec7aa6cad0d65e558ab7473", "repo_path": "/integration/gaia-central" } diff --git a/configure.in b/configure.in index 8ff642535ff4..098d2dfc02ee 100644 --- a/configure.in +++ b/configure.in @@ -245,6 +245,11 @@ if test -n "$gonkdir" ; then MOZ_B2G_CAMERA=1 MOZ_OMX_DECODER=1 AC_SUBST(MOZ_OMX_DECODER) + ;; + 19) + GONK_INCLUDES="-I$gonkdir/frameworks/native/include" + MOZ_NFC=1 + ;; *) AC_MSG_ERROR([Unsupported platform version: $ANDROID_VERSION]) diff --git a/content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp b/content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp index d96176620edb..9347f8405063 100644 --- a/content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp +++ b/content/media/encoder/fmp4_muxer/ISOMediaBoxes.cpp @@ -324,10 +324,13 @@ MovieFragmentBox::MovieFragmentBox(uint32_t aType, ISOControl* aControl) , mTrackType(aType) { boxes.AppendElement(new MovieFragmentHeaderBox(mTrackType, aControl)); + + // Always adds flags_data_offset_present in each TrackFragmentBox, Android + // parser requires this flag to calculate the correct bitstream offset. if (mTrackType & Audio_Track) { boxes.AppendElement( new TrackFragmentBox(Audio_Track, - flags_sample_size_present, + flags_sample_size_present | flags_data_offset_present, aControl)); } if (mTrackType & Video_Track) { diff --git a/dom/browser-element/BrowserElementChildPreload.js b/dom/browser-element/BrowserElementChildPreload.js index 1a53176fb5b4..8b95926d68fc 100644 --- a/dom/browser-element/BrowserElementChildPreload.js +++ b/dom/browser-element/BrowserElementChildPreload.js @@ -688,10 +688,11 @@ BrowserElementChild.prototype = { let self = this; let maxWidth = data.json.args.width; let maxHeight = data.json.args.height; + let mimeType = data.json.args.mimeType; let domRequestID = data.json.id; let takeScreenshotClosure = function() { - self._takeScreenshot(maxWidth, maxHeight, domRequestID); + self._takeScreenshot(maxWidth, maxHeight, mimeType, domRequestID); }; let maxDelayMS = 2000; @@ -712,7 +713,7 @@ BrowserElementChild.prototype = { * the desired maxWidth and maxHeight, and given the DOMRequest ID associated * with the request from the parent. */ - _takeScreenshot: function(maxWidth, maxHeight, domRequestID) { + _takeScreenshot: function(maxWidth, maxHeight, mimeType, domRequestID) { // You can think of the screenshotting algorithm as carrying out the // following steps: // @@ -728,10 +729,14 @@ BrowserElementChild.prototype = { // - Crop the viewport so its width is no larger than maxWidth and its // height is no larger than maxHeight. // + // - Set mozOpaque to true and background color to solid white + // if we are taking a JPEG screenshot, keep transparent if otherwise. + // // - Return a screenshot of the page's viewport scaled and cropped per // above. debug("Taking a screenshot: maxWidth=" + maxWidth + ", maxHeight=" + maxHeight + + ", mimeType=" + mimeType + ", domRequestID=" + domRequestID + "."); if (!content) { @@ -749,19 +754,22 @@ BrowserElementChild.prototype = { let canvasWidth = Math.min(maxWidth, Math.round(content.innerWidth * scale)); let canvasHeight = Math.min(maxHeight, Math.round(content.innerHeight * scale)); + let transparent = (mimeType !== 'image/jpeg'); + var canvas = content.document .createElementNS("http://www.w3.org/1999/xhtml", "canvas"); - canvas.mozOpaque = true; + if (!transparent) + canvas.mozOpaque = true; canvas.width = canvasWidth; canvas.height = canvasHeight; var ctx = canvas.getContext("2d"); ctx.scale(scale, scale); ctx.drawWindow(content, 0, 0, content.innerWidth, content.innerHeight, - "rgb(255,255,255)"); + transparent ? "rgba(255,255,255,0)" : "rgb(255,255,255)"); - // Take a JPEG screenshot to hack around the fact that we can't specify - // opaque PNG. This requires us to unpremultiply the alpha channel, which + // Take a JPEG screenshot by default instead of PNG with alpha channel. + // This requires us to unpremultiply the alpha channel, which // is expensive on ARM processors because they lack a hardware integer // division instruction. canvas.toBlob(function(blob) { @@ -769,7 +777,7 @@ BrowserElementChild.prototype = { id: domRequestID, successRv: blob }); - }, 'image/jpeg'); + }, mimeType); }, _recvFireCtxCallback: function(data) { diff --git a/dom/browser-element/BrowserElementParent.jsm b/dom/browser-element/BrowserElementParent.jsm index 4d6995c5f0e4..53606634a4e6 100644 --- a/dom/browser-element/BrowserElementParent.jsm +++ b/dom/browser-element/BrowserElementParent.jsm @@ -547,16 +547,19 @@ BrowserElementParent.prototype = { return this._sendDOMRequest('purge-history'); }, - _getScreenshot: function(_width, _height) { + _getScreenshot: function(_width, _height, _mimeType) { let width = parseInt(_width); let height = parseInt(_height); + let mimeType = (typeof _mimeType === 'string') ? + _mimeType.trim().toLowerCase() : 'image/jpeg'; if (isNaN(width) || isNaN(height) || width < 0 || height < 0) { throw Components.Exception("Invalid argument", Cr.NS_ERROR_INVALID_ARG); } return this._sendDOMRequest('get-screenshot', - {width: width, height: height}); + {width: width, height: height, + mimeType: mimeType}); }, _recvNextPaint: function(data) { diff --git a/dom/browser-element/mochitest/browserElement_GetScreenshot.js b/dom/browser-element/mochitest/browserElement_GetScreenshot.js index c29dabc5eb8a..fc7c94a35220 100644 --- a/dom/browser-element/mochitest/browserElement_GetScreenshot.js +++ b/dom/browser-element/mochitest/browserElement_GetScreenshot.js @@ -15,20 +15,30 @@ function runTest() { iframe1.src = 'data:text/html,' + '
hello'; - var screenshotArrayBuffers = []; + var screenshotImageDatas = []; var numLoaded = 0; - function screenshotTaken(screenshotArrayBuffer) { - screenshotArrayBuffers.push(screenshotArrayBuffer); - if (screenshotArrayBuffers.length === 1) { + function screenshotTaken(screenshotImageData) { + screenshotImageDatas.push(screenshotImageData); + if (screenshotImageDatas.length === 1) { ok(true, 'Got initial non blank screenshot'); - iframe1.src = 'data:text/html,' + - 'hello'; - // Wait until screenshotArrayBuffer !== screenshotArrayBuffers[0]. - waitForScreenshot(function(screenshotArrayBuffer) { - var view1 = new Int8Array(screenshotArrayBuffer); - var view2 = new Int8Array(screenshotArrayBuffers[0]); + var view = screenshotImageData.data; + if (view[3] !== 255) { + ok(false, 'The first pixel of initial screenshot is not opaque'); + SimpleTest.finish(); + return; + } + ok(true, 'Verified the first pixel of initial screenshot is opaque'); + + iframe1.src = 'data:text/html,' + + 'hello'; + + // Wait until screenshotImageData !== screenshotImageDatas[0]. + waitForScreenshot(function(screenshotImageData) { + var view1 = screenshotImageData.data; + var view2 = screenshotImageDatas[0].data; + if (view1.length != view2.length) { return true; } @@ -40,51 +50,101 @@ function runTest() { } return false; - }); + }, 'image/png'); } - else if (screenshotArrayBuffers.length === 2) { + else if (screenshotImageDatas.length === 2) { ok(true, 'Got updated screenshot after source page changed'); + + var view = screenshotImageData.data; + if (view[3] !== 0) { + // The case here will always fail when oop'd on Firefox Desktop, + // but not on B2G Emulator + // See https://bugzil.la/878003#c20 + + var isB2G = (navigator.platform === ''); + info('navigator.platform: ' + navigator.platform); + if (!isB2G && browserElementTestHelpers.getOOPByDefaultPref()) { + todo(false, 'The first pixel of updated screenshot is not transparent'); + } else { + ok(false, 'The first pixel of updated screenshot is not transparent'); + } + SimpleTest.finish(); + return; + } + + ok(true, 'Verified the first pixel of updated screenshot is transparent'); SimpleTest.finish(); } } // We continually take screenshots until we get one that we are // happy with. - function waitForScreenshot(filter) { - function gotScreenshotArrayBuffer() { - // |this| is the FileReader whose result contains the screenshot as an - // ArrayBuffer. + function waitForScreenshot(filter, mimeType) { + function gotImage(e) { + // |this| is the Image. + + URL.revokeObjectURL(this.src); + + if (e.type === 'error' || !this.width || !this.height) { + tryAgain(); - if (filter(this.result)) { - screenshotTaken(this.result); return; } + + var canvas = document.createElement('canvas'); + canvas.width = canvas.height = 1000; + var ctx = canvas.getContext('2d'); + ctx.drawImage(this, 0, 0); + var imageData = ctx.getImageData(0, 0, 1000, 1000); + + if (filter(imageData)) { + screenshotTaken(imageData); + return; + } + tryAgain(); + } + + function tryAgain() { if (--attempts === 0) { ok(false, 'Timed out waiting for correct screenshot'); SimpleTest.finish(); } else { setTimeout(function() { - iframe1.getScreenshot(1000, 1000).onsuccess = getScreenshotArrayBuffer; + iframe1.getScreenshot(1000, 1000, mimeType).onsuccess = + getScreenshotImageData; }, 200); } } - function getScreenshotArrayBuffer(e) { - var fr = new FileReader(); - fr.onloadend = gotScreenshotArrayBuffer; - fr.readAsArrayBuffer(e.target.result); + function getScreenshotImageData(e) { + var blob = e.target.result; + if (blob.type !== mimeType) { + ok(false, 'MIME type of screenshot taken incorrect'); + SimpleTest.finish(); + } + + if (blob.size === 0) { + tryAgain(); + + return; + } + + var img = new Image(); + img.src = URL.createObjectURL(blob); + img.onload = img.onerror = gotImage; } var attempts = 10; - iframe1.getScreenshot(1000, 1000).onsuccess = getScreenshotArrayBuffer; + iframe1.getScreenshot(1000, 1000, mimeType).onsuccess = + getScreenshotImageData; } function iframeLoadedHandler() { numLoaded++; if (numLoaded === 2) { - waitForScreenshot(function(screenshotArrayBuffer) { - return screenshotArrayBuffer.byteLength != 0; - }); + waitForScreenshot(function(screenshotImageData) { + return true; + }, 'image/jpeg'); } } diff --git a/dom/browser-element/mochitest/test_browserElement_oop_GetScreenshot.html b/dom/browser-element/mochitest/test_browserElement_oop_GetScreenshot.html index ec5b5c15ee1c..81d3e1993146 100644 --- a/dom/browser-element/mochitest/test_browserElement_oop_GetScreenshot.html +++ b/dom/browser-element/mochitest/test_browserElement_oop_GetScreenshot.html @@ -11,6 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=753595 Mozilla Bug 753595 +Mozilla Bug 878003 diff --git a/dom/network/src/NetworkStatsService.jsm b/dom/network/src/NetworkStatsService.jsm index 91ef2847f1aa..c57e15b0531d 100644 --- a/dom/network/src/NetworkStatsService.jsm +++ b/dom/network/src/NetworkStatsService.jsm @@ -428,19 +428,26 @@ this.NetworkStatsService = { debug("clear stats for network " + network.id + " of type " + network.type); if (!this._networks[netId]) { - let error = "Invalid networkType"; - let result = null; - - // Check if network is valid but has not established a connection yet. + // Check if network is valid but has not established a connection yet. If it is not + // found in RIL networks, it can be a SIM network used in the past having sample + // in the database. let rilNetworks = this.getRilNetworks(); - if (rilNetworks[netId]) { - error = null; - result = true; - } + if (!rilNetworks[netId]) { + // Check if it is available in the DB. + this._db.isNetworkAvailable(network, function(aError, aResult) { + if (aResult) { + this._db.clearInterfaceStats(network, function onDBCleared(aError, aResult) { + mm.sendAsyncMessage("NetworkStats:Clear:Return", + { id: msg.id, error: aError, result: aResult }); + }); + return; + } - mm.sendAsyncMessage("NetworkStats:Clear:Return", - { id: msg.id, error: error, result: result }); - return; + mm.sendAsyncMessage("NetworkStats:Clear:Return", + { id: msg.id, error: "Invalid networkType", result: null }); + }); + return; + } } this._db.clearInterfaceStats(network, function onDBCleared(aError, aResult) { diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index 368ca1db3373..ef563bdddf22 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -694,7 +694,27 @@ function RadioInterfaceLayer() { let options = { debug: debugPref, cellBroadcastDisabled: false, - clirMode: RIL.CLIR_DEFAULT + clirMode: RIL.CLIR_DEFAULT, + quirks: { + callstateExtraUint32: + libcutils.property_get("ro.moz.ril.callstate_extra_int", "false") === "true", + v5Legacy: + libcutils.property_get("ro.moz.ril.v5_legacy", "true") === "true", + requestUseDialEmergencyCall: + libcutils.property_get("ro.moz.ril.dial_emergency_call", "false") === "true", + simAppStateExtraFields: + libcutils.property_get("ro.moz.ril.simstate_extra_field", "false") === "true", + extraUint2ndCall: + libcutils.property_get("ro.moz.ril.extra_int_2nd_call", "false") == "true", + haveQueryIccLockRetryCount: + libcutils.property_get("ro.moz.ril.query_icc_count", "false") == "true", + sendStkProfileDownload: + libcutils.property_get("ro.moz.ril.send_stk_profile_dl", "false") == "true", + dataRegistrationOnDemand: + libcutils.property_get("ro.moz.ril.data_reg_on_demand", "false") == "true" + }, + rilEmergencyNumbers: libcutils.property_get("ril.ecclist") || + libcutils.property_get("ro.ril.ecclist") }; try { diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 6ed8d89cd38f..c5ad538ab6e8 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -38,7 +38,7 @@ "use strict"; -importScripts("ril_consts.js", "systemlibs.js"); +importScripts("ril_consts.js"); importScripts("resource://gre/modules/workers/require.js"); // set to true in ril_consts.js to see debug messages @@ -53,6 +53,7 @@ if (!this.debug) { }; } +let RIL_EMERGENCY_NUMBERS; const DEFAULT_EMERGENCY_NUMBERS = ["112", "911"]; // Timeout value for emergency callback mode. @@ -74,23 +75,22 @@ const MMI_MAX_LENGTH_SHORT_CODE = 2; const MMI_END_OF_USSD = "#"; -let RILQUIRKS_CALLSTATE_EXTRA_UINT32 = libcutils.property_get("ro.moz.ril.callstate_extra_int", "false") === "true"; +let RILQUIRKS_CALLSTATE_EXTRA_UINT32; // This may change at runtime since in RIL v6 and later, we get the version // number via the UNSOLICITED_RIL_CONNECTED parcel. -let RILQUIRKS_V5_LEGACY = libcutils.property_get("ro.moz.ril.v5_legacy", "true") === "true"; -let RILQUIRKS_REQUEST_USE_DIAL_EMERGENCY_CALL = libcutils.property_get("ro.moz.ril.dial_emergency_call", "false") === "true"; -let RILQUIRKS_SIM_APP_STATE_EXTRA_FIELDS = libcutils.property_get("ro.moz.ril.simstate_extra_field", "false") === "true"; +let RILQUIRKS_V5_LEGACY; +let RILQUIRKS_REQUEST_USE_DIAL_EMERGENCY_CALL; +let RILQUIRKS_SIM_APP_STATE_EXTRA_FIELDS; // Needed for call-waiting on Peak device -let RILQUIRKS_EXTRA_UINT32_2ND_CALL = libcutils.property_get("ro.moz.ril.extra_int_2nd_call", "false") == "true"; +let RILQUIRKS_EXTRA_UINT32_2ND_CALL; // On the emulator we support querying the number of lock retries -let RILQUIRKS_HAVE_QUERY_ICC_LOCK_RETRY_COUNT = libcutils.property_get("ro.moz.ril.query_icc_count", "false") == "true"; +let RILQUIRKS_HAVE_QUERY_ICC_LOCK_RETRY_COUNT; // Ril quirk to Send STK Profile Download -let RILQUIRKS_SEND_STK_PROFILE_DOWNLOAD = libcutils.property_get("ro.moz.ril.send_stk_profile_dl", "false") == "true"; +let RILQUIRKS_SEND_STK_PROFILE_DOWNLOAD; // Ril quirk to attach data registration on demand. -let RILQUIRKS_DATA_REGISTRATION_ON_DEMAND = - libcutils.property_get("ro.moz.ril.data_reg_on_demand", "false") == "true"; +let RILQUIRKS_DATA_REGISTRATION_ON_DEMAND; // Marker object. let PENDING_NETWORK_TYPE = {}; @@ -111,7 +111,7 @@ let Buf = { // Maps tokens we send out with requests to the request type, so that // when we get a response parcel back, we know what request it was for. - this.mTokenRequestMap = {}; + this.mTokenRequestMap = new Map(); }, /** @@ -125,7 +125,7 @@ let Buf = { let token = this.readInt32(); let error = this.readInt32(); - options = this.mTokenRequestMap[token]; + options = this.mTokenRequestMap.get(token); if (!options) { if (DEBUG) { debug("Suspicious uninvited request found: " + token + ". Ignored!"); @@ -133,7 +133,7 @@ let Buf = { return; } - delete this.mTokenRequestMap[token]; + this.mTokenRequestMap.delete(token); request_type = options.rilRequestType; options.rilRequestError = error; @@ -174,7 +174,7 @@ let Buf = { } options.rilRequestType = type; options.rilRequestError = null; - this.mTokenRequestMap[this.mToken] = options; + this.mTokenRequestMap.set(this.mToken, options); this.mToken++; return this.mToken; }, @@ -2912,12 +2912,8 @@ let RIL = { * The number to look up. */ _isEmergencyNumber: function(number) { - // Check read-write ecclist property first. - let numbers = libcutils.property_get("ril.ecclist"); - if (!numbers) { - // Then read-only ecclist property since others RIL only uses this. - numbers = libcutils.property_get("ro.ril.ecclist"); - } + // Check ril provided numbers first. + let numbers = RIL_EMERGENCY_NUMBERS; if (numbers) { numbers = numbers.split(","); @@ -3585,11 +3581,8 @@ let RIL = { } // Set flag for outgoing emergency call. - if (newCall.isOutgoing && this._isEmergencyNumber(newCall.number)) { - newCall.isEmergency = true; - } else { - newCall.isEmergency = false; - } + newCall.isEmergency = newCall.isOutgoing && + this._isEmergencyNumber(newCall.number); // Add to our map. if (newCall.isMpty) { @@ -4962,6 +4955,16 @@ let RIL = { CLIENT_ID = options.clientId; this.cellBroadcastDisabled = options.cellBroadcastDisabled; this.clirMode = options.clirMode; + RIL_EMERGENCY_NUMBERS = options.rilEmergencyNumbers; + let quirks = options.quirks; + RILQUIRKS_CALLSTATE_EXTRA_UINT32 = quirks.callstateExtraUint32; + RILQUIRKS_V5_LEGACY = quirks.v5Legacy; + RILQUIRKS_REQUEST_USE_DIAL_EMERGENCY_CALL = quirks.requestUseDialEmergencyCall; + RILQUIRKS_SIM_APP_STATE_EXTRA_FIELDS = quirks.simAppStateExtraFields; + RILQUIRKS_EXTRA_UINT32_2ND_CALL = quirks.extraUint2ndCall; + RILQUIRKS_HAVE_QUERY_ICC_LOCK_RETRY_COUNT = quirks.haveQueryIccLockRetryCount; + RILQUIRKS_SEND_STK_PROFILE_DOWNLOAD = quirks.sendStkProfileDownload; + RILQUIRKS_DATA_REGISTRATION_ON_DEMAND = quirks.dataRegistrationOnDemand; } }; diff --git a/dom/wifi/WifiCommand.jsm b/dom/wifi/WifiCommand.jsm index b57cb2621b83..b7a550566e6a 100644 --- a/dom/wifi/WifiCommand.jsm +++ b/dom/wifi/WifiCommand.jsm @@ -310,11 +310,16 @@ this.WifiCommand = function(aControlMessage, aInterface) { doBooleanCommand("BLACKLIST clear", "OK", callback); }; - command.setSuspendOptimizations = function (enabled, callback) { + command.setSuspendOptimizationsICS = function (enabled, callback) { doBooleanCommand("DRIVER SETSUSPENDOPT " + (enabled ? 0 : 1), "OK", callback); }; + command.setSuspendOptimizationsJB = function (enabled, callback) { + doBooleanCommand("DRIVER SETSUSPENDMODE " + (enabled ? 1 : 0), + "OK", callback); + }; + command.connectToSupplicant = function(callback) { voidControlMessage("connect_to_supplicant", callback); }; diff --git a/dom/wifi/WifiWorker.js b/dom/wifi/WifiWorker.js index a4bd519b1675..57e58a20584e 100644 --- a/dom/wifi/WifiWorker.js +++ b/dom/wifi/WifiWorker.js @@ -1156,7 +1156,9 @@ var WifiManager = (function() { manager.getHttpProxyNetwork = getHttpProxyNetwork; manager.setHttpProxy = setHttpProxy; manager.configureHttpProxy = configureHttpProxy; - manager.setSuspendOptimizations = wifiCommand.setSuspendOptimizations; + manager.setSuspendOptimizations = (sdkVersion >= 16) + ? wifiCommand.setSuspendOptimizationsJB + : wifiCommand.setSuspendOptimizationsICS; manager.setStaticIpMode = setStaticIpMode; manager.getRssiApprox = wifiCommand.getRssiApprox; manager.getLinkSpeed = wifiCommand.getLinkSpeed; diff --git a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp index 09565a1f9f22..46e5a5c56a17 100644 --- a/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp +++ b/gfx/layers/ipc/ShadowLayerUtilsGralloc.cpp @@ -44,13 +44,33 @@ void ParamTraits