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