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

Commit 641be74b authored by John Hoford's avatar John Hoford
Browse files

enable change in printing

Change-Id: Ibf819002d29b83b4a8d72e7916d04f1c88a6bef2
parent ef3cc52f
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -44,12 +44,23 @@ public class PrintJob {
    // will be <= 300 dpi on A4 (8.3×11.7) paper
    // with a worst case of 150 dpi
    private final static int MAX_PRINT_SIZE = 3500;
    static Boolean sNoPrint = null;

    /**
     * @return true if the system supports print
     */
    public static boolean systemSupportsPrint() {
        return (android.os.Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2);
        // TODO change the code to call a support library
        if (sNoPrint != null) {
            return sNoPrint;
        }
        try {
            Class c = Class.forName("android.print.PrintManager");
            sNoPrint = true;
        } catch (ClassNotFoundException e) {
            sNoPrint = false;
        }
        return sNoPrint;
    }

    public static void printBitmap(final Context context, final String jobName,