Merge "Fix split-shade expansion animation on non-lockscreen." into tm-qpr-dev

This commit is contained in:
Alex Florescu
2022-06-06 08:46:19 +00:00
committed by Android (Google) Code Review
2 changed files with 1 additions and 5 deletions

View File

@@ -1371,12 +1371,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
*/
@ShadeViewRefactor(RefactorComponent.COORDINATOR)
public void setExpandedHeight(float height) {
final float shadeBottom = getHeight() - getEmptyBottomMargin();
final boolean skipHeightUpdate = shouldSkipHeightUpdate();
if (!skipHeightUpdate) {
final float expansionFraction = MathUtils.saturate(height / shadeBottom);
mAmbientState.setExpansionFraction(expansionFraction);
}
updateStackPosition();
if (!skipHeightUpdate) {

View File

@@ -808,6 +808,7 @@ public abstract class PanelViewController {
mExpansionDragDownAmountPx = h;
mExpandedFraction = Math.min(1f,
maxPanelHeight == 0 ? 0 : mExpandedHeight / maxPanelHeight);
mAmbientState.setExpansionFraction(mExpandedFraction);
onHeightUpdated(mExpandedHeight);
updatePanelExpansionAndVisibility();
});