summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsuncx <changyingx.sun@intel.com>2015-09-15 15:57:09 +0800
committerSteve Kondik <steve@cyngn.com>2015-11-07 05:40:42 -0800
commit3d4374ef467d0f610b9bf1e9cacf0ca44f4d09ef (patch)
tree0e7f8337aa8c8f33b877b3c27caa597a2228fdc1
parentecc58f4ef77bacabf8751b37a340439637666008 (diff)
downloadframeworks_base-3d4374ef467d0f610b9bf1e9cacf0ca44f4d09ef.zip
frameworks_base-3d4374ef467d0f610b9bf1e9cacf0ca44f4d09ef.tar.gz
frameworks_base-3d4374ef467d0f610b9bf1e9cacf0ca44f4d09ef.tar.bz2
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 <zhiquan.liu@intel.com>
-rw-r--r--packages/PrintSpooler/src/com/android/printspooler/renderer/PdfManipulationService.java5
1 files changed, 1 insertions, 4 deletions
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