diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java index 6a9e096f603c6..b5f57b64cf433 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java @@ -122,6 +122,10 @@ public class NetworkControllerBaseTest extends SysuiTestCase { public TestWatcher failWatcher = new TestWatcher() { @Override protected void failed(Throwable e, Description description) { + if (mNetworkController == null) { + Log.d(TAG, "mNetworkController = null!"); + return; + } // Print out mNetworkController state if the test fails. StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw);