Skip to content
Commit bde15130 authored by lumark's avatar lumark
Browse files

Call WC#onDisplayChanged in setParent

WC#mDisplayContent will update when received from WC#onDisplayChanged.

Currently, for Task#mDisplayContent, will update when its stack position change,
or the Task reparented to new display,
but for new activity launch flow, it won't receive onDisplayChanged callback
for the Task,

because before the Task added the stack, the stack has already called
onDisplayChanged when it created and added into TaskStackContainer.

The fix is add a check in WC#setParent to see if the display of new parent is
is same as the current one, if not, calling onDisplayChanged to update
the display from the new parent.

Also, add a unit-test to test this scenerio.

Bug: 142617871
Test: atest WindowContainerTests#testOnDisplayChanged TaskTests \
      TaskStackTests

Change-Id: I84c91dc63508b270a3576335bc9c8a005b72eba6
parent c9b6967e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment