fix(magnification): cleanup cached instance for removed display
When new displays added, for some types of display the sysui magnification
would create corresponding MagnificationSettingsController or
MagnificationModeSwitch for them. Once the instances are created,
they'll live in the sysui lifecycle, even after the specific displays
removed.
Therefore, we add callback in MagnificationImpl, then when a display removed,
it can get notified and do the cleanup for related cached instances.
Bug: 437868750
Flag: com.android.systemui.cleanup_instances_when_display_removed
Test: manually try with system heap dump
atest com.android.systemui.accessibility
Change-Id: Ifa69c3693f8f9b07dd1ae734d04514a3e0060265
Loading
Please register or sign in to comment