diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-05-02 16:25:34 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-02 16:25:34 -0700 |
commit | 04e83d39523316ad7fa9fd7b3f392caa847ddc70 (patch) | |
tree | 45b80d5c5bcc89936014a7ab345f85b564cb8b87 /wifi | |
parent | d69c367577440be968d33f6ab67bc758c379156f (diff) | |
parent | 2c02da2bc62c4dfef684ea381be02a4e568b73d0 (diff) | |
download | frameworks_base-04e83d39523316ad7fa9fd7b3f392caa847ddc70.zip frameworks_base-04e83d39523316ad7fa9fd7b3f392caa847ddc70.tar.gz frameworks_base-04e83d39523316ad7fa9fd7b3f392caa847ddc70.tar.bz2 |
Merge "Fix reference counting of wifi locks" into jb-dev
Diffstat (limited to 'wifi')
-rw-r--r-- | wifi/java/android/net/wifi/WifiManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 8aa613b..36f38f9 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -1557,7 +1557,7 @@ public class WifiManager { */ public void acquire() { synchronized (mBinder) { - if (mRefCounted ? (++mRefCount > 0) : (!mHeld)) { + if (mRefCounted ? (++mRefCount == 1) : (!mHeld)) { try { mService.acquireWifiLock(mBinder, mLockType, mTag, mWorkSource); synchronized (WifiManager.this) { @@ -1786,7 +1786,7 @@ public class WifiManager { */ public void acquire() { synchronized (mBinder) { - if (mRefCounted ? (++mRefCount > 0) : (!mHeld)) { + if (mRefCounted ? (++mRefCount == 1) : (!mHeld)) { try { mService.acquireMulticastLock(mBinder, mTag); synchronized (WifiManager.this) { |