Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f01e3b5b authored by Patrick Scott's avatar Patrick Scott Committed by Android Git Automerger
Browse files

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

* commit '01b7a98c':
  Need a public way to wait for cookie operations.
parents 987cc804 01b7a98c
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -516,13 +516,19 @@ public final class CookieManager {
        }
    }

    synchronized void waitForCookieOperationsToComplete() {
    /**
     * 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) { }
            }
        }
    }

    private synchronized void signalCookieOperationsComplete() {
        pendingCookieOperations--;