diff options
| author | 2023-03-03 13:39:52 -0600 | |
|---|---|---|
| committer | 2023-03-03 13:39:52 -0600 | |
| commit | 13670970e9e154c5aba3a0f1cff79b81344a14fd (patch) | |
| tree | bee68151bb51986a2f32c18c831087a388cf6f3b | |
| parent | bf78a8d15f0c9454db29c3b8e456400a1287c9e3 (diff) | |
Unregister WindowInfosListener in destructor
Bug: 263311858
Test: presubmits
Change-Id: I13c2e3a8ca5c1b0645616ba0b3222d4a4f13db3d
| -rw-r--r-- | core/jni/android_window_WindowInfosListener.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/jni/android_window_WindowInfosListener.cpp b/core/jni/android_window_WindowInfosListener.cpp index f2cbe8abae8b..32b85b01cdce 100644 --- a/core/jni/android_window_WindowInfosListener.cpp +++ b/core/jni/android_window_WindowInfosListener.cpp @@ -118,6 +118,7 @@ struct WindowInfosListener : public gui::WindowInfosListener { } ~WindowInfosListener() override { + SurfaceComposerClient::getDefault()->removeWindowInfosListener(this); JNIEnv* env = AndroidRuntime::getJNIEnv(); env->DeleteWeakGlobalRef(mListener); } |