diff options
author | Heemin Seog <hseog@google.com> | 2020-07-27 16:50:17 -0700 |
---|---|---|
committer | Heemin Seog <hseog@google.com> | 2020-08-06 01:34:15 +0000 |
commit | 691f3b9c9a942e223c767067e2ed66e93f525527 (patch) | |
tree | a9fc0a74a86d6ef3fa9b71510e49cbcd840beea0 | |
parent | 98cc417b616b1f86e399bd2003cd73815be3d4fb (diff) | |
download | cts-691f3b9c9a942e223c767067e2ed66e93f525527.tar.gz |
Fix WindowInsetsAnimationControllerTests when there is no MockIME
Bug: 155126599
Test: atest WindowInsetsAnimationControllerTests
Change-Id: Id461a0959fa401fd9b1f765e3b48113ae159abcd
-rw-r--r-- | tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationControllerTests.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationControllerTests.java b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationControllerTests.java index c90b8596c36..35b06bae6be 100644 --- a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationControllerTests.java +++ b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsAnimationControllerTests.java @@ -175,7 +175,9 @@ public class WindowInsetsAnimationControllerTests extends WindowManagerTestBase // which can trigger assertion failures in VerifyingCallback otherwise. runOnUiThread(() -> { mCallbacks.clear(); - mRootView.setWindowInsetsAnimationCallback(null); + if (mRootView != null) { + mRootView.setWindowInsetsAnimationCallback(null); + } }); // Now it should be safe to reset the IME to the default one. |