Merge "Need a public way to wait for cookie operations." into honeycomb

This commit is contained in:
Patrick Scott
2011-02-04 11:20:37 -08:00
committed by Android (Google) Code Review

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) { }
}
}
}