Issue/disabling battery saver theme change on older devices#11480
Merged
marecar3 merged 4 commits intofeature/material-themefrom Mar 20, 2020
Merged
Conversation
|
You can test the changes on this Pull Request by downloading the APK here. |
Contributor
|
Nice work @khaykov! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes this issue.
On devices with API 27 and lower, when the app theme is set based on battery saver, toggling battery saver option twice causes activities to lose state (savedInstanceState will be null). This can result in all kinds of fun stuff that we do not want. This all happens on system level, and unless we decide to handle all UI configuration changes manually there is nothing we can do about this.
This PR removes
Set by Battery Savertheme option from devices with API 27 and lower. For those devicesLightwill be the default option.Battery saver theme switch on API 28 works as expected with the
MODE_NIGHT_FOLLOW_SYSTEMflag.To test 1:
To test 2:
PR submission checklist:
RELEASE-NOTES.txtif necessary.