Merge "Print API for N: Fix docs and change interfaces as requested." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
50a871857d
@@ -30330,7 +30330,7 @@ package android.print.pdf {
|
||||
|
||||
package android.printservice {
|
||||
|
||||
public class CustomPrinterIconCallback {
|
||||
public final class CustomPrinterIconCallback {
|
||||
method public boolean onCustomPrinterIconLoaded(android.graphics.drawable.Icon);
|
||||
}
|
||||
|
||||
|
||||
@@ -32829,7 +32829,7 @@ package android.print.pdf {
|
||||
|
||||
package android.printservice {
|
||||
|
||||
public class CustomPrinterIconCallback {
|
||||
public final class CustomPrinterIconCallback {
|
||||
method public boolean onCustomPrinterIconLoaded(android.graphics.drawable.Icon);
|
||||
}
|
||||
|
||||
|
||||
@@ -30402,7 +30402,7 @@ package android.print.pdf {
|
||||
|
||||
package android.printservice {
|
||||
|
||||
public class CustomPrinterIconCallback {
|
||||
public final class CustomPrinterIconCallback {
|
||||
method public boolean onCustomPrinterIconLoaded(android.graphics.drawable.Icon);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import android.util.Log;
|
||||
/**
|
||||
* Callback for {@link PrinterDiscoverySession#onRequestCustomPrinterIcon}.
|
||||
*/
|
||||
public class CustomPrinterIconCallback {
|
||||
public final class CustomPrinterIconCallback {
|
||||
/** The printer the call back is for */
|
||||
private final @NonNull PrinterId mPrinterId;
|
||||
private final @NonNull IPrintServiceClient mObserver;
|
||||
|
||||
@@ -347,18 +347,15 @@ public final class PrintJob {
|
||||
* <p />
|
||||
* This overrides any previously set status set via {@link #setStatus(CharSequence)},
|
||||
* {@link #setStatus(int)}, {@link #block(String)}, or {@link #fail(String)},
|
||||
* <p />
|
||||
* To clear the status use {@link #setStatus(CharSequence) <code>setStatus(null)</code>}
|
||||
*
|
||||
* @param status The new status as a String resource.
|
||||
* @param statusResId The new status as a String resource. If 0 the status will be empty.
|
||||
*/
|
||||
@MainThread
|
||||
public void setStatus(@StringRes int status) {
|
||||
public void setStatus(@StringRes int statusResId) {
|
||||
PrintService.throwIfNotCalledOnMainThread();
|
||||
Preconditions.checkArgument(status != 0, "status has to be != 0");
|
||||
|
||||
try {
|
||||
mPrintServiceClient.setStatusRes(mCachedInfo.getId(), status,
|
||||
mPrintServiceClient.setStatusRes(mCachedInfo.getId(), statusResId,
|
||||
mContext.getPackageName());
|
||||
} catch (RemoteException re) {
|
||||
Log.e(LOG_TAG, "Error setting status for job: " + mCachedInfo.getId(), re);
|
||||
|
||||
@@ -408,15 +408,15 @@ public abstract class PrinterDiscoverySession {
|
||||
public abstract void onStartPrinterStateTracking(@NonNull PrinterId printerId);
|
||||
|
||||
/**
|
||||
* Request the custom icon for a printer. Once the icon is available use
|
||||
* {@link CustomPrinterIconCallback#onCustomPrinterIconLoaded} to send the data to the print
|
||||
* service.
|
||||
* Called by the system to request the custom icon for a printer. Once the icon is available the
|
||||
* print services uses {@link CustomPrinterIconCallback#onCustomPrinterIconLoaded} to send the
|
||||
* icon to the system.
|
||||
*
|
||||
* @param printerId The printer to icon belongs to.
|
||||
* @param cancellationSignal Signal used to cancel the request
|
||||
* @param callback Callback for returning the icon to the print spooler.
|
||||
* @param cancellationSignal Signal used to cancel the request.
|
||||
* @param callback Callback for returning the icon to the system.
|
||||
*
|
||||
* @see android.print.PrinterInfo.Builder#setHasCustomPrinterIcon()
|
||||
* @see android.print.PrinterInfo.Builder#setHasCustomPrinterIcon(boolean)
|
||||
*/
|
||||
public void onRequestCustomPrinterIcon(@NonNull PrinterId printerId,
|
||||
@NonNull CancellationSignal cancellationSignal,
|
||||
|
||||
Reference in New Issue
Block a user