Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f613685 authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge "Fix footer-notif overlap after inline reply" into main

parents 8fd912f6 39968ded
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.systemui.statusbar.notification.ColorUpdateLogger;
import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor;
import com.android.systemui.statusbar.notification.row.FooterViewButton;
import com.android.systemui.statusbar.notification.row.StackScrollerDecorView;
import com.android.systemui.statusbar.notification.stack.AnimationProperties;
import com.android.systemui.statusbar.notification.stack.ExpandableViewState;
import com.android.systemui.statusbar.notification.stack.ViewState;
import com.android.systemui.util.DrawableDumpKt;
@@ -457,6 +458,12 @@ public class FooterView extends StackScrollerDecorView {
         */
        public boolean hideContent;

        /**
         * When true, skip animating Y on the next #animateTo.
         * Once true, remains true until reset in #animateTo.
         */
        public boolean resetY = false;

        @Override
        public void copyFrom(ViewState viewState) {
            super.copyFrom(viewState);
@@ -473,5 +480,17 @@ public class FooterView extends StackScrollerDecorView {
                footerView.setContentVisibleAnimated(!hideContent);
            }
        }

        @Override
        public void animateTo(View child, AnimationProperties properties) {
            if (child instanceof FooterView) {
                // Must set animateY=false before super.animateTo, which checks for animateY
                if (resetY) {
                    properties.getAnimationFilter().animateY = false;
                    resetY = false;
                }
            }
            super.animateTo(child, properties);
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ public class AnimationFilter {
    public static final int NO_DELAY = -1;
    boolean animateAlpha;
    boolean animateX;
    boolean animateY;
    public boolean animateY;
    ArraySet<View> animateYViews = new ArraySet<>();
    boolean animateZ;
    boolean animateHeight;
+7 −0
Original line number Diff line number Diff line
@@ -1868,6 +1868,13 @@ public class NotificationStackScrollLayout
    private void updateImeInset(WindowInsets windowInsets) {
        mImeInset = windowInsets.getInsets(WindowInsets.Type.ime()).bottom;

        if (mFooterView != null && mFooterView.getViewState() != null) {
            // Do not animate footer Y when showing IME so that after IME hides, the footer
            // appears at the correct Y. Once resetY is true, it remains true (even when IME
            // hides, where mImeInset=0) until reset in FooterViewState#animateTo.
            ((FooterView.FooterViewState) mFooterView.getViewState()).resetY |= mImeInset > 0;
        }

        if (mForcedScroll != null) {
            updateForcedScroll();
        }