Merge "Remove an NPE in tearDown" into main am: e7b7ceb70d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2770460 Change-Id: I017eafbc7dcf191cf6babcd3c43fa89a66546bbc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
ddd00cd23a
1 changed files with 2 additions and 1 deletions
|
|
@ -199,7 +199,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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue