Loading packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +51 −31 Original line number Diff line number Diff line Loading @@ -686,6 +686,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat PrintAttributes currAttributes = mPrintJob.getAttributes(); PrintAttributes newAttributes = printJobInfo.getAttributes(); if (newAttributes != null) { // Take the media size only if the current printer supports is. MediaSize oldMediaSize = currAttributes.getMediaSize(); MediaSize newMediaSize = newAttributes.getMediaSize(); Loading @@ -712,6 +713,24 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } } // Take the resolution only if the current printer supports is. Resolution oldResolution = currAttributes.getResolution(); Resolution newResolution = newAttributes.getResolution(); if (!oldResolution.equals(newResolution)) { PrinterCapabilitiesInfo capabilities = mCurrentPrinter.getCapabilities(); if (capabilities != null) { List<Resolution> resolutions = capabilities.getResolutions(); final int resolutionCount = resolutions.size(); for (int i = 0; i < resolutionCount; i++) { Resolution resolution = resolutions.get(i); if (resolution.equals(newResolution)) { currAttributes.setResolution(resolution); break; } } } } // Take the color mode only if the current printer supports it. final int currColorMode = currAttributes.getColorMode(); final int newColorMode = newAttributes.getColorMode(); Loading @@ -726,6 +745,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } } } } // Handle selected page changes making sure they are in the doc. PrintDocumentInfo info = mPrintedDocument.getDocumentInfo().info; Loading Loading
packages/PrintSpooler/src/com/android/printspooler/ui/PrintActivity.java +51 −31 Original line number Diff line number Diff line Loading @@ -686,6 +686,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat PrintAttributes currAttributes = mPrintJob.getAttributes(); PrintAttributes newAttributes = printJobInfo.getAttributes(); if (newAttributes != null) { // Take the media size only if the current printer supports is. MediaSize oldMediaSize = currAttributes.getMediaSize(); MediaSize newMediaSize = newAttributes.getMediaSize(); Loading @@ -712,6 +713,24 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } } // Take the resolution only if the current printer supports is. Resolution oldResolution = currAttributes.getResolution(); Resolution newResolution = newAttributes.getResolution(); if (!oldResolution.equals(newResolution)) { PrinterCapabilitiesInfo capabilities = mCurrentPrinter.getCapabilities(); if (capabilities != null) { List<Resolution> resolutions = capabilities.getResolutions(); final int resolutionCount = resolutions.size(); for (int i = 0; i < resolutionCount; i++) { Resolution resolution = resolutions.get(i); if (resolution.equals(newResolution)) { currAttributes.setResolution(resolution); break; } } } } // Take the color mode only if the current printer supports it. final int currColorMode = currAttributes.getColorMode(); final int newColorMode = newAttributes.getColorMode(); Loading @@ -726,6 +745,7 @@ public class PrintActivity extends Activity implements RemotePrintDocument.Updat } } } } // Handle selected page changes making sure they are in the doc. PrintDocumentInfo info = mPrintedDocument.getDocumentInfo().info; Loading