summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/util
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-09-25 15:46:33 -0700
committerJohn Hoford <hoford@google.com>2013-09-25 15:47:26 -0700
commitef3cc52f473f15534f00b61b55b53e93931fef97 (patch)
tree5899aa56fac7bcaa2d3a5cee94976bac38b462bc /src/com/android/gallery3d/util
parentc0b8a86ec7cb9b54053ca5cb38716a73d1ba171c (diff)
downloadandroid_packages_apps_Gallery2-ef3cc52f473f15534f00b61b55b53e93931fef97.tar.gz
android_packages_apps_Gallery2-ef3cc52f473f15534f00b61b55b53e93931fef97.tar.bz2
android_packages_apps_Gallery2-ef3cc52f473f15534f00b61b55b53e93931fef97.zip
disable print on older system.
Change-Id: I003aa965c885e6c7f65ade51b024bad400e8e458
Diffstat (limited to 'src/com/android/gallery3d/util')
-rw-r--r--src/com/android/gallery3d/util/PrintJob.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/util/PrintJob.java b/src/com/android/gallery3d/util/PrintJob.java
index c08f078b0..a593c2d90 100644
--- a/src/com/android/gallery3d/util/PrintJob.java
+++ b/src/com/android/gallery3d/util/PrintJob.java
@@ -22,6 +22,7 @@ import android.graphics.Matrix;
import android.graphics.RectF;
import android.graphics.pdf.PdfDocument.Page;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.os.CancellationSignal;
import android.os.ParcelFileDescriptor;
@@ -44,6 +45,13 @@ public class PrintJob {
// with a worst case of 150 dpi
private final static int MAX_PRINT_SIZE = 3500;
+ /**
+ * @return true if the system supports print
+ */
+ public static boolean systemSupportsPrint() {
+ return (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2);
+ }
+
public static void printBitmap(final Context context, final String jobName,
final Bitmap bitmap) {
if (bitmap == null) {