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

Commit adade10a authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android (Google) Code Review
Browse files

Merge "KLP API Review: PrintDocumentAdapter documentation" into klp-dev

parents 0e907e83 19fba5d3
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ public abstract class PrintDocumentAdapter {
     * the last argument <code>true</code> or <code>false</code> depending on
     * whether the layout changed the content or not, respectively; and {@link
     * LayoutResultCallback#onLayoutFailed(CharSequence)}, if an error occurred.
     * Note that you must call one of the methods of the given callback.
     * </p>
     * <p>
     * When doing a layout you may satisfy some of the constraints in the print
@@ -147,13 +148,14 @@ public abstract class PrintDocumentAdapter {

    /**
     * Called when specific pages of the content should be written in the
     * from of a PDF file to the given file descriptor. This method is invoked
     * form of a PDF file to the given file descriptor. This method is invoked
     * on the main thread.
     *<p>
     * After you are done writing, you should close the file descriptor and
     * invoke {@link WriteResultCallback #onWriteFinished(List)}, if writing
     * invoke {@link WriteResultCallback #onWriteFinished(PageRange[]), if writing
     * completed successfully; or {@link WriteResultCallback#onWriteFailed(
     * CharSequence)}, if an error occurred.
     * CharSequence)}, if an error occurred. Note that you must call one of
     * the methods of the given callback.
     * </p>
     * <p>
     * <strong>Note:</strong> If the printed content is large, it is a good
+5 −4
Original line number Diff line number Diff line
@@ -36,10 +36,11 @@ import java.io.InputStream;
import java.io.OutputStream;

/**
 * Adapter for printing files. This class could be useful if you
 * Adapter for printing PDF files. This class could be useful if you
 * want to print a file and intercept when the system is ready
 * spooling the data, so you can deleted the file if it is a
 * temporary one.
 * spooling the data, so you can delete the file if it is a
 * temporary one. To achieve this one must override {@link #onFinish()}
 * and delete the file yourself.
 */
public class PrintFileDocumentAdapter extends PrintDocumentAdapter {

@@ -57,7 +58,7 @@ public class PrintFileDocumentAdapter extends PrintDocumentAdapter {
     * Constructor.
     *
     * @param context Context for accessing resources.
     * @param file The file to print.
     * @param file The PDF file to print.
     * @param documentInfo The information about the printed file.
     */
    public PrintFileDocumentAdapter(Context context, File file,