Skip to content
Snippets Groups Projects
Commit ec0149f1 authored by Chalard Jean's avatar Chalard Jean
Browse files

Remove an NPE in tearDown

This is masking an exception in setUp() and makes debugging difficult

Test: treehugger
Change-Id: I8b5b80c4171d45076dd02bab5ff4b6dc81d98086
parent 9f94648b
No related branches found
No related tags found
No related merge requests found
......@@ -198,7 +198,8 @@ public abstract class AbstractRestrictBackgroundNetworkTestCase {
protected void tearDown() throws Exception {
executeShellCommand("cmd netpolicy stop-watching");
mServiceClient.unbind();
if (mLock.isHeld()) mLock.release();
final PowerManager.WakeLock lock = mLock;
if (null != lock && lock.isHeld()) lock.release();
}
protected int getUid(String packageName) throws Exception {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment