394 Commits

Author SHA1 Message Date
Bill Yi
43c1a5dc97 Import translations. DO NOT MERGE
Change-Id: I5818fd932d01bc4ccfcd7204f013151604693bd3
Auto-generated-cl: translation import
2016-07-20 14:53:17 -07:00
Andrew Sapperstein
418e09fc43 Use colorControlHighlight for print button ripple.
Instead of using #eeff41 (a random shade of yellow), use
the default color for ripples.

Change-Id: I32fc7e9a10a994deb2066941c96457ad8549dd11
Fixes: 30115080
2016-07-13 13:04:13 -07:00
Bill Yi
4ae6354467 Import translations. DO NOT MERGE
Change-Id: I53789d03049f5647fff50cf5521b461bf5481afd
Auto-generated-cl: translation import
2016-06-03 04:57:35 -07:00
Philip P. Moltmann
75300f64e7 Merge "Use text input to deal with fullscreen IME" into nyc-dev
am: ddf5c44567

* commit 'ddf5c445673bab848b3d9c8af4de8978daf9b56b':
  Use text input to deal with fullscreen IME

Change-Id: I5fc7ddf35ce6696824558029f09f8e7cd9ac6fbd
2016-06-02 00:05:44 +00:00
Philip P. Moltmann
9f87935b2e Use text input to deal with fullscreen IME
The full screen "number" keyboard strips all non-numeric letters
out of the text field.

Bug: 29004437
Change-Id: Ic7e79106a7fcf0716a28061592221557b9d62f52
2016-06-01 22:08:13 +00:00
Bill Yi
5248b0cb75 Import translations. DO NOT MERGE
Change-Id: I2bc1e221db4776d03f49e80844a482628e632262
Auto-generated-cl: translation import
2016-05-30 18:16:13 -07:00
Bill Yi
f03166100c Import translations. DO NOT MERGE
Change-Id: I55d645f1ec4661ef1db9a650aa555178fc6ed6a5
Auto-generated-cl: translation import
2016-05-30 18:11:25 -07:00
Philip P. Moltmann
5338bead7f Merge "Move add-printer list headers to the right positions." into nyc-dev
am: 00e3c23265

* commit '00e3c232656e648376c94a78b568c3ca1fe8c123':
  Move add-printer list headers to the right positions.

Change-Id: I439ab5769e597994912d8bf5dcb6edcfa2a9b496
2016-05-25 23:21:05 +00:00
Philip P. Moltmann
00e3c23265 Merge "Move add-printer list headers to the right positions." into nyc-dev 2016-05-25 23:10:26 +00:00
Philip P. Moltmann
7ca655ea0a Merge "Correct height of add printer list separator" into nyc-dev
am: 80c18bcc3a

* commit '80c18bcc3a52dee62eec4b95de1ebfbf3c7d397f':
  Correct height of add printer list separator

Change-Id: I3cfdf14bc4e72b727f6469f99f950794e667ce33
2016-05-23 18:38:36 +00:00
Philip P. Moltmann
80c18bcc3a Merge "Correct height of add printer list separator" into nyc-dev 2016-05-23 18:27:14 +00:00
Philip P. Moltmann
8aa4856f22 Correct height of add printer list separator
Do not use listPreferredItemHeightSmall a height for list separator.

Fixes: 28907033
Change-Id: Ibe9744f28e7bd17fb5a298fa3cff0e3d403de10f
2016-05-23 09:54:39 -07:00
Bill Yi
95750c3ac9 Import translations. DO NOT MERGE
Change-Id: I4bf63c7c9d2e24184607f05914e8e063e8792d45
Auto-generated-cl: translation import
2016-05-23 01:47:37 -07:00
Bill Yi
a5c77a4738 Import translations. DO NOT MERGE
Change-Id: I7c447305120cc398cbd0e7a98b8226ee7c632059
Auto-generated-cl: translation import
2016-05-23 01:42:41 -07:00
Baligh Uddin
0230026110 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 28857042
Change-Id: Ia00d58694c7f42c901f10a3bd93bb6b3b2725400
2016-05-21 18:43:19 -07:00
Philip P. Moltmann
3704b11ff9 Move add-printer list headers to the right positions.
Fixes: 28833479
Change-Id: I0ab955e1a1625e9638da5a76584af988a9f6c342
2016-05-18 08:26:21 -07:00
Baligh Uddin
a7415866b8 Import translations. DO NOT MERGE
Change-Id: I4da401d240a0092eab168724856107dc1e75036a
Auto-generated-cl: translation import
2016-05-16 15:27:50 -07:00
Baligh Uddin
a3b6b364c6 Import translations. DO NOT MERGE
Change-Id: Ic96958132725f1af9e842dbab5158628e51dea73
Auto-generated-cl: translation import
2016-05-16 15:22:14 -07:00
Philip P. Moltmann
e05a7b71c6 Handle failure to create file.
This should never happen unless you disable the DocumentsUI app. Hence
handle it by a simple toast.

