Skip to content

Commit 78cb7cf

Browse files
cwrenAndroid (Google) Code Review
authored andcommitted
Allow animations to run past cancelled draws, if the view is visible.
Bug: 6475482 Change-Id: Iecb3a04744282135efa0049f1b70a46dc4a6bb23
1 parent 8b4d73b commit 78cb7cf

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

core/java/android/view/ViewRootImpl.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1855,18 +1855,15 @@ private void performTraversals() {
18551855
performDraw();
18561856
}
18571857
} else {
1858-
// End any pending transitions on this non-visible window
1859-
if (mPendingTransitions != null && mPendingTransitions.size() > 0) {
1858+
if (viewVisibility == View.VISIBLE) {
1859+
// Try again
1860+
scheduleTraversals();
1861+
} else if (mPendingTransitions != null && mPendingTransitions.size() > 0) {
18601862
for (int i = 0; i < mPendingTransitions.size(); ++i) {
18611863
mPendingTransitions.get(i).endChangingAnimations();
18621864
}
18631865
mPendingTransitions.clear();
18641866
}
1865-
1866-
if (viewVisibility == View.VISIBLE) {
1867-
// Try again
1868-
scheduleTraversals();
1869-
}
18701867
}
18711868
}
18721869

0 commit comments

Comments
 (0)