Merge "Fix customized activity open/close animation backdrop color" into tm-qpr-dev

This commit is contained in:
Chris Li
2022-12-08 05:34:00 +00:00
committed by Android (Google) Code Review

View File

@@ -3011,13 +3011,16 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
// When there are more than one changing containers, it may leave part of the // When there are more than one changing containers, it may leave part of the
// screen empty. Show background color to cover that. // screen empty. Show background color to cover that.
showBackdrop = getDisplayContent().mChangingContainers.size() > 1; showBackdrop = getDisplayContent().mChangingContainers.size() > 1;
backdropColor = appTransition.getNextAppTransitionBackgroundColor();
} else { } else {
// Check whether the app has requested to show backdrop for open/close // Check whether the app has requested to show backdrop for open/close
// transition. // transition.
final Animation a = appTransition.getNextAppRequestedAnimation(enter); final Animation a = appTransition.getNextAppRequestedAnimation(enter);
showBackdrop = a != null && a.getShowBackdrop(); if (a != null) {
showBackdrop = a.getShowBackdrop();
backdropColor = a.getBackdropColor();
}
} }
backdropColor = appTransition.getNextAppTransitionBackgroundColor();
} }
final Rect localBounds = new Rect(mTmpRect); final Rect localBounds = new Rect(mTmpRect);
localBounds.offsetTo(mTmpPoint.x, mTmpPoint.y); localBounds.offsetTo(mTmpPoint.x, mTmpPoint.y);