|
|
|
@ -431,8 +431,17 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|
|
|
|
// https://issuetracker.google.com/issues/143570309#comment3
|
|
|
|
|
applicationContext.resources.configuration.uiMode = config.uiMode
|
|
|
|
|
|
|
|
|
|
// random StrictMode onDiskRead violation even when Fenix is not running in the background.
|
|
|
|
|
components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
|
|
|
|
|
if (isMainProcess()) {
|
|
|
|
|
// We can only do this on the main process as resetAfter will access components.core, which
|
|
|
|
|
// will initialize the engine and create an additional GeckoRuntime from the Gecko
|
|
|
|
|
// child process, causing a crash.
|
|
|
|
|
|
|
|
|
|
// There's a strict mode violation in A-Cs LocaleAwareApplication which
|
|
|
|
|
// reads from shared prefs: https://github.com/mozilla-mobile/android-components/issues/8816
|
|
|
|
|
components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
|
|
|
|
|
super.onConfigurationChanged(config)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
super.onConfigurationChanged(config)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|