diff options
| author | 2011-02-04 12:52:46 -0500 | |
|---|---|---|
| committer | 2011-02-04 12:52:46 -0500 | |
| commit | b88e52c7602a193dfcc4715bc59d95e1c555fffb (patch) | |
| tree | a279b76197411bd1508064172641727510ae82f1 | |
| parent | 67ec9aa87812a4d55a3c0ed5d0ab66cdb36342f0 (diff) | |
Need a public way to wait for cookie operations.
Hidden for now as we are past the public api deadline.
Bug: 3421214
Change-Id: I8a65ae479d0b8b020af2600d7d29d5d358414add
| -rw-r--r-- | core/java/android/webkit/CookieManager.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index 1fea65adf074..9b0d4e0eaa27 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -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) { } + } } } |