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:
@@ -1716,8 +1716,10 @@ 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();
|
||||||
long ident = Binder.clearCallingIdentity();
|
long ident = Binder.clearCallingIdentity();
|
||||||
try {
|
try {
|
||||||
@@ -1735,7 +1737,7 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
} finally {
|
} finally {
|
||||||
Binder.restoreCallingIdentity(ident);
|
Binder.restoreCallingIdentity(ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
updateWifiState();
|
updateWifiState();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1749,8 +1751,11 @@ public class WifiService extends IWifiManager.Stub {
|
|||||||
|
|
||||||
private boolean releaseWifiLockLocked(IBinder lock) {
|
private boolean releaseWifiLockLocked(IBinder lock) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user