Skip WindowInsetsAnimationTest when navbar isnt supported.
When navbar isnt present on a form factor, skip the test.
Test: atest WindowInsetsAnimationTests
Fix: 161128969
Change-Id: Iff65be60da9ddd6bde4264b61d46fc63a42b89bc
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationTests.java b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationTests.java
index 6bc9070..d5b652f 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationTests.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationTests.java
@@ -100,8 +100,10 @@
@Test
public void testAnimationCallbacks_overlapping() {
- WindowInsets before = mActivity.mLastWindowInsets;
+ // Test requires navbar to create overlapping animations.
+ assumeTrue(hasWindowInsets(mRootView, navigationBars()));
+ WindowInsets before = mActivity.mLastWindowInsets;
MultiAnimCallback callbackInner = new MultiAnimCallback();
MultiAnimCallback callback = mock(MultiAnimCallback.class,
withSettings()
@@ -188,8 +190,10 @@
@Test
public void testAnimationCallbacks_childInsetting() {
- WindowInsets before = mActivity.mLastWindowInsets;
+ // test requires navbar.
+ assumeTrue(hasWindowInsets(mRootView, navigationBars()));
+ WindowInsets before = mActivity.mLastWindowInsets;
boolean[] done = new boolean[1];
WindowInsetsAnimation.Callback childCallback = mock(WindowInsetsAnimation.Callback.class);
WindowInsetsAnimation.Callback callback = new Callback(DISPATCH_MODE_CONTINUE_ON_SUBTREE) {