Merge m-c to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2015-10-22 11:55:01 +02:00
commit a2f61f8ddc
56 changed files with 643 additions and 188 deletions

View File

@ -52,8 +52,12 @@ _OPT\.OBJ/
\.cproject$
\.settings/
# Ignore the directory that JetBrains IDEs create
# Ignore the files and directory that JetBrains IDEs create.
\.idea/
\.iml$
# Gradle cache.
^.gradle/
# Python stuff installed at build time.
^python/psutil/.*\.so

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>

View File

@ -19,7 +19,7 @@
<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="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>

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="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -19,7 +19,7 @@
<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="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="4ace9aaee0e048dfda11bb787646c59982a3dc80"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "1b902ff26547e2a6c896351a6a73b673f65e19b2",
"git_revision": "29ce8ec8606e59f582375234440812b046346513",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "8b7263ff51b72b49a16f3ff09ea98182aad1ffee",
"revision": "9ba6b51b109bb675c8c8c2687c75b088df7e50ac",
"repo_path": "integration/gaia-central"
}

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="8d83715f08b7849f16a0dfc88f78d5c3a89c0a54">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>

View File

@ -18,7 +18,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="3b9a47b517d345b8d98bc7f787b9a6c2f51ca75d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="0c28789b9957913be975eb002a22323f93585d4c"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="c9d4fe680662ee44a4bdea42ae00366f5df399cf">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="1b902ff26547e2a6c896351a6a73b673f65e19b2"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="29ce8ec8606e59f582375234440812b046346513"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="fake-qemu-kernel" path="prebuilts/qemu-kernel" remote="b2g" revision="939b377d55a2f081d94029a30a75d05e5a20daf3"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c1bbb66f52f9e2d76ce97e7b3aa0cb29957cd7d8"/>

View File

