Clean up ReferenceQueue, fix ReferenceQueueTest.
- Remove change markers & clarify comments.
- ReferenceQueue.remove(timeout) doesn't provide any hard guarantees;
it only promises to be broadly equivalent to Object.wait() so there's
no need to wait in a loop. We also guard against "spurious" notifies
by sychronizing on a private object, not on ReferenceQueue.this
(fixes ReferenceQueueTest#testRemoveWithSpuriousNotify).
bug: 25893944
Change-Id: I7833691d67fed3eae6a5d4370771c2c4216cbd7b
1 file changed