Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java +19 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading @@ -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); } } } packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AnimationFilter.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +7 −0 Original line number Diff line number Diff line Loading @@ -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(); } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/footer/ui/view/FooterView.java +19 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading @@ -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); } } }
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/AnimationFilter.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +7 −0 Original line number Diff line number Diff line Loading @@ -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(); } Loading