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

Commit e52f8091 authored by Robert Carr's avatar Robert Carr
Browse files

VirtualDisplayTaskEmbedder: Post background color change callback

Otherwise we will end up calling SurfaceView#setResizeBackgroundColor
from a Binder thread and potentially cause a crash. This mirrors the
behavior of TaskOrganizerTaskEmbedder.

Bug: 157605189
Test: Existing tests pass
Change-Id: Iafe9e4c3eb4d32a52a6a1479aa9a2b295cd4ad6f
parent 54eec4b7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -365,8 +365,8 @@ public class VirtualDisplayTaskEmbedder extends TaskEmbedder {
            // Found the topmost stack on target display. Now check if the topmost task's
            // description changed.
            if (taskInfo.taskId == stackInfo.taskIds[stackInfo.taskIds.length - 1]) {
                mHost.onTaskBackgroundColorChanged(VirtualDisplayTaskEmbedder.this,
                        taskInfo.taskDescription.getBackgroundColor());
                mHost.post(()-> mHost.onTaskBackgroundColorChanged(VirtualDisplayTaskEmbedder.this,
                        taskInfo.taskDescription.getBackgroundColor()));
            }
        }