From b19ff2b4a263739669756375f44003a1c8143753 Mon Sep 17 00:00:00 2001 From: Michael Kaply Date: Tue, 23 May 2017 15:36:10 -0500 Subject: [PATCH] Bug 1367201 - Add MOZ_ANDROID_MOZILLA_ONLINE build flag to support MozillaOnline (Mozilla China) custom code. r=nalexander MozReview-Commit-ID: BB0dcmLez0w --HG-- extra : rebase_source : d14a9094a3e8a6008f86fcb4d5efc1af6b0bbb24 --- mobile/android/base/AppConstants.java.in | 10 ++++++++++ mobile/android/base/generate_build_config.py | 3 ++- mobile/android/moz.configure | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/mobile/android/base/AppConstants.java.in b/mobile/android/base/AppConstants.java.in index 959787fa6bbd..425d8f2ea4ea 100644 --- a/mobile/android/base/AppConstants.java.in +++ b/mobile/android/base/AppConstants.java.in @@ -324,5 +324,15 @@ public class AppConstants { true; //#else false; +//#endif + /** + * This flag is for enabling custom code used only in the + * MozillaOnline (Mozilla China) version of Fennec. + */ + public static final boolean MOZ_ANDROID_MOZILLA_ONLINE = +//#ifdef MOZ_ANDROID_MOZILLA_ONLINE + true; +//#else + false; //#endif } diff --git a/mobile/android/base/generate_build_config.py b/mobile/android/base/generate_build_config.py index f9e893d09254..28c65c3431a0 100644 --- a/mobile/android/base/generate_build_config.py +++ b/mobile/android/base/generate_build_config.py @@ -36,7 +36,7 @@ def _defines(): CONFIG.update(buildconfig.substs) DEFINES = dict(buildconfig.defines) - for var in ('MOZ_ANDROID_ACTIVITY_STREAM' + for var in ('MOZ_ANDROID_ACTIVITY_STREAM', 'MOZ_ANDROID_ANR_REPORTER', 'MOZ_ANDROID_BEAM', 'MOZ_ANDROID_CUSTOM_TABS', @@ -46,6 +46,7 @@ def _defines(): 'MOZ_ANDROID_GCM', 'MOZ_ANDROID_MLS_STUMBLER', 'MOZ_ANDROID_MMA', + 'MOZ_ANDROID_MOZILLA_ONLINE', 'MOZ_LEANPLUM_SDK_KEY', 'MOZ_LEANPLUM_SDK_CLIENTID', 'MOZ_ANDROID_SEARCH_ACTIVITY', diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure index 9ef979bcfc88..19179b4f7077 100644 --- a/mobile/android/moz.configure +++ b/mobile/android/moz.configure @@ -83,6 +83,13 @@ option(env='MOZ_ANDROID_ACTIVITY_STREAM', set_config('MOZ_ANDROID_ACTIVITY_STREAM', depends_if('MOZ_ANDROID_ACTIVITY_STREAM')(lambda _: True)) +option(env='MOZ_ANDROID_MOZILLA_ONLINE', + help='Enable MozillaOnline (Mozilla China) specific Android code', + default=False) + +set_config('MOZ_ANDROID_MOZILLA_ONLINE', + depends_if('MOZ_ANDROID_MOZILLA_ONLINE')(lambda _: True)) + option(env='MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER', help='Build and package the install bouncer APK', default=True)