am 160c18a4: Merge "Need a public way to wait for cookie operations." into honeycomb

* commit '160c18a4d209f56766fdd90e4711c8e29fd407e6':
  Need a public way to wait for cookie operations.
This commit is contained in:
Patrick Scott
2011-02-04 11:22:41 -08:00
committed by Android Git Automerger

View File

@@ -519,11 +519,17 @@ public final class CookieManager {
}
}
synchronized void waitForCookieOperationsToComplete() {
while (pendingCookieOperations > 0) {
try {
wait();
} catch (InterruptedException e) { }
/**
* Waits for pending operations to completed.
* {@hide} Too late to release publically.
*/
public void waitForCookieOperationsToComplete() {
synchronized (this) {
while (pendingCookieOperations > 0) {
try {
wait();
} catch (InterruptedException e) { }
}
}
}