Loading packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +1 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } public void reset() { super.reset(); setTintColor(0); setShowingLegacyBackground(false); setBelowSpeedBump(false); Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private boolean mClearable; private ExpansionLogger mLogger; private String mLoggingKey; private boolean mWasReset; public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); Loading Loading @@ -88,6 +89,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mPublicLayout.reset(); mPrivateLayout.reset(); mMaxExpandHeight = 0; mWasReset = true; logExpansionEvent(false, wasExpanded); } Loading Loading @@ -246,11 +248,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); boolean updateExpandHeight = mMaxExpandHeight == 0; boolean updateExpandHeight = mMaxExpandHeight == 0 && !mWasReset; mMaxExpandHeight = mPrivateLayout.getMaxHeight(); if (updateExpandHeight) { applyExpansionToLayout(); } mWasReset = false; } public void setSensitive(boolean sensitive) { Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +11 −0 Original line number Diff line number Diff line Loading @@ -255,6 +255,10 @@ public abstract class ExpandableView extends FrameLayout { public void setBelowSpeedBump(boolean below) { } public void reset() { mOnHeightChangedListener.onReset(this); } /** * A listener notifying when {@link #getActualHeight} changes. */ Loading @@ -265,5 +269,12 @@ public abstract class ExpandableView extends FrameLayout { * padding or the padding between the elements changed */ void onHeightChanged(ExpandableView view); /** * Called when the view is reset and therefore the height will change abruptly * * @param view The view which was reset. */ void onReset(ExpandableView view); } } packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +4 −0 Original line number Diff line number Diff line Loading @@ -1468,6 +1468,10 @@ public class NotificationPanelView extends PanelView implements requestPanelHeightUpdate(); } @Override public void onReset(ExpandableView view) { } @Override public void onScrollChanged() { if (mQsExpanded) { Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +37 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,8 @@ public class NotificationStackScrollLayout extends ViewGroup private int mNotificationTopPadding; private float mTopPaddingOverflow; private boolean mDontReportNextOverScroll; private boolean mRequestViewResizeAnimationOnLayout; private boolean mNeedViewResizeAnimation; /** * The maximum scrollPosition which we are allowed to reach when a notification was expanded. Loading Loading @@ -319,9 +321,18 @@ public class NotificationStackScrollLayout extends ViewGroup setMaxLayoutHeight(getHeight()); updateContentHeight(); clampScrollPosition(); requestAnimationOnViewResize(); requestChildrenUpdate(); } private void requestAnimationOnViewResize() { if (mRequestViewResizeAnimationOnLayout && mIsExpanded && mAnimationsEnabled) { mNeedViewResizeAnimation = true; mNeedsAnimation = true; } mRequestViewResizeAnimationOnLayout = false; } public void updateSpeedBumpIndex(int newIndex) { int currentIndex = indexOfChild(mSpeedBumpView); Loading Loading @@ -1598,9 +1609,18 @@ public class NotificationStackScrollLayout extends ViewGroup generateHideSensitiveEvent(); generateDarkEvent(); generateGoToFullShadeEvent(); generateViewResizeEvent(); mNeedsAnimation = false; } private void generateViewResizeEvent() { if (mNeedViewResizeAnimation) { mAnimationEvents.add( new AnimationEvent(null, AnimationEvent.ANIMATION_TYPE_VIEW_RESIZE)); } mNeedViewResizeAnimation = false; } private void generateSnapBackEvents() { for (View child : mSnappedBackChildren) { mAnimationEvents.add(new AnimationEvent(child, Loading Loading @@ -1892,6 +1912,11 @@ public class NotificationStackScrollLayout extends ViewGroup requestChildrenUpdate(); } @Override public void onReset(ExpandableView view) { mRequestViewResizeAnimationOnLayout = true; } private void updateScrollPositionOnExpandInBottom(ExpandableView view) { if (view instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) view; Loading Loading @@ -2258,6 +2283,14 @@ public class NotificationStackScrollLayout extends ViewGroup // ANIMATION_TYPE_HIDE_SENSITIVE new AnimationFilter() .animateHideSensitive(), // ANIMATION_TYPE_VIEW_RESIZE new AnimationFilter() .animateAlpha() .animateHeight() .animateTopInset() .animateY() .animateZ(), }; static int[] LENGTHS = new int[] { Loading Loading @@ -2297,6 +2330,9 @@ public class NotificationStackScrollLayout extends ViewGroup // ANIMATION_TYPE_HIDE_SENSITIVE StackStateAnimator.ANIMATION_DURATION_STANDARD, // ANIMATION_TYPE_VIEW_RESIZE StackStateAnimator.ANIMATION_DURATION_STANDARD, }; static final int ANIMATION_TYPE_ADD = 0; Loading @@ -2311,6 +2347,7 @@ public class NotificationStackScrollLayout extends ViewGroup static final int ANIMATION_TYPE_DARK = 9; static final int ANIMATION_TYPE_GO_TO_FULL_SHADE = 10; static final int ANIMATION_TYPE_HIDE_SENSITIVE = 11; static final int ANIMATION_TYPE_VIEW_RESIZE = 12; final long eventStartTime; final View changingView; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +1 −0 Original line number Diff line number Diff line Loading @@ -660,6 +660,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView } public void reset() { super.reset(); setTintColor(0); setShowingLegacyBackground(false); setBelowSpeedBump(false); Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +4 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private boolean mClearable; private ExpansionLogger mLogger; private String mLoggingKey; private boolean mWasReset; public interface ExpansionLogger { public void logNotificationExpansion(String key, boolean userAction, boolean expanded); Loading Loading @@ -88,6 +89,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mPublicLayout.reset(); mPrivateLayout.reset(); mMaxExpandHeight = 0; mWasReset = true; logExpansionEvent(false, wasExpanded); } Loading Loading @@ -246,11 +248,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); boolean updateExpandHeight = mMaxExpandHeight == 0; boolean updateExpandHeight = mMaxExpandHeight == 0 && !mWasReset; mMaxExpandHeight = mPrivateLayout.getMaxHeight(); if (updateExpandHeight) { applyExpansionToLayout(); } mWasReset = false; } public void setSensitive(boolean sensitive) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +11 −0 Original line number Diff line number Diff line Loading @@ -255,6 +255,10 @@ public abstract class ExpandableView extends FrameLayout { public void setBelowSpeedBump(boolean below) { } public void reset() { mOnHeightChangedListener.onReset(this); } /** * A listener notifying when {@link #getActualHeight} changes. */ Loading @@ -265,5 +269,12 @@ public abstract class ExpandableView extends FrameLayout { * padding or the padding between the elements changed */ void onHeightChanged(ExpandableView view); /** * Called when the view is reset and therefore the height will change abruptly * * @param view The view which was reset. */ void onReset(ExpandableView view); } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +4 −0 Original line number Diff line number Diff line Loading @@ -1468,6 +1468,10 @@ public class NotificationPanelView extends PanelView implements requestPanelHeightUpdate(); } @Override public void onReset(ExpandableView view) { } @Override public void onScrollChanged() { if (mQsExpanded) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +37 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,8 @@ public class NotificationStackScrollLayout extends ViewGroup private int mNotificationTopPadding; private float mTopPaddingOverflow; private boolean mDontReportNextOverScroll; private boolean mRequestViewResizeAnimationOnLayout; private boolean mNeedViewResizeAnimation; /** * The maximum scrollPosition which we are allowed to reach when a notification was expanded. Loading Loading @@ -319,9 +321,18 @@ public class NotificationStackScrollLayout extends ViewGroup setMaxLayoutHeight(getHeight()); updateContentHeight(); clampScrollPosition(); requestAnimationOnViewResize(); requestChildrenUpdate(); } private void requestAnimationOnViewResize() { if (mRequestViewResizeAnimationOnLayout && mIsExpanded && mAnimationsEnabled) { mNeedViewResizeAnimation = true; mNeedsAnimation = true; } mRequestViewResizeAnimationOnLayout = false; } public void updateSpeedBumpIndex(int newIndex) { int currentIndex = indexOfChild(mSpeedBumpView); Loading Loading @@ -1598,9 +1609,18 @@ public class NotificationStackScrollLayout extends ViewGroup generateHideSensitiveEvent(); generateDarkEvent(); generateGoToFullShadeEvent(); generateViewResizeEvent(); mNeedsAnimation = false; } private void generateViewResizeEvent() { if (mNeedViewResizeAnimation) { mAnimationEvents.add( new AnimationEvent(null, AnimationEvent.ANIMATION_TYPE_VIEW_RESIZE)); } mNeedViewResizeAnimation = false; } private void generateSnapBackEvents() { for (View child : mSnappedBackChildren) { mAnimationEvents.add(new AnimationEvent(child, Loading Loading @@ -1892,6 +1912,11 @@ public class NotificationStackScrollLayout extends ViewGroup requestChildrenUpdate(); } @Override public void onReset(ExpandableView view) { mRequestViewResizeAnimationOnLayout = true; } private void updateScrollPositionOnExpandInBottom(ExpandableView view) { if (view instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) view; Loading Loading @@ -2258,6 +2283,14 @@ public class NotificationStackScrollLayout extends ViewGroup // ANIMATION_TYPE_HIDE_SENSITIVE new AnimationFilter() .animateHideSensitive(), // ANIMATION_TYPE_VIEW_RESIZE new AnimationFilter() .animateAlpha() .animateHeight() .animateTopInset() .animateY() .animateZ(), }; static int[] LENGTHS = new int[] { Loading Loading @@ -2297,6 +2330,9 @@ public class NotificationStackScrollLayout extends ViewGroup // ANIMATION_TYPE_HIDE_SENSITIVE StackStateAnimator.ANIMATION_DURATION_STANDARD, // ANIMATION_TYPE_VIEW_RESIZE StackStateAnimator.ANIMATION_DURATION_STANDARD, }; static final int ANIMATION_TYPE_ADD = 0; Loading @@ -2311,6 +2347,7 @@ public class NotificationStackScrollLayout extends ViewGroup static final int ANIMATION_TYPE_DARK = 9; static final int ANIMATION_TYPE_GO_TO_FULL_SHADE = 10; static final int ANIMATION_TYPE_HIDE_SENSITIVE = 11; static final int ANIMATION_TYPE_VIEW_RESIZE = 12; final long eventStartTime; final View changingView; Loading