From 3d4374ef467d0f610b9bf1e9cacf0ca44f4d09ef Mon Sep 17 00:00:00 2001 From: suncx Date: Tue, 15 Sep 2015 15:57:09 +0800 Subject: The process PrintSpooler:renderer crashes in libpdfium.so. In PdfManipulationService.java, PdfEditorImpl shouldn't open the same ParcelFileDescriptor before PdfRendererImpl close it. In this case, add a lock to synchronize the two threads. Change-Id: Ia405b3d4fbccf56982212a21e4a586f69da0ddb5 Signed-off-by: Zhiquan Liu --- .../com/android/printspooler/renderer/PdfManipulationService.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'packages/PrintSpooler') diff --git a/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java b/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java index 7db2074..11a9a0e 100644 --- a/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java +++ b/packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java @@ -56,6 +56,7 @@ public final class PdfManipulationService extends Service { private static final int MILS_PER_INCH = 1000; private static final int POINTS_IN_INCH = 72; + private final Object mLock = new Object(); @Override public IBinder onBind(Intent intent) { @@ -74,8 +75,6 @@ public final class PdfManipulationService extends Service { } private final class PdfRendererImpl extends IPdfRenderer.Stub { - private final Object mLock = new Object(); - private Bitmap mBitmap; private PdfRenderer mRenderer; @@ -209,8 +208,6 @@ public final class PdfManipulationService extends Service { } private final class PdfEditorImpl extends IPdfEditor.Stub { - private final Object mLock = new Object(); - private PdfEditor mEditor; @Override -- cgit v1.1