Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Android respect power saving/disabled animations #17287

Merged
merged 5 commits into from Oct 26, 2023

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Sep 9, 2023

When the animation methods and tickers were ported from Forms to MAUI, the bits which pay attention to the Android system animation settings did not make the port. These changes bring those bits forward:

  • If the system's animations are disabled (either by accessibility features or developer features), new animations will jump immediately to their finished state

  • If the device's power saving mode kicks on while animations are in progress, the animations will immediately jump to their finished state

  • If the device's animation durations is set to zero (disabled) while animations are in progress and the API version is 33 or greater, the animations will immediately jump to their finished state

Fixes #16476.
Fixes #16478.

This should make the tests from #16511 pass.

@hartez hartez marked this pull request as ready for review September 11, 2023 15:18
@hartez hartez requested a review from a team as a code owner September 11, 2023 15:18
@samhouts samhouts added this to the .NET 8 GA milestone Sep 11, 2023
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DisablingTickerFinishesAllAnimationsInChain failing on mac

PureWeen
PureWeen previously approved these changes Sep 25, 2023
@PureWeen PureWeen enabled auto-merge (squash) September 25, 2023 18:00
@hartez hartez marked this pull request as draft September 25, 2023 18:51
auto-merge was automatically disabled September 25, 2023 18:51

Pull request was converted to draft

@hartez
Copy link
Contributor Author

hartez commented Sep 25, 2023

Converting to draft until I can figure out why DisablingTickerPreventsAnimationFromRepeating fails intermittently.

Make Android respect power saving/disabled animations;
Watch animation duration if API >= 33
@hartez hartez force-pushed the fix-android-animation-battery branch from d4b361f to 6a338a8 Compare October 25, 2023 15:34
@hartez hartez requested a review from a team as a code owner October 25, 2023 15:34
@hartez hartez changed the base branch from main to net8.0 October 25, 2023 15:35
@Eilon Eilon removed the request for review from a team October 25, 2023 16:33
@PureWeen PureWeen modified the milestones: .NET 8 SR3, .NET 8 GA Oct 25, 2023
@PureWeen PureWeen enabled auto-merge (squash) October 26, 2023 20:12
@PureWeen PureWeen merged commit 2c0754c into net8.0 Oct 26, 2023
44 of 47 checks passed
@PureWeen PureWeen deleted the fix-android-animation-battery branch October 26, 2023 20:40
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants