| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| |
| | |
70100919d0 am: 9e0ab4a327
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1697309
Change-Id: Id300ef712eda7bfab164044c95c807ebf4e9798f
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Updates the Japanese Photo L media size name with JPN_ prefix
Test: L is present in API with updated name
Signed-off-by: Kurtis Schlepp <mopriadevteam@gmail.com>
Change-Id: Ib4e52b23571b166f6c000676fb81b4ac7c1f9a7a
|
| |\|
| |
| |
| |
| |
| | |
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1527008
Change-Id: I12470fa6debd0ffb49ba18fdf9e1e5cef49a363a
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
L size media is very common in Japan, as listed at
https://en.wikipedia.org/wiki/Photo_print_sizes. DPS and other
print services must add their own definitions of this popular size.
Including it in PrintAttributes will allow other software to
leverage it instead of re-defining it, leading to a more consistent
experience in the future.
Test: L is present in API
Change-Id: I7022881846d1bf46bda80b4825c5cba01b794821
Signed-off-by: Glade Diviney <mopriadevteam@gmail.com>
|
| |\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
016db3711a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1574587
Change-Id: Id294d2edc0f8d84a65f1a47318c2a23a75d87fd9
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
Adds large format media sizes to expand media sizes supported by
the BuiltInPrintService.
Test: Print to a large format printer that supports arch media sizes
Signed-off-by: Kurtis Schlepp <mopriadevteam@gmail.com>
Change-Id: I83494d4e313c933cc8200646c77a6a0364ac2e44
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
|
| |
|
|
|
|
|
|
|
| |
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
|
| |
|
|
|
|
|
| |
Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
|
| |
|
|
|
| |
Test: incident_report print. Having no entries
Change-Id: I3c7d611e44c0d3bf8e00775b1708bd82a334121a
|
| |
|
|
|
| |
Fixes: 28268203
Change-Id: I4246bc7431d1e0ecb75a6d101ba6ccd548567704
|
| |
|
|
|
|
|
| |
Please note that null and 0 values mean "unset" and that margins
historically allowed negative values.
Change-Id: I1773bc552142345e18c1c31fb25e583d0ed070a2
|
| |
|
|
|
|
|
| |
The MediaSizeComparator already sorts the media sizes correctly.
Bug: 12675943
Change-Id: I6fa4b1a8885a60704bc175ec849ea483ffb4bcd8
|
| |
|
|
|
|
|
|
|
|
|
| |
- Stop using deprecated APIs
- Fix all public and some internal javadoc
- Add @Decorations to public APIs
- Some minor cleanup, e.g. don't use variables with overlapping names in same scope
- remove unnecessary properties from manifest (they are set by the build
system)
Change-Id: I0ce8849a516414763fe9de76c3a18ce17d896816
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An app might suggest certain attribute for an print job. This patch
fixes
- PrintActivity should not silently overwrite the attributes with
the default values
- Handle duplex mode in PrintAttributes similar to the other attributes.
I.e. have an "unset" value (0). This is an API change. But the only
use case for PrintAttributes was to pass them to print() and thereby
the PrintActivity. This was broken (see above), hence we are changing
and API that could have never been used.
Bug: 23629618
Change-Id: I43c25704497c799352fb806126dc93f6db4879f5
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
Change-Id: I19850154ef2798afff511e4490a268ce38e8cbae
|
| |
|
|
|
|
|
|
|
|
|
|
| |
bug:10551786
bug:10551697
bug:10705082
bug:10741641
bug:11318976
bug:10550979
bug:10551761
Change-Id: I46ceb66a69b6d32d6b417356178f67f2e25e891a
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
bug:10550844
Change-Id: Ic1bbb2cb6ab55826eb66242f6002b7165aff37a4
Conflicts:
core/java/android/print/PrintAttributes.java
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
The hide javadoc annotation had a type, thus leaking the API.
bug:10552358
Change-Id: Iec4e203d0786efbe6afbd9b6995f11642935336c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Added more North America media sizes as well as Chinese and Japanese.
bug:10495384
Change-Id: I74869c13d1412780b0053ef665845d65e972e526
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
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
|