Methods Summary |
---|
public com.android.printspooler.model.PageContentRepository$PageContentProvider | acquirePageContentProvider(int pageIndex, android.view.View owner)
throwIfDestroyed();
if (DEBUG) {
Log.i(LOG_TAG, "Acquiring provider for page: " + pageIndex);
}
return new PageContentProvider(pageIndex, owner);
|
public void | close(java.lang.Runnable callback)
throwIfNotOpened();
mState = STATE_CLOSED;
if (DEBUG) {
Log.i(LOG_TAG, "STATE_CLOSED");
}
mRenderer.close(callback);
|
public void | destroy(java.lang.Runnable callback)
if (mState == STATE_OPENED) {
close(new Runnable() {
@Override
public void run() {
destroy(callback);
}
});
return;
}
mState = STATE_DESTROYED;
if (DEBUG) {
Log.i(LOG_TAG, "STATE_DESTROYED");
}
mRenderer.destroy();
if (callback != null) {
callback.run();
}
|
protected void | finalize()
try {
if (mState != STATE_DESTROYED) {
mCloseGuard.warnIfOpen();
destroy(null);
}
} finally {
super.finalize();
}
|
public int | getFilePageCount()
return mRenderer.getPageCount();
|
public void | open(android.os.ParcelFileDescriptor source, OpenDocumentCallback callback)
throwIfNotClosed();
mState = STATE_OPENED;
if (DEBUG) {
Log.i(LOG_TAG, "STATE_OPENED");
}
mRenderer.open(source, callback);
|
public void | releasePageContentProvider(com.android.printspooler.model.PageContentRepository$PageContentProvider provider)
throwIfDestroyed();
if (DEBUG) {
Log.i(LOG_TAG, "Releasing provider for page: " + provider.mPageIndex);
}
provider.cancelLoad();
|
public void | startPreload(int firstShownPage, int lastShownPage)
// If we do not have a render spec we have no clue what size the
// preloaded bitmaps should be, so just take a note for what to do.
if (mLastRenderSpec == null) {
mScheduledPreloadFirstShownPage = firstShownPage;
mScheduledPreloadLastShownPage = lastShownPage;
} else if (mState == STATE_OPENED) {
mRenderer.startPreload(firstShownPage, lastShownPage, mLastRenderSpec);
}
|
public void | stopPreload()
mRenderer.stopPreload();
|
private void | throwIfDestroyed()
if (mState == STATE_DESTROYED) {
throw new IllegalStateException("Destroyed");
}
|
private void | throwIfNotClosed()
if (mState != STATE_CLOSED) {
throw new IllegalStateException("Not closed");
}
|
private void | throwIfNotOpened()
if (mState != STATE_OPENED) {
throw new IllegalStateException("Not opened");
}
|