Complete Android animation runtime integration and validation - #54
Merged
Merged
Conversation
Drive the shared AnimationScheduler from one demand-driven, surface-gated Choreographer callback while preserving the shared monotonic clock and lifecycle pause rebasing. Late-bind the default tick source so early AnimationScheduler.Default access cannot pin the fallback timer, serialize lifecycle state application, and acquire Choreographer only on Android's main Looper. Observe Android animator duration scale dynamically with a lifecycle-aware ContentObserver, propagate the exact platform scalar through neutral policy, and ensure deterministic scale-zero endpoint completion and cleanup. Preserve stable MotionEvent pointer ownership across multi-touch index changes and cancellation, add cleanup, resize, retargeting, idle-wake, and leak regressions, and document the Android capability and manual-validation matrix.
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.
Summary
Completes Android runtime integration for the shared ModernFormsNext animation system without introducing Android-only schedulers, easing, or interpolation.
This integrates the shared
AnimationSchedulerwith Choreographer-based frame pacing and covers lifecycle pause/resume/rebase, Android animator-duration scaling, stable multi-touch ownership, interaction effects, theme transitions, layout and visual-state transitions, cleanup, diagnostics, and the Android diagnostic sample.Architecture
The platform-neutral runtime remains responsible for:
AnimationSchedulerThemeManagerInteractionEffect,RippleEffect, andPressScaleEffectLayoutTransitionandVisualStateTransitionThe Android backend is limited to:
No second Android-only animation system was created.
Frame pacing
AnimationScheduler.Defaultaccess cannot permanently select the fallback ticker.Lifecycle
Reduced motion
Android
ANIMATOR_DURATION_SCALEis read through a lifecycle-awareContentObserverusing the application context and a main-thread Handler.scale == 0: active animations publish their exact target immediately and the scheduler remains idle.scale < 1: newly started animations use shortened durations.scale == 1: normal duration.scale > 1: newly started animations use extended durations.1.0.Multi-touch
ActionIndexonly to find the changed pointer for DOWN/POINTER_DOWN and POINTER_UP/UP.Cleanup and leak prevention
Cleanup covers scheduler entries, native frame callbacks, pointer captures, lifecycle and invalidation subscriptions, ContentObserver registration, detach/reparent/dispose, and surface recreation.
The Android activity tracker uses a
WeakReferencefor the current Activity. The frame source does not retain a View or Activity, and reduced-motion observation uses application context. Automated weak-reference and lifecycle tests cover managed cleanup paths; no device-profiler leak claim is made.Automated validation
git diff --check: PASSThe complete test count was confirmed from a clean worktree at the exact feature SHA because nested worktrees under
artifactscan otherwise contaminateReleaseVersionConsistencyTests.Manual emulator validation
A manual emulator smoke test confirmed only:
Remaining device-specific validation
The following still require deeper manual/device validation and are not claimed as completed here:
Closes #29