diff options
| author | 2016-01-12 17:51:35 -0800 | |
|---|---|---|
| committer | 2016-01-21 19:42:49 -0800 | |
| commit | 9969559da02f54fcbd7832de9810507a581d98d8 (patch) | |
| tree | f72c48a9c714978c63a7b067bd51f9295efcc0d7 | |
| parent | 1b5f07d403158421b3b50b61e0300950ebdab334 (diff) | |
Removed staggering animation with notification groups
It was more distracting than helping
Change-Id: I5a1110268d23d9f964ad515b6fff16cf9d9a4992
6 files changed, 15 insertions, 26 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index eedf265e0b33..1c1ae26d18d4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -371,9 +371,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } public void startChildAnimation(StackScrollState finalState, - StackStateAnimator stateAnimator, boolean withDelays, long delay, long duration) { + StackStateAnimator stateAnimator, long delay, long duration) { if (mIsSummaryWithChildren) { - mChildrenContainer.startAnimationToState(finalState, stateAnimator, withDelays, delay, + mChildrenContainer.startAnimationToState(finalState, stateAnimator, delay, duration); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java index d430bbe0eb35..a959e071619a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationTemplateViewWrapper.java @@ -28,6 +28,7 @@ import android.widget.TextView; import com.android.systemui.statusbar.CrossFadeHelper; import com.android.systemui.statusbar.TransformableView; import com.android.systemui.statusbar.ViewTransformationHelper; +import com.android.systemui.statusbar.stack.StackStateAnimator; /** * Wraps a notification view inflated from a template. @@ -61,7 +62,8 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp .translationY((otherStablePosition[1] + otherState.getTransformedView().getHeight() - ownPosition[1]) * 0.33f) - .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH) + .setDuration( + StackStateAnimator.ANIMATION_DURATION_STANDARD) .setInterpolator(TransformState.FAST_OUT_SLOW_IN) .withEndAction(new Runnable() { @Override @@ -99,7 +101,8 @@ public class NotificationTemplateViewWrapper extends NotificationHeaderViewWrapp } mText.animate() .translationY(0) - .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH) + .setDuration( + StackStateAnimator.ANIMATION_DURATION_STANDARD) .setInterpolator(TransformState.FAST_OUT_SLOW_IN) .withEndAction(new Runnable() { @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java index 52d900150cd3..039a907e522a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java @@ -31,6 +31,7 @@ import android.widget.TextView; import com.android.systemui.R; import com.android.systemui.statusbar.CrossFadeHelper; import com.android.systemui.statusbar.ExpandableNotificationRow; +import com.android.systemui.statusbar.stack.StackStateAnimator; /** * A transform state of a view. @@ -92,7 +93,7 @@ public class TransformState { } transformedView.animate() .setInterpolator(TransformState.FAST_OUT_SLOW_IN) - .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH) + .setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD) .withEndAction(new Runnable() { @Override public void run() { @@ -146,7 +147,7 @@ public class TransformState { } transformedView.animate() .setInterpolator(TransformState.FAST_OUT_SLOW_IN) - .setDuration(CrossFadeHelper.ANIMATION_DURATION_LENGTH) + .setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD) .withEndAction(new Runnable() { @Override public void run() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java index baccd2c49b51..352940481e57 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationChildrenContainer.java @@ -403,31 +403,20 @@ public class NotificationChildrenContainer extends ViewGroup { } public void startAnimationToState(StackScrollState state, StackStateAnimator stateAnimator, - boolean withDelays, long baseDelay, long duration) { + long baseDelay, long duration) { int childCount = mChildren.size(); ViewState tmpState = new ViewState(); - int delayIndex = 0; - int maxAllowChildCount = getMaxAllowedVisibleChildren(true /* likeCollapsed */); for (int i = childCount - 1; i >= 0; i--) { ExpandableNotificationRow child = mChildren.get(i); StackViewState viewState = state.getViewStateForView(child); - int difference = Math.min(StackStateAnimator.DELAY_EFFECT_MAX_INDEX_DIFFERENCE_CHILDREN, - delayIndex); - long delay = withDelays - ? difference * StackStateAnimator.ANIMATION_DELAY_PER_ELEMENT_EXPAND_CHILDREN - : 0; - delay = (long) (delay * (mChildrenExpanded ? 1.0f : 0.5f) + baseDelay); - stateAnimator.startStackAnimations(child, viewState, state, -1, delay); + stateAnimator.startStackAnimations(child, viewState, state, -1, baseDelay); // layout the divider View divider = mDividers.get(i); tmpState.initFrom(divider); tmpState.yTranslation = viewState.yTranslation - mDividerHeight; tmpState.alpha = mChildrenExpanded && viewState.alpha != 0 ? 0.5f : 0; - stateAnimator.startViewAnimations(divider, tmpState, delay, duration); - if (i < maxAllowChildCount) { - delayIndex++; - } + stateAnimator.startViewAnimations(divider, tmpState, baseDelay, duration); } if (mGroupOverflowContainer != null) { stateAnimator.startViewAnimations(mGroupOverflowContainer, mGroupOverFlowState, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 5aa5900a9ae1..36b2810313a3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -3124,7 +3124,7 @@ public class NotificationStackScrollLayout extends ViewGroup StackStateAnimator.ANIMATION_DURATION_STANDARD, // ANIMATION_TYPE_GROUP_EXPANSION_CHANGED - StackStateAnimator.ANIMATION_DURATION_EXPAND_CLICKED, + StackStateAnimator.ANIMATION_DURATION_STANDARD, // ANIMATION_TYPE_HEADS_UP_APPEAR StackStateAnimator.ANIMATION_DURATION_HEADS_UP_APPEAR, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java index f9a64df546fe..9d5e072a0251 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java @@ -43,17 +43,14 @@ public class StackStateAnimator { public static final int ANIMATION_DURATION_STANDARD = 360; public static final int ANIMATION_DURATION_GO_TO_FULL_SHADE = 448; public static final int ANIMATION_DURATION_APPEAR_DISAPPEAR = 464; - public static final int ANIMATION_DURATION_EXPAND_CLICKED = 360; public static final int ANIMATION_DURATION_DIMMED_ACTIVATED = 220; public static final int ANIMATION_DURATION_HEADS_UP_APPEAR = 650; public static final int ANIMATION_DURATION_HEADS_UP_DISAPPEAR = 230; public static final int ANIMATION_DELAY_PER_ELEMENT_INTERRUPTING = 80; - public static final int ANIMATION_DELAY_PER_ELEMENT_EXPAND_CHILDREN = 54; public static final int ANIMATION_DELAY_PER_ELEMENT_MANUAL = 32; public static final int ANIMATION_DELAY_PER_ELEMENT_GO_TO_FULL_SHADE = 48; public static final int ANIMATION_DELAY_PER_ELEMENT_DARK = 24; public static final int DELAY_EFFECT_MAX_INDEX_DIFFERENCE = 2; - public static final int DELAY_EFFECT_MAX_INDEX_DIFFERENCE_CHILDREN = 3; public static final int ANIMATION_DELAY_HEADS_UP = 120; private static final int TAG_ANIMATOR_TRANSLATION_Y = R.id.translation_y_animator_tag; @@ -263,8 +260,7 @@ public class StackStateAnimator { delay + duration); } else if (child instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) child; - row.startChildAnimation(finalState, this, child == mChildExpandingView, delay, - duration); + row.startChildAnimation(finalState, this, delay, duration); } } |