Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gaba
fenix
Commits
6a618aa3
Unverified
Commit
6a618aa3
authored
Jul 28, 2020
by
Sachin
Committed by
GitHub
Jul 28, 2020
Browse files
for #11698 added on demand workmanager initialization (#12739)
parent
bef98698
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/AndroidManifest.xml
View file @
6a618aa3
...
...
@@ -282,6 +282,11 @@
<meta-data
android:name=
"firebase_analytics_collection_enabled"
android:value=
"false"
/>
<!-- Removes the default Workmanager initialization so that we can use on-demand initializer. -->
<provider
android:name=
"androidx.work.impl.WorkManagerInitializer"
android:authorities=
"${applicationId}.workmanager-init"
tools:node=
"remove"
/>
</application>
</manifest>
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
View file @
6a618aa3
...
...
@@ -8,9 +8,12 @@ import android.annotation.SuppressLint
import
android.os.Build
import
android.os.Build.VERSION.SDK_INT
import
android.os.StrictMode
import
android.util.Log.INFO
import
androidx.annotation.CallSuper
import
androidx.appcompat.app.AppCompatDelegate
import
androidx.core.content.getSystemService
import
androidx.work.Configuration.Provider
import
androidx.work.Configuration.Builder
import
kotlinx.coroutines.Deferred
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.GlobalScope
...
...
@@ -53,7 +56,7 @@ import org.mozilla.fenix.utils.BrowsersCache
* Installs [CrashReporter], initializes [Glean] in fenix builds and setup Megazord in the main process.
*/
@Suppress
(
"Registered"
,
"TooManyFunctions"
,
"LargeClass"
)
open
class
FenixApplication
:
LocaleAwareApplication
()
{
open
class
FenixApplication
:
LocaleAwareApplication
()
,
Provider
{
init
{
recordOnInit
()
// DO NOT MOVE ANYTHING ABOVE HERE: the timing of this measurement is critical.
}
...
...
@@ -420,4 +423,6 @@ open class FenixApplication : LocaleAwareApplication() {
companion
object
{
private
const
val
KINTO_ENDPOINT_PROD
=
"https://firefox.settings.services.mozilla.com/v1"
}
override
fun
getWorkManagerConfiguration
()
=
Builder
().
setMinimumLoggingLevel
(
INFO
).
build
()
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment