Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 9688e63

Browse files
authored
Move accounts initialization to Activity onCreate (#2926)
* Move accounts initialization to onActivityCreate * Revert "Fixes an AC issue with FxA and the account state after rebooting (#2925)" This reverts commit 83ebdc5.
1 parent 83ebdc5 commit 9688e63

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ protected void attachBaseContext(Context base) {
216216

217217
@Override
218218
protected void onCreate(Bundle savedInstanceState) {
219+
((VRBrowserApplication)getApplication()).onActivityCreate();
219220
SettingsStore.getInstance(getBaseContext()).setPid(Process.myPid());
220221
// Fix for infinite restart on startup crashes.
221222
long count = SettingsStore.getInstance(getBaseContext()).getCrashRestartCount();

app/src/common/shared/org/mozilla/vrbrowser/VRBrowserApplication.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,20 @@ public class VRBrowserApplication extends Application {
3131
@Override
3232
public void onCreate() {
3333
super.onCreate();
34-
3534
mAppExecutors = new AppExecutors();
36-
mPlaces = new Places(this);
3735
mBitmapCache = new BitmapCache(this, mAppExecutors.diskIO(), mAppExecutors.mainThread());
38-
mServices = new Services(this, mPlaces);
39-
mAccounts = new Accounts(this);
36+
4037

4138
TelemetryWrapper.init(this);
4239
GleanMetricsService.init(this);
4340
}
4441

42+
protected void onActivityCreate() {
43+
mPlaces = new Places(this);
44+
mServices = new Services(this, mPlaces);
45+
mAccounts = new Accounts(this);
46+
}
47+
4548
@Override
4649
protected void attachBaseContext(Context base) {
4750
Context context = LocaleUtils.init(base);

app/src/common/shared/org/mozilla/vrbrowser/telemetry/GleanMetricsService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static void init(Context aContext) {
5252
GleanMetricsService.stop();
5353
}
5454
Configuration config = new Configuration(Configuration.DEFAULT_TELEMETRY_ENDPOINT, BuildConfig.BUILD_TYPE);
55-
Glean.INSTANCE.initialize(aContext, config);
55+
Glean.INSTANCE.initialize(aContext, true, config);
5656
}
5757

5858
// It would be called when users turn on/off the setting of telemetry.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
addRepos(repositories)
66
dependencies {
77
classpath 'com.android.tools.build:gradle:3.4.2'
8-
classpath "org.mozilla.telemetry:glean-gradle-plugin:$versions.android_components"
8+
classpath "org.mozilla.telemetry:glean-gradle-plugin:$versions.telemetry"
99
classpath "$deps.kotlin.plugin"
1010

1111
// NOTE: Do not place your application dependencies here; they belong

versions.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def versions = [:]
2525
// GeckoView versions can be found here:
2626
// https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/
2727
versions.gecko_view = "75.0.20200304084140"
28-
versions.android_components = "21.0.0"
28+
versions.android_components = "28.0.1"
2929
// Note that android-components also depends on application-services,
3030
// and in fact is our main source of appservices-related functionality.
3131
// The version number below tracks the application-services version
3232
// that we depend on directly for its rustlog package, and it's important
3333
// that it be kept insync with the version used by android-components above.
34-
versions.mozilla_appservices = "0.42.2"
34+
versions.mozilla_appservices = "0.48.2"
3535
versions.mozilla_speech = "1.0.11"
3636
versions.openwnn = "1.3.7"
3737
versions.google_vr = "1.190.0"
@@ -52,7 +52,7 @@ versions.snakeyaml = "1.24"
5252
versions.gson = "2.8.5"
5353
versions.robolectric = "4.2.1"
5454
versions.work = "2.2.0"
55-
versions.telemetry = "22.0.0"
55+
versions.telemetry = "24.1.0"
5656
ext.versions = versions
5757

5858
def deps = [:]

0 commit comments

Comments
 (0)