diff options
| author | Adrian Roos <roosa@google.com> | 2020-03-19 20:15:57 +0100 |
|---|---|---|
| committer | Adrian Roos <roosa@google.com> | 2020-03-31 17:48:52 +0200 |
| commit | 53989971bfddd3ec2db4160858d58c4f679f0749 (patch) | |
| tree | dd760aded7c9e09a42fd5bb1f6db728b4ec148a5 /core/java/android/view/WindowInsetsAnimation.java | |
| parent | 71271db6bf8842f474278f905ad4cbd032fc849d (diff) | |
WindowInsetsAnimationController: Fix minor API issues
- make sure we only dispatch the controller in onCancelled after the app has seen onReady
- return a linearly interpolated getFraction() if there is no interpolator instead of -1
Bug: 118118435
Test: atest WindowInsetsAnimationControllerTests
Change-Id: Iccd0b6246b4cdc250f3111409821c1dac53c694e
Diffstat (limited to 'core/java/android/view/WindowInsetsAnimation.java')
| -rw-r--r-- | core/java/android/view/WindowInsetsAnimation.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/view/WindowInsetsAnimation.java b/core/java/android/view/WindowInsetsAnimation.java index e32648809f8f..cf5e7e3d3e26 100644 --- a/core/java/android/view/WindowInsetsAnimation.java +++ b/core/java/android/view/WindowInsetsAnimation.java @@ -110,14 +110,13 @@ public final class WindowInsetsAnimation { * and 1. * </p> * @see #getFraction() for raw fraction. - * @return The current interpolated progress of this animation. -1 if interpolator isn't - * specified. + * @return The current interpolated progress of this animation. */ public float getInterpolatedFraction() { if (mInterpolator != null) { return mInterpolator.getInterpolation(mFraction); } - return -1; + return mFraction; } /** |
