summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorEvan Birenbaum <birenbaum@google.com>2016-05-20 12:18:32 -0700
committerLorenzo Colitti <lorenzo@google.com>2016-05-24 03:36:25 +0000
commit2817836d7522c876b022bd7002a81f3d23d57645 (patch)
treece9b976be822f64ed1224c35bce576eecedfa5f4 /apps
parent1a44969bce4e65524feb4b4ba2679f20c8b6a398 (diff)
downloadandroid_development-2817836d7522c876b022bd7002a81f3d23d57645.tar.gz
android_development-2817836d7522c876b022bd7002a81f3d23d57645.tar.bz2
android_development-2817836d7522c876b022bd7002a81f3d23d57645.zip
Fix a crash when exiting the DevTools Connectivity page.
A lock was being released without checking if it was held, which resulted in a crash because WifiManager.MulticastLock is reference counted by default. BUG=28668604 Change-Id: I306731129894d5525e974561c2680ae7db5aff4b
Diffstat (limited to 'apps')
-rw-r--r--apps/Development/src/com/android/development/Connectivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/Development/src/com/android/development/Connectivity.java b/apps/Development/src/com/android/development/Connectivity.java
index 47bba601e..56504821e 100644
--- a/apps/Development/src/com/android/development/Connectivity.java
+++ b/apps/Development/src/com/android/development/Connectivity.java
@@ -486,7 +486,9 @@ public class Connectivity extends Activity {
mCm.unregisterNetworkCallback(mCallback);
mCallback = null;
unregisterReceiver(mReceiver);
- mWml.release();
+ if (mWml.isHeld()) {
+ mWml.release();
+ }
}
@Override