@ -9,6 +9,16 @@
color: #fff;
}
/* Use inverted spinner icon on the dark background */
.update-throbber {
list-style-image: url("chrome://global/skin/icons/loading-inverted.png");
}
@media (min-resolution: 1.1dppx) {
.update-throbber {
list-style-image: url("chrome://global/skin/icons/loading-inverted@2x.png");
}
}
.text-link {
color: #fff !important;
text-decoration: underline;

View File

@ -9,6 +9,16 @@
color: #fff;
}
/* Use inverted spinner icon on the dark background */
.update-throbber {
list-style-image: url("chrome://global/skin/icons/loading-inverted.png");
}
@media (min-resolution: 1.1dppx) {
.update-throbber {
list-style-image: url("chrome://global/skin/icons/loading-inverted@2x.png");
}
}
.text-link {
color: #fff !important;
text-decoration: underline;

View File

@ -9,6 +9,16 @@
color: #fff;
}
/* Use inverted spinner icon on the dark background */
.update-throbber {
list-style-image: url("chrome://global/skin/icons/loading-inverted.png");
}
@media (min-resolution: 1.1dppx) {
.update-throbber {
list-style-image: url("chrome://global/skin/icons/loading-inverted@2x.png");
}
}
.text-link {
color: #fff !important;
text-decoration: underline;

View File

@ -128,7 +128,7 @@ global.openPanel = (node, popupURL, extension) => {
panel.setAttribute("id", makeWidgetId(extension.id) + "-panel");
panel.setAttribute("class", "browser-extension-panel");
panel.setAttribute("type", "arrow");
panel.setAttribute("flip", "slide");
panel.setAttribute("role", "group");
let anchor;
if (node.localName == "toolbarbutton") {
@ -143,18 +143,23 @@ global.openPanel = (node, popupURL, extension) => {
anchor = node;
}
let context;
panel.addEventListener("popuphidden", () => {
context.unload();
panel.remove();
});
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
let browser = document.createElementNS(XUL_NS, "browser");
browser.setAttribute("type", "content");
browser.setAttribute("disableglobalhistory", "true");
panel.appendChild(browser);
let titleChangedListener = () => {
panel.setAttribute("aria-label", browser.contentTitle);
}
let context;
panel.addEventListener("popuphidden", () => {
browser.removeEventListener("DOMTitleChanged", titleChangedListener, true);
context.unload();
panel.remove();
});
let loadListener = () => {
panel.removeEventListener("load", loadListener);
@ -192,6 +197,8 @@ global.openPanel = (node, popupURL, extension) => {
panel.openPopup(anchor, "bottomcenter topright", 0, 0, false, false);
};
browser.addEventListener("load", contentLoadListener, true);
browser.addEventListener("DOMTitleChanged", titleChangedListener, true);
};
panel.addEventListener("load", loadListener);

View File

@ -117,7 +117,9 @@ var fakeRooms = [
switch(pref) {
// Ensure we skip FTE completely.
case "gettingStarted.seen":
return true;
}
return null;
},
hasEncryptionKey: true,
setLoopPref: function(){},

127
build.gradle Normal file
View File

@ -0,0 +1,127 @@
import java.util.regex.Pattern
allprojects {
// Expose the per-object-directory configuration to all projects.
ext {
mozconfig = gradle.mozconfig
topsrcdir = gradle.mozconfig.topsrcdir
topobjdir = gradle.mozconfig.topobjdir
}
repositories {
jcenter()
}
}
buildDir "${topobjdir}/gradle/build"
buildscript {
repositories {
jcenter()
// For spoon-gradle-plugin SNAPSHOT release. This needs to go before
// the snapshots repository, otherwise we find a remote 1.0.3-SNAPSHOT
// that doesn't include nalexander's local changes.
maven {
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
}
// For spoon SNAPSHOT releases.
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
dependencies {
// Unit testing support was added in 1.1.0. IntelliJ 14.1.4 and Android
// Studio 1.2.1.1 appear to work fine with plugin version 1.3.0.
classpath 'com.android.tools.build:gradle:1.3.0'
classpath('com.stanfy.spoon:spoon-gradle-plugin:1.0.3-SNAPSHOT') {
// Without these, we get errors linting.
exclude module: 'guava'
}
}
}
task generateCodeAndResources(type:Exec) {
workingDir "${topobjdir}"
commandLine mozconfig.substs.GMAKE
args '-C'
args "${topobjdir}/mobile/android/base"
args 'gradle-targets'
// Only show the output if something went wrong.
ignoreExitValue = true
standardOutput = new ByteArrayOutputStream()
errorOutput = standardOutput
doLast {
if (execResult.exitValue != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
}
}
}
// Skip unit test for all build variants, unless if it was specifically requested by user.
// The enabled property for the unit test tasks is reset based on the command line task names just before the task execution.
// I bet there is a easier/cleaner way to do this, but this gets the job done for now.
Pattern pattern = Pattern.compile('.*test(.+UnitTest)?.*')
boolean startTasksIncludeTest = gradle.startParameter.taskNames.any {
taskName ->
taskName.matches(pattern)
}
gradle.taskGraph.beforeTask {
Task task ->
if (task.name.matches(pattern)) {
task.enabled = startTasksIncludeTest
}
}
afterEvaluate {
subprojects {
if (!hasProperty('android')) {
return
}
android.applicationVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
android.libraryVariants.all {
preBuild.dependsOn rootProject.generateCodeAndResources
}
}
}
apply plugin: 'idea'
idea {
project {
languageLevel = '1.7'
}
module {
// Object directories take a huge amount of time for IntelliJ to index.
// Exclude them. Convention is that object directories start with obj.
// IntelliJ is clever and will not exclude the parts of the object
// directory that are referenced, if there are any.
def topsrcdirURI = file(topsrcdir).toURI()
excludeDirs += files(file(topsrcdir)
.listFiles({it.isDirectory()} as FileFilter)
.collect({topsrcdirURI.relativize(it.toURI()).toString()}) // Relative paths.
.findAll({it.startsWith('obj')}))
// If topobjdir is below topsrcdir, hide only some portions of that tree.
def topobjdirURI = file(topobjdir).toURI()
if (!topsrcdirURI.relativize(topobjdirURI).isAbsolute()) {
excludeDirs -= file(topobjdir)
excludeDirs += files(file(topobjdir).listFiles())
excludeDirs -= file("${topobjdir}/gradle")
excludeDirs -= file("${topobjdir}/mobile")
}
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
excludeDirs += file("${topsrcdir}/mobile/android/thirdparty/com/adjust")
}
}
}
task wrapper(type: Wrapper) {
}

View File

@ -3757,6 +3757,7 @@ MOZ_ANDROID_SEARCH_ACTIVITY=
MOZ_ANDROID_DOWNLOADS_INTEGRATION=
MOZ_ANDROID_MLS_STUMBLER=
MOZ_ANDROID_SHARE_OVERLAY=
MOZ_EXCLUDE_HYPHENATION_DICTIONARIES=
MOZ_INSTALL_TRACKING=
MOZ_SWITCHBOARD=
ACCESSIBILITY=1
@ -4864,6 +4865,13 @@ if test -n "$MOZ_ANDROID_TAB_QUEUE"; then
AC_DEFINE(MOZ_ANDROID_TAB_QUEUE)
fi
dnl =========================================================
dnl = Whether to exclude hyphenations files in the build
dnl =========================================================
if test -n "$MOZ_EXCLUDE_HYPHENATION_DICTIONARIES"; then
AC_DEFINE(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
fi
dnl ========================================================
dnl = Include install tracking on Android
dnl ========================================================
@ -8595,6 +8603,7 @@ AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)
AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
AC_SUBST(MOZ_ANDROID_SEARCH_INTENT_CLASS)
AC_SUBST(MOZ_EXCLUDE_HYPHENATION_DICTIONARIES)
AC_SUBST(MOZ_INSTALL_TRACKING)
AC_SUBST(MOZ_SWITCHBOARD)
AC_SUBST(ENABLE_STRIP)

View File

@ -52,18 +52,18 @@ function* testOptionsShortcut() {
yield toolbox.selectTool("webconsole");
is(toolbox.currentToolId, "webconsole", "webconsole is selected");
synthesizeKeyFromKeyTag("toolbox-options-key", doc);
synthesizeKeyFromKeyTag(doc.getElementById("toolbox-options-key"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (1)");
synthesizeKeyFromKeyTag("toolbox-options-key", doc);
synthesizeKeyFromKeyTag(doc.getElementById("toolbox-options-key"));
is(toolbox.currentToolId, "webconsole", "webconsole is selected (1)");
yield toolbox.selectTool("webconsole");
is(toolbox.currentToolId, "webconsole", "webconsole is selected");
synthesizeKeyFromKeyTag("toolbox-options-key2", doc);
synthesizeKeyFromKeyTag(doc.getElementById("toolbox-options-key2"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (2)");
synthesizeKeyFromKeyTag("toolbox-options-key", doc);
synthesizeKeyFromKeyTag(doc.getElementById("toolbox-options-key"));
is(toolbox.currentToolId, "webconsole", "webconsole is reselected (2)");
synthesizeKeyFromKeyTag("toolbox-options-key2", doc);
synthesizeKeyFromKeyTag(doc.getElementById("toolbox-options-key2"));
is(toolbox.currentToolId, "options", "Toolbox selected via shortcut key (2)");
}

View File

@ -97,9 +97,8 @@ function removeTab(tab) {
});
}
function synthesizeKeyFromKeyTag(aKeyId, document) {
let key = document.getElementById(aKeyId);
isnot(key, null, "Successfully retrieved the <key> node");
function synthesizeKeyFromKeyTag(key) {
is(key && key.tagName, "key", "Successfully retrieved the <key> node");
let modifiersAttr = key.getAttribute("modifiers");
@ -113,13 +112,14 @@ function synthesizeKeyFromKeyTag(aKeyId, document) {
isnot(name, null, "Successfully retrieved keycode/key");
let modifiers = {
shiftKey: modifiersAttr.match("shift"),
ctrlKey: modifiersAttr.match("ctrl"),
altKey: modifiersAttr.match("alt"),
metaKey: modifiersAttr.match("meta"),
accelKey: modifiersAttr.match("accel")
shiftKey: !!modifiersAttr.match("shift"),
ctrlKey: !!modifiersAttr.match("control"),
altKey: !!modifiersAttr.match("alt"),
metaKey: !!modifiersAttr.match("meta"),
accelKey: !!modifiersAttr.match("accel")
};
info("Synthesizing key " + name + " " + JSON.stringify(modifiers));
EventUtils.synthesizeKey(name, modifiers);
}

View File

@ -27,7 +27,7 @@ function test() {
let mgr = ResponsiveUI.ResponsiveUIManager;
synthesizeKeyFromKeyTag("key_responsiveUI");
synthesizeKeyFromKeyTag(document.getElementById("key_responsiveUI"));
yield once(mgr, "on");

View File

@ -24,29 +24,13 @@ function test() {
return testOnePreset(instance.menulist.firstChild.childNodes.length - 4);
}
function synthesizeKeyFromKeyTag(aKeyId) {
let key = document.getElementById(aKeyId);
isnot(key, null, "Successfully retrieved the <key> node");
let name = null;
if (key.getAttribute("keycode"))
name = key.getAttribute("keycode");
else if (key.getAttribute("key"))
name = key.getAttribute("key");
isnot(name, null, "Successfully retrieved keycode/key");
key.doCommand();
}
Task.spawn(function*() {
yield addTab("data:text/html;charset=utf8,test custom presets in responsive mode");
let mgr = ResponsiveUI.ResponsiveUIManager;
synthesizeKeyFromKeyTag("key_responsiveUI");
synthesizeKeyFromKeyTag(document.getElementById("key_responsiveUI"));
yield once(mgr, "on");
@ -107,7 +91,7 @@ function test() {
// Let's wait next loop to stop it.
yield nextTick();
synthesizeKeyFromKeyTag("key_responsiveUI");
synthesizeKeyFromKeyTag(document.getElementById("key_responsiveUI"));
yield once(mgr, "on");
@ -140,7 +124,7 @@ function test() {
instance.close();
yield once(mgr, "off");
synthesizeKeyFromKeyTag("key_responsiveUI");
synthesizeKeyFromKeyTag(document.getElementById("key_responsiveUI"));
info("waiting for responsive mode to turn on");
yield once(mgr, "on");

View File

@ -3,10 +3,8 @@
"use strict";
var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
var {TargetFactory} = require("devtools/client/framework/target");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
var promise = require("promise");
// shared-head.js handles imports, constants, and utility functions
Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtools/client/framework/test/shared-head.js", this);
// Import the GCLI test helper
var testDir = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
@ -184,32 +182,6 @@ function wait(ms) {
return def.promise;
}
function synthesizeKeyFromKeyTag(aKeyId) {
let key = document.getElementById(aKeyId);
isnot(key, null, "Successfully retrieved the <key> node");
let modifiersAttr = key.getAttribute("modifiers");
let name = null;
if (key.getAttribute("keycode"))
name = key.getAttribute("keycode");
else if (key.getAttribute("key"))
name = key.getAttribute("key");
isnot(name, null, "Successfully retrieved keycode/key");
let modifiers = {
shiftKey: modifiersAttr.match("shift"),
ctrlKey: modifiersAttr.match("ctrl"),
altKey: modifiersAttr.match("alt"),
metaKey: modifiersAttr.match("meta"),
accelKey: modifiersAttr.match("accel")
}
EventUtils.synthesizeKey(name, modifiers);
}
function nextTick() {
let def = promise.defer();
executeSoon(() => def.resolve())

View File

@ -53,7 +53,8 @@ var test = asyncTest(function*() {
info("try ctrl-l to clear output");
executeSoon(() => {
EventUtils.synthesizeKey("l", { ctrlKey: true });
let clearKey = hud.ui.window.document.querySelector("key[command=consoleCmd_clearOutput]:not([disabled])");
synthesizeKeyFromKeyTag(clearKey);
});
yield hud.jsterm.once("messages-cleared");

View File

@ -5,15 +5,12 @@
"use strict";
var {gDevTools} = Cu.import("resource://devtools/client/framework/gDevTools.jsm", {});
var {console} = Cu.import("resource://gre/modules/Console.jsm", {});
// shared-head.js handles imports, constants, and utility functions
Services.scriptloader.loadSubScript("chrome://mochitests/content/browser/devtools/client/framework/test/shared-head.js", this);
var {Task} = Cu.import("resource://gre/modules/Task.jsm", {});
var {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
var promise = require("promise");
var {TargetFactory} = require("devtools/client/framework/target");
var {Utils: WebConsoleUtils} = require("devtools/shared/webconsole/utils");
var {Messages} = require("devtools/client/webconsole/console-output");
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
const asyncStorage = require("devtools/shared/async-storage");
// Services.prefs.setBoolPref("devtools.debugger.log", true);

View File

@ -15,24 +15,20 @@ loader.lazyServiceGetter(this, "clipboardHelper",
"@mozilla.org/widget/clipboardhelper;1",
"nsIClipboardHelper");
loader.lazyImporter(this, "Services", "resource://gre/modules/Services.jsm");
loader.lazyGetter(this, "EventEmitter", () => require("devtools/shared/event-emitter"));
loader.lazyGetter(this, "AutocompletePopup",
() => require("devtools/client/shared/autocomplete-popup").AutocompletePopup);
loader.lazyGetter(this, "ToolSidebar",
() => require("devtools/client/framework/sidebar").ToolSidebar);
loader.lazyGetter(this, "ConsoleOutput",
() => require("devtools/client/webconsole/console-output").ConsoleOutput);
loader.lazyGetter(this, "Messages",
() => require("devtools/client/webconsole/console-output").Messages);
loader.lazyGetter(this, "asyncStorage",
() => require("devtools/shared/async-storage"));
loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter");
loader.lazyRequireGetter(this, "AutocompletePopup", "devtools/client/shared/autocomplete-popup", true);
loader.lazyRequireGetter(this, "ToolSidebar", "devtools/client/framework/sidebar", true);
loader.lazyRequireGetter(this, "ConsoleOutput", "devtools/client/webconsole/console-output", true);
loader.lazyRequireGetter(this, "Messages", "devtools/client/webconsole/console-output", true);
loader.lazyRequireGetter(this, "asyncStorage", "devtools/shared/async-storage");
loader.lazyRequireGetter(this, "EnvironmentClient", "devtools/shared/client/main", true);
loader.lazyRequireGetter(this, "ObjectClient", "devtools/shared/client/main", true);
loader.lazyRequireGetter(this, "system", "devtools/shared/system");
loader.lazyRequireGetter(this, "Timers", "sdk/timers");
loader.lazyImporter(this, "VariablesView", "resource://devtools/client/shared/widgets/VariablesView.jsm");
loader.lazyImporter(this, "VariablesViewController", "resource://devtools/client/shared/widgets/VariablesViewController.jsm");
loader.lazyImporter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm");
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
loader.lazyGetter(this, "Timers", () => require("sdk/timers"));
const STRINGS_URI = "chrome://browser/locale/devtools/webconsole.properties";
var l10n = new WebConsoleUtils.l10n(STRINGS_URI);
@ -528,6 +524,12 @@ WebConsoleFrame.prototype = {
let doc = this.document;
if (system.constants.platform === "macosx") {
doc.querySelector("#key_clearOSX").removeAttribute("disabled");
} else {
doc.querySelector("#key_clear").removeAttribute("disabled");
}
this.filterBox = doc.querySelector(".hud-filter-box");
this.outputNode = doc.getElementById("output-container");
this.completeNode = doc.querySelector(".jsterm-complete-node");

View File

@ -62,7 +62,11 @@ function goUpdateConsoleCommands() {
<key key="&fullZoomResetCmd.commandkey2;" command="cmd_fullZoomReset" modifiers="accel"/>
<key key="&findCmd.key;" command="cmd_find" modifiers="accel"/>
<key key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
<key key="&clearOutputCtrl.key;" command="consoleCmd_clearOutput" modifiers="control"/>
<!-- The 'clear' key differs by plaform, so the correct one becomes
enabled in JS -->
<key id="key_clear" disabled="true" key="&clearOutputCtrl.key;" command="consoleCmd_clearOutput" modifiers="control shift"/>
<key id="key_clearOSX" disabled="true" key="&clearOutputCtrl.key;" command="consoleCmd_clearOutput" modifiers="control"/>
</keyset>
<keyset id="editMenuKeys"/>

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,6 @@
#Sun Oct 18 17:00:46 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip

160
gradlew vendored Executable file
View File

@ -0,0 +1,160 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

View File

@ -4,9 +4,11 @@
include $(topsrcdir)/config/rules.mk
ifndef MOZ_EXCLUDE_HYPHENATION_DICTIONARIES
PATTERN_FILES = $(strip $(wildcard $(srcdir)/*/hyphenation/*.dic))
ifneq (,$(PATTERN_FILES))
libs::
$(INSTALL) $(PATTERN_FILES) $(FINAL_TARGET)/hyphenation
endif
endif # MOZ_EXCLUDE_HYPHENATION_DICTIONARIES

View File

@ -153,6 +153,13 @@ public class AppConstants {
null;
//#endif
public static final boolean MOZ_EXCLUDE_HYPHENATION_DICTIONARIES =
//#ifdef MOZ_EXCLUDE_HYPHENATION_DICTIONARIES
true;
//#else
false;
//#endif
/**
* Whether this APK was built with constrained resources --
* no xhdpi+ images, for example.

View File

@ -237,6 +237,14 @@ public class BrowserSearch extends HomeFragment
mSearchEngines = null;
}
@Override
public void onHiddenChanged(boolean hidden) {
if (!hidden) {
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("SearchEngines:GetVisible", null));
}
super.onHiddenChanged(hidden);
}
@Override
public void onResume() {
super.onResume();
@ -552,6 +560,22 @@ public class BrowserSearch extends HomeFragment
mAdapter.notifyDataSetChanged();
}
private boolean shouldUpdateSearchEngine(ArrayList<SearchEngine> searchEngines) {
if (searchEngines.size() != mSearchEngines.size()) {
return true;
}
int size = searchEngines.size();
for (int i = 0; i < size; i++) {
if (!mSearchEngines.get(i).name.equals(searchEngines.get(i).name)) {
return true;
}
}
return false;
}
private void setSearchEngines(JSONObject data) {
ThreadUtils.assertOnUiThread();
@ -597,15 +621,17 @@ public class BrowserSearch extends HomeFragment
}
}
mSearchEngines = Collections.unmodifiableList(searchEngines);
mLastLocale = Locale.getDefault();
// checking if the new searchEngine is different from mSearchEngine, will have to re-layout if yes
boolean change = shouldUpdateSearchEngine(searchEngines);
if (mAdapter != null && change) {
mSearchEngines = Collections.unmodifiableList(searchEngines);
mLastLocale = Locale.getDefault();
updateSearchEngineBar();
if (mAdapter != null) {
mAdapter.notifyDataSetChanged();
}
updateSearchEngineBar();
// Show suggestions opt-in prompt only if suggestions are not enabled yet,
// user hasn't been prompted and we're not on a private browsing tab.
if (!mSuggestionsEnabled && !suggestionsPrompted && mSuggestClient != null) {

View File

@ -6,7 +6,7 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:gecko="http://schemas.android.com/apk/res-auto">
<ImageButton
<ImageView
android:id="@+id/favicon"
android:layout_width="@dimen/browser_toolbar_favicon_size"
android:layout_height="match_parent"

View File

@ -5,6 +5,7 @@
package org.mozilla.gecko.widget;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.R;
import android.content.Context;
@ -21,6 +22,7 @@ public class RoundedCornerLayout extends LinearLayout {
private float cornerRadius;
private Path path;
boolean cannotClipPath;
public RoundedCornerLayout(Context context) {
super(context);
@ -38,6 +40,9 @@ public class RoundedCornerLayout extends LinearLayout {
}
private void init(Context context) {
// Bug 1201081 - clipPath with hardware acceleration crashes on r11-18.
cannotClipPath = AppConstants.Versions.feature11Plus && !AppConstants.Versions.feature19Plus;
final DisplayMetrics metrics = context.getResources().getDisplayMetrics();
cornerRadius = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX,
@ -49,6 +54,10 @@ public class RoundedCornerLayout extends LinearLayout {
@Override
protected void onSizeChanged(int w, int h, int oldw, int oldh) {
super.onSizeChanged(w, h, oldw, oldh);
if (cannotClipPath) {
return;
}
final RectF r = new RectF(0, 0, w, h);
path = new Path();
path.addRoundRect(r, cornerRadius, cornerRadius, Path.Direction.CW);
@ -57,6 +66,11 @@ public class RoundedCornerLayout extends LinearLayout {
@Override
public void draw(Canvas canvas) {
if (cannotClipPath) {
super.draw(canvas);
return;
}
canvas.save();
canvas.clipPath(path);
super.draw(canvas);

View File

@ -98,7 +98,7 @@ dependencies {
compile 'com.android.support:recyclerview-v7:23.0.1'
if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
compile 'com.android.support:mediarouter-v7:22.2.1'
compile 'com.android.support:mediarouter-v7:23.0.1'
compile 'com.google.android.gms:play-services-basement:8.1.0'
compile 'com.google.android.gms:play-services-base:8.1.0'
compile 'com.google.android.gms:play-services-cast:8.1.0'
@ -106,10 +106,6 @@ dependencies {
compile project(':thirdparty')
if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
compile project(':thirdparty_adjust_sdk')
}
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.0'
testCompile 'org.simpleframework:simple-http:4.1.13'

View File

@ -23,7 +23,7 @@ buildscript {
// the snapshots repository, otherwise we find a remote 1.0.3-SNAPSHOT
// that doesn't include nalexander's local changes.
maven {
url "file://${topsrcdir}/mobile/android/gradle/m2repo"
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
}
// For spoon SNAPSHOT releases.
maven {

View File

@ -34,11 +34,6 @@ project(':base').projectDir = new File(gradleRoot, 'base')
project(':omnijar').projectDir = new File(gradleRoot, 'omnijar')
project(':thirdparty').projectDir = new File(gradleRoot, 'thirdparty')
if (json.substs.MOZ_INSTALL_TRACKING) {
include ':thirdparty_adjust_sdk'
project(':thirdparty_adjust_sdk').projectDir = new File(gradleRoot, 'thirdparty_adjust_sdk')
}
// The Gradle instance is shared between settings.gradle and all the
// other build.gradle files (see
// http://forums.gradle.org/gradle/topics/define_extension_properties_from_settings_xml).

View File

@ -21,8 +21,9 @@ android {
sourceSets {
main {
java {
// Thirdparty Adjust SDK code is included in the thirdparty_adjust_sdk project.
exclude 'com/adjust/**'
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
exclude 'com/adjust/**'
}
}
}
}

View File

@ -1,32 +0,0 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
targetSdkVersion 22
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
sourceSets {
main {
java {
srcDir "${topsrcdir}/mobile/android/thirdparty/com/adjust"
}
}
}
}
dependencies {
compile 'com.android.support:support-v4:22.2.0'
}

View File

@ -104,9 +104,6 @@ class MachCommands(MachCommandBase):
srcdir('thirdparty/src/main/AndroidManifest.xml', 'mobile/android/gradle/thirdparty/AndroidManifest.xml')
srcdir('thirdparty/src/main/java', 'mobile/android/thirdparty')
srcdir('thirdparty_adjust_sdk/build.gradle', 'mobile/android/gradle/thirdparty_adjust_sdk/build.gradle')
srcdir('thirdparty_adjust_sdk/src/main/AndroidManifest.xml', 'mobile/android/gradle/thirdparty_adjust_sdk/AndroidManifest.xml')
srcdir('omnijar/build.gradle', 'mobile/android/gradle/omnijar/build.gradle')
srcdir('omnijar/src/main/java/locales', 'mobile/android/locales')
srcdir('omnijar/src/main/java/chrome', 'mobile/android/chrome')

View File

@ -8,7 +8,7 @@ import org.mozilla.gecko.R;
import com.jayway.android.robotium.solo.Condition;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
/**
* This patch tests the clear private data options:
@ -126,7 +126,7 @@ public class testClearPrivateData extends PixelTest {
mSolo.waitForCondition(new Condition() {
@Override
public boolean isSatisfied() {
ImageButton btn = (ImageButton) mSolo.getView(R.id.favicon);
ImageView btn = (ImageView) mSolo.getView(R.id.favicon);
mSolo.clickOnView(btn);
return true;
}

View File

@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.adjust.sdk">
package="org.mozilla.gecko.thirdparty_unused">
</manifest>

49
mobile/android/thirdparty/build.gradle vendored Normal file
View File

@ -0,0 +1,49 @@
buildDir "${topobjdir}/gradle/build/mobile/android/thirdparty"
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
targetSdkVersion 22
minSdkVersion 9
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java {
srcDir '.'
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
exclude 'com/adjust/**'
}
}
}
}
}
dependencies {
compile 'com.android.support:support-v4:23.0.1'
}
apply plugin: 'idea'
idea {
module {
// This is cosmetic. See the excludes in the root project.
if (!mozconfig.substs.MOZ_INSTALL_TRACKING) {
excludeDirs += file('com/adjust/sdk')
}
}
}

View File

@ -2,9 +2,9 @@ package com.adjust.sdk;
import android.content.Context;
import org.apache.http.client.HttpClient;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.HttpParams;
import ch.boye.httpclientandroidlib.client.HttpClient;
import ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient;
import ch.boye.httpclientandroidlib.params.HttpParams;
public class AdjustFactory {
private static IPackageHandler packageHandler = null;

View File

@ -2,9 +2,9 @@ package com.adjust.sdk;
import android.net.Uri;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import ch.boye.httpclientandroidlib.HttpResponse;
import ch.boye.httpclientandroidlib.client.HttpClient;
import ch.boye.httpclientandroidlib.client.methods.HttpGet;
import org.json.JSONObject;
import java.net.URI;

View File

@ -14,15 +14,15 @@ import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.message.BasicNameValuePair;
import ch.boye.httpclientandroidlib.HttpResponse;
import ch.boye.httpclientandroidlib.NameValuePair;
import ch.boye.httpclientandroidlib.client.ClientProtocolException;
import ch.boye.httpclientandroidlib.client.HttpClient;
import ch.boye.httpclientandroidlib.client.entity.UrlEncodedFormEntity;
import ch.boye.httpclientandroidlib.client.methods.HttpPost;
import ch.boye.httpclientandroidlib.client.methods.HttpUriRequest;
import ch.boye.httpclientandroidlib.client.utils.URLEncodedUtils;
import ch.boye.httpclientandroidlib.message.BasicNameValuePair;
import org.json.JSONObject;
import java.io.IOException;

View File

@ -12,12 +12,12 @@ package com.adjust.sdk;
import android.content.Context;
import android.content.pm.PackageManager;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import ch.boye.httpclientandroidlib.HttpResponse;
import ch.boye.httpclientandroidlib.HttpStatus;
import ch.boye.httpclientandroidlib.client.HttpClient;
import ch.boye.httpclientandroidlib.params.BasicHttpParams;
import ch.boye.httpclientandroidlib.params.HttpConnectionParams;
import ch.boye.httpclientandroidlib.params.HttpParams;
import org.json.JSONException;
import org.json.JSONObject;

View File

@ -59,8 +59,18 @@ class ArchlinuxBootstrapper(BaseBootstrapper):
'networkmanager',
]
AUR_PACKAGES = [
'https://aur.archlinux.org/cgit/aur.git/snapshot/uuid.tar.gz'
BROWSER_AUR_PACKAGES = [
'https://aur.archlinux.org/cgit/aur.git/snapshot/uuid.tar.gz',
]
MOBILE_ANDROID_COMMON_PACKAGES = [
'zlib', # mobile/android requires system zlib.
'jdk7-openjdk', # It would be nice to handle alternative JDKs. See https://wiki.archlinux.org/index.php/Java.
'wget', # For downloading the Android SDK and NDK.
'multilib/lib32-libstdc++5', # See comment about 32 bit binaries and multilib below.
'multilib/lib32-ncurses',
'multilib/lib32-readline',
'multilib/lib32-zlib',
]
def __init__(self, version, dist_id, **kwargs):
@ -69,14 +79,55 @@ class ArchlinuxBootstrapper(BaseBootstrapper):
def install_system_packages(self):
self.pacman_install(*self.SYSTEM_PACKAGES)
self.aur_install(*self.AUR_PACKAGES)
def install_browser_packages(self):
self.aur_install(*self.AUR_BROWSER_PACKAGES)
self.pacman_install(*self.BROWSER_PACKAGES)
def install_mobile_android_packages(self):
raise NotImplementedError('Bootstrap support for mobile-android is '
'not yet available for Archlinux')
import android
# Multi-part process:
# 1. System packages.
# 2. Android SDK and NDK.
# 3. Android packages.
# 1. This is hard to believe, but the Android SDK binaries are 32-bit
# and that conflicts with 64-bit Arch installations out of the box. The
# solution is to add the multilibs repository; unfortunately, this
# requires manual intervention.
try:
self.pacman_install(*self.MOBILE_ANDROID_COMMON_PACKAGES)
except e:
print('Failed to install all packages. The Android developer '
'toolchain requires 32 bit binaries be enabled (see '
'https://wiki.archlinux.org/index.php/Android). You may need to '
'manually enable the multilib repository following the instructions '
'at https://wiki.archlinux.org/index.php/Multilib.')
raise e
# 2. The user may have an external Android SDK (in which case we save
# them a lengthy download), or they may have already completed the
# download. We unpack to ~/.mozbuild/{android-sdk-linux, android-ndk-r10e}.
mozbuild_path = os.environ.get('MOZBUILD_STATE_PATH', os.path.expanduser(os.path.join('~', '.mozbuild')))
self.sdk_path = os.environ.get('ANDROID_SDK_HOME', os.path.join(mozbuild_path, 'android-sdk-linux'))
self.ndk_path = os.environ.get('ANDROID_NDK_HOME', os.path.join(mozbuild_path, 'android-ndk-r10e'))
self.sdk_url = 'https://dl.google.com/android/android-sdk_r24.0.1-linux.tgz'
is_64bits = sys.maxsize > 2**32
if is_64bits:
self.ndk_url = 'https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin'
else:
self.ndk_url = 'https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86.bin'
android.ensure_android_sdk_and_ndk(path=mozbuild_path,
sdk_path=self.sdk_path, sdk_url=self.sdk_url,
ndk_path=self.ndk_path, ndk_url=self.ndk_url)
android_tool = os.path.join(self.sdk_path, 'tools', 'android')
android.ensure_android_packages(android_tool=android_tool)
def suggest_mobile_android_mozconfig(self):
import android
android.suggest_mozconfig(sdk_path=self.sdk_path,
ndk_path=self.ndk_path)
def _update_package_manager(self):
self.pacman_update

42
settings.gradle Normal file
View File

@ -0,0 +1,42 @@
// You might think topsrcdir is '.', but that's not true when the Gradle build
// is launched from within IntelliJ.
def topsrcdir = rootProject.projectDir.absolutePath
def commandLine = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
def proc = commandLine.execute(null, new File(topsrcdir))
def standardOutput = new ByteArrayOutputStream()
proc.consumeProcessOutput(standardOutput, standardOutput)
proc.waitFor()
// Only show the output if something went wrong.
if (proc.exitValue() != 0) {
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${proc.exitValue()}:\n\n${standardOutput.toString()}")
}
import groovy.json.JsonSlurper
def slurper = new JsonSlurper()
def json = slurper.parseText(standardOutput.toString())
if (json.substs.MOZ_BUILD_APP != 'mobile/android') {
throw new GradleException("Building with Gradle is only supported for Fennec, i.e., MOZ_BUILD_APP == 'mobile/android'.");
}
include ':app'
include ':base'
include ':omnijar'
include ':thirdparty'
def gradleRoot = new File("${json.topobjdir}/mobile/android/gradle")
project(':app').projectDir = new File(gradleRoot, 'app')
project(':base').projectDir = new File(gradleRoot, 'base')
project(':omnijar').projectDir = new File(gradleRoot, 'omnijar')
project(':thirdparty').projectDir = new File("${json.topsrcdir}/mobile/android/thirdparty")
// The Gradle instance is shared between settings.gradle and all the
// other build.gradle files (see
// http://forums.gradle.org/gradle/topics/define_extension_properties_from_settings_xml).
// We use this ext property to pass the per-object-directory mozconfig
// between scripts. This lets us execute set-up code before we gradle
// tries to configure the project even once, and as a side benefit
// saves invoking |mach environment| multiple times.
gradle.ext.mozconfig = json

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -17,6 +17,8 @@
skin/classic/global/aboutSupport.css (../../shared/aboutSupport.css)
skin/classic/global/appPicker.css (../../shared/appPicker.css)
skin/classic/global/config.css (../../shared/config.css)
skin/classic/global/icons/loading-inverted.png (../../shared/icons/loading-inverted.png)
skin/classic/global/icons/loading-inverted@2x.png (../../shared/icons/loading-inverted@2x.png)
skin/classic/global/icons/warning.svg (../../shared/incontent-icons/warning.svg)
skin/classic/global/alerts/alert-common.css (../../shared/alert-common.css)
skin/classic/global/menu/shared-menu-check@2x.png (../../shared/menu-check@2x.png)

View File

@ -69,7 +69,7 @@ class AndroidChannel : public nsBaseChannel
private:
AndroidChannel(nsIURI *aURI, jni::Object::Param aConnection) {
mConnection = aConnection;
mURI = aURI;
SetURI(aURI);
auto type = widget::GeckoAppShell::ConnectionGetMimeType(mConnection);
if (type) {