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

Commit e74a9f18 authored by Massimo Carli's avatar Massimo Carli
Browse files

[87/n] Handle Letterbox Surface Lifecycle in SplitScreen

Before this code, Changes for a no leaf Task were skipped
at the TransitionObserver level to avoid the creation of
letterbox surfaces using, as parent surface, the surface of
Tasks without any activity.

Now leaf tasks, the only allowed to provide the parent
surface for the creation of the letterbox surfaces, are
referenced in the LetterboxTaskInfoRepository and cannot
be completely ignored.

In case of split screen, for instance, the id of the
Task received in the Change cannot be used directly
but it will be used to identify the specific leaf
Task from its parent using the logic in TaskIdResolver.

After this change the requirement to not create letterbox
surfaces for not leaf task will be accomplished because
a LetterboxLifecycleEvent will be only created for those.
LetterboxLifecycleEvent for not leaf tasks will be null
and so skipped in DelegateLetterboxTransitionObserver.

Flag: com.android.window.flags.app_compat_refactoring_fix_multiwindow_task_hierarchy
Bug: 421103832
Test: atest WMShellUnitTests:DelegateLetterboxTransitionObserverTest
Test: atest WMShellUnitTests:TaskInfoLetterboxLifecycleEventFactoryTest
Test: atest WMShellUnitTests:MixedLetterboxControllerTest
Test: atest WMShellUnitTests:LetterboxTaskListenerAdapterTest

Change-Id: I522a2261c26468bb70535025d4edfd4a8aae3d17
parent 2e92c4e6
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