Methods Summary |
---|
private void | addAnObjectToTheQueue()
try {
mQueue.put(new Object());
} catch (InterruptedException e) {
// This should not happen in practice, the queue is unbounded so this method will not
// block.
// If this thread is using interrupt to shut down, preserve interrupt status and return.
Thread.currentThread().interrupt();
}
|
public void | assertNoMoreCallbacks()
if (mQueue.peek() != null) {
throw new IllegalStateException("there was an unexpected callback on the queue");
}
|
public void | awaitOneCallback(long timeout, java.util.concurrent.TimeUnit unit)
if (mQueue.poll(timeout, unit) == null) {
throw new TimeoutException();
}
|
public boolean | onError(android.media.MediaPlayer mp, int what, int extra)
addAnObjectToTheQueue();
return mOnErrorReturnValue;
|
public void | setOnErrorReturnValue(boolean value)
mOnErrorReturnValue = value;
|