diff options
author | Philip P. Moltmann <moltmann@google.com> | 2015-11-11 09:38:23 -0800 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2015-11-11 09:38:23 -0800 |
commit | 5e4bda9bd4ff1ec31b65f07c800daf4586bc48ac (patch) | |
tree | 58e806666d681ae7469db6b21229d5bfdc25e4cb | |
parent | 7b02b6bbaf0b4330ac05fda8cd47f4044ee2740a (diff) | |
download | experimental-5e4bda9bd4ff1ec31b65f07c800daf4586bc48ac.tar.gz |
Add duplex mode and media sizes with long and short names to foo.bar.printservice.
Change-Id: Ifdef42bed135892407b83c364d149b6b3bfb5d5d
-rw-r--r-- | PrintService/src/foo/bar/printservice/MyPrintService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/PrintService/src/foo/bar/printservice/MyPrintService.java b/PrintService/src/foo/bar/printservice/MyPrintService.java index f185642..ebf3cdf 100644 --- a/PrintService/src/foo/bar/printservice/MyPrintService.java +++ b/PrintService/src/foo/bar/printservice/MyPrintService.java @@ -383,7 +383,8 @@ public class MyPrintService extends PrintService { new PrinterCapabilitiesInfo.Builder(printerId) .setMinMargins(new Margins(200, 200, 200, 200)) .addMediaSize(MediaSize.ISO_A4, true) - .addMediaSize(MediaSize.ISO_A5, false) + .addMediaSize(MediaSize.NA_GOVT_LETTER, false) + .addMediaSize(MediaSize.JPN_YOU4, false) .addResolution(new Resolution("R1", getString( R.string.resolution_200x200), 200, 200), false) .addResolution(new Resolution("R2", getString( @@ -391,6 +392,9 @@ public class MyPrintService extends PrintService { .setColorModes(PrintAttributes.COLOR_MODE_COLOR | PrintAttributes.COLOR_MODE_MONOCHROME, PrintAttributes.COLOR_MODE_MONOCHROME) + .setDuplexModes(PrintAttributes.DUPLEX_MODE_LONG_EDGE + | PrintAttributes.DUPLEX_MODE_NONE, + PrintAttributes.DUPLEX_MODE_LONG_EDGE) .build(); printer = new PrinterInfo.Builder(printer) |