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

Commit 4f2a93a4 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Fix the condition for removing desktop wallpaper

This change fixes a condition that led to an ANR error when a task was
moved from the default display to another.

Previously, DesktopWallpaperActivity was removed when the last desktop
task was removed (e.g. the task closed or left desktop mode). However,
if other desktop tasks remained on a different display,
DesktopWallpaperActivity remained on the default display. In this case,
DesktopWallpaperActivity became the topmost task on the default display,
and the system server attempted to give it focus. Because
DesktopWallpaperActivity is not focusable, the system server could not
find a focusable window, eventually causing an ANR.

This commit corrects the condition for removing the desktop wallpaper.
Now, DesktopWallpaperActivity is removed when the last desktop task on
the default display is removed.

Bug: 381361395
Test: DesktopTasksControllerTest#moveToNextDisplay_removeWallpaper
Flag: com.android.window.flags.enable_per_display_desktop_wallpaper_activity
Change-Id: I7f142b3cc4282109c716e80b65f8b9e2cc343787
parent 3ffdc22a
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