Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f99159c0 authored by Kazuki Takise's avatar Kazuki Takise
Browse files

Add task focus change support to FocusTransitionListener

This change adds task focus change support to FocusTransitionListener
to replace TaskInfo#isFocused with system-wide focus state.

The ideal, long-term solution is to implement this with a unified task
repository in WMShell, but as the project isn't ready yet, this change
workarounds some pain points that come from the compatibility with
existing APIs.

With this change, instead of FocusTransitionObserver registering as
TransitionObserver, focus state in FocusTransitionObserver is updated
in FreeformTransitionObserver#onTransitionReady(). This is because
focus state needs to be updated before FreeformTransitionObserver
processes the transition. Having one observer should be simpler
than having a order requirement between two observers, and this is
effectively merging FocusTransitionObserver and
FreeformTransitionObserver from the perspective of TransitionObserver,
but keeps these classes seperately to both avoid circular dependency
and isolate responsibilities. (Now FocusTransitionObserver no
longer implements TransitionObserver.)

Bug: 371143601
Flag: com.android.window.flags.enable_display_focus_in_shell_transitions
Test: atest FocusTransitionObserverTest
Change-Id: I68b6aaa44cf8578d3dcac3277c66e3d07738eef8
parent 173f6d13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment