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

Commit e2f59993 authored by Lingyu Feng's avatar Lingyu Feng
Browse files

Do not start secondary home on display that cannot host tasks

The system server can crash with a SecurityException due to a race
condition when launching a secondary home activity. This crash occurs if
Display.canHostTasks() becomes false, but WindowManager has not yet
received the corresponding onDisplayChanged() event. This CL prevents
the crash by ensuring Display.canHostTasks() is checked before the
launch attempt.

Bug: 438030031
Test: RootWindowContainerTests
Flag: com.android.server.display.feature.flags.enable_display_content_mode_management
Flag: com.android.window.flags.enable_mirror_display_no_activity
Change-Id: I0957cdcef4dfc955d2b2e89d7dad72e29b28c215
parent 1a2a7e81
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