Merge "Fix issue with LayoutTransition on non-visible windows."
This commit is contained in:
@@ -1575,13 +1575,13 @@ public final class ViewRootImpl extends Handler implements ViewParent,
|
|||||||
boolean cancelDraw = attachInfo.mTreeObserver.dispatchOnPreDraw() ||
|
boolean cancelDraw = attachInfo.mTreeObserver.dispatchOnPreDraw() ||
|
||||||
viewVisibility != View.VISIBLE;
|
viewVisibility != View.VISIBLE;
|
||||||
|
|
||||||
if (!cancelDraw && !newSurface) {
|
if (mPendingTransitions != null && mPendingTransitions.size() > 0) {
|
||||||
if (mPendingTransitions != null && mPendingTransitions.size() > 0) {
|
for (int i = 0; i < mPendingTransitions.size(); ++i) {
|
||||||
for (int i = 0; i < mPendingTransitions.size(); ++i) {
|
mPendingTransitions.get(i).startChangingAnimations();
|
||||||
mPendingTransitions.get(i).startChangingAnimations();
|
|
||||||
}
|
|
||||||
mPendingTransitions.clear();
|
|
||||||
}
|
}
|
||||||
|
mPendingTransitions.clear();
|
||||||
|
}
|
||||||
|
if (!cancelDraw && !newSurface) {
|
||||||
mFullRedrawNeeded = false;
|
mFullRedrawNeeded = false;
|
||||||
|
|
||||||
final long drawStartTime;
|
final long drawStartTime;
|
||||||
@@ -1619,10 +1619,6 @@ public final class ViewRootImpl extends Handler implements ViewParent,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// If we're not drawing, then we don't need to draw the transitions, either
|
|
||||||
if (mPendingTransitions != null) {
|
|
||||||
mPendingTransitions.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
// We were supposed to report when we are done drawing. Since we canceled the
|
// We were supposed to report when we are done drawing. Since we canceled the
|
||||||
// draw, remember it here.
|
// draw, remember it here.
|
||||||
@@ -1632,7 +1628,7 @@ public final class ViewRootImpl extends Handler implements ViewParent,
|
|||||||
if (fullRedrawNeeded) {
|
if (fullRedrawNeeded) {
|
||||||
mFullRedrawNeeded = true;
|
mFullRedrawNeeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (viewVisibility == View.VISIBLE) {
|
if (viewVisibility == View.VISIBLE) {
|
||||||
// Try again
|
// Try again
|
||||||
scheduleTraversals();
|
scheduleTraversals();
|
||||||
|
|||||||
Reference in New Issue
Block a user