Bug 1152871 - Include Adjust SDK private token in builds. r=mfinkle, a=sledru
authorNick Alexander <nalexander@mozilla.com>
Wed, 29 Apr 2015 09:56:02 -0700
changeset 267309 03c37cb5965b34bab781a25fa93d4c825ac13331
parent 267308 decc405cf39875d307f3f66f8e89b38e5ed0b894
child 267310 c7644820e1680e61cc92a4adef28ede87c0b0eed
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, sledru
bugs1152871
milestone39.0a2
Bug 1152871 - Include Adjust SDK private token in builds. r=mfinkle, a=sledru
mobile/android/base/adjust/AdjustHelper.java
mobile/android/config/mozconfigs/common
--- a/mobile/android/base/adjust/AdjustHelper.java
+++ b/mobile/android/base/adjust/AdjustHelper.java
@@ -12,24 +12,27 @@ import com.adjust.sdk.Adjust;
 import com.adjust.sdk.AdjustConfig;
 import com.adjust.sdk.AdjustReferrerReceiver;
 import com.adjust.sdk.LogLevel;
 
 public class AdjustHelper implements AdjustHelperInterface {
     public void onCreate(final Context context, final String maybeAppToken) {
         final String environment;
         final String appToken;
+        final LogLevel logLevel;
         if (maybeAppToken != null) {
             environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
             appToken = maybeAppToken;
+            logLevel = LogLevel.WARN;
         } else {
             environment = AdjustConfig.ENVIRONMENT_SANDBOX;
             appToken = "ABCDEFGHIJKL";
+            logLevel = LogLevel.VERBOSE;
         }
         AdjustConfig config = new AdjustConfig(context, appToken, environment);
-        config.setLogLevel(LogLevel.VERBOSE);
+        config.setLogLevel(logLevel);
         Adjust.onCreate(config);
     }
 
     public void onReceive(final Context context, final Intent intent) {
         new AdjustReferrerReceiver().onReceive(context, intent);
     }
 }
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -32,16 +32,17 @@ ac_add_options --with-android-gnu-compil
 ac_add_options --with-android-version=9
 ac_add_options --with-system-zlib
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 
 # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
 ac_add_options --enable-warnings-as-errors
 
 ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-fennec-geoloc-api.key
+ac_add_options --with-adjust-sdk-keyfile=/builds/adjust-sdk.token
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 # Use ccache
 . "$topsrcdir/build/mozconfig.cache"
 
 HOST_CC="$topsrcdir/gcc/bin/gcc"