Remove redundant instances of depth controller.

During each app launch, a new `MyDepthController` is instantiated, which
registers two of its methods as listeners for cross window blur and
opaqueness. This controller's usefulness spans that specific animation
only, but the listeners are never unregistered. This creates conflicts
when an opaqueness signal happens, which cause the background to flicker
(see videos).

Bug: 283335820
Test: manual, see videos in the bug
Flag: not needed, bug fix
Change-Id: I3dcb0b8ff0aa77bf3183a926889d0131b17bcaa4
This commit is contained in:
Luca Zuccarini
2023-05-23 14:50:14 +00:00
parent 7b01dbd811
commit a96dcb0cc7
2 changed files with 25 additions and 2 deletions

View File

@@ -1065,6 +1065,9 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
new SurfaceControl.Transaction().remove(dimLayer).apply()));
}
backgroundRadiusAnim.addListener(
AnimatorListeners.forEndCallback(depthController::dispose));
return backgroundRadiusAnim;
}