Android security tags, read closely by Lightrion

CVE-2024-31324 AI-generated analysis

platform/frameworks/base, WindowManager (services/core/java/com/android/server/wm/WindowState.java)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (5 corrections). Verify against the commit before relying on it.

WindowState.hide() now decides whether to defer the visibility change based on whether an exit animation was actually applied to the window itself (return value of mWinAnimator.applyAnimationLocked), instead of checking isAnimating(TRANSITION | PARENTS), so a window with no hide animation is committed invisible immediately even when its parent container is animating.

Root cause

In WindowState.hide(doAnimation, requestAnim), after calling mWinAnimator.applyAnimationLocked(TRANSIT_EXIT, false), the code only fell back to immediate hiding when !isAnimating(TRANSITION | PARENTS). Per the commit message, commit 9bca6b4 overextended this condition to include the parent container. If the parent was animating but the window itself had no exit animation, doAnimation stayed true and the window waited for onAnimationFinished -> checkPolicyVisibilityChange to hide it. That callback never arrives because the window is not animating, so the window that should have been hidden remained on screen.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to June 2024 · Findings