From 24fca180a146ec6e94a5058280c593216edbae15 Mon Sep 17 00:00:00 2001 From: Haibo Huang Date: Tue, 28 Apr 2020 14:47:47 -0700 Subject: [PATCH] Fix the use of pdfium FPDF_LoadPage returns FPDF_PAGE and that's also what expected by other APIs. There's no need for conversion. This works now because FPDF_PAGE is defined as void*. But will fails with new pdfium. Bug: 155031873 Change-Id: I74381ec8ec36797a5901ea3de845c2b5d798ba0c --- libs/hwui/jni/pdf/PdfEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hwui/jni/pdf/PdfEditor.cpp b/libs/hwui/jni/pdf/PdfEditor.cpp index 828d6e3992b6d..e65921ac8e0a9 100644 --- a/libs/hwui/jni/pdf/PdfEditor.cpp +++ b/libs/hwui/jni/pdf/PdfEditor.cpp @@ -110,7 +110,7 @@ static void nativeSetTransformAndClip(JNIEnv* env, jclass thiz, jlong documentPt jlong transformPtr, jint clipLeft, jint clipTop, jint clipRight, jint clipBottom) { FPDF_DOCUMENT document = reinterpret_cast(documentPtr); - FPDF_PAGE* page = (FPDF_PAGE*) FPDF_LoadPage(document, pageIndex); + FPDF_PAGE page = FPDF_LoadPage(document, pageIndex); if (!page) { jniThrowException(env, "java/lang/IllegalStateException", "cannot open page");