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
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user