Merge "Fix issues with early-finish" into tm-qpr-dev
This commit is contained in:
@@ -866,13 +866,19 @@ public class DefaultTransitionHandler implements Transitions.TransitionHandler {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
va.addListener(new AnimatorListenerAdapter() {
|
va.addListener(new AnimatorListenerAdapter() {
|
||||||
|
private boolean mFinished = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
|
if (mFinished) return;
|
||||||
|
mFinished = true;
|
||||||
finisher.run();
|
finisher.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationCancel(Animator animation) {
|
public void onAnimationCancel(Animator animation) {
|
||||||
|
if (mFinished) return;
|
||||||
|
mFinished = true;
|
||||||
finisher.run();
|
finisher.run();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -220,9 +220,9 @@ public class RemoteAnimationAdapterCompat {
|
|||||||
for (int i = info.getChanges().size() - 1; i >= 0; --i) {
|
for (int i = info.getChanges().size() - 1; i >= 0; --i) {
|
||||||
info.getChanges().get(i).getLeash().release();
|
info.getChanges().get(i).getLeash().release();
|
||||||
}
|
}
|
||||||
for (int i = leashMap.size() - 1; i >= 0; --i) {
|
// Don't release here since launcher might still be using them. Instead
|
||||||
leashMap.valueAt(i).release();
|
// let launcher release them (eg. via RemoteAnimationTargets)
|
||||||
}
|
leashMap.clear();
|
||||||
try {
|
try {
|
||||||
finishCallback.onTransitionFinished(null /* wct */, finishTransaction);
|
finishCallback.onTransitionFinished(null /* wct */, finishTransaction);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user