Merge "Clean up existing a11y listeners when reparenting." into rvc-dev am: 4d3059c0ba

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11707943

Change-Id: I67573b400a58c87c8b7b8ad6c726a05d424bf9d8
This commit is contained in:
TreeHugger Robot
2020-06-03 00:14:02 +00:00
committed by Automerger Merge Worker

View File

@@ -4776,6 +4776,9 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
* @param sc The new SurfaceControl, where the DisplayContent's surfaces will be re-parented to.
*/
void reparentDisplayContent(WindowState win, SurfaceControl sc) {
if (mParentWindow != null) {
mParentWindow.removeEmbeddedDisplayContent(this);
}
mParentWindow = win;
mParentWindow.addEmbeddedDisplayContent(this);
mParentSurfaceControl = sc;