Fix launcher holds a surfaceController
When the dark night mode switch is triggered,systemui calls binder to the onNavigationBarSurface method in the launcher and applies the surfaceController. Keep switching,you will keep applying,resulting in more surface objects. The behaviour would cause that SurfaceFlinger couldn't remove the unnecessary navigationbar layers timely and the navigationbar layer would leak in SF. Actively release the SC after using the SC in the launcher. Bug: 317336417 Test: 1.Launch the settings app 2.Click Display menu 3.click the dark theme menu multiple times 4.Check whether the surfaceController is released adb shell "ls -l/proc/904/fd|wc -l" Change-Id: Ic449de9dbe0c52e0053be91e67ee9081a574581b
Loading
Please register or sign in to comment