Merge change If1acb2dd into eclair

* changes:
  Add a little logging to diagnose wifi cycle bug
This commit is contained in:
Android (Google) Code Review
2009-10-13 12:45:30 -04:00

View File

@@ -1702,6 +1702,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();
@@ -1737,6 +1739,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) {
@@ -1758,7 +1763,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;
} }