commit | 779955390ca635db90185af573897c5235678f6b | [log] [tgz] |
---|---|---|
author | Tony Wickham <twickham@google.com> | Wed Jun 10 15:36:52 2020 -0500 |
committer | Tony Wickham <twickham@google.com> | Wed Jun 10 15:36:52 2020 -0500 |
tree | 44b5ea2df3cff4463c9e1552546a53ed698b85e5 | |
parent | db087d3c98a37f57ae761cb8527a776958ddb01d [diff] |
Add null check before updating animation progress Haven't been able to reproduce it locally, but seems theoretically possible if we get an onDrag() event right after something else cancels the animation (which clears the animation controller). Bug: 157900227 Change-Id: Ia134aa948e62d39f71e41dd4e6b98f3227ae0522
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java index 2c21609..171c5ee 100644 --- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java +++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -310,6 +310,9 @@ } protected void updateProgress(float fraction) { + if (mCurrentAnimation == null) { + return; + } mCurrentAnimation.setPlayFraction(fraction); if (mAtomicComponentsController != null) { // Make sure we don't divide by 0, and have at least a small runway.