Bug: 28709934
Change-Id: Iac4aff32617120c442e0f994a2a8c0ce3cca380d
2016-05-11 15:04:17 -07:00
Baligh Uddin
6c9b9a0040 Import translations. DO NOT MERGE
Change-Id: I937913df9ba9c5bcb8ca110826e8bb61730eab93
Auto-generated-cl: translation import
2016-04-14 19:11:22 -07:00
Bill Yi
4a1171ea92 Import translations. DO NOT MERGE
Change-Id: If767f0a767da0172ba79fb9d8feaff6c1a8c9157
Auto-generated-cl: translation import
2016-04-09 04:14:00 -07:00
Philip P. Moltmann
6c2bed24ec Merge "Print Activity: Use a single (re-implemented) parsing logig for page ranges." into nyc-dev 2016-04-06 16:08:49 +00:00
Bill Yi
f65a843661 Import translations. DO NOT MERGE
Change-Id: Ib8200b22451664277e49d59489e1727b281fa960
Auto-generated-cl: translation import
2016-04-05 00:18:26 -07:00
Philip P. Moltmann
c6c319e988 Print Activity: Use a single (re-implemented) parsing logig for page ranges.
- Support unbounded ranges, e.g. 4- == 4-pageCount and -2 == 1-2
- Do not allow reverse ranges, i.e. 7-3 is not allowed anymore
- restrict characters that can be typed into field
- force numeric keyboard

- Fix bug that we update the selected pages even if the page ranges are
  invalid

Fixes: 13126748
Change-Id: I515d9346ceb152a41b7260792c5dd9bd91b27cab
2016-04-01 14:35:04 -07:00
Bill Yi
25b12ac54e Merge "Import translations. DO NOT MERGE" into nyc-dev 2016-03-31 04:18:13 +00:00
Bill Yi
30443bf699 Import translations. DO NOT MERGE
Change-Id: Icc3eb7aed5c4991a4628cd3978a0d8339ec785a9
Auto-generated-cl: translation import
2016-03-30 20:09:56 -07:00
Philip P. Moltmann
9dcb86a48d Add the print service recommendation service
This service connects through the print manager to the print spooler:

PrintSpooler.AddPrintersActivity <-> PrintManager <-> PrintManagerService <-> UserState <-> RemotePrintServiceRecommendationService <-> PrintRecommendationService <-> PrintRecommendationServiceImpl

Hence there is a lot of mindless plumming.

The actual changes are only in the AddPrintersActivity which is extended
to show another list of services: The recommended services.

The PrintServiceRecommendationService is based on the experimenal print
service stubs provider. This provider was contributed the Android by
Mopria. As this services uses Android own network discovery service most
code from the experimental provider goes away. In fact the only logic
left over is the selections of mdns-txt fields to look at and the
printer vendor configuration.

This relies on the Android MDNS to get fixed (Bug: 27696905). This also
does not deal with how to update the recommendation service.

