public final class AndroidDocumentProviderFactory extends java.lang.Object implements DocumentProviderFactory, ThreadBound
| Constructor and Description |
|---|
AndroidDocumentProviderFactory(android.app.Application application) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkThreadAccess()
Checks whether the current thread has access to this object.
|
DocumentProvider |
create() |
void |
postAndWait(java.lang.Runnable r)
Synchronously executes a
Runnable on the thread that this object is bound to. |
<V> V |
postAndWait(UncheckedCallable<V> c)
Synchronously executes an
UncheckedCallable on the thread that this object is bound to,
and returns its result. |
void |
postDelayed(java.lang.Runnable r,
long delayMillis)
Asynchronously executes a
Runnable on the thread that this object is bound to
after the specified delay. |
void |
removeCallbacks(java.lang.Runnable r)
Removes any pending posts of the given
Runnable that are in the queue. |
void |
verifyThreadAccess()
Enforces that the current thread has access to this object.
|
public AndroidDocumentProviderFactory(android.app.Application application)
public DocumentProvider create()
create in interface DocumentProviderFactorypublic boolean checkThreadAccess()
ThreadBoundcheckThreadAccess in interface ThreadBoundpublic void verifyThreadAccess()
ThreadBoundverifyThreadAccess in interface ThreadBoundpublic <V> V postAndWait(UncheckedCallable<V> c)
ThreadBoundUncheckedCallable on the thread that this object is bound to,
and returns its result.postAndWait in interface ThreadBoundV - the return type of the UncheckedCallablec - the UncheckedCallable to executeUncheckedCallable.call()public void postAndWait(java.lang.Runnable r)
ThreadBoundRunnable on the thread that this object is bound to.postAndWait in interface ThreadBoundr - the Runnable to executepublic void postDelayed(java.lang.Runnable r,
long delayMillis)
ThreadBoundRunnable on the thread that this object is bound to
after the specified delay.postDelayed in interface ThreadBoundr - the Runnable to executedelayMillis - The delay (in milliseconds) until the Runnable will be executed.public void removeCallbacks(java.lang.Runnable r)
ThreadBoundRunnable that are in the queue.removeCallbacks in interface ThreadBoundr - the Runnable to remove from the queue