948c9a6393e0995a4d988d5d164998aa0e12b25d |
|
03-Feb-2015 |
Svetoslav <svetoslavganov@google.com> |
Add duplex mode support. This change adds support for duplex printing. The print UI now has a duplex option which allows the user to choose one of the supported duplex options by the currently selected printer. The chosen duplex mode is propaged to the print service that manages this printer. Change-Id: I807ba9da2723531535c0e1e33f2f4e1b503a54b0
/frameworks/base/core/java/android/print/PrintAttributes.java
|
525a66b2bb5abf844aff2109bdc9ed819566bece |
|
15-Jun-2014 |
Svet Ganov <svetoslavganov@google.com> |
Adding print preview. This change adds the pring preview part of the new print UX. The UI has two parts, the top section is the print options and the bottom section print preview with a list of pages. The user can interact only with one of them. When print options are expanded they cover the preview content and a scrim is laid out on top of the preview. Tapping the scrim collapses the print options. When the user types in page ranges and closes the options to look at the preview, the latter is updated to show only these pages. In the list of pages the user can further prune pages by deselecting them. Change-Id: I0b23d2c598afe2a34400ccfa43e4e935af83c72f
/frameworks/base/core/java/android/print/PrintAttributes.java
|
a798c0a984f29f7180883a61839f68d2cbf0c6ce |
|
15-May-2014 |
Svetoslav <svetoslavganov@google.com> |
Refactor printing Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
/frameworks/base/core/java/android/print/PrintAttributes.java
|
4d4c66dd38e940082e385b49a33f4022ab04c738 |
|
25-Oct-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Update the documentaton of the android.print package. bug:10551786 bug:10551697 bug:10705082 bug:10741641 bug:11318976 bug:10550979 bug:10551761 Change-Id: I46ceb66a69b6d32d6b417356178f67f2e25e891a
/frameworks/base/core/java/android/print/PrintAttributes.java
|
b2420c917bf4092f44a2270d7e88ee2380f72080 |
|
07-Oct-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
The undefined media sizes for both orientations not properly constructed. We have constants for an app to specify an undefined media size in portrait and such in landscape. The constants for these media sizes had the width and height dimesions swapped. bug:11099831 Change-Id: Ic09227c3a03429fc5a4a157abc15fea87d3ad8be
/frameworks/base/core/java/android/print/PrintAttributes.java
|
7be27acac922b5ea66ec6b464ded6f057bd6f1e5 |
|
30-Sep-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print attributes hint not honored. 1. Initially we have a single printer, the fake PDF printer, and wait for printers to be discovered. This printer was handling only a couple of media sizes. Hence, if the app provides a media size hint and the PDF printer does not support it, we were essentially ignoring the suggested media size since it was not supported by the selected printer and we fell back to the default paper size for that printer. The fake PDF printer should support all predefined media sizes. 2. The list of available paper sizes was shown in the order they are added ignoring the current locale. It is much better user experience if the media sizes used in the current locale are shown at the top and all others after that. Also the media sizes for the current locale should be alphabetically ordered so the user can quickly find the desired one. 3. The orientation was reset on media size or printer change. bug:10564537 Change-Id: Iaa0d42242730ce69cea3effd4d0f4bc087068804
/frameworks/base/core/java/android/print/PrintAttributes.java
|
678e907e09388dff8b2955bb524c2706f067a6ef |
|
21-Sep-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Merge "Update android.print.PrintAttributes documentation" into klp-dev
|
d8f391b4e0e8d876ec7216d34f86a9b3e8bab7e5 |
|
21-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Offer to enable a print service after it is installed. The user has to explicitly enable a print service from the settings UI before using it. Usually, users very rarely if at all interact with print services, therefore all print service management task are performed from the print settings. We also have to get user consent warning that the user's data is about to be given to a third-party app. We now post a notification allowing the user to go directly to the settings screen to turn the service on. bug:10447510 Change-Id: Iea56c0825f0bf38328ad94912f0ea5576e9339b3
/frameworks/base/core/java/android/print/PrintAttributes.java
|
22cb9170d33eb6da54fc36b783fcb93fd6057749 |
|
30-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Update android.print.PrintAttributes documentation bug:10550844 Change-Id: Ic1bbb2cb6ab55826eb66242f6002b7165aff37a4 Conflicts: core/java/android/print/PrintAttributes.java
/frameworks/base/core/java/android/print/PrintAttributes.java
|
81d4014c59d2c6cf23b0465e9b8c94b6bfe428e2 |
|
18-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Hiding a method that was never meant to be public. The hide javadoc annotation had a type, thus leaking the API. bug:10552358 Change-Id: Iec4e203d0786efbe6afbd9b6995f11642935336c
/frameworks/base/core/java/android/print/PrintAttributes.java
|
013b816ac7d723a0116c039e6266d93d13851fe1 |
|
18-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Update the print dialog. 1. The print dialog was resizable and as a result when printers come and go its size changes which looks bad. The dialog is now trying to be maximally large limited by a max size or the screen - whichever is smaller. This required moving from GridLayout to several LinearLayouts since the former does not support distribution of empty space evently between the items in a row. Also we want all items in a column of inputs to be of equal size (the spinners specifically). 2. Added labeledBy attribute to associate a view with another one that serves as its label for accessibility purposes. We have lebelFor attribute but it is not useful in most layout files since it has to refer the auto-generated id of a view which usually appears later in the layout file, thus generating a compilation error. This was needed for the accessibility support of the print dialog. bug:10631660 2. Disabling the spinners or the print button did not produce visual feedback leading to user frustration. bug:10741907 Change-Id: I0c12eddabc4035bc7becd1b86c1f1b8fdcf4289c
/frameworks/base/core/java/android/print/PrintAttributes.java
|
fa77ece25a98810b6f56130d4a83c62b2e34c4f5 |
|
17-Sep-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Adding more standard media sizes. Added more North America media sizes as well as Chinese and Japanese. bug:10495384 Change-Id: I74869c13d1412780b0053ef665845d65e972e526
/frameworks/base/core/java/android/print/PrintAttributes.java
|
651dd4e6ee6510caf9f15c51094a11121af17ec2 |
|
12-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Remove unneeded print APIs and update the min margins APIs. 1. Removed unneeded code in Resolution that was storing its label as resource and package name. We do not have predefined resolutions, therefore we always persist the label. 2. Renamed the print attribute margins to minMargins to reflect that these are the minimal margins the printer support. Updated the docs as well. 3. Renamed the create method of all builder to build. bug:10727487 Change-Id: Ie72ab8aaa5215b8bd2853885011b3b4efa4deb2e
/frameworks/base/core/java/android/print/PrintAttributes.java
|
cc65b0c325b88c466763712f76148a6f5b8a5b3f |
|
11-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Not change the print options on printer change if possible. If the user selects some print options from the dialog and then changes the printer to one that has the same capabilities the selections in the UI should not change. bug:10631856 Change-Id: Ia76ce58c446815e3498d2f4b4739dee62d11d96a
/frameworks/base/core/java/android/print/PrintAttributes.java
|
a36285f3f2f74b1d2d5d0336ffe519ab9f6e062a |
|
05-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Bug fixes in the print dialog 1. Read/write async tasks of the persistence manger used by the FusedPrintersProvider could be run more that once, so create a new one every time. 2. The fake printer used to save to PDF should not be added to printer history. 3. Removed print preview leftover code from the print dialog. 4. Save to PDF was not working on the second consecutive attempt. 5. The fisrt time the orientation change was ignored - regression Change-Id: I8960ef2cf92dfeeec22fa8751ba8475092b5b65c
/frameworks/base/core/java/android/print/PrintAttributes.java
|
a76233ae845da4bc9e3bcd89821701a747215e7b |
|
05-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Hiding some unneeded APIs, 1. Hide the MediaSize and Resolution constructors that take package and resource Id. 2. Fix a bug and docs in creating portrait and landscape media size. Change-Id: If59992e355391de6ad6d14d4f7b3be8c8b6cc0e0
/frameworks/base/core/java/android/print/PrintAttributes.java
|
773f54de3de9bce7b6f915aa47ed686b161d77aa |
|
03-Sep-2013 |
Svetoslav <svetoslavganov@google.com> |
Print API updated. 1. Removed the updatePrinters API on PrinterDiscoverySession. Now re-adding a printer updates it. 2. Added getTrackedPrinters() API to allow a print service to figure out which printers' state should be tracked by the service. 3. Removed the APIs on PrintDocumentInfo that describe the layout of the content as they are not needed. For example, if the print attributes passed in layout require landscape mode, the the app should just create a PDF page with the wider side up and draw its content in portrait. The printer will then rotate the page. Change-Id: Idd72c6e9c129e8b17eef1236573a99773f8ff0a2
/frameworks/base/core/java/android/print/PrintAttributes.java
|
aec1417ca9eb63209668ac17da90cf8a07c6076c |
|
27-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print APIs update. 1. Added scale to fit and scale to fill fitting modes. 2. Added APIs for a print app to specify which constraints imposed by the print attributes were satsified during a layout so they are not handled by the printer again, e.g. if the content is to be in landscape the the app generated such content the printer should rotate the content again. 3. Added some printer statuses. 4. Added a helper class that generates PDF documents with correct size based on the passed in print attributes. 5. Exposed a ctor for PageRange which was hidden by mistake and apps could not create page ranges. Added API for changing the printer status. Change-Id: If1334a61d2d931027b98075f653018d456b1b768
/frameworks/base/core/java/android/print/PrintAttributes.java
|
798bed6cc7d273e72b0253288605db9cd2b57740 |
|
11-Aug-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Refinement of the print service APIs. 1. Factored out the printer discovery APIs of a print service in a dedicated session object that is created by the print service on demand. This ensures that added/removed/updated printers from one session do not interfere with another session. 2. Updated the app facing APIs to pass in a document info along with a printed file. Also exposed the print file adapter so apps that create a temporary file for printing can intercept when it is read by the system so the file can be deleted. 3. Updated the print service documentation. Change-Id: I3473d586c26d8bda1cf7e2bdacb441aa9df982ed
/frameworks/base/core/java/android/print/PrintAttributes.java
|
85b1f883056a1d74473fd9ce774948878f389ab6 |
|
25-Jul-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Iteration on the print sub-system. 1. API changes: Moved copies API from PrintAttributes to PrintJobInfo; Changed the PageRange list to an array in PrintDocumentAdapter#onWrite; Added onCancelled method to the layout and write callbacks. 2. Refactored the serialization of remote layout and write commands. Now the commands are serialized by the code in the client instead in the spooler. The benefit is simple code since the client has to do a serialization to delegate to the main thread anyway. The increased IPC found is fine since these calls are quite unfrequent. 3. Removed an unused file: IPrintSpoolerObserver.aidl 4. Added equals and hasCode implementation to PageRange, PrintAttributes, MediaSize, Resolution, Margins, Tray, PrintDocumentInfo. 5. Added shortcut path for query APIs on PrintJob that return cached values if the print job is in a uncuttable state, i.e. completed or cancelled. Failed print jobs can be restarted. 6. PrintJobInfo was not properly serialized. 7. Updated the look of the print dialog to be stable if there is and there isn't currently selected printer. 8. PrintJobCOnfigActivity now calls onLayout on every print attributes change but requests a write only on print preview or print button press. Also if the layout did not change the content and it is already written no subsequent call is made. Also if the selected pages change and we already have them no subsequent call to write is made. Also the app is called with print preview attribute set when performing layout and with it cleared after the print button is pressed. A lot of changes making sure that only valid actions are enabled in the activity (looks like a dialog) at a given time frame. The print job config activity is also hidden after we got all the data, i.e. layout and write are done. 9. The callback from the print spooler to the system are scheduled via messages to avoid lock being held during the call. It was hard to guarantee that since a method holding a lock may be calling one that would like to release the lock at some point to make the callbacks. 10. Print spooler state is persisted only if something changes in a completed print job, i.e. not one that is being constructed due the print job config dialog. 11. Fixed a potential race in the RemotePrintSpooler where it was possible that a client that got a handle to the remote spooler calls into an unbound spooler. E.g: the client gets the remote interface with a lock held, now the client releases the lock to avoid IPC with a lock, during the IPC scheduling the spooler has notified the system that it is done and the system unbinds from it, now the client's IPC is made to a spooler that is disconnected. Change-Id: Ie9c42255940a27ecaed21a4d326a663a4788ac9d
/frameworks/base/core/java/android/print/PrintAttributes.java
|
0d1daa50f6d180c57f92596501e2e5c0b5ef9997 |
|
23-Jul-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Updating the print dialog and its interactinos with the printing app. 1. Added support for reporting the old print attributes during layout. Now we keep track of the old print attributes, so the app can compute the delta and decide whether re-layout work is needed. 2. Fixed PrintDocumentAdapter callback interleavings. Layout callbacks were intermixing with write ones - a mess. Now we make an attempt to cancel layout and write if they respond to cancellation, otherwise we wait but do not interleave them. 3. Refactored the PrintJobConfigActivity for easier maintenance and to have a single update UI method that does the minimal amount of work. Change-Id: I31ada1a0550882e6185018e6f17f923aed165d15
/frameworks/base/core/java/android/print/PrintAttributes.java
|
88d199130d44c6bacb383a7757e782cf97483c68 |
|
22-Jul-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Implement persistence/restoring of print spooler state. 1. Implemented the persistence and restoring of the print spooler state. The print spooler state is saved as an XML on every print job change and is restored when we bind to the spooler. The system does not unbind from the spooler until the state persistence completes. We are now storing the entire state, i.e. all print jobs, when a single one changes. This is not optimal but we are not expecting to have many such at the same time, so for now we err for simplicity of implementation. 2. Enforcing a non-empty print job name. 3. Hidden the STATE_CREATED print job state which should never be visible to a client since this is the state of a print job during construction, i.e. the print dialog is up and we are doing back and forth with the app. 4. Fixed some PrintAttributes APIs that were incorrectly taking in a PackageManager instance. 5. Updated the PrintSpooler build file due to splitting the framework into multiple jars. Change-Id: I52c88eaa1ec9c64920359cc143c79832a4c3d25b
/frameworks/base/core/java/android/print/PrintAttributes.java
|
17b7f6e6d4ec9f5e9597bfd283f1c017b6c66275 |
|
25-Jun-2013 |
Svetoslav <svetoslavganov@google.com> |
Clean up of the print APIs. 1. Fixed a case in which the onPrintCompleted callback may not be invoked. 2. Added string resulrces for the different error messages for failed printing in OnPrintCompletedCallback 3. Fixed the string comments for the MediaSize constants. 4. Added APIs to create certain print attributes by passing in a string label instead of resource and package name since in some cases a print service may be getting already internationalized lables or it may not know all possible values. 5. Fixed a crash in PrintJobConfigActivity if there is no input or output tray. Change-Id: Ie877b7dc669051606394aa290e6d2b979a42db4c
/frameworks/base/core/java/android/print/PrintAttributes.java
|
4b9a4d16872bbb50712e007b419ac0b35ff1582d |
|
12-Jun-2013 |
Svetoslav Ganov <svetoslavganov@google.com> |
Print - platform APIs Related changes: Skia (inlcude PDF APIs): https://googleplex-android-review.googlesource.com/#/c/305814/ Canvas to PDF: https://googleplex-android-review.googlesource.com/#/c/319367/ Settings (initial version): https://googleplex-android-review.googlesource.com/#/c/306077/ Build: https://googleplex-android-review.googlesource.com/#/c/292437/ Sample print services: https://googleplex-android-review.googlesource.com/#/c/281785/ Change-Id: I104d12efd12577f05c7b9b2a5e5e49125c0f09da
/frameworks/base/core/java/android/print/PrintAttributes.java
|