Fix bug where Folder gets stuck with an invalid OutlineProvider when cancelled.
Bug: 70300667 Change-Id: I05d82c402584175d5fff336a8b7d9811dcf15633
This commit is contained in:
@@ -34,7 +34,6 @@ public abstract class RevealOutlineAnimation extends ViewOutlineProvider {
|
||||
final float elevation = revealView.getElevation();
|
||||
|
||||
va.addListener(new AnimatorListenerAdapter() {
|
||||
private boolean mWasCanceled = false;
|
||||
private boolean mIsClippedToOutline;
|
||||
private ViewOutlineProvider mOldOutlineProvider;
|
||||
|
||||
@@ -49,18 +48,11 @@ public abstract class RevealOutlineAnimation extends ViewOutlineProvider {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationCancel(Animator animation) {
|
||||
mWasCanceled = true;
|
||||
}
|
||||
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (!mWasCanceled) {
|
||||
revealView.setOutlineProvider(mOldOutlineProvider);
|
||||
revealView.setClipToOutline(mIsClippedToOutline);
|
||||
if (shouldRemoveElevationDuringAnimation()) {
|
||||
revealView.setTranslationZ(0);
|
||||
}
|
||||
revealView.setOutlineProvider(mOldOutlineProvider);
|
||||
revealView.setClipToOutline(mIsClippedToOutline);
|
||||
if (shouldRemoveElevationDuringAnimation()) {
|
||||
revealView.setTranslationZ(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user