Commit ffad4ce0 authored by Michael Thiessen's avatar Michael Thiessen Committed by Commit Bot

Fix DisplayCutoutTest

The test was removing an observer after finishing the Activity, leading
to an NPE.

Bug: 1146208
Change-Id: I59563b4d5c9c9501d1f3a3a64c1014f39fa0351f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2522607
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Commit-Queue: Yaron Friedman <yfriedman@chromium.org>
Auto-Submit: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824948}
parent 4f59b0a4
......@@ -176,7 +176,9 @@ public class DisplayCutoutTestRule<T extends ChromeActivity> extends ChromeActiv
}
protected void tearDown() {
getActivity().getFullscreenManager().removeObserver(mListener);
if (!getActivity().isActivityFinishingOrDestroyed()) {
getActivity().getFullscreenManager().removeObserver(mListener);
}
mTestServer.stopAndDestroyServer();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment