Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d4374ef authored by suncx's avatar suncx Committed by Steve Kondik
Browse files

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: default avatarZhiquan Liu <zhiquan.liu@intel.com>
parent ecc58f4e
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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