Merge "Remove unused param from ExpandableView#performRemoveAnimation" into udc-qpr-dev am: bfa9c9322a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23828523

Change-Id: Ia8356c1c68f27d6e0a9604ae2290f0cad307b234
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
András Kurucz
2023-06-30 14:16:22 +00:00
committed by Automerger Merge Worker
6 changed files with 17 additions and 34 deletions

View File

@@ -359,9 +359,9 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
} }
@Override @Override
public long performRemoveAnimation(long duration, long delay, public long performRemoveAnimation(long duration, long delay, float translationDirection,
float translationDirection, boolean isHeadsUpAnimation, float endLocation, boolean isHeadsUpAnimation, Runnable onFinishedRunnable,
Runnable onFinishedRunnable, AnimatorListenerAdapter animationListener) { AnimatorListenerAdapter animationListener) {
enableAppearDrawing(true); enableAppearDrawing(true);
mIsHeadsUpAnimation = isHeadsUpAnimation; mIsHeadsUpAnimation = isHeadsUpAnimation;
if (mDrawingAppearAnimation) { if (mDrawingAppearAnimation) {

View File

@@ -2975,7 +2975,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
long delay, long delay,
float translationDirection, float translationDirection,
boolean isHeadsUpAnimation, boolean isHeadsUpAnimation,
float endLocation,
Runnable onFinishedRunnable, Runnable onFinishedRunnable,
AnimatorListenerAdapter animationListener) { AnimatorListenerAdapter animationListener) {
if (mMenuRow != null && mMenuRow.isMenuVisible()) { if (mMenuRow != null && mMenuRow.isMenuVisible()) {
@@ -2986,7 +2985,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
ExpandableNotificationRow.super.performRemoveAnimation( ExpandableNotificationRow.super.performRemoveAnimation(
duration, delay, translationDirection, isHeadsUpAnimation, duration, delay, translationDirection, isHeadsUpAnimation,
endLocation, onFinishedRunnable, animationListener); onFinishedRunnable, animationListener);
} }
}); });
anim.start(); anim.start();
@@ -2994,7 +2993,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
} }
} }
return super.performRemoveAnimation(duration, delay, translationDirection, return super.performRemoveAnimation(duration, delay, translationDirection,
isHeadsUpAnimation, endLocation, onFinishedRunnable, animationListener); isHeadsUpAnimation, onFinishedRunnable, animationListener);
} }
@Override @Override

View File

@@ -367,7 +367,6 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable, Ro
* such that the child appears to be going away to the top. 1 * such that the child appears to be going away to the top. 1
* Should mean the opposite. * Should mean the opposite.
* @param isHeadsUpAnimation Is this a headsUp animation. * @param isHeadsUpAnimation Is this a headsUp animation.
* @param endLocation The location where the horizonal heads up disappear animation should end.
* @param onFinishedRunnable A runnable which should be run when the animation is finished. * @param onFinishedRunnable A runnable which should be run when the animation is finished.
* @param animationListener An animation listener to add to the animation. * @param animationListener An animation listener to add to the animation.
* *
@@ -375,7 +374,7 @@ public abstract class ExpandableView extends FrameLayout implements Dumpable, Ro
* animation starts. * animation starts.
*/ */
public abstract long performRemoveAnimation(long duration, public abstract long performRemoveAnimation(long duration,
long delay, float translationDirection, boolean isHeadsUpAnimation, float endLocation, long delay, float translationDirection, boolean isHeadsUpAnimation,
Runnable onFinishedRunnable, Runnable onFinishedRunnable,
AnimatorListenerAdapter animationListener); AnimatorListenerAdapter animationListener);

View File

