Add getParentingSurfaceControl() in DisplayContent
- After the DisplayAreas are created from the policy, DisplayContent
adds a RootWrapper in the parent hierarhcy and then mSurfaceControl
starts pointing to the RootWrapper instead of the original
DisplayContent surface which now becomes mWindowingLayer.
- Later when DisplayAreaOrganizers are reset because of a client crash,
all the leashes of the DisplayAreas move under RootWrapper causing
inconsistency in z-order.
- To avoid this, getParentingSurfaceControl() method should be used at
all the places that are reparenting the directly children of
DisplayContent.
- This method can be used at other places as a future work. For now only
use it for 2 obvious scenarios.
Fix: 326975721
Test: atest DisplayContentTests
Change-Id: I21d580b4fead8e9b0b19a36e3282c923880a9dc9
2 files changed