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

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

Merge "Adding hidden APIs for observing the print jobs state." into klp-dev

parents 3adc49c6 704697b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ LOCAL_SRC_FILES += \
	core/java/android/print/IPrinterDiscoveryObserver.aidl \
	core/java/android/print/IPrintDocumentAdapter.aidl \
	core/java/android/print/IPrintClient.aidl \
	core/java/android/print/IPrintJobStateChangeListener.aidl \
	core/java/android/print/IPrintManager.aidl \
	core/java/android/print/IPrintSpooler.aidl \
	core/java/android/print/IPrintSpoolerCallbacks.aidl \
+8 −0
Original line number Diff line number Diff line
@@ -19372,6 +19372,13 @@ package android.print {
    method public void cancel();
    method public android.print.PrintJobId getId();
    method public android.print.PrintJobInfo getInfo();
    method public boolean isBlocked();
    method public boolean isCancelled();
    method public boolean isCompleted();
    method public boolean isFailed();
    method public boolean isQueued();
    method public boolean isStarted();
    method public void restart();
  }
  public final class PrintJobId implements android.os.Parcelable {
@@ -19384,6 +19391,7 @@ package android.print {
    method public int describeContents();
    method public android.print.PrintAttributes getAttributes();
    method public int getCopies();
    method public long getCreationTime();
    method public android.print.PrintJobId getId();
    method public java.lang.String getLabel();
    method public android.print.PageRange[] getPages();
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.print;

import android.print.PrintJobId;

/**
 * Interface for observing print job state changes.
 *
 * @hide
 */
oneway interface IPrintJobStateChangeListener {
    void onPrintJobStateChanged(in PrintJobId printJobId);
}
+6 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.print.IPrinterDiscoveryObserver;
import android.print.IPrintDocumentAdapter;
import android.print.IPrintClient;
import android.print.PrintJobId;
import android.print.IPrintJobStateChangeListener;
import android.print.PrinterId;
import android.print.PrintJobInfo;
import android.print.PrintAttributes;
@@ -39,6 +40,11 @@ interface IPrintManager {
    void cancelPrintJob(in PrintJobId printJobId, int appId, int userId);
    void restartPrintJob(in PrintJobId printJobId, int appId, int userId);

    void addPrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
            int appId, int userId);
    void removePrintJobStateChangeListener(in IPrintJobStateChangeListener listener,
            int userId);

    List<PrintServiceInfo> getEnabledPrintServices(int userId);

    void createPrinterDiscoverySession(in IPrinterDiscoveryObserver observer, int userId);
+2 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package android.print;

import android.content.ComponentName;
import android.print.PrintJobInfo;

import android.print.PrintJobId;

/**
 * Interface for receiving interesting state updates from the print spooler.
@@ -29,4 +29,5 @@ oneway interface IPrintSpoolerClient {
    void onPrintJobQueued(in PrintJobInfo printJob);
    void onAllPrintJobsForServiceHandled(in ComponentName printService);
    void onAllPrintJobsHandled();
    void onPrintJobStateChanged(in PrintJobId printJobId, int appId);
}
Loading