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

Skip to content
Commit 87327dd2 authored by Dohyun Lee's avatar Dohyun Lee Committed by Rachit Jain
Browse files

Fix InvalidDisplayException on display removal for visible background users



In the automotive multi-user, multi-display environment that supports
background users with UI access on assigned displays (a.k.a. visible
background users), it's not allowed to create a window or launch an
activity on an unassigned display.
The crash happens when the test removes the overlay display during
its teardown while a test activity is running in it. When the display
is removed, the root tasks in its task display area are reparented to
the task display area of the default display, which is not assigned
to their user, causing the crash.
Therefore, it is modified to reparent the root tasks to the display
where their user is assigned when removing the display.

Flag: EXEMPT (bug fix)
Bug: 362325749
Test: atest CtsWindowManagerDeviceActivity:ActivityLifecycleTopResumedStateTests#testFinishOnDifferentDisplay_nonFocused
Test: atest --user-type secondary_user CtsWindowManagerDeviceActivity:ActivityLifecycleTopResumedStateTests#testFinishOnDifferentDisplay_nonFocused
Test: atest --user-type secondary_user_on_secondary_display CtsWindowManagerDeviceActivity:ActivityLifecycleTopResumedStateTests#testFinishOnDifferentDisplay_nonFocused

Signed-off-by: default avatarDohyun Lee <dohyun.lee@lge.com>
(cherry picked from https://partner-android-review.googlesource.com/q/commit:d2f6a39ce402c8ed88e46d47961bbbf31266bb60)
Merged-In: I223d4c33d7bcc09b06517dee7e07086cf06db736
Change-Id: I223d4c33d7bcc09b06517dee7e07086cf06db736
parent c3b59309
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