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

Commit

Permalink
Remove WorkManager initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Nov 11, 2019
1 parent 1aea8bf commit dfb2d04
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions app/src/common/shared/org/mozilla/vrbrowser/browser/Services.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dfb2d04

Please sign in to comment.