From 4c4835f2a2b129729ea6fe44915ca151a20a1586 Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Mon, 4 Nov 2019 13:40:47 +0100 Subject: [PATCH] Remove WorkManager initialization Per https://github.com/MozillaReality/FirefoxReality/pull/1973#discussion_r337518862 --- .../org/mozilla/vrbrowser/browser/Services.kt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/Services.kt b/app/src/common/shared/org/mozilla/vrbrowser/browser/Services.kt index a215b5f9d..d480ed387 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/Services.kt +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/Services.kt @@ -53,20 +53,6 @@ class Services(context: Context, places: Places): GeckoSession.NavigationDelegat GlobalSyncableStoreProvider.configureStore(SyncEngine.Bookmarks to places.bookmarks) GlobalSyncableStoreProvider.configureStore(SyncEngine.History to places.history) - - // TODO this really shouldn't be necessary, since WorkManager auto-initializes itself, unless - // auto-initialization is disabled in the manifest file. We don't disable the initialization, - // but i'm seeing crashes locally because WorkManager isn't initialized correctly... - // Maybe this is a race of sorts? We're trying to access it before it had a chance to auto-initialize? - // It's not well-documented _when_ that auto-initialization is supposed to happen. - - // For now, let's just manually initialize it here, and swallow failures (it's already initialized). - try { - WorkManager.initialize( - context, - Configuration.Builder().setMinimumLoggingLevel(android.util.Log.INFO).build() - ) - } catch (e: IllegalStateException) {} } // Process received device events, only handling received tabs for now.