api-impl: add stubs to make AnimationDrawable and Animation not cause lockups

apps may (ab)use AnimationDrawable.run and Animation.setAnimationListener
to time transitions between states; even though we don't currently implement
the animations, state transitions are still desirable (otherwise the app may
lock up)
This commit is contained in:
Mis012
2024-03-16 18:55:14 +01:00
parent ec2c956acb
commit ab7c6cf834
4 changed files with 35 additions and 4 deletions

View File

@@ -2,7 +2,11 @@ package android.view.animation;
public class Animation {
public interface AnimationListener {}
public interface AnimationListener {
public void onAnimationEnd(Animation animation);
public void onAnimationRepeat(Animation animation);
public void onAnimationStart(Animation animation);
}
public void setDuration(long durationMillis) {}
@@ -12,4 +16,10 @@ public class Animation {
public void setFillBefore(boolean dummy) {}
public void setFillAfter(boolean dummy) {}
public void setStartOffset(long offset) {}
public void setAnimationListener(AnimationListener l) {
l.onAnimationEnd(this); // FIXME
}
}