author | cnevinc <cnevinc@livemail.tw> |
Sat, 13 May 2017 14:08:57 -0700 | |
changeset 578519 | 1b3f2cf0e35771e8f3b3d5a2a022dae98dd94e5f |
parent 578518 | ddce5b179da8fd49c87e6a992d689c5eba3b04c4 |
child 578520 | 60b2bf977087c70f59eecac42d0481c35a5daec3 |
push id | 58945 |
push user | nalexander@mozilla.com |
push date | Tue, 16 May 2017 04:41:39 +0000 |
reviewers | nalexander, maliu, sebastian |
bugs | 1351585 |
milestone | 55.0a1 |
--- a/mobile/android/app/build.gradle +++ b/mobile/android/app/build.gradle @@ -159,16 +159,22 @@ android { } if (mozconfig.substs.MOZ_INSTALL_TRACKING) { exclude 'org/mozilla/gecko/adjust/StubAdjustHelper.java' } else { exclude 'org/mozilla/gecko/adjust/AdjustHelper.java' } + if (mozconfig.substs.MOZ_INSTALL_MMA) { + exclude 'org/mozilla/gecko/mma/MmaStubImp.java' + } else { + exclude 'org/mozilla/gecko/mma/MmaLeanplumImp.java' + } + 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. } @@ -296,16 +302,17 @@ task checkstyle(type: Checkstyle) { classpath = files() } task syncPreprocessedCode(type: Sync, dependsOn: rootProject.generateCodeAndResources) { into("${project.buildDir}/generated/source/preprocessed_code") from("${topobjdir}/mobile/android/base/generated/preprocessed") { // All other preprocessed code is included in the geckoview project. include '**/AdjustConstants.java' + include '**/MmaConstants.java' } } // The localization system uses the moz.build 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
--- a/mobile/android/base/AndroidManifest.xml.in +++ b/mobile/android/base/AndroidManifest.xml.in @@ -468,10 +468,46 @@ <service android:name="org.mozilla.gecko.process.GeckoServiceChildProcess$tab" android:enabled="true" android:exported="false" android:process=":tab" android:isolatedProcess="false"> </service> +#ifdef MOZ_INSTALL_MMA + <receiver android:name="com.leanplum.LeanplumPushReceiver" android:exported="false" + android:enabled="true"> + <intent-filter> + <action android:name="com.leanplum.LeanplumPushListenerService" /> + </intent-filter> + </receiver> + + <!-- Leanplum Local Push Notification Service--> + <service android:name="com.leanplum.LeanplumLocalPushListenerService" /> + + <!-- Leanplum GCM Message Handling Service --> + <service android:name="com.leanplum.LeanplumPushListenerService" android:exported="false" + android:enabled="false"> + <intent-filter> + <action android:name="com.google.android.c2dm.intent.RECEIVE" /> + </intent-filter> + </service> + + <!-- Leanplum GCM Instance ID Service --> + <service android:name="com.leanplum.LeanplumPushInstanceIDService" android:exported="false" + android:enabled="false"> + <intent-filter> + <action android:name="com.google.android.gms.iid.InstanceID" /> + </intent-filter> + </service> + + <!-- Leanplum GCM/FCM Registration Service --> + <service android:name="com.leanplum.LeanplumPushRegistrationService" /> + + + <!-- Geofencing Service --> + <service android:name="com.leanplum.ReceiveTransitionsIntentService" /> +#endif + + </application> </manifest>
--- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -135,16 +135,17 @@ GECKOVIEW_JARS = \ gecko-view.jar \ sync-thirdparty.jar \ $(NULL) ifdef MOZ_INSTALL_TRACKING GECKOVIEW_JARS += gecko-thirdparty-adjust_sdk.jar endif + geckoview_jars_classpath := $(subst $(NULL) ,:,$(strip $(GECKOVIEW_JARS))) FENNEC_JARS = \ gecko-browser.jar \ gecko-thirdparty.jar \ services.jar \ $(NULL) @@ -155,16 +156,17 @@ endif ifdef MOZ_ANDROID_SEARCH_ACTIVITY FENNEC_JARS += search-activity.jar endif ifdef MOZ_ANDROID_MLS_STUMBLER FENNEC_JARS += ../stumbler/stumbler.jar endif + # All the jars we're compiling from source. (not to be confused with # java_bundled_libs, which holds the jars which we're including as binaries). ALL_JARS = \ $(GECKOVIEW_JARS) \ $(FENNEC_JARS) \ $(NULL) # The list of jars in Java classpath notation (colon-separated).
new file mode 100644 --- /dev/null +++ b/mobile/android/base/MmaConstants.java.in @@ -0,0 +1,31 @@ +//#filter substitution +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * 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/. */ + +package org.mozilla.gecko; + +import org.mozilla.gecko.mma.MmaInterface; +//#ifdef MOZ_INSTALL_MMA +import org.mozilla.gecko.mma.MmaLeanplumImp; +//#else +import org.mozilla.gecko.mma.MmaStubImp; +//#endif + +public class MmaConstants { + public static final String MOZ_INSTALL_MMA_SDK_APP_TOKEN = +//#ifdef MOZ_INSTALL_MMA_SDK_APP_TOKEN + "@MOZ_INSTALL_MMA_SDK_APP_TOKEN@"; +//#else + null; +//#endif + + public static MmaInterface getMma() { +//#ifdef MOZ_INSTALL_MMA + return new MmaLeanplumImp(); +//#else + return new MmaStubImp(); +//#endif + } +}
--- a/mobile/android/base/generate_build_config.py +++ b/mobile/android/base/generate_build_config.py @@ -44,16 +44,17 @@ def _defines(): 'MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE', 'MOZ_ANDROID_EXCLUDE_FONTS', 'MOZ_ANDROID_GCM', 'MOZ_ANDROID_MLS_STUMBLER', 'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_CRASHREPORTER', 'MOZ_DEBUG', 'MOZ_INSTALL_TRACKING', + 'MOZ_INSTALL_MMA' 'MOZ_LOCALE_SWITCHER', 'MOZ_NATIVE_DEVICES', 'MOZ_SWITCHBOARD'): if CONFIG[var]: DEFINES[var] = 1 for var in ('MOZ_ANDROID_GCM_SENDERID', 'MOZ_PKG_SPECIAL',
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java +++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java @@ -54,16 +54,17 @@ import org.mozilla.gecko.home.HomePager. import org.mozilla.gecko.home.HomePager.OnUrlOpenListener; import org.mozilla.gecko.home.HomePanelsManager; import org.mozilla.gecko.home.HomeScreen; import org.mozilla.gecko.home.SearchEngine; import org.mozilla.gecko.icons.Icons; import org.mozilla.gecko.media.VideoPlayer; import org.mozilla.gecko.menu.GeckoMenu; import org.mozilla.gecko.menu.GeckoMenuItem; +import org.mozilla.gecko.mma.MmaDelegate; import org.mozilla.gecko.mozglue.GeckoLoader; import org.mozilla.gecko.mozglue.SafeIntent; import org.mozilla.gecko.notifications.NotificationHelper; import org.mozilla.gecko.overlays.ui.ShareDialog; import org.mozilla.gecko.permissions.Permissions; import org.mozilla.gecko.preferences.ClearOnShutdownPref; import org.mozilla.gecko.preferences.GeckoPreferences; import org.mozilla.gecko.promotion.AddToHomeScreenPromotion; @@ -861,28 +862,39 @@ public class BrowserApp extends GeckoApp final String installerPackageName = getPackageManager().getInstallerPackageName(getPackageName()); Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH, TelemetryContract.Method.SYSTEM, "installer_" + installerPackageName); } /** * Initializes the default Switchboard URLs the first time. * @param intent */ - private static void initSwitchboard(final Context context, final SafeIntent intent, final boolean isInAutomation) { + private void initSwitchboard(final Context context, final SafeIntent intent, final boolean isInAutomation) { if (isInAutomation) { Log.d(LOGTAG, "Switchboard disabled - in automation"); return; } else if (!AppConstants.MOZ_SWITCHBOARD) { Log.d(LOGTAG, "Switchboard compile-time disabled"); return; } final String serverExtra = intent.getStringExtra(INTENT_KEY_SWITCHBOARD_SERVER); final String serverUrl = TextUtils.isEmpty(serverExtra) ? SWITCHBOARD_SERVER : serverExtra; - new AsyncConfigLoader(context, serverUrl).execute(); + new AsyncConfigLoader(context, serverUrl) { + @Override + protected Void doInBackground(Void... params) { + super.doInBackground(params); + if (SwitchBoard.isInExperiment(context, Experiments.LEANPLUM) && + GeckoPreferences.getBooleanPref(context, GeckoPreferences.PREFS_HEALTHREPORT_UPLOAD_ENABLED, true)) { + // Do LeanPlum start/init here + MmaDelegate.init(BrowserApp.this.getApplication()); + } + return null; + } + }.execute(); } private static void initTelemetryUploader(final boolean isInAutomation) { TelemetryUploadService.setDisabled(isInAutomation); } private void showUpdaterPermissionSnackbar() { SnackbarBuilder.SnackbarCallback allowCallback = new SnackbarBuilder.SnackbarCallback() {
new file mode 100644 --- /dev/null +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaDelegate.java @@ -0,0 +1,41 @@ +//#filter substitution +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * 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/. */ +package org.mozilla.gecko.mma; + +import android.app.Application; +import android.content.Context; + +import org.mozilla.gecko.MmaConstants; + + +public class MmaDelegate { + + private static MmaInterface mmaHelper = MmaConstants.getMma(); + + public static String FIRST_RUN = "First Run"; + public static String SECOND_RUN = "Second Run"; + public static String OPENED_APP = "Opened App"; + public static String OPENED_LOGIN_MANAGER = "Opened Login Manager"; + public static String OPENED_BOOKMARK = "Opened Bookmark"; + public static String OPENED_NEW_TAB = "Opened New Tab"; + public static String INTERACT_WITH_SEARCH_URL_AREA = "Interact With Search URL Area"; + public static String SAVED_BOOKMARK = "saved bookmark"; + public static String OPENED_TELEPHONE_LINK = "Opened Telephone Link"; + public static String OPENED_MAILTO_LINK = "Opened Mailto Link"; + public static String SAVED_IMAGE = "Download Media - Saved Image"; + public static String CLEAR_PRIVATE_DATA = "Closed Private Tabs When Leaving Private Browsing"; + public static String CLOSED_PRIVATE_TABS = "Closed Private Tabs"; + public static String SAVED_LOGIN_AND_PASSWORD = "Saved Login and Password"; + + public static void init(Application application) { + mmaHelper.init(application); + } + + public void start(Context context) { + mmaHelper.start(context); + } + +}
new file mode 100644 --- /dev/null +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaInterface.java @@ -0,0 +1,17 @@ +//#filter substitution +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * 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/. */ +package org.mozilla.gecko.mma; + +import android.app.Application; +import android.content.Context; + + +public interface MmaInterface { + void init(Application application); + + void start(Context context); + +}
new file mode 100644 --- /dev/null +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaLeanplumImp.java @@ -0,0 +1,20 @@ +//#filter substitution +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * 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/. */ +package org.mozilla.gecko.mma; + +import android.app.Application; +import android.content.Context; + + +public class MmaLeanplumImp implements MmaInterface { + @Override public void init(Application application) { + + } + + @Override public void start(Context context) { + + } +}
new file mode 100644 --- /dev/null +++ b/mobile/android/base/java/org/mozilla/gecko/mma/MmaStubImp.java @@ -0,0 +1,20 @@ +//#filter substitution +/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- + * 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/. */ +package org.mozilla.gecko.mma; + +import android.app.Application; +import android.content.Context; + + +public class MmaStubImp implements MmaInterface { + @Override public void init(Application application) { + + } + + @Override public void start(Context context) { + + } +}
--- a/mobile/android/base/moz.build +++ b/mobile/android/base/moz.build @@ -114,26 +114,32 @@ with Files('resources/menu/browsersearch DIRS += ['locales'] GENERATED_FILES += [ '../geckoview/generated/preprocessed/org/mozilla/geckoview/BuildConfig.java', 'AndroidManifest.xml', 'generated/preprocessed/org/mozilla/gecko/AdjustConstants.java', 'generated/preprocessed/org/mozilla/gecko/AppConstants.java', + 'generated/preprocessed/org/mozilla/gecko/MmaConstants.java', ] w = GENERATED_FILES['../geckoview/generated/preprocessed/org/mozilla/geckoview/BuildConfig.java'] w.script = 'generate_build_config.py:generate_java' w.inputs += ['../geckoview/BuildConfig.java.in'] x = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/AdjustConstants.java'] x.script = 'generate_build_config.py:generate_java' x.inputs += ['AdjustConstants.java.in'] y = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/AppConstants.java'] y.script = 'generate_build_config.py:generate_java' y.inputs += ['AppConstants.java.in'] + +y1 = GENERATED_FILES['generated/preprocessed/org/mozilla/gecko/MmaConstants.java'] +y1.script = 'generate_build_config.py:generate_java' +y1.inputs += ['MmaConstants.java.in'] + z = GENERATED_FILES['AndroidManifest.xml'] z.script = 'generate_build_config.py:generate_android_manifest' z.inputs += ['AndroidManifest.xml.in'] include('android-services.mozbuild') geckoview_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/main/' geckoview_thirdparty_source_dir = TOPSRCDIR + '/mobile/android/geckoview/src/thirdparty/' @@ -149,21 +155,23 @@ constants_jar.sources += [geckoview_sour 'SysInfo.java', ]] constants_jar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'adjust/AdjustHelperInterface.java', 'adjust/AttributionHelperListener.java', 'db/BrowserContract.java', 'LocaleManager.java', 'Locales.java', + 'mma/MmaInterface.java', ]] constants_jar.generated_sources = [ '../geckoview/generated/preprocessed/org/mozilla/geckoview/BuildConfig.java', 'generated/preprocessed/org/mozilla/gecko/AdjustConstants.java', 'generated/preprocessed/org/mozilla/gecko/AppConstants.java', + 'generated/preprocessed/org/mozilla/gecko/MmaConstants.java', ] constants_jar.extra_jars = [ CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'], CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'], CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'], CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB'], ] @@ -174,16 +182,28 @@ if CONFIG['MOZ_INSTALL_TRACKING']: constants_jar.extra_jars += [ 'gecko-thirdparty-adjust_sdk.jar', ] else: constants_jar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'adjust/StubAdjustHelper.java', ]] +if CONFIG['MOZ_INSTALL_MMA']: + constants_jar.sources += ['java/org/mozilla/gecko/' + x for x in [ + 'mma/MmaLeanplumImp.java', + ]] + constants_jar.extra_jars += [ + 'gecko-thirdparty-leanplum_sdk.jar' + ] +else: + constants_jar.sources += ['java/org/mozilla/gecko/' + x for x in [ + 'mma/MmaStubImp.java', + ]] + resjar = add_java_jar('gecko-R') resjar.sources = [] resjar.generated_sources += [ 'generated/org/mozilla/gecko/R.java', ] if CONFIG['ANDROID_SUPPORT_V4_AAR']: ANDROID_EXTRA_PACKAGES += ['android.support.v4'] @@ -740,16 +760,17 @@ gbjar.sources += ['java/org/mozilla/geck 'menu/GeckoMenuInflater.java', 'menu/GeckoMenuItem.java', 'menu/GeckoSubMenu.java', 'menu/MenuItemActionBar.java', 'menu/MenuItemDefault.java', 'menu/MenuItemSwitcherLayout.java', 'menu/MenuPanel.java', 'menu/MenuPopup.java', + 'mma/MmaDelegate.java', 'MotionEventInterceptor.java', 'notifications/NotificationClient.java', 'notifications/NotificationHelper.java', 'notifications/NotificationReceiver.java', 'notifications/NotificationService.java', 'notifications/WhatsNewReceiver.java', 'overlays/OverlayConstants.java', 'overlays/service/OverlayActionService.java', @@ -968,17 +989,17 @@ gbjar.sources += ['java/org/mozilla/geck 'widget/themed/ThemedView.java', ]] android_package_dir = CONFIG['ANDROID_PACKAGE_NAME'].replace('.', '/') gbjar.generated_sources = [] # Keep it this way. gbjar.extra_jars += [ CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'], CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'], CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'], - 'constants.jar' + 'constants.jar', ] if CONFIG['MOZ_CRASHREPORTER']: gbjar.sources += [ 'java/org/mozilla/gecko/CrashReporter.java' ] ANDROID_RES_DIRS += [ 'crashreporter/res' ] if CONFIG['MOZ_ANDROID_GCM']: gbjar.sources += ['java/org/mozilla/gecko/' + x for x in [ 'gcm/GcmInstanceIDListenerService.java', @@ -1203,16 +1224,132 @@ if CONFIG['MOZ_INSTALL_TRACKING']: 'com/adjust/sdk/RequestHandler.java', 'com/adjust/sdk/UnitTestActivity.java', 'com/adjust/sdk/Util.java' ] ] adjustjar.extra_jars += [ 'sync-thirdparty.jar', ] + +if CONFIG['MOZ_INSTALL_MMA']: + lpjar = add_java_jar('gecko-thirdparty-leanplum_sdk') + lpjar.sources += [ thirdparty_source_dir + f for f in [ + 'com/leanplum/ActionArgs.java', + 'com/leanplum/ActionContext.java', + 'com/leanplum/activities/LeanplumAccountAuthenticatorActivity.java', + 'com/leanplum/activities/LeanplumActionBarActivity.java', + 'com/leanplum/activities/LeanplumActivity.java', + 'com/leanplum/activities/LeanplumActivityGroup.java', + 'com/leanplum/activities/LeanplumAliasActivity.java', + 'com/leanplum/activities/LeanplumAppCompatActivity.java', + 'com/leanplum/activities/LeanplumExpandableListActivity.java', + 'com/leanplum/activities/LeanplumFragmentActivity.java', + 'com/leanplum/activities/LeanplumLauncherActivity.java', + 'com/leanplum/activities/LeanplumListActivity.java', + 'com/leanplum/activities/LeanplumNativeActivity.java', + 'com/leanplum/activities/LeanplumPreferenceActivity.java', + 'com/leanplum/activities/LeanplumTabActivity.java', + 'com/leanplum/annotations/File.java', + 'com/leanplum/annotations/Parser.java', + 'com/leanplum/annotations/Variable.java', + 'com/leanplum/CacheUpdateBlock.java', + 'com/leanplum/callbacks/ActionCallback.java', + 'com/leanplum/callbacks/InboxChangedCallback.java', + 'com/leanplum/callbacks/NewsfeedChangedCallback.java', + 'com/leanplum/callbacks/PostponableAction.java', + 'com/leanplum/callbacks/RegisterDeviceCallback.java', + 'com/leanplum/callbacks/RegisterDeviceFinishedCallback.java', + 'com/leanplum/callbacks/StartCallback.java', + 'com/leanplum/callbacks/VariableCallback.java', + 'com/leanplum/callbacks/VariablesChangedCallback.java', + 'com/leanplum/internal/ActionArg.java', + 'com/leanplum/internal/ActionManager.java', + 'com/leanplum/internal/AESCrypt.java', + 'com/leanplum/internal/BaseActionContext.java', + 'com/leanplum/internal/CollectionUtil.java', + 'com/leanplum/internal/Constants.java', + 'com/leanplum/internal/FileManager.java', + 'com/leanplum/internal/HybiParser.java', + 'com/leanplum/internal/JsonConverter.java', + 'com/leanplum/internal/LeanplumInternal.java', + 'com/leanplum/internal/LeanplumManifestHelper.java', + 'com/leanplum/internal/LeanplumManifestParser.java', + 'com/leanplum/internal/LeanplumMessageMatchFilter.java', + 'com/leanplum/internal/LeanplumUIEditorWrapper.java', + 'com/leanplum/internal/Log.java', + 'com/leanplum/internal/OsHandler.java', + 'com/leanplum/internal/Registration.java', + 'com/leanplum/internal/Request.java', + 'com/leanplum/internal/RequestFactory.java', + 'com/leanplum/internal/ResourceQualifiers.java', + 'com/leanplum/internal/Socket.java', + 'com/leanplum/internal/SocketIOClient.java', + 'com/leanplum/internal/Util.java', + 'com/leanplum/internal/VarCache.java', + 'com/leanplum/internal/WebSocketClient.java', + 'com/leanplum/Leanplum.java', + 'com/leanplum/LeanplumActivityHelper.java', + 'com/leanplum/LeanplumApplication.java', + 'com/leanplum/LeanplumCloudMessagingProvider.java', + 'com/leanplum/LeanplumDeviceIdMode.java', + 'com/leanplum/LeanplumEditorMode.java', + 'com/leanplum/LeanplumException.java', + 'com/leanplum/LeanplumGcmProvider.java', + 'com/leanplum/LeanplumInbox.java', + 'com/leanplum/LeanplumInboxMessage.java', + 'com/leanplum/LeanplumInflater.java', + 'com/leanplum/LeanplumLocalPushListenerService.java', + 'com/leanplum/LeanplumLocationAccuracyType.java', + 'com/leanplum/LeanplumManualProvider.java', + 'com/leanplum/LeanplumPushInstanceIDService.java', + 'com/leanplum/LeanplumPushListenerService.java', + 'com/leanplum/LeanplumPushNotificationCustomizer.java', + 'com/leanplum/LeanplumPushReceiver.java', + 'com/leanplum/LeanplumPushRegistrationService.java', + 'com/leanplum/LeanplumPushService.java', + 'com/leanplum/LeanplumResources.java', + 'com/leanplum/LeanplumUIEditor.java', + 'com/leanplum/LocationManager.java', + 'com/leanplum/messagetemplates/Alert.java', + 'com/leanplum/messagetemplates/BaseMessageDialog.java', + 'com/leanplum/messagetemplates/BaseMessageOptions.java', + 'com/leanplum/messagetemplates/CenterPopup.java', + 'com/leanplum/messagetemplates/CenterPopupOptions.java', + 'com/leanplum/messagetemplates/Confirm.java', + 'com/leanplum/messagetemplates/HTMLOptions.java', + 'com/leanplum/messagetemplates/HTMLTemplate.java', + 'com/leanplum/messagetemplates/Interstitial.java', + 'com/leanplum/messagetemplates/InterstitialOptions.java', + 'com/leanplum/messagetemplates/MessageTemplates.java', + 'com/leanplum/messagetemplates/OpenURL.java', + 'com/leanplum/messagetemplates/WebInterstitial.java', + 'com/leanplum/messagetemplates/WebInterstitialOptions.java', + 'com/leanplum/Newsfeed.java', + 'com/leanplum/NewsfeedMessage.java', + 'com/leanplum/UIEditorBridge.java', + 'com/leanplum/utils/BitmapUtil.java', + 'com/leanplum/utils/SharedPreferencesUtil.java', + 'com/leanplum/utils/SizeUtil.java', + 'com/leanplum/Var.java', + 'com/leanplum/views/BackgroundImageView.java', + 'com/leanplum/views/CloseButton.java', + ] ] + lpjar.extra_jars += [ + CONFIG['ANDROID_PLAY_SERVICES_BASE_AAR_LIB'], + CONFIG['ANDROID_PLAY_SERVICES_BASEMENT_AAR_LIB'], + CONFIG['ANDROID_PLAY_SERVICES_GCM_AAR_LIB'], + CONFIG['ANDROID_SUPPORT_ANNOTATIONS_JAR_LIB'], + CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'], + CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'], + CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB'], + CONFIG['ANDROID_PLAY_SERVICES_ADS_AAR_LIB'], + 'sync-thirdparty.jar', + ] + # Putting branding earlier allows branders to override default resources. ANDROID_RES_DIRS += [ '/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res', 'resources', '/mobile/android/services/src/main/res', '!res', ]
--- a/mobile/android/geckoview/build.gradle +++ b/mobile/android/geckoview/build.gradle @@ -94,16 +94,17 @@ dependencies { compile "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}" } task syncPreprocessedCode(type: Sync, dependsOn: rootProject.generateCodeAndResources) { into("${project.buildDir}/generated/source/preprocessed_code") from("${topobjdir}/mobile/android/base/generated/preprocessed") { // AdjustConstants is included in the main app project. exclude '**/AdjustConstants.java' + exclude '**/MmaConstants.java' } } apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle" android.libraryVariants.all { variant -> variant.preBuild.dependsOn syncPreprocessedCode