Home
last modified time | relevance | path

Searched refs:printerId (Results 1 – 25 of 27) sorted by relevance

12

/frameworks/base/services/print/java/com/android/server/print/
DRemotePrintService.java111 public void onCustomPrinterIconLoaded(PrinterId printerId, Icon icon); in onCustomPrinterIconLoaded() argument
406 public void startPrinterStateTracking(@NonNull PrinterId printerId) { in startPrinterStateTracking() argument
408 printerId).sendToTarget(); in startPrinterStateTracking()
417 public void requestCustomPrinterIcon(@NonNull PrinterId printerId) { in requestCustomPrinterIcon() argument
419 printerId).sendToTarget(); in requestCustomPrinterIcon()
428 private void handleRequestCustomPrinterIcon(@NonNull PrinterId printerId) { in handleRequestCustomPrinterIcon() argument
431 mPendingCommands.add(() -> handleRequestCustomPrinterIcon(printerId)); in handleRequestCustomPrinterIcon()
438 mPrintService.requestCustomPrinterIcon(printerId); in handleRequestCustomPrinterIcon()
440 Slog.e(LOG_TAG, "Error requesting icon for " + printerId, re); in handleRequestCustomPrinterIcon()
445 private void handleStartPrinterStateTracking(final @NonNull PrinterId printerId) { in handleStartPrinterStateTracking() argument
[all …]
DUserState.java325 public @Nullable Icon getCustomPrinterIcon(@NonNull PrinterId printerId) { in getCustomPrinterIcon() argument
326 Icon icon = mSpooler.getCustomPrinterIcon(printerId); in getCustomPrinterIcon()
329 RemotePrintService service = mActiveServices.get(printerId.getServiceName()); in getCustomPrinterIcon()
331 service.requestCustomPrinterIcon(printerId); in getCustomPrinterIcon()
348 PrinterId printerId = printJobInfo.getPrinterId(); in cancelPrintJob() local
350 if (printerId != null) { in cancelPrintJob()
351 ComponentName printServiceName = printerId.getServiceName(); in cancelPrintJob()
524 public void startPrinterStateTracking(@NonNull PrinterId printerId) { in startPrinterStateTracking() argument
536 mPrinterDiscoverySession.startPrinterStateTrackingLocked(printerId); in startPrinterStateTracking()
540 public void stopPrinterStateTracking(PrinterId printerId) { in stopPrinterStateTracking() argument
[all …]
DPrintManagerService.java191 public Icon getCustomPrinterIcon(PrinterId printerId, int userId) { in getCustomPrinterIcon() argument
192 printerId = Preconditions.checkNotNull(printerId); in getCustomPrinterIcon()
205 return userState.getCustomPrinterIcon(printerId); in getCustomPrinterIcon()
453 public void startPrinterStateTracking(PrinterId printerId, int userId) { in startPrinterStateTracking() argument
454 printerId = Preconditions.checkNotNull(printerId); in startPrinterStateTracking()
467 userState.startPrinterStateTracking(printerId); in startPrinterStateTracking()
474 public void stopPrinterStateTracking(PrinterId printerId, int userId) { in stopPrinterStateTracking() argument
475 printerId = Preconditions.checkNotNull(printerId); in stopPrinterStateTracking()
488 userState.stopPrinterStateTracking(printerId); in stopPrinterStateTracking()
DRemotePrintSpooler.java368 public final void onCustomPrinterIconLoaded(@NonNull PrinterId printerId, in onCustomPrinterIconLoaded() argument
377 printerId, icon); in onCustomPrinterIconLoaded() local
401 public final @Nullable Icon getCustomPrinterIcon(@NonNull PrinterId printerId) { in getCustomPrinterIcon() argument
409 printerId); in getCustomPrinterIcon()
813 public Void onCustomPrinterIconLoaded(IPrintSpooler target, PrinterId printerId, in onCustomPrinterIconLoaded() argument
816 target.onCustomPrinterIconLoaded(printerId, icon, mCallback, sequence); in onCustomPrinterIconLoaded()
855 public Icon getCustomPrinterIcon(IPrintSpooler target, PrinterId printerId) in getCustomPrinterIcon() argument
858 target.getCustomPrinterIcon(printerId, mCallback, sequence); in getCustomPrinterIcon()
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/model/
DCustomPrinterIconCache.java66 private @Nullable File getIconFileName(@NonNull PrinterId printerId) { in getIconFileName() argument
67 StringBuffer sb = new StringBuffer(printerId.getServiceName().getPackageName()); in getIconFileName()
73 (printerId.getServiceName().getClassName() + ":" + printerId.getLocalId()) in getIconFileName()
91 public synchronized @Nullable Icon getIcon(@NonNull PrinterId printerId) { in getIcon() argument
94 File iconFile = getIconFileName(printerId); in getIcon()
140 public synchronized void onCustomPrinterIconLoaded(@NonNull PrinterId printerId, in onCustomPrinterIconLoaded() argument
142 File iconFile = getIconFileName(printerId); in onCustomPrinterIconLoaded()
151 Log.e(LOG_TAG, "Could not write icon for " + printerId + " to storage", e); in onCustomPrinterIconLoaded()
DPrintSpoolerService.java290 PrinterId printerId = printJob.getPrinterId(); in getPrintJobInfos() local
292 || (printerId != null in getPrintJobInfos()
293 && componentName.equals(printerId.getServiceName()))); in getPrintJobInfos()
546 PrinterId printerId = printJob.getPrinterId(); in setPrintJobState() local
547 if (printerId != null) { in setPrintJobState()
548 ComponentName service = printerId.getServiceName(); in setPrintJobState()
757 public void onCustomPrinterIconLoaded(PrinterId printerId, Icon icon) { in onCustomPrinterIconLoaded() argument
758 mCustomIconCache.onCustomPrinterIconLoaded(printerId, icon); in onCustomPrinterIconLoaded()
770 public Icon getCustomPrinterIcon(PrinterId printerId) { in getCustomPrinterIcon() argument
771 return mCustomIconCache.getIcon(printerId); in getCustomPrinterIcon()
[all …]
/frameworks/base/core/tests/coretests/src/android/print/mockservice/
DStubbablePrinterDiscoverySession.java67 public void onStartPrinterStateTracking(@NonNull PrinterId printerId) { in onStartPrinterStateTracking() argument
69 mCallbacks.onStartPrinterStateTracking(printerId); in onStartPrinterStateTracking()
74 public void onRequestCustomPrinterIcon(@NonNull PrinterId printerId, in onRequestCustomPrinterIcon() argument
78 mCallbacks.onRequestCustomPrinterIcon(printerId, cancellationSignal, callback); in onRequestCustomPrinterIcon()
83 public void onStopPrinterStateTracking(@NonNull PrinterId printerId) { in onStopPrinterStateTracking() argument
85 mCallbacks.onStopPrinterStateTracking(printerId); in onStopPrinterStateTracking()
DPrinterDiscoverySessionCallbacks.java43 public abstract void onStartPrinterStateTracking(PrinterId printerId); in onStartPrinterStateTracking() argument
45 public abstract void onRequestCustomPrinterIcon(PrinterId printerId, in onRequestCustomPrinterIcon() argument
48 public abstract void onStopPrinterStateTracking(PrinterId printerId); in onStopPrinterStateTracking() argument
/frameworks/base/core/java/android/printservice/
DPrinterDiscoverySession.java408 public abstract void onStartPrinterStateTracking(@NonNull PrinterId printerId); in onStartPrinterStateTracking() argument
421 public void onRequestCustomPrinterIcon(@NonNull PrinterId printerId, in onRequestCustomPrinterIcon() argument
435 public abstract void onStopPrinterStateTracking(@NonNull PrinterId printerId); in onStopPrinterStateTracking() argument
521 void startPrinterStateTracking(@NonNull PrinterId printerId) { in startPrinterStateTracking() argument
523 && !mTrackedPrinters.contains(printerId)) { in startPrinterStateTracking()
524 mTrackedPrinters.add(printerId); in startPrinterStateTracking()
525 onStartPrinterStateTracking(printerId); in startPrinterStateTracking()
535 void requestCustomPrinterIcon(@NonNull PrinterId printerId) { in requestCustomPrinterIcon() argument
537 CustomPrinterIconCallback callback = new CustomPrinterIconCallback(printerId, in requestCustomPrinterIcon()
539 onRequestCustomPrinterIcon(printerId, new CancellationSignal(), callback); in requestCustomPrinterIcon()
[all …]
DPrintService.java417 public void startPrinterStateTracking(PrinterId printerId) { in onBind() argument
419 printerId).sendToTarget(); in onBind()
423 public void requestCustomPrinterIcon(PrinterId printerId) { in onBind() argument
425 printerId).sendToTarget(); in onBind()
429 public void stopPrinterStateTracking(PrinterId printerId) { in onBind() argument
431 printerId).sendToTarget(); in onBind()
542 PrinterId printerId = (PrinterId) message.obj;
543 mDiscoverySession.startPrinterStateTracking(printerId);
553 PrinterId printerId = (PrinterId) message.obj;
554 mDiscoverySession.requestCustomPrinterIcon(printerId);
[all …]
DIPrintService.aidl37 void startPrinterStateTracking(in PrinterId printerId); in startPrinterStateTracking() argument
45 void requestCustomPrinterIcon(in PrinterId printerId); in requestCustomPrinterIcon() argument
47 void stopPrinterStateTracking(in PrinterId printerId); in stopPrinterStateTracking() argument
DCustomPrinterIconCallback.java42 CustomPrinterIconCallback(@NonNull PrinterId printerId, @NonNull IPrintServiceClient observer) { in CustomPrinterIconCallback() argument
43 mPrinterId = printerId; in CustomPrinterIconCallback()
DIPrintServiceClient.aidl74 void onCustomPrinterIconLoaded(in PrinterId printerId, in Icon icon); in onCustomPrinterIconLoaded() argument
/frameworks/base/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/mockservice/
DStubbablePrinterDiscoverySession.java67 public void onStartPrinterStateTracking(@NonNull PrinterId printerId) { in onStartPrinterStateTracking() argument
69 mCallbacks.onStartPrinterStateTracking(printerId); in onStartPrinterStateTracking()
74 public void onRequestCustomPrinterIcon(@NonNull PrinterId printerId, in onRequestCustomPrinterIcon() argument
78 mCallbacks.onRequestCustomPrinterIcon(printerId, cancellationSignal, callback); in onRequestCustomPrinterIcon()
83 public void onStopPrinterStateTracking(@NonNull PrinterId printerId) { in onStopPrinterStateTracking() argument
85 mCallbacks.onStopPrinterStateTracking(printerId); in onStopPrinterStateTracking()
DPrinterDiscoverySessionCallbacks.java43 public abstract void onStartPrinterStateTracking(PrinterId printerId); in onStartPrinterStateTracking() argument
45 public abstract void onRequestCustomPrinterIcon(PrinterId printerId, in onRequestCustomPrinterIcon() argument
48 public abstract void onStopPrinterStateTracking(PrinterId printerId); in onStopPrinterStateTracking() argument
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/
DPrinterRegistry.java83 public void forgetFavoritePrinter(PrinterId printerId) { in forgetFavoritePrinter() argument
86 provider.forgetFavoritePrinter(printerId); in forgetFavoritePrinter()
90 public boolean isFavoritePrinter(PrinterId printerId) { in isFavoritePrinter() argument
93 return provider.isFavoritePrinter(printerId); in isFavoritePrinter()
98 public void setTrackedPrinter(@Nullable PrinterId printerId) { in setTrackedPrinter() argument
101 provider.setTrackedPrinter(printerId); in setTrackedPrinter()
DFusedPrintersProvider.java463 public void setTrackedPrinter(@Nullable PrinterId printerId) { in setTrackedPrinter() argument
467 if (mTrackedPrinter.equals(printerId)) { in setTrackedPrinter()
472 mTrackedPrinter = printerId; in setTrackedPrinter()
473 if (printerId != null) { in setTrackedPrinter()
474 mDiscoverySession.startPrinterStateTracking(printerId); in setTrackedPrinter()
479 public boolean isFavoritePrinter(PrinterId printerId) { in isFavoritePrinter() argument
483 if (favoritePritner.getId().equals(printerId)) { in isFavoritePrinter()
490 public void forgetFavoritePrinter(PrinterId printerId) { in forgetFavoritePrinter() argument
497 if (!mFavoritePrinters.get(i).first.getId().equals(printerId)) { in forgetFavoritePrinter()
503 mPersistenceManager.removeHistoricalPrinterAndWritePrinterHistory(printerId); in forgetFavoritePrinter()
[all …]
DPrintActivity.java2299 public int getPrinterIndex(PrinterId printerId) { in getPrinterIndex() argument
2302 if (printerHolder != null && printerHolder.printer.getId().equals(printerId)) { in getPrinterIndex()
2559 public PrinterHolder getPrinterHolder(PrinterId printerId) { in getPrinterHolder() argument
2565 if (printerId.equals(printerHolder.printer.getId())) { in getPrinterHolder()
2580 public boolean pruneRemovedPrinter(PrinterId printerId) { in pruneRemovedPrinter() argument
2585 if (printerHolder.printer.getId().equals(printerId) && printerHolder.removed) { in pruneRemovedPrinter()
2605 PrinterId printerId = new PrinterId(getComponentName(), "PDF printer"); in createFakePdfPrinter() local
2608 new PrinterCapabilitiesInfo.Builder(printerId); in createFakePdfPrinter()
2621 return new PrinterInfo.Builder(printerId, getString(R.string.save_as_pdf), in createFakePdfPrinter()
/frameworks/base/core/java/android/print/
DIPrintManager.aidl129 void startPrinterStateTracking(in PrinterId printerId, int userId); in startPrinterStateTracking() argument
141 Icon getCustomPrinterIcon(in PrinterId printerId, int userId); in getCustomPrinterIcon() argument
143 void stopPrinterStateTracking(in PrinterId printerId, int userId); in stopPrinterStateTracking() argument
DPrinterInfo.java92 private PrinterInfo(@NonNull PrinterId printerId, @NonNull String name, @Status int status, in PrinterInfo() argument
96 mId = printerId; in PrinterInfo()
234 private static @NonNull PrinterId checkPrinterId(PrinterId printerId) { in checkPrinterId() argument
235 return Preconditions.checkNotNull(printerId, "printerId cannot be null."); in checkPrinterId()
419 public Builder(@NonNull PrinterId printerId, @NonNull String name, @Status int status) { in Builder() argument
420 mPrinterId = checkPrinterId(printerId); in Builder()
DPrinterDiscoverySession.java107 public final void startPrinterStateTracking(@NonNull PrinterId printerId) { in startPrinterStateTracking() argument
113 mPrintManager.startPrinterStateTracking(printerId, mUserId); in startPrinterStateTracking()
119 public final void stopPrinterStateTracking(@NonNull PrinterId printerId) { in stopPrinterStateTracking() argument
125 mPrintManager.stopPrinterStateTracking(printerId, mUserId); in stopPrinterStateTracking()
DIPrintSpooler.aidl81 void onCustomPrinterIconLoaded(in PrinterId printerId, in Icon icon, in onCustomPrinterIconLoaded() argument
93 void getCustomPrinterIcon(in PrinterId printerId, in getCustomPrinterIcon() argument
DPrintJobInfo.java313 public void setPrinterId(@NonNull PrinterId printerId) { in setPrinterId() argument
314 mPrinterId = printerId; in setPrinterId()
DPrinterCapabilitiesInfo.java455 public Builder(@NonNull PrinterId printerId) { in Builder() argument
456 if (printerId == null) { in Builder()
/frameworks/base/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/
DWorkflowTest.java175 PrinterId printerId = session.getService().generatePrinterId(name); in addPrinter() local
179 new PrinterCapabilitiesInfo.Builder(printerId); in addPrinter()
190 printerInfo = new PrinterInfo.Builder(printerId, name, in addPrinter()
193 printerInfo = (new PrinterInfo.Builder(printerId, name, in addPrinter()

12