diff options
author | Irfan Sheriff <isheriff@google.com> | 2012-05-02 14:40:16 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2012-05-02 14:40:16 -0700 |
commit | 2c02da2bc62c4dfef684ea381be02a4e568b73d0 (patch) | |
tree | ff1748198c45b32390fc05b5d2cbfbcf0dc491ed /wifi | |
parent | faac92942c50b12edada5e92e7c323609b2bdb5f (diff) | |
download | frameworks_base-2c02da2bc62c4dfef684ea381be02a4e568b73d0.zip frameworks_base-2c02da2bc62c4dfef684ea381be02a4e568b73d0.tar.gz frameworks_base-2c02da2bc62c4dfef684ea381be02a4e568b73d0.tar.bz2 |
Fix reference counting of wifi locks
Bug: 6105898
Change-Id: I7368de91fa4aa63fd97dda0ee91d810aaaa53d8b
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) { |