Skip to content

Make Android respect power saving/disabled animations#17287

Merged
PureWeen merged 5 commits into
net8.0from
fix-android-animation-battery
Oct 26, 2023
Merged

Make Android respect power saving/disabled animations#17287
PureWeen merged 5 commits into
net8.0from
fix-android-animation-battery

Conversation

@hartez
Copy link
Copy Markdown
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
Copy Markdown
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

@samhouts samhouts modified the milestones: .NET 8 GA, Under Consideration Sep 19, 2023
@hartez hartez force-pushed the fix-android-animation-battery branch from 4b1f7df to 54c48be Compare September 19, 2023 20:27
Comment thread src/Core/src/PublicAPI/net-tizen/PublicAPI.Shipped.txt Outdated
@PureWeen PureWeen modified the milestones: Under Consideration, .NET 8 GA Sep 24, 2023
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
Copy Markdown
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
Comment thread src/Controls/src/Core/Tweener.cs
Comment thread src/Controls/src/Core/AnimationExtensions.cs
Comment thread src/Controls/src/Core/Tweener.cs
Comment thread src/Controls/tests/Core.UnitTests/TestClasses/AnimationReadyHandler.cs Outdated
Comment thread src/Core/src/PublicAPI/net-android/PublicAPI.Shipped.txt Outdated
@PureWeen PureWeen enabled auto-merge (squash) October 26, 2023 20:12
@PureWeen PureWeen merged commit 2c0754c into net8.0 Oct 26, 2023
@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
@samhouts samhouts added the fixed-in-8.0.100-rc.2.9530 Look for this fix in 8.0.100-rc.2.9530 label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

fixed-in-8.0.100-rc.2.9530 Look for this fix in 8.0.100-rc.2.9530 platform/android

Projects

None yet

5 participants