Bug 1208240 - Move the Adjust initialization to BrowserApp and observe FHR opt-out r=nalexander

This commit is contained in:
Mark Finkle 2015-09-26 15:12:22 -04:00
parent b063ad40e3
commit 94411010b9
2 changed files with 8 additions and 6 deletions

View File

@ -6,6 +6,7 @@
package org.mozilla.gecko;
import org.mozilla.gecko.annotation.RobocopTarget;
import org.mozilla.gecko.AdjustConstants;
import org.mozilla.gecko.AppConstants.Versions;
import org.mozilla.gecko.DynamicToolbar.PinReason;
import org.mozilla.gecko.DynamicToolbar.VisibilityTransition;
@ -862,6 +863,13 @@ public class BrowserApp extends GeckoApp
mReadingListHelper = new ReadingListHelper(appContext, getProfile(), this);
mAccountsHelper = new AccountsHelper(appContext, getProfile());
if (AppConstants.MOZ_INSTALL_TRACKING) {
final SharedPreferences prefs = GeckoSharedPrefs.forApp(this);
if (prefs.getBoolean(GeckoPreferences.PREFS_HEALTHREPORT_UPLOAD_ENABLED, true)) {
AdjustConstants.getAdjustHelper().onCreate(this, AdjustConstants.MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN);
}
}
if (AppConstants.MOZ_ANDROID_BEAM) {
NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
if (nfc != null) {

View File

@ -4,8 +4,6 @@
package org.mozilla.gecko;
import org.mozilla.gecko.AdjustConstants;
import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.db.BrowserContract;
import org.mozilla.gecko.db.BrowserDB;
import org.mozilla.gecko.db.LocalBrowserDB;
@ -155,10 +153,6 @@ public class GeckoApplication extends Application
});
super.onCreate();
if (AppConstants.MOZ_INSTALL_TRACKING) {
AdjustConstants.getAdjustHelper().onCreate(this, AdjustConstants.MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN);
}
}
public boolean isApplicationInBackground() {