Remove deprecated WindowContainer#isAnimatingExcluding method

Instead of excluding types, it would be better to specify animation
types explicitly.

Bug: 167166247
Test: build and all WM unit tests pass
Change-Id: Ideb9920aa97321645f0e0d1dc1c0980f2a8ff4fe
This commit is contained in:
Ming-Shin Lu
2021-10-08 00:59:54 +08:00
parent 0d3c394689
commit 44806cdbb5
2 changed files with 2 additions and 16 deletions

View File

@@ -955,21 +955,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
return getAnimatingContainer(flags, typesToCheck) != null;
}
/**
* Similar to {@link #isAnimating(int, int)} except provide a bitmask of
* {@link AnimationType} to exclude, rather than include
* @param flags The combination of bitmask flags to specify targets and condition for
* checking animating status.
* @param typesToExclude The combination of bitmask {@link AnimationType} to exclude when
* checking if animating.
*
* @deprecated Use {@link #isAnimating(int, int)}
*/
@Deprecated
final boolean isAnimatingExcluding(int flags, int typesToExclude) {
return isAnimating(flags, ANIMATION_TYPE_ALL & ~typesToExclude);
}
/**
* @deprecated Use {@link #isAnimating(int, int)}
* TODO (b/152333373): Migrate calls to use isAnimating with specified animation type

View File

@@ -42,6 +42,7 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.spyOn;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.times;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
import static com.android.server.wm.DisplayArea.Type.ANY;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_ALL;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_APP_TRANSITION;
import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_SCREEN_ROTATION;
import static com.android.server.wm.WindowContainer.AnimationFlags.CHILDREN;
@@ -440,7 +441,7 @@ public class WindowContainerTests extends WindowTestsBase {
assertTrue(window.isAnimating());
assertFalse(window.isAnimating(0, ANIMATION_TYPE_SCREEN_ROTATION));
assertTrue(window.isAnimating(0, ANIMATION_TYPE_APP_TRANSITION));
assertFalse(window.isAnimatingExcluding(0, ANIMATION_TYPE_APP_TRANSITION));
assertFalse(window.isAnimating(0, ANIMATION_TYPE_ALL & ~ANIMATION_TYPE_APP_TRANSITION));
final TestWindowContainer child = window.addChildWindow();
assertFalse(child.isAnimating());