Merge b2ginbound to central, a=merge

This commit is contained in:
Wes Kocher 2015-06-10 18:36:06 -07:00
commit b124d4653d
21 changed files with 128 additions and 79 deletions

View File

@ -352,10 +352,10 @@ pref("dom.w3c_touch_events.safetyY", 120); // escape borders in units of 1/240"
#ifdef MOZ_SAFE_BROWSING
// Safe browsing does nothing unless this pref is set
pref("browser.safebrowsing.enabled", false);
pref("browser.safebrowsing.enabled", true);
// Prevent loading of pages identified as malware
pref("browser.safebrowsing.malware.enabled", false);
pref("browser.safebrowsing.malware.enabled", true);
pref("browser.safebrowsing.debug", false);
pref("browser.safebrowsing.updateURL", "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%VERSION%&pver=2.2&key=%GOOGLE_API_KEY%");
@ -405,6 +405,11 @@ pref("urlclassifier.max-complete-age", 2700);
// URL for checking the reason for a malware warning.
pref("browser.safebrowsing.malware.reportURL", "https://safebrowsing.google.com/safebrowsing/diagnostic?client=%NAME%&hl=%LOCALE%&site=");
// Tracking protection
pref("privacy.trackingprotection.enabled", true);
pref("privacy.trackingprotection.pbmode.enabled", false);
#endif
// True if this is the first time we are showing about:firstrun

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -19,10 +19,10 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="aac9cc4bb94cf720baf8f7ee419b4d76ac86b1ac"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9d0e5057ee5404a31ec1bf76131cb11336a7c3b6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="70b7fcbf7ff0ef38d04f82d68a56f2bb44ec694a"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -132,7 +132,7 @@
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="4bebbe8d92368befc31e8b4a99da2d29cc26bfbc"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="f37bd545063039e30a92f2550ae78c0e6e4e2d08"/>
<project name="platform_external_wpa_supplicant_8" path="external/wpa_supplicant_8" remote="b2g" revision="0c6a6547cd1fd302fa2b0f6e375654df36bf0ec4"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="de4bfffbbc2aabe5b5eca485e459da75e49097e2"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2b62676f02abb7633aac619e0f92c7fd70216860"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="d82e00fb6380b4f6cea7a96213913ee9eb441239"/>
<project name="platform/development" path="development" revision="5968ff4e13e0d696ad8d972281fc27ae5a12829b"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="0951179277915335251c5e11d242e4e1a8c2236f"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -19,10 +19,10 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="aac9cc4bb94cf720baf8f7ee419b4d76ac86b1ac"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="87a2d8ab9248540910e56921654367b78a587095"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="9d0e5057ee5404a31ec1bf76131cb11336a7c3b6"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="34ea6163f9f0e0122fb0bb03607eccdca31ced7a"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9",
"git_revision": "d2f31eb85837aae6eca04d022d1f5b2023bc778c",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "c33bf7766d1b19c407c3bbab943403ddee172915",
"revision": "2e9a1e5808b983fe4aa50a169b0e36fb3f0b43a3",
"repo_path": "integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="46da1a05ac04157669685246d70ac59d48699c9e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="70b7fcbf7ff0ef38d04f82d68a56f2bb44ec694a"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e3eaf72ccd1bfe6d60d37efde6d3b92c1dbc5ff9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="d2f31eb85837aae6eca04d022d1f5b2023bc778c"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="3477513bcd385571aa01c0d074849e35bd5e2376"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -1438,6 +1438,12 @@ BrowserElementChild.prototype = {
else if (state & Ci.nsIWebProgressListener.STATE_IS_INSECURE) {
stateDesc = 'insecure';
}
else if (state & Ci.nsIWebProgressListener.STATE_LOADED_TRACKING_CONTENT) {
stateDesc = 'loaded_tracking_content';
}
else if (state & Ci.nsIWebProgressListener.STATE_BLOCKED_TRACKING_CONTENT) {
stateDesc = 'blocked_tracking_content';
}
else {
debug("Unexpected securitychange state!");
stateDesc = '???';

View File

@ -193,11 +193,12 @@ DeviceStorageRequestChild::
= static_cast<nsDOMDeviceStorageCursor*>(mRequest.get());
uint32_t count = r.paths().Length();
cursor->mFiles.SetCapacity(count);
for (uint32_t i = 0; i < count; i++) {
nsRefPtr<DeviceStorageFile> dsf
= new DeviceStorageFile(r.type(), r.paths()[i].storageName(),
r.rootdir(), r.paths()[i].name());
cursor->mFiles.AppendElement(dsf);
cursor->mFiles.AppendElement(dsf.forget());
}
nsRefPtr<ContinueCursorEvent> event = new ContinueCursorEvent(cursor);

View File

@ -1461,6 +1461,10 @@ DeviceStorageFile::collectFilesInternal(
return;
}
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
MOZ_ASSERT(typeChecker);
nsCOMPtr<nsIDirectoryEnumerator> files = do_QueryInterface(e);
nsCOMPtr<nsIFile> f;
@ -1487,6 +1491,10 @@ DeviceStorageFile::collectFilesInternal(
continue;
}
if (isFile && !typeChecker->Check(mStorageType, fullpath)) {
continue;
}
if (!StringBeginsWith(fullpath, aRootPath)) {
NS_ERROR("collectFiles returned a path that does not belong!");
continue;
@ -2033,21 +2041,13 @@ ContinueCursorEvent::GetNextFile()
nsString cursorStorageType;
cursor->GetStorageType(cursorStorageType);
DeviceStorageTypeChecker* typeChecker
= DeviceStorageTypeChecker::CreateOrGet();
if (!typeChecker) {
return nullptr;
}
while (cursor->mFiles.Length() > 0) {
nsRefPtr<DeviceStorageFile> file = cursor->mFiles[0];
cursor->mFiles.RemoveElementAt(0);
if (!typeChecker->Check(cursorStorageType, file->mFile)) {
continue;
while (cursor->mIndex < cursor->mFiles.Length()) {
nsRefPtr<DeviceStorageFile> file = cursor->mFiles[cursor->mIndex].forget();
++cursor->mIndex;
if (file) {
file->CalculateMimeType();
return file.forget();
}
file->CalculateMimeType();
return file.forget();
}
return nullptr;
@ -2172,6 +2172,7 @@ nsDOMDeviceStorageCursor::nsDOMDeviceStorageCursor(nsPIDOMWindow* aWindow,
: DOMCursor(aWindow, nullptr)
, mOkToCallContinue(false)
, mSince(aSince)
, mIndex(0)
, mFile(aFile)
, mPrincipal(aPrincipal)
, mRequester(new nsContentPermissionRequester(GetOwner()))

View File

@ -216,6 +216,7 @@ public:
nsTArray<nsRefPtr<DeviceStorageFile> > mFiles;
bool mOkToCallContinue;
PRTime mSince;
size_t mIndex;
void GetStorageType(nsAString & aType);

View File

@ -139,6 +139,11 @@ IccService.prototype = {
let icc = this.getIccByServiceId(aServiceId);
if (!icc.iccInfo || !icc.iccInfo.iccid) {
debug("Warning: got STK command when iccid is invalid.");
return;
}
gIccMessenger.notifyStkProactiveCommand(icc.iccInfo.iccid, aStkcommand);
icc._deliverListenerEvent("notifyStkCommand", [aStkcommand]);

View File

@ -4,7 +4,7 @@
"use strict";
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
const { interfaces: Ci, utils: Cu } = Components;
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Promise.jsm");
@ -13,10 +13,23 @@ XPCOMUtils.defineLazyServiceGetter(this, "appsService",
"@mozilla.org/AppsService;1",
"nsIAppsService");
let DEBUG = false;
XPCOMUtils.defineLazyServiceGetter(this, "aceService",
"@mozilla.org/secureelement/access-control/ace;1",
"nsIAccessControlEnforcer");
XPCOMUtils.defineLazyModuleGetter(this, "SEUtils",
"resource://gre/modules/SEUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "SE", () => {
let obj = {};
Cu.import("resource://gre/modules/se_consts.js", obj);
return obj;
});
let DEBUG = SE.DEBUG_SE;
function debug(aMsg) {
if (DEBUG) {
dump("-- HCIEventTransactionSystemMessageConfigurator.js " + Date.now() + " : " + aMsg + "\n");
dump("-*- HCIEventTransaction: " + aMsg);
}
}
@ -41,33 +54,32 @@ HCIEventTransactionSystemMessageConfigurator.prototype = {
return Promise.resolve(false);
}
let appId = appsService.getAppLocalIdByManifestURL(aManifestURL);
if (appId === Ci.nsIScriptSecurityManager.NO_APP_ID) {
return Promise.resolve(false);
}
return new Promise((resolve, reject) => {
appsService.getManifestFor(aManifestURL)
.then((aManifest) => this._checkAppManifest(aMessage.origin, aMessage.aid, aManifest))
.then(() => {
// FIXME: Bug 884594: Access Control Enforcer
// Here we will call ace.isAllowed function which will also return
// a Promise, for now we're just resolving shouldDispatch promise
debug("dispatching message");
resolve(true);
.then(() => aceService.isAccessAllowed(appId, aMessage.origin, aMessage.aid))
.then((allowed) => {
debug("dispatching message: " + allowed);
resolve(allowed);
})
.catch(() => {
// if the Promise chain was broken we don't dispatch the message
debug("not dispatching");
resolve(false);
});
});
},
// we might be doing some async hash computations here, returning
// a resolved/rejected promise for now so we can easily fit the method
// into a Promise chain
_checkAppManifest: function _checkAppManifest(aOrigin, aAid, aManifest) {
DEBUG && debug("aManifest " + JSON.stringify(aManifest));
// convert AID and Secure Element name to uppercased string for comparison
// with manifest secure_element_access rules
let aid = this._byteAIDToHex(aAid);
let aid = SEUtils.byteArrayToHexString(aAid);
let seName = (aOrigin) ? aOrigin.toUpperCase() : "";
let hciRules = aManifest["secure_element_access"] || [];
@ -95,21 +107,6 @@ HCIEventTransactionSystemMessageConfigurator.prototype = {
return (matchingRule) ? Promise.resolve() : Promise.reject();
},
// FIXME: there is probably something which does this
_byteAIDToHex: function _byteAIDToHex(uint8arr) {
if (!uint8arr) {
return "";
}
var hexStr = "";
for (var i = 0; i < uint8arr.length; i++) {
var hex = (uint8arr[i] & 0xff).toString(16);
hex = (hex.length === 1) ? '0' + hex : hex;
hexStr += hex;
}
return hexStr.toUpperCase();
},
classID: Components.ID("{b501edd0-28bd-11e4-8c21-0800200c9a66}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsISystemMessagesConfigurator])
}

View File

@ -23,6 +23,7 @@ const MANIFEST = {
"*/a0*"
]
};
const APPID = 1111;
const PAGE_URL = "app://system.gaiamobile.org/index.html";
const TYPE = "nfc-hci-event-transaction";
@ -39,15 +40,29 @@ const TEST_MESSAGES = [
];
let HCIEvtTransactionConfigurator = null;
let aceAccessAllowed = true;
function setMockAppService(manifest) {
XPCOMUtils.defineLazyServiceGetter = (obj) => {
obj.appsService = {
getManifestFor: (manifestURL) => {
equal(manifestURL, MANIFEST_URL, "should pass proper manifestUrl");
return Promise.resolve(manifest);
}
};
function setMockServices(manifest) {
XPCOMUtils.defineLazyServiceGetter = (obj, service) => {
if (service === "appsService") {
obj.appsService = {
getManifestFor: (manifestURL) => {
equal(manifestURL, MANIFEST_URL, "should pass proper manifestUrl");
return Promise.resolve(manifest);
},
getAppLocalIdByManifestURL: (manifestURL) => {
equal(manifestURL, MANIFEST_URL, "should pass proper manifestUrl");
return APPID;
},
};
}
else if (service === "aceService") {
obj.aceService = {
isAccessAllowed: () => {
return Promise.resolve(aceAccessAllowed);
}
};
}
};
}
@ -62,7 +77,7 @@ function handleRejectedPromise() {
}
function run_test() {
setMockAppService(MANIFEST);
setMockServices(MANIFEST);
HCIEvtTransactionConfigurator = getSystemMessageConfigurator();
ok(!!HCIEvtTransactionConfigurator, "Configurator should be instantiated");
@ -96,3 +111,21 @@ add_test(function test_shouldDispatch_general_rule_validation() {
.catch(handleRejectedPromise)
.then(run_next_test);
});
add_test(function test_shouldDispatch_aceIsAccessAllowed() {
var testAccessAllowed = () => {
return HCIEvtTransactionConfigurator
.shouldDispatch(MANIFEST_URL, PAGE_URL, TYPE, TEST_MESSAGES[1])
.then((result) => {
ok(result === aceAccessAllowed, "Should be equal to ACE access decision");
});
};
aceAccessAllowed = false;
testAccessAllowed().then(() => {
aceAccessAllowed = true;
return testAccessAllowed();
})
.catch(handleRejectedPromise)
.then(run_next_test);
});

View File

@ -16,7 +16,7 @@ mar_file=b2g-$PLATFORM-gecko-update.mar
# We need different platform names for each variant (user, userdebug and
# eng). We do not append variant suffix for "user" to keep compability with
# verions already installed in the phones.
if [ 0$DOGFOOD -ne 0 -o $VARIANT != "user" ]; then
if [ 0$DOGFOOD -ne 1 -a $VARIANT != "user" ]; then
PLATFORM=$PLATFORM-$VARIANT
fi

View File

@ -563,17 +563,17 @@ private:
void
GeckoInputReaderPolicy::setDisplayInfo()
{
static_assert(nsIScreen::ROTATION_0_DEG ==
DISPLAY_ORIENTATION_0,
static_assert(static_cast<int>(nsIScreen::ROTATION_0_DEG) ==
static_cast<int>(DISPLAY_ORIENTATION_0),
"Orientation enums not matched!");
static_assert(nsIScreen::ROTATION_90_DEG ==
DISPLAY_ORIENTATION_90,
static_assert(static_cast<int>(nsIScreen::ROTATION_90_DEG) ==
static_cast<int>(DISPLAY_ORIENTATION_90),
"Orientation enums not matched!");
static_assert(nsIScreen::ROTATION_180_DEG ==
DISPLAY_ORIENTATION_180,
static_assert(static_cast<int>(nsIScreen::ROTATION_180_DEG) ==
static_cast<int>(DISPLAY_ORIENTATION_180),
"Orientation enums not matched!");
static_assert(nsIScreen::ROTATION_270_DEG ==
DISPLAY_ORIENTATION_270,
static_assert(static_cast<int>(nsIScreen::ROTATION_270_DEG) ==
static_cast<int>(DISPLAY_ORIENTATION_270),
"Orientation enums not matched!");
nsRefPtr<nsScreenGonk> screen = nsScreenManagerGonk::GetPrimaryScreen();