Bug: 24533249
Change-Id: I6edc6e25fc08a50d478b61c71bb8ea158b08624c
2016-03-30 17:21:07 -07:00
Geoff Mendal
60e532a47f Import translations. DO NOT MERGE
Change-Id: If53b6bafc90089964ee5de76e683bf196160c171
Auto-generated-cl: translation import
2016-03-28 07:27:25 -07:00
Bill Yi
397fb345ba Import translations. DO NOT MERGE
Change-Id: I311ab683a598426efc4739408be109d766aad721
Auto-generated-cl: translation import
2016-03-25 19:34:39 -07:00
Philip P. Moltmann
30b0752ef5 Remove unnecessary strings and labels.
Bug: 27815807
Change-Id: I6388055938afbbadc954c913ce0554f9a4a313e8
2016-03-23 13:32:35 -07:00
Philip P. Moltmann
49435a7295 Merge "Deal with print-preview renderings that do not match the correct number of pages." into nyc-dev 2016-03-23 17:17:40 +00:00
Geoff Mendal
c07f2d99da Import translations. DO NOT MERGE
Change-Id: I0d693f0c99347f9d04c7240e07bdd6ea526cb987
Auto-generated-cl: translation import
2016-03-19 14:01:30 +05:30
Philip P. Moltmann
066bf81b98 Deal with print-preview renderings that do not match the correct number
of pages.

If the printing app declares more pages than the print preview pdf has
we used to throw an exception in the PDFManupulationService. This caused
the bitmap to be never written and the read-bitmap function to hang
forever. This was because read() return 0 meaning "pipe is closed" which
lead to an infinite loop. Now a read of 0 page might cause an exception
if the page is not fully read. This exception then causes the
preview_page_error to be displayed.

Bug: 27556666
Change-Id: I7b9de50dce930629e8d38efd4e2659a00b70cc4e
2016-03-18 10:57:32 -07:00
Geoff Mendal
03a76f7c9e Import translations. DO NOT MERGE
Change-Id: Iebdb30818688a27d0c8edb60c5686a37e69f3444
Auto-generated-cl: translation import
2016-03-14 07:19:18 -07:00
Bill Yi
f4735aa23a Import translations. DO NOT MERGE
Change-Id: I72b2693c21cc8536a5642b6c0526f611a28631bc
Auto-generated-cl: translation import
2016-03-10 18:50:20 -08:00
Geoff Mendal
70431d0653 Import translations. DO NOT MERGE
Change-Id: If1e61e7ff8623456b114a06e38ecaa4e7b65e7b8
Auto-generated-cl: translation import
2016-03-09 07:19:29 -08:00
Philip P. Moltmann
66c96591e2 Add "app printer activity" and always keep the print service state
updated. Also fiddle with the UI to use more standard values.

To be sure the print service state alwasy updated I changed
PrintManager.getPrintServices to return a loader which just wraps a
registerListener/getList/removeListener combo.

I also added a new function to enabled/disable a print service to be
keep all updating logic inside the PrintManagerService->UserState.

Then I changed all code to use this new interface.

Detailed comments:

PrintServiceInfo:
- I had to add the enabled state to the PrintServiceInfo as some users
  of PrintManager.getPrintServices want all services but then display
  different data depending on the enabled state. Of course I could have
  created two PrintManager.getPrintServices-loaders to load the two
  separate list of services. I think it is much easier to add this
  property though. It is updated every time new data is returned to the
  PrintManager.getPrintServices-loader.

AddPrinterActivity:
- This is shown as a dialog-style overlay to indicate that the user will
  return to the select-printers activity. It contains of three list that
  are updated via separate loaders.
- The recommended services will be added later to keep this path set
  small.

PrintActivity:
- There are two small places where we have to update the data when we
  get a new list of print services.
  - In very, very rare conditions it can happen that the print service
    of the current printer gains or looses the "advancedOptions"
    activity
  - If we have no enabled print services we want to show "Add printer"
    instead of "All printers...".
- Also the print registry is not the only loader anymore, hence we have
  to assign loader ids to it to not conflict with the other loaders in
  this activity.
- Small bug in onPrintersChanged: If a printer is selected and the print
  service of this printer gets disabled the holder goes into "removed"
  state which disables the printer. When the print service is then
  enabled again, we forgot to re-enable the holder.

PrinterRegistry:
- The registry assumed that the FusedPrinterProvider was the only loader
  in the activity. This is not true anymore, hence it has to assign the
  appropriate loader ids.
- The FusedPrinterProvider has an internal loader, hence we have to
  forward a loader Id into it.
