Skip to content
Commit cb50daa7 authored by Naomi Musgrave's avatar Naomi Musgrave
Browse files

[MediaProjection] Store WindowContext in field

When WindowContext is a local variable for starting layer mirroring,
the variable is eventually garbage collected. When this occurs
when MediaProjection is still running, then DisplayContent
fails to transform the captured content from
onConfigurationChanged.

The destroyed WindowContext triggers unregistering the
WindowContainerListener. Even though the WindowToken is
still being used by DisplayContent, DisplayContent is no
longer able to retrieve the WindowContainer associated
with the WindowToken. The WindowToken set when layer
mirroring begins is used to indicate the layer of
the hierarchy to mirror.

Bug: 197579637
Test: Manual
Change-Id: Ib8a971d1a85ebfe9db59d9267cc387f4f4d15991
parent 9541f4a4
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