Merge \"Syncronize renderPage vs. onServiceDisconnected\" into nyc-mr1-dev

am: c7c647bbf0

Change-Id: Ibd18df2822dbb0993eb4fc22392c3c523197c540
This commit is contained in:
Philip P. Moltmann
2016-06-28 16:18:09 +00:00
committed by android-build-merger

View File

@@ -838,9 +838,15 @@ public final class PageContentRepository {
try (ParcelFileDescriptor source = pipe[0]) { try (ParcelFileDescriptor source = pipe[0]) {
try (ParcelFileDescriptor destination = pipe[1]) { try (ParcelFileDescriptor destination = pipe[1]) {
synchronized (mLock) {
mRenderer.renderPage(mPageIndex, bitmap.getWidth(), bitmap.getHeight(), if (mRenderer != null) {
mRenderSpec.printAttributes, destination); mRenderer.renderPage(mPageIndex, bitmap.getWidth(),
bitmap.getHeight(), mRenderSpec.printAttributes,
destination);
} else {
throw new IllegalStateException("Renderer is disconnected");
}
}
} }
BitmapSerializeUtils.readBitmapPixels(bitmap, source); BitmapSerializeUtils.readBitmapPixels(bitmap, source);