diff --git a/config/faster/rules.mk b/config/faster/rules.mk index 0e6083ac0138..79833a10348e 100644 --- a/config/faster/rules.mk +++ b/config/faster/rules.mk @@ -62,13 +62,6 @@ endif # fallback $(TOPOBJDIR)/faster/%: ; -ifeq ($(MOZ_BUILD_APP),mobile/android) -# The generic rule doesn't handle relative directories, which are used -# extensively in mobile/android/base. -$(TOPOBJDIR)/mobile/android/base/% : $(TOPOBJDIR)/buildid.h FORCE - $(MAKE) -C $(TOPOBJDIR)/mobile/android/base $* -endif - # Generic rule to fall back to the recursive make backend. # This needs to stay after other $(TOPOBJDIR)/* rules because GNU Make # <3.82 apply pattern rules in definition order, not stem length like diff --git a/config/recurse.mk b/config/recurse.mk index b1874085fe69..b94721f62e53 100644 --- a/config/recurse.mk +++ b/config/recurse.mk @@ -160,20 +160,11 @@ recurse: $(LOOP_OVER_DIRS) ifeq (.,$(DEPTH)) -# The Android SDK bindings needs to build the Java generator code -# source code in order to write the SDK bindings. -widget/android/bindings/export: mobile/android/base/export -# The widget JNI wrapper generator code needs to build the GeckoView -# source code in order to find JNI wrapper annotations. -widget/android/export: mobile/android/base/export - -# android_apks is not built on artifact builds without this dependency. -mobile/android/base/export: mobile/android/base/android_apks - -# This is required so that the pre-export tier sees the rules in mobile/android/base +# This is required so that the pre-export tier sees the rules in +# mobile/android ifeq ($(MOZ_WIDGET_TOOLKIT),android) -recurse_pre-export:: mobile/android/base/pre-export +recurse_pre-export:: mobile/android/pre-export endif # CSS2Properties.webidl needs ServoCSSPropList.py from layout/style diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in deleted file mode 100644 index 5db63bc000dd..000000000000 --- a/mobile/android/base/Makefile.in +++ /dev/null @@ -1,9 +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 http://mozilla.org/MPL/2.0/. - -# Developer builds call mach -> Make -> gradle -> mach, which races to -# find and create .mozconfig files and to generate targets. -.NOTPARALLEL: - -include $(topsrcdir)/config/rules.mk diff --git a/mobile/android/base/moz.build b/mobile/android/base/moz.build deleted file mode 100644 index e070e8e4463f..000000000000 --- a/mobile/android/base/moz.build +++ /dev/null @@ -1,47 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# 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 http://mozilla.org/MPL/2.0/. - -with Files("**"): - BUG_COMPONENT = ("GeckoView", "General") - -DEFINES["ANDROID_PACKAGE_NAME"] = CONFIG["ANDROID_PACKAGE_NAME"] -# The recursive make backend treats the first output specially: it's passed as -# an open FileAvoidWrite to the invoked script. That doesn't work well with -# the Gradle task that generates all of the outputs, so we add a dummy first -# output. -t = ("android_apks",) - -GENERATED_FILES += [t] -GENERATED_FILES[t].force = True -GENERATED_FILES[t].script = "/mobile/android/gradle.py:assemble_app" - -# The Android APKs are assembled in the `export` tier, which usually occurs -# before the following files are generated. However, mechanisms in `recurse.mk` -# are used to pull the generated files into the `pre-export` tier, so do not -# require an explicit dependency here. -config_keys = ( - "MOZ_ANDROID_CONTENT_SERVICE_COUNT", - "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS", -) -flags = ["%s=%s" % (k, CONFIG[k] if CONFIG[k] else "") for k in config_keys] - -GeneratedFile( - ("../geckoview/src/main/AndroidManifest_overlay.xml",), - script="gen_from_jinja.py", - inputs=["../geckoview/src/main/AndroidManifest_overlay.jinja"], - flags=flags, -) - -GeneratedFile( - ( - "../geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.java", - ), - script="gen_from_jinja.py", - inputs=[ - "../geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.jinja" - ], - flags=flags, -) diff --git a/mobile/android/docs/adjust.rst b/mobile/android/docs/adjust.rst deleted file mode 100644 index 0bd71cece0da..000000000000 --- a/mobile/android/docs/adjust.rst +++ /dev/null @@ -1,176 +0,0 @@ -.. -*- Mode: rst; fill-column: 100; -*- - -====================================== - Install tracking with the Adjust SDK -====================================== - -Fennec (Firefox for Android) tracks certain types of installs using a third party install tracking -framework called Adjust. The intention is to determine the origin of Fennec installs by answering -the question, "Did this user on this device install Fennec in response to a specific advertising -campaign performed by Mozilla?" - -Mozilla is using a third party framework in order to answer this question for the Firefox for -Android 38.0.5 release. We hope to remove the framework from Fennec in the future. - -The framework consists of a software development kit (SDK) built into Fennec and a -data-collecting Internet service backend run by the German company `adjust GmbH`_. The Adjust SDK -is open source and MIT licensed: see the `github repository`_. Fennec ships a copy of the SDK -(currently not modified from upstream) in ``mobile/android/thirdparty/com/adjust/sdk``. The SDK is -documented at https://docs.adjust.com. - -Data collection -~~~~~~~~~~~~~~~ - -When is data collected and sent to the Adjust backend? -====================================================== - -Data is never collected (or sent to the Adjust backend) unless - -* the Fennec binary is an official Mozilla binary [#official]_; and -* the release channel is Release or Beta [#channel]_. - -If both of the above conditions are true, then data is collected and sent to the Adjust backend in -the following two circumstances: first, when - -* Fennec is started on the device [#started]_. - -Second, when - -* the Fennec binary was installed from the Google Play Store; and -* the Google Play Store sends the installed Fennec binary an `INSTALL_REFERRER Intent`_, and the - received Intent includes Google Play Store campaign tracking information. This happens when thea - Google Play Store install is in response to a campaign-specific Google Play Store link. For - details, see the developer documentation at - https://developers.google.com/analytics/devguides/collection/android/v4/campaigns. - -In these two limited circumstances, data is collected and sent to the Adjust backend. - -Where does data sent to the Adjust backend go? -============================================== - -The Adjust SDK is hard-coded to send data to the endpoint https://app.adjust.com. The endpoint is -defined by ``com.adjust.sdk.Constants.BASE_URL`` at -https://hg.mozilla.org/mozilla-central/file/f76f02793f7a/mobile/android/thirdparty/com/adjust/sdk/Constants.java#l27. - -The Adjust backend then sends a limited subset of the collected data -- limited but sufficient to -uniquely identify the submitting device -- to a set of advertising network providers that Mozilla -elects to share the collected data with. Those advertising networks then confirm or deny that the -identifying information corresponds to a specific advertising campaign performed by Mozilla. - -What data is collected and sent to the Adjust backend? -====================================================== - -The Adjust SDK collects and sends two messages to the Adjust backend. The messages have the -following parameters:: - - V/Adjust ( 6508): Parameters: - V/Adjust ( 6508): screen_format normal - V/Adjust ( 6508): device_manufacturer samsung - V/Adjust ( 6508): session_count 1 - V/Adjust ( 6508): device_type phone - V/Adjust ( 6508): screen_size normal - V/Adjust ( 6508): package_name org.mozilla.firefox - V/Adjust ( 6508): app_version 39.0a1 - V/Adjust ( 6508): android_uuid - V/Adjust ( 6508): display_width 720 - V/Adjust ( 6508): country GB - V/Adjust ( 6508): os_version 18 - V/Adjust ( 6508): needs_attribution_data 0 - V/Adjust ( 6508): environment sandbox - V/Adjust ( 6508): device_name Galaxy Nexus - V/Adjust ( 6508): os_name android - V/Adjust ( 6508): tracking_enabled 1 - V/Adjust ( 6508): created_at 2015-03-24T17:53:38.452Z-0400 - V/Adjust ( 6508): app_token - V/Adjust ( 6508): screen_density high - V/Adjust ( 6508): language en - V/Adjust ( 6508): display_height 1184 - V/Adjust ( 6508): gps_adid - - V/Adjust ( 6508): Parameters: - V/Adjust ( 6508): needs_attribution_data 0 - V/Adjust ( 6508): app_token - V/Adjust ( 6508): environment production - V/Adjust ( 6508): android_uuid - V/Adjust ( 6508): tracking_enabled 1 - V/Adjust ( 6508): gps_adid - -The available parameters (including ones not exposed to Mozilla) are documented at -https://partners.adjust.com/placeholders/. - -Notes on what data is collected -------------------------------- - -The *android_uuid* uniquely identifies the device. - -The *gps_adid* is a Google Advertising ID. It is capable of uniquely identifying a device to any -advertiser, across all applications. If a Google Advertising ID is not available, Adjust may fall -back to an Android ID, or, as a last resort, the device's WiFi MAC address. - -The *tracking_enabled* flag is only used to allow or disallow contextual advertising to be sent to a -user. It can be, and is, ignored for general install tracking of the type Mozilla is using the -Adjust SDK for. (This flag might be used by consumers using the Adjust SDK to provide in-App -advertising.) - -It is not clear how much entropy their is in the set of per-device parameters that do not -*explicitly* uniquely identify the device. That is, it is not known if the device parameters are -likely to uniquely fingerprint the device, in the way that user agent capabilities are likely to -uniquely fingerprint the user. - -Technical notes -~~~~~~~~~~~~~~~ - -Build flags controlling the Adjust SDK integration -================================================== - -Add the following to your mozconfig to compile with the Adjust SDK:: - - export MOZ_INSTALL_TRACKING=1 - export MOZ_NATIVE_DEVICES=1 - ac_add_options --with-adjust-sdk-keyfile="$topsrcdir/mobile/android/base/adjust-sdk-sandbox.token" - -``MOZ_NATIVE_DEVICES`` is required to provide some Google Play Services dependencies. - -No trace of the Adjust SDK should be present in Fennec if -``MOZ_INSTALL_TRACKING`` is not defined. - -Access to the Adjust backend is controlled by a private App-specific -token. Fennec's token is managed by Release Engineering and should not -be exposed if at all possible; for example, it should *not* leak to build -logs. The value of the token is read from the file specified using the -``configure`` flag ``--with-adjust-sdk-keyfile=KEYFILE`` and stored in -the build variable ``MOZ_ADJUST_SDK_KEY``. The mozconfig specified above -defaults to submitting data to a special Adjust sandbox allowing a -developer to test Adjust without submitting false data to our backend. - -We throw an assertion if ``MOZ_INSTALL_TRACKING`` is specified but -``--with-adjust-sdk-keyfile`` is not to ensure our builders have a proper -adjust token for release and beta builds. It's great to catch some -errors at compile-time rather than in release. That being said, ideally -we'd specify a default ``--with-adjust-sdk-keyfile`` for developer builds -but I don't know how to do that. - -Technical notes on the Adjust SDK integration -============================================= - -The *Adjust install tracking SDK* is a pure-Java library that is conditionally compiled into Fennec. -It's not trivial to integrate such conditional feature libraries into Fennec without pre-processing. -To minimize such pre-processing, we define a trivial ``AdjustHelperInterface`` and define two -implementations: the real ``AdjustHelper``, which requires the Adjust SDK, and a no-op -``StubAdjustHelper``, which has no additional requirements. We use the existing pre-processed -``AppConstants.java.in`` to switch, at build-time, between the two implementations. - -Notes and links -=============== - -.. _adjust GmbH: http://www.adjust.com -.. _github repository: https://github.com/adjust/android_sdk -.. [#official] Data is not sent for builds not produced by Mozilla: this would include - redistributors such as the Palemoon project. -.. [#channel] Data is not sent for Aurora, Nightly, or custom builds. -.. [#started] *Started* means more than just when the user taps the Fennec icon or otherwise causes - the Fennec user interface to appear directly. It includes, for example, when a Fennec service - (like the Update Service, or Background Sync), starts and Fennec was not previously running on the - device. See http://developer.android.com/reference/android/app/Application.html#onCreate%28%29 - for details. -.. _INSTALL_REFERRER Intent: https://developer.android.com/reference/com/google/android/gms/tagmanager/InstallReferrerReceiver.html \ No newline at end of file diff --git a/mobile/android/base/gen_from_jinja.py b/mobile/android/gen_from_jinja.py similarity index 100% rename from mobile/android/base/gen_from_jinja.py rename to mobile/android/gen_from_jinja.py diff --git a/mobile/android/locales/filter.py b/mobile/android/locales/filter.py index 40cffcb316f2..1014fed21170 100644 --- a/mobile/android/locales/filter.py +++ b/mobile/android/locales/filter.py @@ -14,7 +14,7 @@ def test(mod, path, entity=None): import re # ignore anything but mobile, which is our local repo checkout name - if mod not in ("dom", "toolkit", "mobile", "mobile/android/base", "mobile/android"): + if mod not in ("dom", "toolkit", "mobile", "mobile/android"): return "ignore" if mod == "toolkit": diff --git a/mobile/android/locales/l10n.ini b/mobile/android/locales/l10n.ini index 1d6afa4a157d..6d4704bc7e20 100644 --- a/mobile/android/locales/l10n.ini +++ b/mobile/android/locales/l10n.ini @@ -11,7 +11,7 @@ depth = ../../.. all = mobile/android/locales/all-locales [compare] -dirs = mobile mobile/android mobile/android/base +dirs = mobile mobile/android [includes] toolkit = toolkit/locales/l10n.ini diff --git a/mobile/android/locales/l10n.toml b/mobile/android/locales/l10n.toml index 444e0728a0bc..c989e006256e 100644 --- a/mobile/android/locales/l10n.toml +++ b/mobile/android/locales/l10n.toml @@ -128,13 +128,6 @@ exclude-multi-locale = [ reference = "mobile/android/locales/en-US/**" l10n = "{l}mobile/android/**" -[[paths]] - reference = "mobile/android/base/locales/en-US/**" - l10n = "{l}mobile/android/base/**" - test = [ - "android-dtd", - ] - # hand-picked paths from toolkit, keep in sync with jar.mn [[paths]] reference = "dom/locales/en-US/chrome/global.dtd" diff --git a/mobile/android/moz.build b/mobile/android/moz.build index 3be3dae6a0bb..48b86c103b13 100644 --- a/mobile/android/moz.build +++ b/mobile/android/moz.build @@ -8,6 +8,44 @@ with Files("**"): BUG_COMPONENT = ("GeckoView", "General") SCHEDULES.exclusive = ["android"] +# The recursive make backend treats the first output specially: it's passed as +# an open FileAvoidWrite to the invoked script. That doesn't work well with +# the Gradle task that generates all of the outputs, so we add a dummy first +# output. +t = ("android_apks",) + +GENERATED_FILES += [t] +GENERATED_FILES[t].force = True +GENERATED_FILES[t].script = "/mobile/android/gradle.py:assemble_app" + +# The Android APKs are assembled in the `export` tier, which usually occurs +# before the following files are generated. However, mechanisms in `recurse.mk` +# are used to pull the generated files into the `pre-export` tier, so do not +# require an explicit dependency here. +config_keys = ( + "MOZ_ANDROID_CONTENT_SERVICE_COUNT", + "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS", +) +flags = ["%s=%s" % (k, CONFIG[k] if CONFIG[k] else "") for k in config_keys] + +GeneratedFile( + ("geckoview/src/main/AndroidManifest_overlay.xml",), + script="gen_from_jinja.py", + inputs=["geckoview/src/main/AndroidManifest_overlay.jinja"], + flags=flags, +) + +GeneratedFile( + ( + "geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.java", + ), + script="gen_from_jinja.py", + inputs=[ + "geckoview/src/main/java/org/mozilla/gecko/process/GeckoChildProcessServices.jinja" + ], + flags=flags, +) + CONFIGURE_SUBST_FILES += ["installer/Makefile"] DIRS += [ @@ -17,7 +55,6 @@ DIRS += [ DIRS += [ "actors", - "base", "chrome", "components", "modules", diff --git a/mobile/locales/filter.py b/mobile/locales/filter.py index b5d7c260ea15..f7d43b375b70 100644 --- a/mobile/locales/filter.py +++ b/mobile/locales/filter.py @@ -14,7 +14,7 @@ def test(mod, path, entity=None): import re # ignore anything but mobile, which is our local repo checkout name - if mod not in ("dom", "toolkit", "mobile", "mobile/android/base", "mobile/android"): + if mod not in ("dom", "toolkit", "mobile", "mobile/android"): return "ignore" if mod == "toolkit": diff --git a/mobile/locales/l10n.ini b/mobile/locales/l10n.ini index 43ded369a871..3b51865b4fa2 100644 --- a/mobile/locales/l10n.ini +++ b/mobile/locales/l10n.ini @@ -12,7 +12,7 @@ depth = ../.. all = mobile/android/locales/all-locales [compare] -dirs = mobile mobile/android mobile/android/base +dirs = mobile mobile/android [includes] toolkit = toolkit/locales/l10n.ini diff --git a/third_party/python/compare-locales/compare_locales/paths/ini.py b/third_party/python/compare-locales/compare_locales/paths/ini.py index 0e4b7d12bf04..aacf992f2e28 100644 --- a/third_party/python/compare-locales/compare_locales/paths/ini.py +++ b/third_party/python/compare-locales/compare_locales/paths/ini.py @@ -203,8 +203,6 @@ class EnumerateApp(object): 'l10n': mozpath.normpath('{l10n_base}/{locale}/%s/**' % module) } - if module == 'mobile/android/base': - paths['test'] = ['android-dtd'] projectconfig.add_paths(paths) for child in aConfig.children: self._config_for_ini(projectconfig, child) diff --git a/xpcom/base/nsMemoryImpl.cpp b/xpcom/base/nsMemoryImpl.cpp index 1a52f81ef70f..9e1deacc2b24 100644 --- a/xpcom/base/nsMemoryImpl.cpp +++ b/xpcom/base/nsMemoryImpl.cpp @@ -19,8 +19,7 @@ // Minimum memory threshold for a device to be considered // a low memory platform. This value has be in sync with -// Java's equivalent threshold, defined in -// mobile/android/base/util/HardwareUtils.java +// Java's equivalent threshold, defined in HardwareUtils.java # define LOW_MEMORY_THRESHOLD_KB (384 * 1024) #endif