/frameworks/base/core/java/android/print/ |
PrintAttributes.java | 81 private @Nullable MediaSize mMediaSize; 93 mMediaSize = (parcel.readInt() == 1) ? MediaSize.createFromParcel(parcel) : null; 111 public @Nullable MediaSize getMediaSize() { 118 * @param mediaSize The media size. 122 public void setMediaSize(MediaSize mediaSize) { 123 mMediaSize = mediaSize; 414 builder.append("mediaSize: ").append(mMediaSize); 455 public static final class MediaSize { 456 private static final String LOG_TAG = "MediaSize"; [all...] |
PrinterCapabilitiesInfo.java | 25 import android.print.PrintAttributes.MediaSize; 61 private @NonNull List<MediaSize> mMediaSizes; 98 mMediaSizes = new ArrayList<MediaSize>(other.mMediaSizes); 129 public @NonNull List<MediaSize> getMediaSizes() { 378 mMediaSizes = new ArrayList<MediaSize>(); 381 mMediaSizes.add(MediaSize.createFromParcel(parcel)); 468 * @param mediaSize A media size. 474 * @see PrintAttributes.MediaSize 476 public @NonNull Builder addMediaSize(@NonNull MediaSize mediaSize, boolean isDefault) [all...] |
/packages/services/BuiltInPrintService/src/com/android/bips/jni/ |
MediaSizes.java | 84 private final Map<String, PrintAttributes.MediaSize> mNameToSizeMap = new HashMap<>(); 87 mNameToSizeMap.put(LETTER, PrintAttributes.MediaSize.NA_LETTER); 88 mNameToSizeMap.put(LEGAL, PrintAttributes.MediaSize.NA_LEGAL); 89 mNameToSizeMap.put(ISO_A3, PrintAttributes.MediaSize.ISO_A3); 90 mNameToSizeMap.put(ISO_A4, PrintAttributes.MediaSize.ISO_A4); 91 mNameToSizeMap.put(ISO_A5, PrintAttributes.MediaSize.ISO_A5); 92 mNameToSizeMap.put(JPN_HAGAKI, PrintAttributes.MediaSize.JPN_HAGAKI); 93 mNameToSizeMap.put(JIS_B4, PrintAttributes.MediaSize.JIS_B4); 94 mNameToSizeMap.put(JIS_B5, PrintAttributes.MediaSize.JIS_B5); 95 mNameToSizeMap.put(NA_LEDGER_11X17, PrintAttributes.MediaSize.NA_TABLOID) [all...] |
/cts/tests/tests/print/src/android/print/cts/ |
PrinterCapabilitiesChangeTest.java | 23 import android.print.PrintAttributes.MediaSize; 65 private MediaSize mMsBefore; 67 private MediaSize mMsAfter; 81 * @param mediaSize The media size to use 86 private List<PrinterInfo> generatePrinters(PrinterId printerId, MediaSize mediaSize, 92 if (mediaSize != null) { 100 .addMediaSize(mediaSize, true) 118 * @param mediaSize The media size to match 122 private void waitForMediaSizeChange(PrintAttributes[] printAttributes, MediaSize mediaSize [all...] |
ClassParametersTest.java | 20 import android.print.PrintAttributes.MediaSize; 124 * Test that we cannot create PrintAttributes.mediaSize with illegal parameters. 130 assertException(() -> new MediaSize(null, "label", 10, 10), 132 assertException(() -> new MediaSize("", "label", 10, 10), 134 assertException(() -> new MediaSize("id", null, 10, 10), 136 assertException(() -> new MediaSize("id", "", 10, 10), 138 assertException(() -> new MediaSize("id", "label", -10, 10), 140 assertException(() -> new MediaSize("id", "label", 0, 10), 142 assertException(() -> new MediaSize("id", "label", 10, -10), 144 assertException(() -> new MediaSize("id", "label", 10, 0) [all...] |
PrintAttributesTest.java | 23 import android.print.PrintAttributes.MediaSize; 63 private final MediaSize MEDIA_SIZES[] = { 64 MediaSize.ISO_A3, MediaSize.ISO_A4, MediaSize.ISO_A5 93 * @param mediaSize {@link MediaSize} to use 100 private PrintAttributes createAttributes(MediaSize mediaSize, int colorMode, int duplexMode, 102 if (mediaSize == null && colorMode == 0 && duplexMode == 0 && resolution == null) [all...] |
PrinterCapabilitiesTest.java | 23 import android.print.PrintAttributes.MediaSize; 86 .addMediaSize(MediaSize.ISO_A4, true) 101 // Test no mediasize 109 // Test no default mediasize 115 .addMediaSize(MediaSize.ISO_A4, false) 121 .addMediaSize(MediaSize.ISO_A4, true) 122 .addMediaSize(MediaSize.ISO_A5, true), 130 .addMediaSize(MediaSize.ISO_A4, true).build(), 138 .addMediaSize(MediaSize.ISO_A4, true) 188 MediaSize[] mediaSizes = {MediaSize.ISO_A0, MediaSize.ISO_A0 [all...] |
CustomPrintOptionsTest.java | 23 import android.print.PrintAttributes.MediaSize; 70 private final MediaSize DEFAULT_MEDIA_SIZE = MediaSize.ISO_A0; 80 private final MediaSize[] MEDIA_SIZES = { DEFAULT_MEDIA_SIZE, MediaSize.ISO_B0 }; 235 * @param mediaSize The media size to use 236 * @param isPortrait If the mediaSize is portrait 244 final PageRange[] pages, final MediaSize mediaSize, final boolean isPortrait, 252 if (mediaSize != null) [all...] |
InterfaceForAppsTest.java | 72 .addMediaSize(PrintAttributes.MediaSize.ISO_A5, true) 73 .addMediaSize(PrintAttributes.MediaSize.ISO_A3, false) 364 PrintAttributes.MediaSize.ISO_A3.getLabel(getActivity().getPackageManager())); 379 assertEquals(PrintAttributes.MediaSize.ISO_A3.asLandscape(),
|
PrintDocumentInfoTest.java | 23 import android.print.PrintAttributes.MediaSize; 280 .addMediaSize(MediaSize.ISO_A0, true) 281 .addMediaSize(MediaSize.ISO_A5, false)
|
PrintDocumentAdapterContractTest.java | 30 import android.print.PrintAttributes.MediaSize; 165 .setMediaSize(MediaSize.ISO_A3) 438 changeMediaSize(MediaSize.ISO_A0.getLabel(getActivity().getPackageManager())); 496 .setMediaSize(MediaSize.ISO_A3) 509 .setMediaSize(MediaSize.ISO_A3.asLandscape()) 522 .setMediaSize(MediaSize.ISO_A0.asLandscape()) 535 .setMediaSize(MediaSize.ISO_A0.asLandscape()) 548 .setMediaSize(MediaSize.ISO_A0.asLandscape()) 757 .setMediaSize(MediaSize.ISO_A3 [all...] |
PrinterInfoTest.java | 24 import android.print.PrintAttributes.MediaSize; 115 .addMediaSize(MediaSize.ISO_A4, true)
|
PageRangeAdjustmentTest.java | 28 import android.print.PrintAttributes.MediaSize; 519 .addMediaSize(MediaSize.ISO_A4, true) 520 .addMediaSize(MediaSize.ISO_A5, false)
|
PrinterDiscoverySessionLifecycleTest.java | 25 import android.print.PrintAttributes.MediaSize; 550 .addMediaSize(MediaSize.ISO_A4, true) 551 .addMediaSize(MediaSize.ISO_A5, false)
|
PrintJobStateTransitionsTest.java | 21 import android.print.PrintAttributes.MediaSize; 92 .addMediaSize(MediaSize.ISO_A4, true)
|
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/util/ |
MediaSizeUtils.java | 23 import android.print.PrintAttributes.MediaSize; 36 private static Map<MediaSize, Integer> sMediaSizeToStandardMap; 51 public static MediaSize getDefault(Context context) { 53 return MediaSize.getStandardMediaSizeById(mediaSizeId); 57 * Get the standard the {@link MediaSize} belongs to. 60 * @param mediaSize The {@link MediaSize} to be resolved 62 * @return The standard the {@link MediaSize} belongs to 64 private static int getStandardForMediaSize(Context context, MediaSize mediaSize) { [all...] |
/cts/tests/tests/print/src/android/print/pdf/cts/ |
PrintedPdfDocumentTest.java | 62 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 70 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 80 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 91 .setMediaSize(new PrintAttributes.MediaSize("oneMil", "oneMil", 1, 1)).build(); 117 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 127 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 137 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 149 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 162 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build(); 172 .setMediaSize(PrintAttributes.MediaSize.ISO_A4).build() [all...] |
/frameworks/base/core/java/android/print/pdf/ |
PrintedPdfDocument.java | 26 import android.print.PrintAttributes.MediaSize; 84 MediaSize mediaSize = attributes.getMediaSize(); 87 mPageWidth = (int) (((float) mediaSize.getWidthMils() / MILS_PER_INCH) 89 mPageHeight = (int) (((float) mediaSize.getHeightMils() / MILS_PER_INCH)
|
/packages/experimental/PrintService/src/foo/bar/printservice/ |
CustomPrintOptionsActivity.java | 8 import android.print.PrintAttributes.MediaSize; 34 .setMediaSize(MediaSize.ISO_A5)
|
MyPrintService.java | 34 import android.print.PrintAttributes.MediaSize; 453 .addMediaSize(MediaSize.ISO_A4, true) 454 .addMediaSize(MediaSize.NA_GOVT_LETTER, false) 455 .addMediaSize(MediaSize.JPN_YOU4, false)
|
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/widget/ |
PageContentView.java | 22 import android.print.PrintAttributes.MediaSize; 41 private MediaSize mMediaSize; 80 MediaSize mediaSize, Margins minMargins) { 86 ? mediaSize != null : !mMediaSize.equals(mediaSize); 97 mMediaSize = mediaSize;
|
/frameworks/base/packages/PrintSpooler/tests/outofprocess/src/com/android/printspooler/outofprocess/tests/ |
WorkflowTest.java | 70 private PrintAttributes.MediaSize mFirst; 72 private PrintAttributes.MediaSize mSecond; 74 public WorkflowTest(PrintAttributes.MediaSize first, boolean selectPrinter, 75 PrintAttributes.MediaSize second) { 172 /** Add a printer with a given name and supported mediasize to a session */ 174 String name, PrintAttributes.MediaSize mediaSize) { 182 if (mediaSize != null) { 186 .addMediaSize(mediaSize, true) 227 ArrayList<String> trackedPrinters, PrintAttributes.MediaSize mediaSize) [all...] |
/frameworks/support/core-utils/kitkat/android/support/v4/print/ |
PrintHelperKitkat.java | 37 import android.print.PrintAttributes.MediaSize; 235 PrintAttributes.MediaSize mediaSize; 237 mediaSize = PrintAttributes.MediaSize.UNKNOWN_PORTRAIT; 239 mediaSize = PrintAttributes.MediaSize.UNKNOWN_LANDSCAPE; 242 .setMediaSize(mediaSize) 515 MediaSize mediaSize; [all...] |
/frameworks/base/packages/PrintSpooler/src/com/android/printspooler/ui/ |
PrintPreviewController.java | 24 import android.print.PrintAttributes.MediaSize; 132 PageRange[] writtenPages, PageRange[] selectedPages, MediaSize mediaSize, 164 args.arg3 = mediaSize; 299 MediaSize mediaSize = (MediaSize) args.arg3; 305 mediaSize, margins);
|
PrintActivity.java | 53 import android.print.PrintAttributes.MediaSize; 208 private ArrayAdapter<SpinnerItem<MediaSize>> mMediaSizeSpinnerAdapter; 837 MediaSize oldMediaSize = currAttributes.getMediaSize(); 838 MediaSize newMediaSize = newAttributes.getMediaSize(); 841 MediaSize newMediaSizePortrait = newAttributes.getMediaSize().asPortrait(); 843 MediaSize supportedSizePortrait = mMediaSizeSpinnerAdapter.getItem(i) [all...] |