Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android

Matt A. Tobin 3 years ago committed by Roy Tam
parent 85045bf6be
commit c9b411d6cd
  1. 1
  2. 109
  3. 373
  4. 11
  5. 17
  6. 1
  7. BIN
  8. 8406
  9. 404
  10. 63
  11. 223
  12. BIN
  13. 916
  14. 30
  15. 33
  16. 61
  17. 27
  18. 15
  19. 32
  20. 433
  21. 342
  22. 65
  23. 4
  24. 29
  25. 594
  26. 1
  27. 3
  28. 7
  29. 26
  30. 16
  31. 25
  32. 31
  33. 18
  34. 7
  35. 7
  36. 1023
  37. BIN
  38. 22
  39. 126
  40. 13
  41. 15
  42. 75
  43. 596
  44. 117
  45. 318
  46. 256
  47. 135
  48. 202
  49. 61
  50. 27
  51. 4261
  52. 439
  53. 112
  54. 509
  55. 480
  56. 89
  57. 133
  58. 52
  59. 361
  60. 235
  61. 218
  62. 252
  63. 119
  64. 227
  65. 282
  66. 256
  67. 459
  68. 100
  69. 10
  70. 2878
  71. 314
  72. 211
  73. 27
  74. 19
  75. 22
  76. 149
  77. 236
  78. 25
  79. 178
  80. 182
  81. 51
  82. 599
  83. 110
  84. 42
  85. 136
  86. 131
  87. 323
  88. 279
  89. 13
  90. 38
  91. 149
  92. 27
  93. 124
  94. 28
  95. 133
  96. 150
  97. 50
  98. 43
  99. 146
  100. 140
  101. Some files were not shown because too many files have changed in this diff Show More

