commit | 691f3b9c9a942e223c767067e2ed66e93f525527 | [log] [tgz] |
---|---|---|
author | Heemin Seog <hseog@google.com> | Mon Jul 27 16:50:17 2020 -0700 |
committer | Heemin Seog <hseog@google.com> | Thu Aug 06 01:34:15 2020 +0000 |
tree | a9fc0a74a86d6ef3fa9b71510e49cbcd840beea0 | |
parent | 98cc417b616b1f86e399bd2003cd73815be3d4fb [diff] |
Fix WindowInsetsAnimationControllerTests when there is no MockIME Bug: 155126599 Test: atest WindowInsetsAnimationControllerTests Change-Id: Id461a0959fa401fd9b1f765e3b48113ae159abcd
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 c90b859..35b06ba 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 @@ // 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.