2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-03 23:15:31 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/10036 - Workaround for System Theme changes with config change

This commit is contained in:
ekager 2020-04-20 21:43:53 -07:00 committed by Emily Kager
parent e42739298c
commit 76b250e035

View File

@ -378,4 +378,12 @@ open class FenixApplication : LocaleAwareApplication() {
// This method is not covered by our internal crash reporting: be very careful when modifying it. // This method is not covered by our internal crash reporting: be very careful when modifying it.
StartupTimeline.onApplicationInit() // DO NOT MOVE ANYTHING ABOVE HERE: the timing is critical. StartupTimeline.onApplicationInit() // DO NOT MOVE ANYTHING ABOVE HERE: the timing is critical.
} }
override fun onConfigurationChanged(config: android.content.res.Configuration) {
// Workaround for androidx appcompat issue where follow system day/night mode config changes
// are not triggered when also using createConfigurationContext like we do in LocaleManager
// https://issuetracker.google.com/issues/143570309#comment3
applicationContext.resources.configuration.uiMode = config.uiMode
super.onConfigurationChanged(config)
}
} }