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
70755adf
Commit
70755adf
authored
Apr 20, 2020
by
ekager
Committed by
Emily Kager
Apr 22, 2020
Browse files
For #10036 - Workaround for System Theme changes with config change
parent
1f8b7ff9
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/FenixApplication.kt
View file @
70755adf
...
...
@@ -378,4 +378,12 @@ open class FenixApplication : LocaleAwareApplication() {
// 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.
}
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
)
}
}
Write
Preview
Markdown
is supported
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