Merge "Prevent setting negative alpha for dim animations."
This commit is contained in:
committed by
Android (Google) Code Review
commit
44c165752b
@@ -169,7 +169,12 @@ class SurfaceAnimationRunner {
|
||||
anim.addUpdateListener(animation -> {
|
||||
synchronized (mCancelLock) {
|
||||
if (!a.mCancelled) {
|
||||
applyTransformation(a, mFrameTransaction, anim.getCurrentPlayTime());
|
||||
final long duration = anim.getDuration();
|
||||
long currentPlayTime = anim.getCurrentPlayTime();
|
||||
if (currentPlayTime > duration) {
|
||||
currentPlayTime = duration;
|
||||
}
|
||||
applyTransformation(a, mFrameTransaction, currentPlayTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user