- The PrintRegistry is only called backed for a single loader, hence no
  need to check the loader-id.

SelectPrinterActivity:
- The AddPrinterDialog was removed as we now have the
  AddPrinterActivity.
- Added a loader for the enabled services to update the empty state.
- Added dedicated loader Id for the PrinterRegistry again.
- If we have no enabled services, the SelectPrinterActivity chainloads
  the AddPrinterActivity as this is the only thing the user can do
  anyway. "Save a click". This should only happen when the activity is
  create the first time.
- Moved the "add printer" from the menu item to the list of printers as
  suggested by UX and Zach.

PrintManagerService, UserState and IPrintManagerParamtersTest:
- As the only place where the print service state is updated is now the
  userstate, we have no more sychronization problems. Whohoo.
- The users can now register for changes to the print services similar
  as they can register for changes to the print jobs.
- UserState.getPrintServices is the only function can exposes any
  knowledge of the print services to the outside world.

Change-Id: I9be2c7300431e06aaff9bdf7eb36120d869b56ac
2016-03-07 09:58:08 -08:00
Philip P. Moltmann
e93cf151fb Merge "Allow the PDF Printer to "print" non-locale-default paper sizes." 2016-02-02 16:34:48 +00:00
Philip P. Moltmann
18fc58f13d Merge "UI improvements for the print spooler" 2016-02-01 23:42:05 +00:00
Philip P. Moltmann
443075ab97 UI improvements for the print spooler
- gray out printer icons of unavailable printers
- Increase touch target of more into button
- Use same info icon as in the Settings
- Align text correctly in destination drop down
- In general use same layout as generic list-item (as much as possible)
- remove unnecesary color file

Change-Id: I8b0339df0cb6a5130b5530f21c4ef86cb75a683b
2016-01-29 10:49:29 -08:00
Philip P. Moltmann
0b953a24c7 Size recyclerview correctly.
Bug: 26769843
Change-Id: I00715ab028f8da10b74db11aaef08843a8cc009f
2016-01-28 13:12:43 -08:00
Geoff Mendal
93f18cefca Import translations. DO NOT MERGE
Change-Id: Id69e1f05426df237d87764464acd6997ed22cff8
Auto-generated-cl: translation import
2016-01-25 05:40:21 -08:00
Philip P. Moltmann
4959caf149 Allow the PDF Printer to "print" non-locale-default paper sizes.
The MediaSizeComparator already sorts the media sizes correctly.

Bug: 12675943
Change-Id: I6fa4b1a8885a60704bc175ec849ea483ffb4bcd8
2016-01-21 15:10:29 -08:00
Geoff Mendal
2874739bf6 Import translations. DO NOT MERGE
Change-Id: I9339fe99c83fe70cec438b7d36abe36116ed0a8a
Auto-generated-cl: translation import
2016-01-20 05:47:05 -08:00
Geoff Mendal
82ec4e9949 Import translations. DO NOT MERGE
Change-Id: I22202310da38844825b48d612c8097ea559b71d7
Auto-generated-cl: translation import
2016-01-18 05:50:11 -08:00
Geoff Mendal
3e3a451f79 Import translations. DO NOT MERGE
Change-Id: I488d48ed5a95fb2764dd2129fc512fa1c2db5fdb
Auto-generated-cl: translation import
2016-01-13 05:37:19 -08:00
Philip P. Moltmann
f7b5018028 Merge "Display toast when print services are disabled." 2016-01-11 19:41:25 +00:00
Geoff Mendal
d7483de165 Import translations. DO NOT MERGE
Change-Id: I519c2c15b3ae10ec47a76de7afff6fea223ba1c9
Auto-generated-cl: translation import
2016-01-11 05:41:24 -08:00
Philip P. Moltmann
1f46779f5e Display toast when print services are disabled.
Change-Id: Id1ebcbbf39eb558bc15c7c69c03fe8124b9c79d7
2016-01-08 14:03:01 -08:00
Philip P. Moltmann
a1cdb4bacb Use notification grouping for print notification.
Change-Id: Ifb5bc0f233611a056db511b15379165ac6fe0edf
2016-01-07 09:19:54 -08:00