diff options
4 files changed, 9 insertions, 60 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index d986aaebc0f8..5a227d0d9bdc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -1203,15 +1203,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView } /** - * Prepares expansion changed. - */ - public void prepareExpansionChanged() { - if (mIsSummaryWithChildren) { - mChildrenContainer.prepareExpansionChanged(); - } - } - - /** * Starts child animations. */ public void startChildAnimation(AnimationProperties properties) { @@ -1525,7 +1516,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView // Let's update our childrencontainer. This is intentionally not guarded with // mIsSummaryWithChildren since we might have had children but not anymore. if (mChildrenContainer != null) { - mChildrenContainer.reInflateViews(mExpandClickListener, mEntry.getSbn()); + mChildrenContainer.reInflateViews(mExpandClickListener); } if (mGuts != null) { NotificationGuts oldGuts = mGuts; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java index 7be8dbcd3c09..ea397b61fe84 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java @@ -77,7 +77,7 @@ public class NotificationChildrenContainer extends ViewGroup static final int NUMBER_OF_CHILDREN_WHEN_SYSTEM_EXPANDED = 5; public static final int NUMBER_OF_CHILDREN_WHEN_CHILDREN_EXPANDED = 8; private static final AnimationProperties ALPHA_FADE_IN = new AnimationProperties() { - private AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha(); + private final AnimationFilter mAnimationFilter = new AnimationFilter().animateAlpha(); @Override public AnimationFilter getAnimationFilter() { @@ -140,7 +140,7 @@ public class NotificationChildrenContainer extends ViewGroup private float mHeaderVisibleAmount = 1.0f; private int mUntruncatedChildCount; private boolean mContainingNotificationIsFaded = false; - private RoundableState mRoundableState; + private final RoundableState mRoundableState; private int mMinSingleLineHeight; private NotificationChildrenContainerLogger mLogger; @@ -448,7 +448,7 @@ public class NotificationChildrenContainer extends ViewGroup } mGroupHeaderWrapper.setExpanded(mChildrenExpanded); mGroupHeaderWrapper.onContentUpdated(mContainingNotification); - recreateLowPriorityHeader(builder, isConversation); + recreateLowPriorityHeader(builder); updateHeaderVisibility(false /* animate */); updateChildrenAppearance(); Trace.endSection(); @@ -561,7 +561,7 @@ public class NotificationChildrenContainer extends ViewGroup * @param builder a builder to reuse. Otherwise the builder will be recovered. */ @VisibleForTesting - void recreateLowPriorityHeader(Notification.Builder builder, boolean isConversation) { + void recreateLowPriorityHeader(Notification.Builder builder) { AsyncGroupHeaderViewInflation.assertInLegacyMode(); RemoteViews header; StatusBarNotification notification = mContainingNotification.getEntry().getSbn(); @@ -909,34 +909,6 @@ public class NotificationChildrenContainer extends ViewGroup return viewState; } - /** - * When moving into the bottom stack, the bottom visible child in an expanded group adjusts its - * height, children in the group after this are gone. - * - * @param child the child who's height to adjust. - * @param parentHeight the height of the parent. - * @param childState the state to update. - * @param yPosition the yPosition of the view. - * @return true if children after this one should be hidden. - */ - private boolean updateChildStateForExpandedGroup( - ExpandableNotificationRow child, - int parentHeight, - ExpandableViewState childState, - int yPosition) { - final int top = yPosition + child.getClipTopAmount(); - final int intrinsicHeight = child.getIntrinsicHeight(); - final int bottom = top + intrinsicHeight; - int newHeight = intrinsicHeight; - if (bottom >= parentHeight) { - // Child is either clipped or gone - newHeight = Math.max((parentHeight - top), 0); - } - childState.hidden = newHeight == 0; - childState.height = newHeight; - return childState.height != intrinsicHeight && !childState.hidden; - } - @VisibleForTesting int getMaxAllowedVisibleChildren() { return getMaxAllowedVisibleChildren(false /* likeCollapsed */); @@ -1040,7 +1012,7 @@ public class NotificationChildrenContainer extends ViewGroup } @Override - protected boolean drawChild(Canvas canvas, View child, long drawingTime) { + protected boolean drawChild(@NonNull Canvas canvas, View child, long drawingTime) { boolean isCanvasChanged = false; Path clipPath = mChildClipPath; @@ -1092,16 +1064,6 @@ public class NotificationChildrenContainer extends ViewGroup } } - - /** - * This is called when the children expansion has changed and positions the children properly - * for an appear animation. - */ - public void prepareExpansionChanged() { - // TODO: do something that makes sense, like placing the invisible views correctly - return; - } - /** * Animate to a given state. */ @@ -1508,7 +1470,7 @@ public class NotificationChildrenContainer extends ViewGroup return mIsMinimized && !mContainingNotification.isExpanded(); } - public void reInflateViews(OnClickListener listener, StatusBarNotification notification) { + public void reInflateViews(OnClickListener listener) { if (!AsyncGroupHeaderViewInflation.isEnabled()) { // When Async header inflation is enabled, we do not reinflate headers because they are // inflated from the background thread @@ -1597,7 +1559,7 @@ public class NotificationChildrenContainer extends ViewGroup mIsMinimized = isMinimized; if (mContainingNotification != null) { /* we're not yet set up yet otherwise */ if (!AsyncGroupHeaderViewInflation.isEnabled()) { - recreateLowPriorityHeader(null /* existingBuilder */, mIsConversation); + recreateLowPriorityHeader(null /* existingBuilder */); } updateHeaderVisibility(false /* animate */); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java index 4686bef9ca5a..c783250f2e0a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackStateAnimator.java @@ -468,10 +468,6 @@ public class StackStateAnimator { if (isFullySwipedOut) { changingView.removeFromTransientContainer(); } - } else if (event.animationType == NotificationStackScrollLayout - .AnimationEvent.ANIMATION_TYPE_GROUP_EXPANSION_CHANGED) { - ExpandableNotificationRow row = (ExpandableNotificationRow) event.mChangingView; - row.prepareExpansionChanged(); } else if (event.animationType == ANIMATION_TYPE_HEADS_UP_CYCLING_IN) { mHeadsUpAppearChildren.add(changingView); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java index 493468e8f675..77b116e2e465 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java @@ -370,7 +370,7 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { row.onDensityOrFontScaleChanged(); - verify(mockContainer).reInflateViews(any(), any()); + verify(mockContainer).reInflateViews(any()); } @Test |