summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java b/platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java
index c18f44ab..ff6b6bbb 100644
--- a/platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java
+++ b/platform/android/src/com/artifex/mupdfdemo/MuPDFPageView.java
@@ -14,6 +14,7 @@ import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.RectF;
import android.net.Uri;
+import android.os.Build;
import android.text.method.PasswordTransformationMethod;
import android.view.LayoutInflater;
import android.view.WindowManager;
@@ -559,6 +560,11 @@ public class MuPDFPageView extends PageView implements MuPDFView {
return new MuPDFCancellableTaskDefinition<Void, Void>(mCore) {
@Override
public Void doInBackground(MuPDFCore.Cookie cookie, Void ... params) {
+ // Workaround bug in Android Honeycomb 3.x, where the bitmap generation count
+ // is not incremented when drawing.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB &&
+ Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH)
+ bm.eraseColor(0);
mCore.drawPage(bm, mPageNumber, sizeX, sizeY, patchX, patchY, patchWidth, patchHeight, cookie);
return null;
}
@@ -573,6 +579,11 @@ public class MuPDFPageView extends PageView implements MuPDFView {
@Override
public Void doInBackground(MuPDFCore.Cookie cookie, Void ... params) {
+ // Workaround bug in Android Honeycomb 3.x, where the bitmap generation count
+ // is not incremented when drawing.
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB &&
+ Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH)
+ bm.eraseColor(0);
mCore.updatePage(bm, mPageNumber, sizeX, sizeY, patchX, patchY, patchWidth, patchHeight, cookie);
return null;
}