am 16cb04ab: Merge change If1acb2dd into eclair

Merge commit '16cb04ab1cd88d917fdd34a9063fe4a9707aa5b1' into eclair-mr2

* commit '16cb04ab1cd88d917fdd34a9063fe4a9707aa5b1':
  Add a little logging to diagnose wifi cycle bug
This commit is contained in:
Robert Greenwalt
2009-10-13 09:56:40 -07:00
committed by Android Git Automerger

View File

@@ -1716,6 +1716,8 @@ public class WifiService extends IWifiManager.Stub {
} }
private boolean acquireWifiLockLocked(WifiLock wifiLock) { private boolean acquireWifiLockLocked(WifiLock wifiLock) {
Log.d(TAG, "acquireWifiLockLocked: " + wifiLock);
mLocks.addLock(wifiLock); mLocks.addLock(wifiLock);
int uid = Binder.getCallingUid(); int uid = Binder.getCallingUid();
@@ -1751,6 +1753,9 @@ public class WifiService extends IWifiManager.Stub {
boolean hadLock; boolean hadLock;
WifiLock wifiLock = mLocks.removeLock(lock); WifiLock wifiLock = mLocks.removeLock(lock);
Log.d(TAG, "releaseWifiLockLocked: " + wifiLock);
hadLock = (wifiLock != null); hadLock = (wifiLock != null);
if (hadLock) { if (hadLock) {
@@ -1772,7 +1777,7 @@ public class WifiService extends IWifiManager.Stub {
Binder.restoreCallingIdentity(ident); Binder.restoreCallingIdentity(ident);
} }
} }
// TODO - should this only happen if you hadLock?
updateWifiState(); updateWifiState();
return hadLock; return hadLock;
} }