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

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

Merge "Implement persistence/restoring of print spooler state."

parents 36ceea80 88d19913
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -18560,14 +18560,14 @@ package android.print {
    ctor public PrintAttributes.Resolution(java.lang.String, java.lang.CharSequence, int, int);
    method public int getHorizontalDpi();
    method public java.lang.String getId();
    method public java.lang.CharSequence getLabel(android.content.pm.PackageManager);
    method public java.lang.CharSequence getLabel();
    method public int getVerticalDpi();
  }
  public static final class PrintAttributes.Tray {
    ctor public PrintAttributes.Tray(java.lang.String, java.lang.CharSequence);
    method public java.lang.String getId();
    method public java.lang.CharSequence getLabel(android.content.pm.PackageManager);
    method public java.lang.CharSequence getLabel();
  }
  public abstract class PrintDocumentAdapter {
@@ -18628,7 +18628,6 @@ package android.print {
    field public static final int PRINT_JOB_ID_UNDEFINED = -1; // 0xffffffff
    field public static final int STATE_CANCELED = 6; // 0x6
    field public static final int STATE_COMPLETED = 4; // 0x4
    field public static final int STATE_CREATED = 1; // 0x1
    field public static final int STATE_FAILED = 5; // 0x5
    field public static final int STATE_QUEUED = 2; // 0x2
    field public static final int STATE_STARTED = 3; // 0x3
+3 −1
Original line number Diff line number Diff line
@@ -42,8 +42,10 @@ public final class PageRange implements Parcelable {
     * @throws IllegalArgumentException If start is less than zero.
     * @throws IllegalArgumentException If end is less than zero.
     * @throws IllegalArgumentException If start greater than end.
     *
     * @hide
     */
    PageRange(int start, int end) {
    public PageRange(int start, int end) {
        if (start < 0) {
            throw new IllegalArgumentException("start cannot be less than zero.");
        }
+2 −2
Original line number Diff line number Diff line
@@ -1007,7 +1007,7 @@ public final class PrintAttributes implements Parcelable {
         *
         * @return The human readable label.
         */
        public CharSequence getLabel(PackageManager packageManager) {
        public CharSequence getLabel() {
            return mLabel;
        }

@@ -1203,7 +1203,7 @@ public final class PrintAttributes implements Parcelable {
         *
         * @return The human readable label.
         */
        public CharSequence getLabel(PackageManager packageManager) {
        public CharSequence getLabel() {
            return mLabel;
        }

+10 −0
Original line number Diff line number Diff line
@@ -110,6 +110,16 @@ public final class PrintDocumentInfo implements Parcelable {
        parcel.writeInt(mContentType);
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("PrintDocumentInfo{");
        builder.append("pageCount: ").append(mPageCount);
        builder.append(", contentType: ").append(mContentType);
        builder.append("}");
        return builder.toString();
    }

    /**
     * Builder for creating an {@link PrintDocumentInfo}.
     */
+12 −0
Original line number Diff line number Diff line
@@ -34,12 +34,21 @@ public final class PrintJobInfo implements Parcelable {
     */
    public static final int STATE_ANY = -1;

    /**
     * Constant for matching any print job state.
     *
     * @hide
     */
    public static final int STATE_ANY_VISIBLE_TO_CLIENTS = -2;

    /**
     * Print job state: The print job is being created but not yet
     * ready to be printed.
     * <p>
     * Next valid states: {@link #STATE_QUEUED}
     * </p>
     *
     * @hide
     */
    public static final int STATE_CREATED = 1;

@@ -132,6 +141,7 @@ public final class PrintJobInfo implements Parcelable {
        mState = other.mState;
        mAppId = other.mAppId;
        mUserId = other.mUserId;
        mTag = other.mTag;
        mAttributes = other.mAttributes;
        mDocumentInfo = other.mDocumentInfo;
    }
@@ -143,6 +153,7 @@ public final class PrintJobInfo implements Parcelable {
        mState = parcel.readInt();
        mAppId = parcel.readInt();
        mUserId = parcel.readInt();
        mTag = parcel.readString();
        if (parcel.readInt() == 1) {
            mPageRanges = (PageRange[]) parcel.readParcelableArray(null);
        }
@@ -373,6 +384,7 @@ public final class PrintJobInfo implements Parcelable {
        parcel.writeInt(mState);
        parcel.writeInt(mAppId);
        parcel.writeInt(mUserId);
        parcel.writeString(mTag);
        if (mPageRanges != null) {
            parcel.writeInt(1);
            parcel.writeParcelableArray(mPageRanges, flags);
Loading