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
Loading
Please register or sign in to comment