diff options
author | Huihong Luo <huisinro@google.com> | 2021-07-23 12:35:59 -0700 |
---|---|---|
committer | Huihong Luo <huisinro@google.com> | 2021-08-12 20:48:22 +0000 |
commit | 9107a62bb42d25994cda871d3206969805a32a25 (patch) | |
tree | dc6c55449c6ba1075a3391c12d8d1c2d097825a9 /libs/hwui/WebViewFunctorManager.cpp | |
parent | 66d5c605819e9897f8ac184e97e7955c282d623c (diff) |
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
(cherry picked from commit 9c5158f7a2f3bff0ccfc8e071143aac7b5c95049)
Diffstat (limited to 'libs/hwui/WebViewFunctorManager.cpp')
-rw-r--r-- | libs/hwui/WebViewFunctorManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/hwui/WebViewFunctorManager.cpp b/libs/hwui/WebViewFunctorManager.cpp index df4101109a18..5aad821ad59f 100644 --- a/libs/hwui/WebViewFunctorManager.cpp +++ b/libs/hwui/WebViewFunctorManager.cpp @@ -100,6 +100,9 @@ WebViewFunctor::~WebViewFunctor() { destroyContext(); ATRACE_NAME("WebViewFunctor::onDestroy"); + if (mSurfaceControl) { + removeOverlays(); + } mCallbacks.onDestroyed(mFunctor, mData); } |