Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +10 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ import com.android.systemui.statusbar.stack.StackScrollState; import java.util.ArrayList; import java.util.List; import java.util.function.BooleanSupplier; import java.util.function.Consumer; public class ExpandableNotificationRow extends ActivatableNotificationView implements PluginListener<NotificationMenuRowPlugin> { Loading Loading @@ -179,6 +180,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView private boolean mExpandAnimationRunning; private AboveShelfChangedListener mAboveShelfChangedListener; private HeadsUpManager mHeadsUpManager; private Consumer<Boolean> mHeadsUpAnimatingAwayListener; private View mHelperButton; private boolean mChildIsExpanding; Loading Loading @@ -1115,13 +1117,21 @@ public class ExpandableNotificationRow extends ActivatableNotificationView public void setHeadsUpAnimatingAway(boolean headsUpAnimatingAway) { boolean wasAboveShelf = isAboveShelf(); boolean changed = headsUpAnimatingAway != mHeadsupDisappearRunning; mHeadsupDisappearRunning = headsUpAnimatingAway; mPrivateLayout.setHeadsUpAnimatingAway(headsUpAnimatingAway); if (changed && mHeadsUpAnimatingAwayListener != null) { mHeadsUpAnimatingAwayListener.accept(headsUpAnimatingAway); } if (isAboveShelf() != wasAboveShelf) { mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf); } } public void setHeadsUpAnimatingAwayListener(Consumer<Boolean> listener) { mHeadsUpAnimatingAwayListener = listener; } /** * @return if the view was just heads upped and is now animating away. During such a time the * layout needs to be kept consistent Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -332,6 +332,7 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. row.setOnExpandClickListener(mPresenter); row.setInflationCallback(this); row.setLongPressListener(getNotificationLongClicker()); mListContainer.bindRow(row); mRemoteInputManager.bindRow(row); // Get the app name. Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationListContainer.java +7 −0 Original line number Diff line number Diff line Loading @@ -188,4 +188,11 @@ public interface NotificationListContainer { default void applyExpandAnimationParams(ExpandAnimationParameters params) {} default void setExpandingNotification(ExpandableNotificationRow row) {} /** * Bind a newly created row. * * @param row The notification to bind. */ default void bindRow(ExpandableNotificationRow row) {} } packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationRoundnessManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ class NotificationRoundnessManager implements OnHeadsUpChangedListener { updateRounding(headsUp, true /* animate */); } public void onHeadsupAnimatingAwayChanged(ExpandableNotificationRow row, boolean isAnimatingAway) { updateRounding(row, false /* animate */); } private void updateRounding(ActivatableNotificationView view, boolean animate) { float topRoundness = getRoundness(view, true /* top */); float bottomRoundness = getRoundness(view, false /* top */); Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +7 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ import java.util.Comparator; import java.util.HashSet; import java.util.List; import java.util.function.BiConsumer; import java.util.function.Consumer; /** * A layout which handles a dynamic amount of notifications and presents them in a scrollable stack. Loading Loading @@ -3021,6 +3022,12 @@ public class NotificationStackScrollLayout extends ViewGroup requestChildrenUpdate(); } @Override public void bindRow(ExpandableNotificationRow row) { row.setHeadsUpAnimatingAwayListener(animatingAway -> mRoundnessManager.onHeadsupAnimatingAwayChanged(row, animatingAway)); } @Override public void applyExpandAnimationParams(ExpandAnimationParameters params) { mAmbientState.setExpandAnimationTopChange(params == null ? 0 : params.getTopChange()); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +10 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ import com.android.systemui.statusbar.stack.StackScrollState; import java.util.ArrayList; import java.util.List; import java.util.function.BooleanSupplier; import java.util.function.Consumer; public class ExpandableNotificationRow extends ActivatableNotificationView implements PluginListener<NotificationMenuRowPlugin> { Loading Loading @@ -179,6 +180,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView private boolean mExpandAnimationRunning; private AboveShelfChangedListener mAboveShelfChangedListener; private HeadsUpManager mHeadsUpManager; private Consumer<Boolean> mHeadsUpAnimatingAwayListener; private View mHelperButton; private boolean mChildIsExpanding; Loading Loading @@ -1115,13 +1117,21 @@ public class ExpandableNotificationRow extends ActivatableNotificationView public void setHeadsUpAnimatingAway(boolean headsUpAnimatingAway) { boolean wasAboveShelf = isAboveShelf(); boolean changed = headsUpAnimatingAway != mHeadsupDisappearRunning; mHeadsupDisappearRunning = headsUpAnimatingAway; mPrivateLayout.setHeadsUpAnimatingAway(headsUpAnimatingAway); if (changed && mHeadsUpAnimatingAwayListener != null) { mHeadsUpAnimatingAwayListener.accept(headsUpAnimatingAway); } if (isAboveShelf() != wasAboveShelf) { mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf); } } public void setHeadsUpAnimatingAwayListener(Consumer<Boolean> listener) { mHeadsUpAnimatingAwayListener = listener; } /** * @return if the view was just heads upped and is now animating away. During such a time the * layout needs to be kept consistent Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationEntryManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -332,6 +332,7 @@ public class NotificationEntryManager implements Dumpable, NotificationInflater. row.setOnExpandClickListener(mPresenter); row.setInflationCallback(this); row.setLongPressListener(getNotificationLongClicker()); mListContainer.bindRow(row); mRemoteInputManager.bindRow(row); // Get the app name. Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationListContainer.java +7 −0 Original line number Diff line number Diff line Loading @@ -188,4 +188,11 @@ public interface NotificationListContainer { default void applyExpandAnimationParams(ExpandAnimationParameters params) {} default void setExpandingNotification(ExpandableNotificationRow row) {} /** * Bind a newly created row. * * @param row The notification to bind. */ default void bindRow(ExpandableNotificationRow row) {} }
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationRoundnessManager.java +5 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,11 @@ class NotificationRoundnessManager implements OnHeadsUpChangedListener { updateRounding(headsUp, true /* animate */); } public void onHeadsupAnimatingAwayChanged(ExpandableNotificationRow row, boolean isAnimatingAway) { updateRounding(row, false /* animate */); } private void updateRounding(ActivatableNotificationView view, boolean animate) { float topRoundness = getRoundness(view, true /* top */); float bottomRoundness = getRoundness(view, false /* top */); Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +7 −0 Original line number Diff line number Diff line Loading @@ -109,6 +109,7 @@ import java.util.Comparator; import java.util.HashSet; import java.util.List; import java.util.function.BiConsumer; import java.util.function.Consumer; /** * A layout which handles a dynamic amount of notifications and presents them in a scrollable stack. Loading Loading @@ -3021,6 +3022,12 @@ public class NotificationStackScrollLayout extends ViewGroup requestChildrenUpdate(); } @Override public void bindRow(ExpandableNotificationRow row) { row.setHeadsUpAnimatingAwayListener(animatingAway -> mRoundnessManager.onHeadsupAnimatingAwayChanged(row, animatingAway)); } @Override public void applyExpandAnimationParams(ExpandAnimationParameters params) { mAmbientState.setExpandAnimationTopChange(params == null ? 0 : params.getTopChange()); Loading