Merge "[SYSUI] Fix logging on test failure" into rvc-dev

This commit is contained in:
Etan Cohen
2020-03-31 22:51:59 +00:00
committed by Android (Google) Code Review

View File

@@ -122,6 +122,10 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
public TestWatcher failWatcher = new TestWatcher() { public TestWatcher failWatcher = new TestWatcher() {
@Override @Override
protected void failed(Throwable e, Description description) { protected void failed(Throwable e, Description description) {
if (mNetworkController == null) {
Log.d(TAG, "mNetworkController = null!");
return;
}
// Print out mNetworkController state if the test fails. // Print out mNetworkController state if the test fails.
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw); PrintWriter pw = new PrintWriter(sw);