diff options
author | Evan Birenbaum <birenbaum@google.com> | 2016-05-20 12:18:32 -0700 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2016-05-24 03:36:25 +0000 |
commit | 2817836d7522c876b022bd7002a81f3d23d57645 (patch) | |
tree | ce9b976be822f64ed1224c35bce576eecedfa5f4 /apps | |
parent | 1a44969bce4e65524feb4b4ba2679f20c8b6a398 (diff) | |
download | android_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.java | 4 |
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 |