Set windowInfo.displayId to be the layerStack
Instead of using the displayId sent from WMS, it's better to use the
layerStack since it more accurately represents where the layer is
presented. Previously, the only case where WMS needed to set a displayId
different from layerStack was when using portal displays, which is no
longer supported.
This also fixes the case with cloned layers. If a cloned layer was
placed on a different display than the main layer, the WindowInfo for
the clone would end up having the same display as the main window since
the properties were directly copied over. With this fix, the cloned
layer's WindowInfo will get the correct layerStack that represents where
it's actually rendered.
Test: MediaProjection capture with mirror
Bug: 195280234
Change-Id: Id1794798a543260c9868ccdc1be3cdb574b73dd5
1 file changed