@@ -235,7 +235,7 @@ public abstract class StackScrollerDecorView extends ExpandableView {
@Override @Override
public long performRemoveAnimation(long duration, long delay, public long performRemoveAnimation(long duration, long delay,
float translationDirection, boolean isHeadsUpAnimation, float endLocation, float translationDirection, boolean isHeadsUpAnimation,
Runnable onFinishedRunnable, Runnable onFinishedRunnable,
AnimatorListenerAdapter animationListener) { AnimatorListenerAdapter animationListener) {
// TODO: Use duration // TODO: Use duration

View File

@@ -69,11 +69,14 @@ class MediaContainerView(context: Context, attrs: AttributeSet?) : ExpandableVie
canvas.clipPath(clipPath) canvas.clipPath(clipPath)
} }
override fun performRemoveAnimation(
override fun performRemoveAnimation(duration: Long, delay: Long, translationDirection: Float, duration: Long,
isHeadsUpAnimation: Boolean, endLocation: Float, delay: Long,
onFinishedRunnable: Runnable?, translationDirection: Float,
animationListener: AnimatorListenerAdapter?): Long { isHeadsUpAnimation: Boolean,
onFinishedRunnable: Runnable?,
animationListener: AnimatorListenerAdapter?
): Long {
return 0 return 0
} }

View File

@@ -27,8 +27,6 @@ import com.android.keyguard.KeyguardSliceView;
import com.android.systemui.R; import com.android.systemui.R;
import com.android.systemui.shared.clocks.AnimatableClockView; import com.android.systemui.shared.clocks.AnimatableClockView;
import com.android.systemui.statusbar.NotificationShelf; import com.android.systemui.statusbar.NotificationShelf;
import com.android.systemui.statusbar.StatusBarIconView;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.row.StackScrollerDecorView; import com.android.systemui.statusbar.notification.row.StackScrollerDecorView;
@@ -427,7 +425,7 @@ public class StackStateAnimator {
} }
changingView.performRemoveAnimation(ANIMATION_DURATION_APPEAR_DISAPPEAR, changingView.performRemoveAnimation(ANIMATION_DURATION_APPEAR_DISAPPEAR,
0 /* delay */, translationDirection, false /* isHeadsUpAppear */, 0 /* delay */, translationDirection, false /* isHeadsUpAppear */,
0, postAnimation, null); postAnimation, null);
} else if (event.animationType == } else if (event.animationType ==
NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT) { NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT) {
if (mHostLayout.isFullySwipedOut(changingView)) { if (mHostLayout.isFullySwipedOut(changingView)) {
@@ -474,28 +472,12 @@ public class StackStateAnimator {
mTmpState.initFrom(changingView); mTmpState.initFrom(changingView);
endRunnable = changingView::removeFromTransientContainer; endRunnable = changingView::removeFromTransientContainer;
} }
float targetLocation = 0;
boolean needsAnimation = true; boolean needsAnimation = true;
if (changingView instanceof ExpandableNotificationRow) { if (changingView instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) changingView; ExpandableNotificationRow row = (ExpandableNotificationRow) changingView;
if (row.isDismissed()) { if (row.isDismissed()) {
needsAnimation = false; needsAnimation = false;
} }
NotificationEntry entry = row.getEntry();
StatusBarIconView icon = entry.getIcons().getStatusBarIcon();
final StatusBarIconView centeredIcon = entry.getIcons().getCenteredIcon();
if (centeredIcon != null && centeredIcon.getParent() != null) {
icon = centeredIcon;
}
if (icon.getParent() != null) {
icon.getLocationOnScreen(mTmpLocation);
float iconPosition = mTmpLocation[0] - icon.getTranslationX()
+ ViewState.getFinalTranslationX(icon)
+ icon.getWidth() * 0.25f;
mHostLayout.getLocationOnScreen(mTmpLocation);
targetLocation = iconPosition - mTmpLocation[0];
}
} }
if (needsAnimation) { if (needsAnimation) {
@@ -515,7 +497,7 @@ public class StackStateAnimator {
} }
long removeAnimationDelay = changingView.performRemoveAnimation( long removeAnimationDelay = changingView.performRemoveAnimation(
ANIMATION_DURATION_HEADS_UP_DISAPPEAR, ANIMATION_DURATION_HEADS_UP_DISAPPEAR,
0, 0.0f, true /* isHeadsUpAppear */, targetLocation, 0, 0.0f, true /* isHeadsUpAppear */,
postAnimation, getGlobalAnimationFinishedListener()); postAnimation, getGlobalAnimationFinishedListener());
mAnimationProperties.delay += removeAnimationDelay; mAnimationProperties.delay += removeAnimationDelay;
} else if (endRunnable != null) { } else if (endRunnable != null) {