@ -127,7 +127,6 @@ MACH_MODULES = [
if os.path.exists('addon-sdk/'):

@ -1,109 +0,0 @@
browser: true
Components: false
# TODO: Create custom rule for `Cu.import`
AddonManager: false
AppConstants: false
Downloads: false
File: false
FileUtils: false
HelperApps: true # TODO: Can be more specific here.
JNI: true # TODO: Can be more specific here.
LightweightThemeManager: false
Messaging: false
Notifications: false
OS: false
ParentalControls: false
PrivateBrowsingUtils: false
Prompt: false
Services: false
SharedPreferences: false
strings: false
Strings: false
Task: false
UITelemetry: false
UserAgentOverrides: 0
XPCOMUtils: false
ctypes: false
dump: false
exports: false
importScripts: false
module: false
require: false
uuidgen: false
Iterator: false # TODO: Remove - deprecated!
global-strict: 0 # Overridden by "strict"
no-underscore-dangle: 0 # We allow trailing underscores in names.
# We disable everything to get all files to pass w/o updating them.
# We'll re-enable one by one.
camelcase: 0
comma-dangle: 0
comma-spacing: 0
consistent-return: 0
curly: 0
dot-notation: 0
eqeqeq: 0
key-spacing: 0
new-cap: 0
no-caller: 0
no-constant-condition: 0
no-empty: 0
no-extra-bind: 0
no-extra-semi: 0
no-loop-func: 0
no-multi-spaces: 0
no-new-object: 0
no-octal: 0
no-return-assign: 0
no-shadow: 0
no-trailing-spaces: 0
no-unused-vars: 0
no-use-before-define: 0
quotes: 0 # [2, "double"]
semi: 0
space-infix-ops: 0
space-unary-ops: 0 # 2:
strict: 0
#"ecmaFeatures": {
# "forOf": true,
# "jsx": true,
#"rules": {
# // turn off all kinds of stuff that we actually do want, because
# // right now, we're bootstrapping the linting infrastructure. We'll
# // want to audit these rules, and start turning them on and fixing the
# // problems they find, one at a time.
# // Eslint built-in rules are documented at <>
# "camelcase": 0, // TODO: Remove (use default)
# "consistent-return": 0, // TODO: Remove (use default)
# dot-location: 0, // [2, property],
# "eqeqeq": 0, // TBD. Might need to be separate for content & chrome
# "global-strict": 0, // Leave as zero (this will be unsupported in eslint 1.0.0)
# "linebreak-style": [2, "unix"],
# "new-cap": 0, // TODO: Remove (use default)
# "no-catch-shadow": 0, // TODO: Remove (use default)
# "no-console": 0, // Leave as 0. We use console logging in content code.
# "no-empty": 0, // TODO: Remove (use default)
# "no-extra-bind": 0, // Leave as 0
# "no-extra-boolean-cast": 0, // TODO: Remove (use default)
# "no-multi-spaces": 0, // TBD.
# "no-new": 0, // TODO: Remove (use default)
# "no-redeclare": 0, // TODO: Remove (use default)
# "no-return-assign": 0, // TODO: Remove (use default)
# "no-underscore-dangle": 0, // Leave as 0. Commonly used for private variables.
# "no-unneeded-ternary": 2,
# "no-unused-expressions": 0, // TODO: Remove (use default)
# "no-unused-vars": 0, // TODO: Remove (use default)
# "no-use-before-define": 0, // TODO: Remove (use default)
# "quotes": [2, "double", "avoid-escape"],
# "strict": 0, // [2, "function"],

@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
1. Definitions
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
(a) for any code that a Contributor has removed from Covered Software;
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
8. Litigation
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

@ -1,11 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
include $(topsrcdir)/config/
include $(topsrcdir)/testing/
$(MAKE) stage-mochitest DIST_BIN=$(DEPTH)/$(DIST)/bin/xulrunner
@(cd $(PKG_STAGE) && tar $(TAR_CREATE_FLAGS) - *) | bzip2 -f > $(DIST)/$(PKG_PATH)$(TEST_PACKAGE)

@ -1,17 +0,0 @@
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
DIRS += ['/testing/instrumentation']
DIRS += ['/extensions']
DIRS += [

@ -1 +0,0 @@
This is an example asset.

Binary file not shown.


Width:  |  Height:  |  Size: 2.8 KiB

File diff suppressed because it is too large Load Diff

@ -1,404 +0,0 @@
buildDir "${topobjdir}/gradle/build/mobile/android/app"
apply plugin: 'android-sdk-manager' // Must come before '*'.
apply plugin: ''
apply plugin: 'checkstyle'
android {
compileSdkVersion 23
buildToolsVersion mozconfig.substs.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
targetSdkVersion 23
minSdkVersion 15
applicationId mozconfig.substs.ANDROID_PACKAGE_NAME
testApplicationId 'org.mozilla.roboexample.test'
testInstrumentationRunner 'org.mozilla.gecko.FennecInstrumentationTestRunner'
manifestPlaceholders = [
// Used by Robolectric based tests; see TestRunner.
buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
vectorDrawables.useSupportLibrary = true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
dexOptions {
javaMaxHeapSize "2g"
lintOptions {
abortOnError true
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFile "${topsrcdir}/mobile/android/config/proguard/proguard.cfg"
productFlavors {
// For API 21+ - with multi dex, this will be faster for local development.
local {
// For multi dex, setting `minSdkVersion 21` allows the Android gradle plugin to
// pre-DEX each module and produce an APK that can be tested on
// Android Lollipop without time consuming DEX merging processes.
minSdkVersion 21
dexOptions {
preDexLibraries true
// We only call `MultiDex.install()` for the automation build flavor
// so this may not work. However, I don't think the multidex support
// library is necessary for 21+, so I expect that it will work.
multiDexEnabled true
// For API < 21 - does not support multi dex because local development
// is slow in that case. Most builds will not require multi dex so this
// should not be an issue.
localOld {
// Automation builds.
automation {
dexOptions {
// As of FF48 on beta, the "test", "lint", etc. treeherder jobs fail because they
// exceed the method limit. Beta includes Adjust and its GPS dependencies, which
// increase the method count & explain the failures. Furthermore, this error only
// occurs on debug builds because we don't proguard.
// We enable multidex as an easy, quick-fix with minimal side effects but before we
// move to gradle for our production builds, we should re-evaluate this decision
// (bug 1286677).
multiDexEnabled true
sourceSets {
main {
manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml"
aidl {
srcDir "${topsrcdir}/mobile/android/base/aidl"
java {
srcDir "${topsrcdir}/mobile/android/base/java"
srcDir "${topsrcdir}/mobile/android/search/java"
srcDir "${topsrcdir}/mobile/android/javaaddons/java"
srcDir "${topsrcdir}/mobile/android/services/src/main/java"
if (mozconfig.substs.MOZ_ANDROID_MLS_STUMBLER) {
srcDir "${topsrcdir}/mobile/android/stumbler/java"
exclude 'org/mozilla/gecko/'
if (!mozconfig.substs.MOZ_NATIVE_DEVICES) {
exclude 'org/mozilla/gecko/'
exclude 'org/mozilla/gecko/'
exclude 'org/mozilla/gecko/'
exclude 'org/mozilla/gecko/'
exclude 'org/mozilla/gecko/'
if (mozconfig.substs.MOZ_WEBRTC) {
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/audio_device/android/java/src"
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src"
srcDir "${topsrcdir}/media/webrtc/trunk/webrtc/modules/video_render/android/java/src"
if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
exclude 'org/mozilla/gecko/adjust/'
} else {
exclude 'org/mozilla/gecko/adjust/'
if (!mozconfig.substs.MOZ_ANDROID_GCM) {
exclude 'org/mozilla/gecko/gcm/**/*.java'
exclude 'org/mozilla/gecko/push/**/*.java'
srcDir "${project.buildDir}/generated/source/preprocessed_code" // See syncPreprocessedCode.
res {
srcDir "${topsrcdir}/${mozconfig.substs.MOZ_BRANDING_DIRECTORY}/res"
srcDir "${project.buildDir}/generated/source/preprocessed_resources" // See syncPreprocessedResources.
srcDir "${topsrcdir}/mobile/android/base/resources"
srcDir "${topsrcdir}/mobile/android/services/src/main/res"
if (mozconfig.substs.MOZ_CRASHREPORTER) {
srcDir "${topsrcdir}/mobile/android/base/crashreporter/res"
assets {
// If we are packaging the bouncer, it will have the distribution, so don't put
// it in the main APK as well.
srcDir "${mozconfig.substs.MOZ_ANDROID_DISTRIBUTION_DIRECTORY}/assets"
srcDir "${topsrcdir}/mobile/android/app/assets"
test {
java {
srcDir "${topsrcdir}/mobile/android/tests/background/junit4/src"
if (!mozconfig.substs.MOZ_ANDROID_GCM) {
exclude 'org/mozilla/gecko/gcm/**/*.java'
exclude 'org/mozilla/gecko/push/**/*.java'
resources {
srcDir "${topsrcdir}/mobile/android/tests/background/junit4/resources"
androidTest {
java {
srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/src"
srcDir "${topsrcdir}/mobile/android/tests/background/junit3/src"
srcDir "${topsrcdir}/mobile/android/tests/browser/junit3/src"
srcDir "${topsrcdir}/mobile/android/tests/javaddons/src"
res {
srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/res"
assets {
srcDir "${topsrcdir}/mobile/android/tests/browser/robocop/assets"
testOptions {
unitTests.all {
// We'd like to use (Runtime.runtime.availableProcessors()/2), but
// we have tests that start test servers and the bound ports
// collide. We'll fix this soon to have much faster test cycles.
maxParallelForks 1
dependencies {
compile ''
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
compile "${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
if (mozconfig.substs.MOZ_ANDROID_GCM) {
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
compile "${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
// Include LeakCanary in most gradle based builds. LeakCanary adds about 5k methods, so we disable
// it for the (non-proguarded, non-multidex) localOld builds to allow space for other libraries.
// Gradle based tests include the no-op version. Mach based builds only include the no-op version
// of this library.
// It doesn't seem like there is a non-trivial way to be conditional on 'localOld', so instead we explicitly
// define a version of leakcanary for every flavor:
localCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
localOldCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
automationCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
compile project(':geckoview')
compile project(':thirdparty')
testCompile 'junit:junit:4.12'
testCompile 'org.robolectric:robolectric:3.1.2'
testCompile 'org.simpleframework:simple-http:6.0.1'
testCompile 'org.mockito:mockito-core:1.10.19'
// Including the Robotium JAR directly can cause issues with dexing.
androidTestCompile ''
// TODO: (bug 1261486): This impl is not robust -
// we just wanted to land something.
task checkstyle(type: Checkstyle) {
configFile file("checkstyle.xml")
// TODO: should use sourceSets from project instead of hard-coded str.
source '../base/java/'
// TODO: This ignores our pre-processed resources.
include '**/*.java'
// TODO: classpath should probably be something.
classpath = files()
task syncPreprocessedCode(type: Sync, dependsOn: rootProject.generateCodeAndResources) {
from("${topobjdir}/mobile/android/base/generated/preprocessed") {
// All other preprocessed code is included in the geckoview project.
include '**/'
// The localization system uses the preprocessor to interpolate a .dtd
// file of XML entity definitions into an XML file of elements referencing those
// entities. (Each locale produces its own .dtd file, backstopped by the en-US
// .dtd file in tree.) Android Studio (and IntelliJ) don't handle these inline
// entities smoothly. This filter merely expands the entities in place, making
// them appear properly throughout the IDE. Be aware that this assumes that the
// JVM's file.encoding is utf-8. See comments in
// mobile/android/
class ExpandXMLEntitiesFilter extends FilterReader {
ExpandXMLEntitiesFilter(Reader input) {
// Extremely inefficient, but whatever.
super(new StringReader(groovy.xml.XmlUtil.serialize(new XmlParser(false, false, true).parse(input))))
task syncPreprocessedResources(type: Sync, dependsOn: rootProject.generateCodeAndResources) {
filesMatching('**/strings.xml') {
// It's not easy -- see the backout in Bug 1242213 -- to change the <manifest>
// package for Fennec. Gradle has grown a mechanism to achieve what we want for
// Fennec, however, with applicationId. To use the same manifest as,
// we replace the package with org.mozilla.gecko (the eventual package) here.
task rewriteManifestPackage(type: Copy, dependsOn: rootProject.generateCodeAndResources) {
filter { it.replaceFirst(/package=".*?"/, 'package="org.mozilla.gecko"') }
apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle"
android.applicationVariants.all { variant ->
variant.preBuild.dependsOn rewriteManifestPackage
variant.preBuild.dependsOn syncPreprocessedCode
variant.preBuild.dependsOn syncPreprocessedResources
// Automation builds don't include Gecko binaries, since those binaries are
// not produced until after build time (at package time). Therefore,
// automation builds include the Gecko binaries into the APK at package
// time. The "withGeckoBinaries" variant of the :geckoview project also
// does this. (It does what it says on the tin!) For notes on this
// approach, see mobile/android/gradle/with_gecko_binaries.gradle.
// Like 'local' or 'localOld'.
def productFlavor = variant.productFlavors[0].name
// :app uses :geckoview:release and handles it's own Gecko binary inclusion,
// even though this would be most naturally done in the :geckoview project.
if (!productFlavor.equals('automation')) {
apply plugin: 'spoon'
spoon {
// For now, let's be verbose.
debug = true
// It's not helpful to pass when we don't have a device connected.
failIfNoDeviceConnected = true
def spoonPackageName
if (gradle.startParameter.taskNames.contains('runBrowserTests')) {
spoonPackageName = 'org.mozilla.tests.browser.junit3'
if (gradle.startParameter.taskNames.contains('runBackgroundTests')) {
spoonPackageName = 'org.mozilla.gecko.background'
if (project.hasProperty('spoonPackageName')) {
// Command line overrides everything.
spoonPackageName = project.spoonPackageName
if (spoonPackageName) {
instrumentationArgs = ['-e', "package=${spoonPackageName}".toString()]
// See discussion at
afterEvaluate {
tasks["spoonLocal${android.testBuildType.capitalize()}AndroidTest"].outputs.upToDateWhen { false }
// This is an awkward way to define different sets of instrumentation tests.
// The task name itself is fished at runtime and the package name configured
// in the spoon configuration.
task runBrowserTests {
dependsOn tasks["spoonLocalOldDebugAndroidTest"]
task runBackgroundTests {
dependsOn tasks["spoonLocalOldDebugAndroidTest"]
// Bug 1299015: Complain to treeherder if checkstyle, lint, or unittest fails. It's not obvious
// how to listen to individual errors in most cases, so we just link to the reports for now.
def makeTaskExecutionListener(artifactRootUrl) {
return new TaskExecutionListener() {
void beforeExecute(Task task) {
// Do nothing.
void afterExecute(Task task, TaskState state) {
if (!state.failure) {
// Link to the failing report. The task path and the report path
// depend on the android-lint task in
// taskcluster/ci/android-stuff/kind.yml. It's not possible to link
// directly, so for now consumers will need to copy-paste the URL.
switch (task.path) {
case ':app:checkstyle':
def url = "${artifactRootUrl}/public/android/checkstyle/checkstyle.xml"
println "TEST-UNEXPECTED-FAIL | android-checkstyle | Checkstyle rule violations were found. See the report at: $url"
case ':app:lintAutomationDebug':
def url = "${artifactRootUrl}/public/android/lint/lint-results-automationDebug.html"
println "TEST-UNEXPECTED-FAIL | android-lint | Lint found errors in the project; aborting build. See the report at: $url"
case ':app:testAutomationDebugUnitTest':
def url = "${artifactRootUrl}/public/android/unittest/automationDebug/index.html"
println "TEST-UNEXPECTED-FAIL | android-test | There were failing tests. See the report at: $url"
// TASK_ID and RUN_ID are provided by docker-worker; see
if (System.env.TASK_ID && System.env.RUN_ID) {
def artifactRootUrl = "${System.env.TASK_ID}/runs/${System.env.RUN_ID}/artifacts"

@ -1,63 +0,0 @@
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at -->
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
<!-- TODO: Clean up code & add checks:
- WhitespaceAround
- EmptyLineSeparator
- NeedBraces
- LeftCurly // placement of "{" in new scope or literal
- RightCurly // placement of "}" in close scope or literal
- Indentation
- OneStatementPerLine
- OperatorWrap
- SeparatorWrap
- MultipleVariableDeclarations
- FallThrough
(I spent too much time already)
Maybe add:
- OneTopLevelClass
- OverloadMethodsDeclarationOrder
- Empty*Block // better to catch errors!
(I spent too much time already)
for a good set of defaults.
<module name="Checker">
<property name="charset" value="UTF-8"/>
<!-- TODO: <property name="fileExtensions" value="java, properties, xml"/> -->
<module name="FileTabCharacter"> <!-- No tabs! -->
<property name="eachLine" value="true"/>
<module name="RegexpSingleline"> <!-- excess whitespace -->
<property name="format" value="\s+$"/>
<property name="message" value="Trailing whitespace"/>
<module name="TreeWalker">
<module name="GenericWhitespace"/> <!-- whitespace for generics -->
<module name="NoLineWrap">
<property name="tokens" value="IMPORT,PACKAGE_DEF"/>
<module name="OuterTypeFilename"/> <!-- `class Lol` only in -->
<module name="WhitespaceAfter">
<!-- TODO: (bug 1263059) Remove specific tokens to enable CAST check. -->
<property name="tokens" value="COMMA, SEMI"/>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>

@ -1,223 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Enable relevant checks disabled by default -->
<issue id="NegativeMargin" severity="warning" />
<!-- We have a custom menu and don't conform to the recommended styles. -->
<issue id="IconColors" severity="ignore" />
<!-- We use our own preprocessing to either add or remove
`android:debuggable` when building with mach so it's
not actually hard-coded. We can probably remove this
warning when we switch to gradle. -->
<issue id="HardcodedDebugMode" severity="ignore" />
<!-- We have our own l10n system & don't use the platform's plurals. -->
<issue id="PluralsCandidate" severity="ignore" />
<!-- We don't want to have to follow the SDK release schedule: we can keep
the warning in order to not forget that there's a new SDK, but there's
no need to break on update. -->
<issue id="OldTargetApi" severity="warning" />
<!-- We want all lint warnings to be fatal errors.
Right now, we set these to lint warnings so:
We did this so we can land lint in automation
and not fail everything. -->
<issue id="AppCompatResource" severity="warning" />
<issue id="GoogleAppIndexingDeepLinkError" severity="warning" />
<issue id="GoogleAppIndexingUrlError" severity="warning" />
<issue id="Instantiatable" severity="warning" />
<issue id="LongLogTag" severity="warning" />
<issue id="MissingPermission" severity="warning" />
<issue id="NewApi" severity="warning" />
<issue id="OnClick" severity="warning" />
<issue id="ReferenceType" severity="warning" />
<issue id="ResourceAsColor" severity="warning" />
<issue id="ResourceType" severity="warning" />
<issue id="ValidFragment" severity="warning" />
<issue id="WrongConstant" severity="warning" />
<!-- We fixed all "Registered" lint errors. However the current gradle plugin has a bug where
it ignores @SuppressLint annotations for this check. See CrashReporter class and -->
<issue id="Registered" severity="warning" />
We want all lint warnings to be fatal errors.
This is the list of checks that we've explicitly
set as errors. Ideally, once we have no more warnings,
we switch to the `warningsAsErrors` lint option
(bug 1253737) rather than listing everything explicitly. -->
<issue id="AaptCrash" severity="error" />
<issue id="Accessibility" severity="error" />
<issue id="AccidentalOctal" severity="error" />
<issue id="AdapterViewChildren" severity="error" />
<issue id="AddJavascriptInterface" severity="error" />
<issue id="AllowBackup" severity="error" />
<issue id="AlwaysShowAction" severity="error" />
<issue id="AndroidGradlePluginVersion" severity="error" />
<issue id="AppCompatMethod" severity="error" />
<issue id="AppIndexingError" severity="error" />
<issue id="AppIndexingWarning" severity="error" />
<issue id="Assert" severity="error" />
<issue id="ButtonCase" severity="error" />
<issue id="ButtonOrder" severity="error" />
<issue id="ByteOrderMark" severity="error" />
<issue id="CheckResult" severity="error" />
<issue id="Correctness" severity="error" />
<issue id="CutPasteId" severity="error" />
<issue id="DalvikOverride" severity="error" />
<issue id="DeviceAdmin" severity="error" />
<issue id="DisableBaselineAlignment" severity="error" />
<issue id="DrawAllocation" severity="error" />
<issue id="DuplicateActivity" severity="error" />
<issue id="DuplicateDefinition" severity="error" />
<issue id="DuplicateIds" severity="error" />
<issue id="DuplicateIncludedIds" severity="error" />
<issue id="DuplicateUsesFeature" severity="error" />
<issue id="ExportedContentProvider" severity="error" />
<issue id="ExportedPreferenceActivity" severity="error" />
<issue id="ExtraText" severity="error" />
<issue id="ExtraTranslation" severity="error" />
<issue id="FloatMath" severity="error" />
<issue id="FullBackupContent" severity="error" />
<issue id="GetInstance" severity="error" />
<issue id="GifUsage" severity="error" />
<issue id="GradleCompatible" severity="error" />
<issue id="GradleDependency" severity="error" />
<issue id="GradleDeprecated" severity="error" />
<issue id="GradleDynamicVersion" severity="error" />
<issue id="GradleGetter" severity="error" />
<issue id="GradleIdeError" severity="error" />
<issue id="GradlePath" severity="error" />
<issue id="GrantAllUris" severity="error" />
<issue id="GridLayout" severity="error" />
<issue id="HandlerLeak" severity="error" />
<issue id="HardcodedText" severity="error" />
<issue id="IconExtension" severity="error" />
<issue id="IconLauncherShape" severity="error" />
<issue id="IconMixedNinePatch" severity="error" />
<issue id="IconNoDpi" severity="error" />
<issue id="IllegalResourceRef" severity="error" />
<issue id="ImpliedQuantity" severity="error" />
<issue id="InOrMmUsage" severity="error" />
<issue id="IncludeLayoutParam" severity="error" />
<issue id="InconsistentArrays" severity="error" />
<issue id="InefficientWeight" severity="error" />
<issue id="InnerclassSeparator" severity="error" />
<issue id="Internationalization" severity="error" />
<issue id="InvalidId" severity="error" />
<issue id="InvalidPackage" severity="error" />
<issue id="InvalidResourceFolder" severity="error" />
<issue id="JavascriptInterface" severity="error" />
<issue id="LabelFor" severity="error" />
<issue id="LibraryCustomView" severity="error" />
<issue id="LocalSuppress" severity="error" />
<issue id="LocaleFolder" severity="error" />
<issue id="LogTagMismatch" severity="error" />
<issue id="MangledCRLF" severity="error" />
<issue id="ManifestOrder" severity="error" />
<issue id="ManifestTypo" severity="error" />
<issue id="MenuTitle" severity="error" />
<issue id="MergeRootFrame" severity="error" />
<issue id="MipmapIcons" severity="error" />
<issue id="MissingApplicationIcon" severity="error" />
<issue id="MissingId" severity="error" />
<issue id="MissingPrefix" severity="error" />
<issue id="MissingQuantity" severity="error" />
<issue id="MissingRegistered" severity="error" />
<issue id="MissingSuperCall" severity="error" />
<issue id="MissingTranslation" severity="error" />
<issue id="MissingVersion" severity="error" />
<issue id="MockLocation" severity="error" />
<issue id="MultipleUsesSdk" severity="error" />
<issue id="NamespaceTypo" severity="error" />
<issue id="NestedScrolling" severity="error" />
<issue id="NfcTechWhitespace" severity="error" />
<issue id="NotSibling" severity="error" />
<issue id="ObsoleteLayoutParam" severity="error" />
<issue id="OnClick" severity="error" />
<issue id="Orientation" severity="error" />
<issue id="Override" severity="error" />
<issue id="OverrideAbstract" severity="error" />
<issue id="PackagedPrivateKey" severity="error" />
<issue id="ParcelCreator" severity="error" />
<issue id="Performance" severity="error" />
<issue id="Proguard" severity="error" />
<issue id="ProguardSplit" severity="error" />
<issue id="PropertyEscape" severity="error" />
<issue id="ProtectedPermissions" severity="error" />
<issue id="PxUsage" severity="error" />
<issue id="Range" severity="error" />
<issue id="RelativeOverlap" severity="error" />
<issue id="RequiredSize" severity="error" />
<issue id="ResAuto" severity="error" />
<issue id="ResourceCycle" severity="error" />
<issue id="ResourceName" severity="error" />
<issue id="ResourceType" severity="error" />
<issue id="RtlCompat" severity="error" />
<issue id="RtlEnabled" severity="error" />
<issue id="ScrollViewCount" severity="error" />
<issue id="ScrollViewSize" severity="error" />
<issue id="SecureRandom" severity="error" />
<issue id="Security" severity="error" />
<issue id="ServiceCast" severity="error" />
<issue id="SetJavaScriptEnabled" severity="error" />
<issue id="ShiftFlags" severity="error" />
<issue id="ShortAlarm" severity="error" />
<issue id="ShowToast" severity="error" />
<issue id="SignatureOrSystemPermissions" severity="error" />
<issue id="StringFormatCount" severity="error" />
<issue id="StringFormatInvalid" severity="error" />
<issue id="StringFormatMatches" severity="error" />
<issue id="StringShouldBeInt" severity="error" />
<issue id="SuspiciousImport" severity="error" />
<issue id="TextFields" severity="error" />
<issue id="TextViewEdits" severity="error" />
<issue id="TooDeepLayout" severity="error" />
<issue id="TooManyViews" severity="error" />
<issue id="TrulyRandom" severity="error" />
<issue id="TypographyDashes" severity="error" />
<issue id="TypographyFractions" severity="error" />
<issue id="TypographyOther" severity="error" />
<issue id="Typos" severity="error" />
<issue id="UniqueConstants" severity="error" />
<issue id="UniquePermission" severity="error" />
<issue id="UnknownId" severity="error" />
<issue id="UnknownIdInLayout" severity="error" />
<issue id="UnlocalizedSms" severity="error" />
<issue id="UnusedNamespace" severity="error" />
<issue id="UnusedQuantity" severity="error" />
<issue id="UnusedResources" severity="error">
<!-- The based build system leaves a .mkdir.done file lying around in the
preprocessed_resources res/raw folder. Lint reports it as unused. We should get
rid of the file eventually. See bug 1268948. -->
<ignore path="**/raw/.mkdir.done" />
<issue id="Usability" severity="error" />
<issue id="UseCheckPermission" severity="error" />
<issue id="UseCompoundDrawables" severity="error" />
<issue id="UselessLeaf" severity="error" />
<issue id="UsesMinSdkAttributes" severity="error" />
<issue id="UsingHttp" severity="error" />
<issue id="ViewHolder" severity="error" />
<issue id="ViewTag" severity="error" />
<issue id="Wakelock" severity="error" />
<issue id="WebViewLayout" severity="error" />
<issue id="WorldReadableFiles" severity="error" />
<issue id="WorldWriteableFiles" severity="error" />
<issue id="WrongCall" severity="error" />
<issue id="WrongCase" severity="error" />
<issue id="WrongConstant" severity="error" />
<issue id="WrongFolder" severity="error" />
<issue id="WrongManifestParent" severity="error" />
<issue id="WrongRegion" severity="error" />
<issue id="WrongThread" severity="error" />
<issue id="WrongViewCast" severity="error" />

Binary file not shown.


Width:  |  Height:  |  Size: 4.2 KiB

@ -1,916 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at */
#filter substitution
// For browser.xml binding
// cacheRatio* is a ratio that determines the amount of pixels to cache. The
// ratio is multiplied by the viewport width or height to get the displayport's
// width or height, respectively.
// (divide integer value by 1000 to get the ratio)
// For instance: cachePercentageWidth is 1500
// viewport height is 500
// => display port height will be 500 * 1.5 = 750
pref("toolkit.browser.cacheRatioWidth", 2000);
pref("toolkit.browser.cacheRatioHeight", 3000);
// How long before a content view (a handle to a remote scrollable object)
// expires.
pref("toolkit.browser.contentViewExpire", 3000);
pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul");
pref("browser.chromeURL", "chrome://browser/content/");
// If a tab has not been active for this long (seconds), then it may be
// turned into a zombie tab to preemptively free up memory. -1 disables time-based
// expiration (but low-memory conditions may still require the tab to be zombified).
pref("browser.tabs.expireTime", 900);
// Disables zombification of background tabs under memory pressure.
// Intended for use in testing, where we don't want the tab running the
// test harness code to be zombified.
pref("browser.tabs.disableBackgroundZombification", false);
// Control whether tab content should try to load from disk cache when network
// is offline.
// Controlled by Switchboard experiment "offline-cache".
pref("browser.tabs.useCache", false);
// From libpref/src/init/all.js, extended to allow a slightly wider zoom range.
pref("zoom.minPercent", 20);
pref("zoom.maxPercent", 400);
pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3,4");
// Mobile will use faster, less durable mode.
pref("", 0);
pref("browser.viewport.desktopWidth", 980);
// The default fallback zoom level to render pages at. Set to -1 to fit page; otherwise
// the value is divided by 1000 and clamped to hard-coded min/max scale values.
pref("browser.viewport.defaultZoom", -1);
// Show/Hide scrollbars when active/inactive
pref("ui.showHideScrollbars", 1);
pref("ui.useOverlayScrollbars", 1);
pref("ui.scrollbarFadeBeginDelay", 450);
pref("ui.scrollbarFadeDuration", 0);
/* turn off the caret blink after 10 cycles */
pref("ui.caretBlinkCount", 10);
/* cache prefs */
pref("browser.cache.disk.enable", true);
pref("browser.cache.disk.capacity", 20480); // kilobytes
pref("browser.cache.disk.max_entry_size", 4096); // kilobytes
pref("browser.cache.disk.smart_size.enabled", true);
pref("browser.cache.disk.smart_size.first_run", true);
// low memory devices
pref("browser.cache.memory.enable", false);
pref("browser.cache.memory.enable", true);
pref("browser.cache.memory.capacity", 1024); // kilobytes
pref("browser.cache.memory_limit", 5120); // 5 MB
/* image cache prefs */
pref("image.cache.size", 1048576); // bytes
/* offline cache prefs */
pref("browser.offline-apps.notify", true);
pref("browser.cache.offline.enable", true);
pref("browser.cache.offline.capacity", 5120); // kilobytes
pref("offline-apps.quota.warn", 1024); // kilobytes
// cache compression turned off for now - see bug #715198
pref("browser.cache.compression_level", 0);
/* disable some protocol warnings */
pref("", false);
pref("network.protocol-handler.warn-external.sms", false);
pref("network.protocol-handler.warn-external.mailto", false);
pref("", false);
/* http prefs */
pref("network.http.pipelining", true);
pref("network.http.pipelining.ssl", true);
pref("network.http.proxy.pipelining", true);
pref("network.http.pipelining.maxrequests" , 6);
pref("network.http.keep-alive.timeout", 109);
pref("network.http.max-connections", 20);
pref("network.http.max-persistent-connections-per-server", 6);
pref("network.http.max-persistent-connections-per-proxy", 20);
// spdy
pref("network.http.spdy.push-allowance", 32768);
pref("network.http.spdy.default-hpack-buffer", 4096); // 4k
// See bug 545869 for details on why these are set the way they are
pref("network.buffer.cache.count", 24);
pref("network.buffer.cache.size", 16384);
// predictive actions
pref("network.predictor.enabled", true);
pref("network.predictor.max-db-size", 2097152); // bytes
pref("network.predictor.preserve", 50); // percentage of predictor data to keep when cleaning up
// Use JS mDNS as a fallback
pref("network.mdns.use_js_fallback", true);
/* history max results display */
pref("browser.display.history.maxresults", 100);
/* How many times should have passed before the remote tabs list is refreshed */
pref("browser.display.remotetabs.timeout", 10);
/* session history */
pref("browser.sessionhistory.max_total_viewers", 1);
pref("browser.sessionhistory.max_entries", 50);
pref("browser.sessionhistory.contentViewerTimeout", 360);
pref("browser.sessionhistory.bfcacheIgnoreMemoryPressure", false);
/* session store */
pref("browser.sessionstore.resume_session_once", false);
pref("browser.sessionstore.resume_from_crash", true);
pref("browser.sessionstore.interval", 10000); // milliseconds
pref("browser.sessionstore.backupInterval", 120000); // milliseconds -> 2 minutes
pref("browser.sessionstore.max_tabs_undo", 10);
pref("browser.sessionstore.max_resumed_crashes", 1);
pref("browser.sessionstore.privacy_level", 0); // saving data: 0 = all, 1 = unencrypted sites, 2 = never
pref("browser.sessionstore.debug_logging", false);
/* these should help performance */
pref("mozilla.widget.force-24bpp", true);
pref("mozilla.widget.use-buffer-pixmap", true);
pref("mozilla.widget.disable-native-theme", true);
pref("layout.reflow.synthMouseMove", false);