Implementing the new material ripple
Fixes: 167177623
Test: RippleDrawableTest
Change-Id: Ic3962760bc9a53c82f66b267bd5aa5006c09fa00
diff --git a/libs/hwui/Animator.cpp b/libs/hwui/Animator.cpp
index 74cf1fd..20a8a8c 100644
--- a/libs/hwui/Animator.cpp
+++ b/libs/hwui/Animator.cpp
@@ -160,10 +160,6 @@
}
}
- if (!mHasStartValue) {
- doSetStartValue(getValue(mTarget));
- }
-
if (!mStagingRequests.empty()) {
// No interpolator was set, use the default
if (mPlayState == PlayState::NotStarted && !mInterpolator) {
@@ -270,9 +266,11 @@
// to call setValue even if the animation isn't yet running or is still
// being delayed as we need to override the staging value
if (playTime < 0) {
- setValue(mTarget, mFromValue);
return false;
}
+ if (!this->mHasStartValue) {
+ doSetStartValue(getValue(mTarget));
+ }
float fraction = 1.0f;
if ((mPlayState == PlayState::Running || mPlayState == PlayState::Reversing) && mDuration > 0) {