Remove Webview Overlays on destroy

When WebViewFunctor is destroyed, overlays needs to be removed.
Bug: 194393522
Test: toggle fullscreen during video playing, and run "adb shell dumpsys
SurfaceFlinger | grep Webview", it should only show onlyi one surface
control

Change-Id: I40d0e503c4f5b25c59886820485e7734716ac859
This commit is contained in:
Huihong Luo
2021-07-23 12:35:59 -07:00
parent 77e32b8915
commit 9c5158f7a2

View File

@@ -100,6 +100,9 @@ WebViewFunctor::~WebViewFunctor() {
destroyContext();
ATRACE_NAME("WebViewFunctor::onDestroy");
if (mSurfaceControl) {
removeOverlays();
}
mCallbacks.onDestroyed(mFunctor, mData);
}