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,8 +1702,10 @@ public class WifiService extends IWifiManager.Stub {
}
private boolean acquireWifiLockLocked(WifiLock wifiLock) {
Log.d(TAG, "acquireWifiLockLocked: " + wifiLock);
mLocks.addLock(wifiLock);
int uid = Binder.getCallingUid();
long ident = Binder.clearCallingIdentity();
try {
@@ -1721,7 +1723,7 @@ public class WifiService extends IWifiManager.Stub {
} finally {
Binder.restoreCallingIdentity(ident);
}
updateWifiState();
return true;
}
@@ -1735,8 +1737,11 @@ public class WifiService extends IWifiManager.Stub {
private boolean releaseWifiLockLocked(IBinder lock) {
boolean hadLock;
WifiLock wifiLock = mLocks.removeLock(lock);
Log.d(TAG, "releaseWifiLockLocked: " + wifiLock);
hadLock = (wifiLock != null);
if (hadLock) {
@@ -1758,7 +1763,7 @@ public class WifiService extends IWifiManager.Stub {
Binder.restoreCallingIdentity(ident);
}
}
// TODO - should this only happen if you hadLock?
updateWifiState();
return hadLock;
}