mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 19:25:43 +00:00
Bug 1208240 - Move the Adjust initialization to BrowserApp and observe FHR opt-out r=nalexander
This commit is contained in:
parent
35b0792faf
commit
b8cdfc1977
@ -6,6 +6,7 @@
|
|||||||
package org.mozilla.gecko;
|
package org.mozilla.gecko;
|
||||||
|
|
||||||
import org.mozilla.gecko.annotation.RobocopTarget;
|
import org.mozilla.gecko.annotation.RobocopTarget;
|
||||||
|
import org.mozilla.gecko.AdjustConstants;
|
||||||
import org.mozilla.gecko.AppConstants.Versions;
|
import org.mozilla.gecko.AppConstants.Versions;
|
||||||
import org.mozilla.gecko.DynamicToolbar.PinReason;
|
import org.mozilla.gecko.DynamicToolbar.PinReason;
|
||||||
import org.mozilla.gecko.DynamicToolbar.VisibilityTransition;
|
import org.mozilla.gecko.DynamicToolbar.VisibilityTransition;
|
||||||
@ -862,6 +863,13 @@ public class BrowserApp extends GeckoApp
|
|||||||
mReadingListHelper = new ReadingListHelper(appContext, getProfile(), this);
|
mReadingListHelper = new ReadingListHelper(appContext, getProfile(), this);
|
||||||
mAccountsHelper = new AccountsHelper(appContext, getProfile());
|
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) {
|
if (AppConstants.MOZ_ANDROID_BEAM) {
|
||||||
NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
|
NfcAdapter nfc = NfcAdapter.getDefaultAdapter(this);
|
||||||
if (nfc != null) {
|
if (nfc != null) {
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
package org.mozilla.gecko;
|
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.BrowserContract;
|
||||||
import org.mozilla.gecko.db.BrowserDB;
|
import org.mozilla.gecko.db.BrowserDB;
|
||||||
import org.mozilla.gecko.db.LocalBrowserDB;
|
import org.mozilla.gecko.db.LocalBrowserDB;
|
||||||
@ -155,10 +153,6 @@ public class GeckoApplication extends Application
|
|||||||
});
|
});
|
||||||
|
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
if (AppConstants.MOZ_INSTALL_TRACKING) {
|
|
||||||
AdjustConstants.getAdjustHelper().onCreate(this, AdjustConstants.MOZ_INSTALL_TRACKING_ADJUST_SDK_APP_TOKEN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isApplicationInBackground() {
|
public boolean isApplicationInBackground() {
|
||||||
|
Loading…
Reference in New Issue
Block a user