Fixed a bug where the brighness mirror would make everything invisible

Because of some new animation optimization, this could lead to issues
where we weren't cancelling the animation in one side case.

Fixes: 156569031
Test: tap on brightness mirror, observe
Change-Id: I18164b16a612431f8b3ec87a5b5834c0f48dd761
This commit is contained in:
Selim Cinek
2020-05-18 11:27:32 -07:00
parent 8ae0cfe36b
commit 7d9d378b28

View File

@@ -92,6 +92,9 @@ public class PropertyAnimator {
AnimatorListenerAdapter listener = properties.getAnimationFinishListener(property);
if (currentValue.equals(newEndValue)) {
// Skip the animation!
if (previousAnimator != null) {
previousAnimator.cancel();
}
if (listener != null) {
listener.onAnimationEnd(null);
}