Removed the shadow alpha property from notifications
It wasn't used anymore. Additionally are we also removing the drag animation events that were originally created for the shadow alpha animations. Test: runtest systemui Change-Id: Ia5cbf7ecb2728fc1298c1b22f3f37bac6b531803 Fixes: 119791828
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
<item type="id" name="height_animator_tag"/>
|
||||
<item type="id" name="x_animator_tag"/>
|
||||
<item type="id" name="y_animator_tag"/>
|
||||
<item type="id" name="shadow_alpha_animator_tag"/>
|
||||
<item type="id" name="translation_x_animator_end_value_tag"/>
|
||||
<item type="id" name="translation_y_animator_end_value_tag"/>
|
||||
<item type="id" name="translation_z_animator_end_value_tag"/>
|
||||
@@ -35,7 +34,6 @@
|
||||
<item type="id" name="alpha_animator_end_value_tag"/>
|
||||
<item type="id" name="top_inset_animator_end_value_tag"/>
|
||||
<item type="id" name="height_animator_end_value_tag"/>
|
||||
<item type="id" name="shadow_alpha_animator_end_value_tag"/>
|
||||
<item type="id" name="x_animator_tag_end_value"/>
|
||||
<item type="id" name="y_animator_tag_end_value"/>
|
||||
<item type="id" name="translation_x_animator_start_value_tag"/>
|
||||
@@ -46,7 +44,6 @@
|
||||
<item type="id" name="alpha_animator_start_value_tag"/>
|
||||
<item type="id" name="top_inset_animator_start_value_tag"/>
|
||||
<item type="id" name="height_animator_start_value_tag"/>
|
||||
<item type="id" name="shadow_alpha_animator_start_value_tag"/>
|
||||
<item type="id" name="x_animator_tag_start_value"/>
|
||||
<item type="id" name="y_animator_tag_start_value"/>
|
||||
<item type="id" name="doze_saved_filter_tag"/>
|
||||
|
||||
@@ -481,7 +481,6 @@ public class BubbleStackView extends FrameLayout implements BubbleTouchHandler.F
|
||||
viewState.dimmed = false;
|
||||
viewState.dark = false;
|
||||
viewState.alpha = 1f;
|
||||
viewState.shadowAlpha = 1f;
|
||||
viewState.notGoneIndex = -1;
|
||||
viewState.xTranslation = 0;
|
||||
viewState.yTranslation = 0;
|
||||
|
||||
@@ -220,7 +220,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
||||
mShelfState.clipTopAmount = 0;
|
||||
mShelfState.alpha = mAmbientState.hasPulsingNotifications() ? 0 : 1;
|
||||
mShelfState.belowSpeedBump = mAmbientState.getSpeedBumpIndex() == 0;
|
||||
mShelfState.shadowAlpha = 1.0f;
|
||||
mShelfState.hideSensitive = false;
|
||||
mShelfState.xTranslation = getTranslationX();
|
||||
if (mNotGoneIndex != -1) {
|
||||
|
||||
@@ -166,7 +166,6 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
||||
updateOutlineAlpha();
|
||||
}
|
||||
};
|
||||
private float mShadowAlpha = 1.0f;
|
||||
private FakeShadowView mFakeShadow;
|
||||
private int mCurrentBackgroundTint;
|
||||
private int mTargetTint;
|
||||
@@ -479,7 +478,6 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
||||
}
|
||||
float alpha = NotificationStackScrollLayout.BACKGROUND_ALPHA_DIMMED;
|
||||
alpha = (alpha + (1.0f - alpha) * mNormalBackgroundVisibilityAmount);
|
||||
alpha *= mShadowAlpha;
|
||||
if (mFadeInFromDarkAnimator != null) {
|
||||
alpha *= mFadeInFromDarkAnimator.getAnimatedFraction();
|
||||
}
|
||||
@@ -1093,19 +1091,6 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
||||
return calculateBgColor() == otherView.calculateBgColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getShadowAlpha() {
|
||||
return mShadowAlpha;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShadowAlpha(float shadowAlpha) {
|
||||
if (shadowAlpha != mShadowAlpha) {
|
||||
mShadowAlpha = shadowAlpha;
|
||||
updateOutlineAlpha();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFakeShadowIntensity(float shadowIntensity, float outlineAlpha, int shadowYEnd,
|
||||
int outlineTranslation) {
|
||||
|
||||
@@ -443,13 +443,6 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable {
|
||||
return super.hasOverlappingRendering() && getActualHeight() <= getHeight();
|
||||
}
|
||||
|
||||
public float getShadowAlpha() {
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
public void setShadowAlpha(float shadowAlpha) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return an amount between -1 and 1 of increased padding that this child needs. 1 means it
|
||||
* needs a full increased padding while -1 means it needs no padding at all. For 0.0f the normal
|
||||
|
||||
@@ -38,7 +38,6 @@ public class AnimationFilter {
|
||||
boolean animateDimmed;
|
||||
boolean animateDark;
|
||||
boolean animateHideSensitive;
|
||||
public boolean animateShadowAlpha;
|
||||
boolean hasDelays;
|
||||
boolean hasGoToFullShadeEvent;
|
||||
long customDelay;
|
||||
@@ -100,11 +99,6 @@ public class AnimationFilter {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AnimationFilter animateShadowAlpha() {
|
||||
animateShadowAlpha = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AnimationFilter animateY(View view) {
|
||||
animateYViews.add(view);
|
||||
return this;
|
||||
@@ -157,7 +151,6 @@ public class AnimationFilter {
|
||||
animateDimmed |= filter.animateDimmed;
|
||||
animateDark |= filter.animateDark;
|
||||
animateHideSensitive |= filter.animateHideSensitive;
|
||||
animateShadowAlpha |= filter.animateShadowAlpha;
|
||||
hasDelays |= filter.hasDelays;
|
||||
mAnimatedProperties.addAll(filter.mAnimatedProperties);
|
||||
}
|
||||
@@ -169,7 +162,6 @@ public class AnimationFilter {
|
||||
animateYViews.clear();
|
||||
animateZ = false;
|
||||
animateHeight = false;
|
||||
animateShadowAlpha = false;
|
||||
animateTopInset = false;
|
||||
animateDimmed = false;
|
||||
animateDark = false;
|
||||
|
||||
@@ -34,13 +34,10 @@ public class ExpandableViewState extends ViewState {
|
||||
|
||||
private static final int TAG_ANIMATOR_HEIGHT = R.id.height_animator_tag;
|
||||
private static final int TAG_ANIMATOR_TOP_INSET = R.id.top_inset_animator_tag;
|
||||
private static final int TAG_ANIMATOR_SHADOW_ALPHA = R.id.shadow_alpha_animator_tag;
|
||||
private static final int TAG_END_HEIGHT = R.id.height_animator_end_value_tag;
|
||||
private static final int TAG_END_TOP_INSET = R.id.top_inset_animator_end_value_tag;
|
||||
private static final int TAG_END_SHADOW_ALPHA = R.id.shadow_alpha_animator_end_value_tag;
|
||||
private static final int TAG_START_HEIGHT = R.id.height_animator_start_value_tag;
|
||||
private static final int TAG_START_TOP_INSET = R.id.top_inset_animator_start_value_tag;
|
||||
private static final int TAG_START_SHADOW_ALPHA = R.id.shadow_alpha_animator_start_value_tag;
|
||||
|
||||
// These are flags such that we can create masks for filtering.
|
||||
|
||||
@@ -91,7 +88,6 @@ public class ExpandableViewState extends ViewState {
|
||||
public boolean dark;
|
||||
public boolean hideSensitive;
|
||||
public boolean belowSpeedBump;
|
||||
public float shadowAlpha;
|
||||
public boolean inShelf;
|
||||
|
||||
/**
|
||||
@@ -125,7 +121,6 @@ public class ExpandableViewState extends ViewState {
|
||||
ExpandableViewState svs = (ExpandableViewState) viewState;
|
||||
height = svs.height;
|
||||
dimmed = svs.dimmed;
|
||||
shadowAlpha = svs.shadowAlpha;
|
||||
dark = svs.dark;
|
||||
hideSensitive = svs.hideSensitive;
|
||||
belowSpeedBump = svs.belowSpeedBump;
|
||||
@@ -153,14 +148,6 @@ public class ExpandableViewState extends ViewState {
|
||||
expandableView.setActualHeight(newHeight, false /* notifyListeners */);
|
||||
}
|
||||
|
||||
float shadowAlpha = expandableView.getShadowAlpha();
|
||||
float newShadowAlpha = this.shadowAlpha;
|
||||
|
||||
// apply shadowAlpha
|
||||
if (shadowAlpha != newShadowAlpha) {
|
||||
expandableView.setShadowAlpha(newShadowAlpha);
|
||||
}
|
||||
|
||||
// apply dimming
|
||||
expandableView.setDimmed(this.dimmed, false /* animate */);
|
||||
|
||||
@@ -205,13 +192,6 @@ public class ExpandableViewState extends ViewState {
|
||||
abortAnimation(child, TAG_ANIMATOR_HEIGHT);
|
||||
}
|
||||
|
||||
// start shadow alpha animation
|
||||
if (this.shadowAlpha != expandableView.getShadowAlpha()) {
|
||||
startShadowAlphaAnimation(expandableView, properties);
|
||||
} else {
|
||||
abortAnimation(child, TAG_ANIMATOR_SHADOW_ALPHA);
|
||||
}
|
||||
|
||||
// start top inset animation
|
||||
if (this.clipTopAmount != expandableView.getClipTopAmount()) {
|
||||
startInsetAnimation(expandableView, properties);
|
||||
@@ -328,69 +308,6 @@ public class ExpandableViewState extends ViewState {
|
||||
child.setActualHeightAnimating(true);
|
||||
}
|
||||
|
||||
private void startShadowAlphaAnimation(final ExpandableView child,
|
||||
AnimationProperties properties) {
|
||||
Float previousStartValue = getChildTag(child, TAG_START_SHADOW_ALPHA);
|
||||
Float previousEndValue = getChildTag(child, TAG_END_SHADOW_ALPHA);
|
||||
float newEndValue = this.shadowAlpha;
|
||||
if (previousEndValue != null && previousEndValue == newEndValue) {
|
||||
return;
|
||||
}
|
||||
ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_SHADOW_ALPHA);
|
||||
AnimationFilter filter = properties.getAnimationFilter();
|
||||
if (!filter.animateShadowAlpha) {
|
||||
// just a local update was performed
|
||||
if (previousAnimator != null) {
|
||||
// we need to increase all animation keyframes of the previous animator by the
|
||||
// relative change to the end value
|
||||
PropertyValuesHolder[] values = previousAnimator.getValues();
|
||||
float relativeDiff = newEndValue - previousEndValue;
|
||||
float newStartValue = previousStartValue + relativeDiff;
|
||||
values[0].setFloatValues(newStartValue, newEndValue);
|
||||
child.setTag(TAG_START_SHADOW_ALPHA, newStartValue);
|
||||
child.setTag(TAG_END_SHADOW_ALPHA, newEndValue);
|
||||
previousAnimator.setCurrentPlayTime(previousAnimator.getCurrentPlayTime());
|
||||
return;
|
||||
} else {
|
||||
// no new animation needed, let's just apply the value
|
||||
child.setShadowAlpha(newEndValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ValueAnimator animator = ValueAnimator.ofFloat(child.getShadowAlpha(), newEndValue);
|
||||
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
child.setShadowAlpha((float) animation.getAnimatedValue());
|
||||
}
|
||||
});
|
||||
animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
|
||||
long newDuration = cancelAnimatorAndGetNewDuration(properties.duration, previousAnimator);
|
||||
animator.setDuration(newDuration);
|
||||
if (properties.delay > 0 && (previousAnimator == null
|
||||
|| previousAnimator.getAnimatedFraction() == 0)) {
|
||||
animator.setStartDelay(properties.delay);
|
||||
}
|
||||
AnimatorListenerAdapter listener = properties.getAnimationFinishListener();
|
||||
if (listener != null) {
|
||||
animator.addListener(listener);
|
||||
}
|
||||
// remove the tag when the animation is finished
|
||||
animator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
child.setTag(TAG_ANIMATOR_SHADOW_ALPHA, null);
|
||||
child.setTag(TAG_START_SHADOW_ALPHA, null);
|
||||
child.setTag(TAG_END_SHADOW_ALPHA, null);
|
||||
}
|
||||
});
|
||||
startAnimator(animator, listener);
|
||||
child.setTag(TAG_ANIMATOR_SHADOW_ALPHA, animator);
|
||||
child.setTag(TAG_START_SHADOW_ALPHA, child.getShadowAlpha());
|
||||
child.setTag(TAG_END_SHADOW_ALPHA, newEndValue);
|
||||
}
|
||||
|
||||
private void startInsetAnimation(final ExpandableView child, AnimationProperties properties) {
|
||||
Integer previousStartValue = getChildTag(child, TAG_START_TOP_INSET);
|
||||
Integer previousEndValue = getChildTag(child, TAG_END_TOP_INSET);
|
||||
@@ -476,10 +393,6 @@ public class ExpandableViewState extends ViewState {
|
||||
if (animator != null) {
|
||||
animator.cancel();
|
||||
}
|
||||
animator = getChildTag(view, TAG_ANIMATOR_SHADOW_ALPHA);
|
||||
if (animator != null) {
|
||||
animator.cancel();
|
||||
}
|
||||
animator = getChildTag(view, TAG_ANIMATOR_TOP_INSET);
|
||||
if (animator != null) {
|
||||
animator.cancel();
|
||||
|
||||
@@ -217,8 +217,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
private HashSet<View> mChildrenToAddAnimated = new HashSet<>();
|
||||
private ArrayList<View> mAddedHeadsUpChildren = new ArrayList<>();
|
||||
private ArrayList<View> mChildrenToRemoveAnimated = new ArrayList<>();
|
||||
private ArrayList<View> mSnappedBackChildren = new ArrayList<>();
|
||||
private ArrayList<View> mDragAnimPendingChildren = new ArrayList<>();
|
||||
private ArrayList<View> mChildrenChangingPositions = new ArrayList<>();
|
||||
private HashSet<View> mFromMoreCardAdditions = new HashSet<>();
|
||||
private ArrayList<AnimationEvent> mAnimationEvents = new ArrayList<>();
|
||||
@@ -3001,8 +2999,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
generateChildRemovalEvents();
|
||||
generateChildAdditionEvents();
|
||||
generatePositionChangeEvents();
|
||||
generateSnapBackEvents();
|
||||
generateDragEvents();
|
||||
generateTopPaddingEvent();
|
||||
generateActivateEvent();
|
||||
generateDimmedEvent();
|
||||
@@ -3097,24 +3093,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
mNeedViewResizeAnimation = false;
|
||||
}
|
||||
|
||||
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
|
||||
private void generateSnapBackEvents() {
|
||||
for (View child : mSnappedBackChildren) {
|
||||
mAnimationEvents.add(new AnimationEvent(child,
|
||||
AnimationEvent.ANIMATION_TYPE_SNAP_BACK));
|
||||
}
|
||||
mSnappedBackChildren.clear();
|
||||
}
|
||||
|
||||
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
|
||||
private void generateDragEvents() {
|
||||
for (View child : mDragAnimPendingChildren) {
|
||||
mAnimationEvents.add(new AnimationEvent(child,
|
||||
AnimationEvent.ANIMATION_TYPE_START_DRAG));
|
||||
}
|
||||
mDragAnimPendingChildren.clear();
|
||||
}
|
||||
|
||||
@ShadeViewRefactor(RefactorComponent.STATE_RESOLVER)
|
||||
private void generateChildRemovalEvents() {
|
||||
for (View child : mChildrenToRemoveAnimated) {
|
||||
@@ -5280,7 +5258,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_ADD
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5289,7 +5266,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_REMOVE
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5298,7 +5274,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_REMOVE_SWIPED_OUT
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5307,22 +5282,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_TOP_PADDING_CHANGED
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
.animateDimmed()
|
||||
.animateZ(),
|
||||
|
||||
// ANIMATION_TYPE_START_DRAG
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha(),
|
||||
|
||||
// ANIMATION_TYPE_SNAP_BACK
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight(),
|
||||
|
||||
// ANIMATION_TYPE_ACTIVATED_CHILD
|
||||
new AnimationFilter()
|
||||
.animateZ(),
|
||||
@@ -5334,7 +5299,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
// ANIMATION_TYPE_CHANGE_POSITION
|
||||
new AnimationFilter()
|
||||
.animateAlpha() // maybe the children change positions
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5345,7 +5309,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_GO_TO_FULL_SHADE
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5359,7 +5322,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_VIEW_RESIZE
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5368,7 +5330,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
// ANIMATION_TYPE_GROUP_EXPANSION_CHANGED
|
||||
new AnimationFilter()
|
||||
.animateAlpha()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5376,7 +5337,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_HEADS_UP_APPEAR
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5384,7 +5344,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_HEADS_UP_DISAPPEAR
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5393,7 +5352,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_HEADS_UP_DISAPPEAR_CLICK
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5402,7 +5360,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
// ANIMATION_TYPE_HEADS_UP_OTHER
|
||||
new AnimationFilter()
|
||||
.animateShadowAlpha()
|
||||
.animateHeight()
|
||||
.animateTopInset()
|
||||
.animateY()
|
||||
@@ -5411,7 +5368,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
// ANIMATION_TYPE_EVERYTHING
|
||||
new AnimationFilter()
|
||||
.animateAlpha()
|
||||
.animateShadowAlpha()
|
||||
.animateDark()
|
||||
.animateDimmed()
|
||||
.animateHideSensitive()
|
||||
@@ -5447,12 +5403,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
// ANIMATION_TYPE_TOP_PADDING_CHANGED
|
||||
StackStateAnimator.ANIMATION_DURATION_STANDARD,
|
||||
|
||||
// ANIMATION_TYPE_START_DRAG
|
||||
StackStateAnimator.ANIMATION_DURATION_STANDARD,
|
||||
|
||||
// ANIMATION_TYPE_SNAP_BACK
|
||||
StackStateAnimator.ANIMATION_DURATION_STANDARD,
|
||||
|
||||
// ANIMATION_TYPE_ACTIVATED_CHILD
|
||||
StackStateAnimator.ANIMATION_DURATION_DIMMED_ACTIVATED,
|
||||
|
||||
@@ -5503,23 +5453,21 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
static final int ANIMATION_TYPE_REMOVE = 1;
|
||||
static final int ANIMATION_TYPE_REMOVE_SWIPED_OUT = 2;
|
||||
static final int ANIMATION_TYPE_TOP_PADDING_CHANGED = 3;
|
||||
static final int ANIMATION_TYPE_START_DRAG = 4;
|
||||
static final int ANIMATION_TYPE_SNAP_BACK = 5;
|
||||
static final int ANIMATION_TYPE_ACTIVATED_CHILD = 6;
|
||||
static final int ANIMATION_TYPE_DIMMED = 7;
|
||||
static final int ANIMATION_TYPE_CHANGE_POSITION = 8;
|
||||
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;
|
||||
static final int ANIMATION_TYPE_GROUP_EXPANSION_CHANGED = 13;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_APPEAR = 14;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_DISAPPEAR = 15;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_DISAPPEAR_CLICK = 16;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_OTHER = 17;
|
||||
static final int ANIMATION_TYPE_EVERYTHING = 18;
|
||||
static final int ANIMATION_TYPE_PULSE_APPEAR = 19;
|
||||
static final int ANIMATION_TYPE_PULSE_DISAPPEAR = 20;
|
||||
static final int ANIMATION_TYPE_ACTIVATED_CHILD = 4;
|
||||
static final int ANIMATION_TYPE_DIMMED = 5;
|
||||
static final int ANIMATION_TYPE_CHANGE_POSITION = 6;
|
||||
static final int ANIMATION_TYPE_DARK = 7;
|
||||
static final int ANIMATION_TYPE_GO_TO_FULL_SHADE = 8;
|
||||
static final int ANIMATION_TYPE_HIDE_SENSITIVE = 9;
|
||||
static final int ANIMATION_TYPE_VIEW_RESIZE = 10;
|
||||
static final int ANIMATION_TYPE_GROUP_EXPANSION_CHANGED = 11;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_APPEAR = 12;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_DISAPPEAR = 13;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_DISAPPEAR_CLICK = 14;
|
||||
static final int ANIMATION_TYPE_HEADS_UP_OTHER = 15;
|
||||
static final int ANIMATION_TYPE_EVERYTHING = 16;
|
||||
static final int ANIMATION_TYPE_PULSE_APPEAR = 17;
|
||||
static final int ANIMATION_TYPE_PULSE_DISAPPEAR = 18;
|
||||
|
||||
static final int DARK_ANIMATION_ORIGIN_INDEX_ABOVE = -1;
|
||||
static final int DARK_ANIMATION_ORIGIN_INDEX_BELOW = -2;
|
||||
@@ -5687,11 +5635,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
|
||||
boolean isBlockingHelperShown = false;
|
||||
|
||||
if (mDragAnimPendingChildren.contains(view)) {
|
||||
// We start the swipe and finish it in the same frame; we don't want a drag
|
||||
// animation.
|
||||
mDragAnimPendingChildren.remove(view);
|
||||
}
|
||||
mAmbientState.onDragFinished(view);
|
||||
updateContinuousShadowDrawing();
|
||||
|
||||
@@ -5752,10 +5695,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
setSwipingInProgress(true);
|
||||
mAmbientState.onBeginDrag(v);
|
||||
updateContinuousShadowDrawing();
|
||||
if (mAnimationsEnabled && (mIsExpanded || !isPinnedHeadsUp(v))) {
|
||||
mDragAnimPendingChildren.add(v);
|
||||
mNeedsAnimation = true;
|
||||
}
|
||||
requestChildrenUpdate();
|
||||
}
|
||||
|
||||
@@ -5763,16 +5702,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
||||
public void onChildSnappedBack(View animView, float targetLeft) {
|
||||
mAmbientState.onDragFinished(animView);
|
||||
updateContinuousShadowDrawing();
|
||||
if (!mDragAnimPendingChildren.contains(animView)) {
|
||||
if (mAnimationsEnabled) {
|
||||
mSnappedBackChildren.add(animView);
|
||||
mNeedsAnimation = true;
|
||||
}
|
||||
requestChildrenUpdate();
|
||||
} else {
|
||||
// We start the swipe and snap back in the same frame, we don't want any animation
|
||||
mDragAnimPendingChildren.remove(animView);
|
||||
}
|
||||
NotificationMenuRowPlugin menuRow = mSwipeHelper.getCurrentMenuRow();
|
||||
if (menuRow != null && targetLeft == 0) {
|
||||
menuRow.resetMenu();
|
||||
|
||||
@@ -227,7 +227,6 @@ public class StackScrollAlgorithm {
|
||||
nextChild);
|
||||
// The child below the dragged one must be fully visible
|
||||
if (ambientState.isShadeExpanded()) {
|
||||
viewState.shadowAlpha = 1;
|
||||
viewState.hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ public class StackScrollState {
|
||||
viewState.height = view.getIntrinsicHeight();
|
||||
viewState.gone = view.getVisibility() == View.GONE;
|
||||
viewState.alpha = 1f;
|
||||
viewState.shadowAlpha = 1f;
|
||||
viewState.notGoneIndex = -1;
|
||||
viewState.xTranslation = view.getTranslationX();
|
||||
viewState.hidden = false;
|
||||
|
||||
@@ -171,8 +171,7 @@ public class StackStateAnimator {
|
||||
|| viewState.alpha != child.getAlpha()
|
||||
|| viewState.height != child.getActualHeight()
|
||||
|| viewState.clipTopAmount != child.getClipTopAmount()
|
||||
|| viewState.dark != child.isDark()
|
||||
|| viewState.shadowAlpha != child.getShadowAlpha())) {
|
||||
|| viewState.dark != child.isDark())) {
|
||||
mAnimationProperties.delay = mCurrentAdditionalDelay
|
||||
+ calculateChildAnimationDelay(viewState, finalState);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user