910 Commits

Author SHA1 Message Date
Philip P. Moltmann
61209bc924 Do not launch non exposed add printer activity
Change-Id: I0b9b11ea0ce0140c77dff2539b1a0a9dcf1558b0
Fixes: 29580579
2016-06-22 16:41:22 -07:00
Philip P. Moltmann
142fc425c4 Merge "Cache resources needed to sort media sizes." into nyc-dev 2016-06-09 20:35:59 +00:00
Philip P. Moltmann
0c470821d3 Cache resources needed to sort media sizes.
- Cache media_standard_iso
- Cache labels between configuration changes (localization might
  change labels)
- Use ints instead of String's for standards
- Use HashMap instead of Array map as the lookup is faster for
  larger arrays

Fixes: 29068056
Change-Id: I027c80fac4d7e8ea6c2cac0f1a2d52b54807f5be
2016-06-03 09:00:10 -07:00
Bill Yi
2641c648f7 Import translations. DO NOT MERGE
Change-Id: Ic52f441a17948a9d117126b1e808d05535cc558d
Auto-generated-cl: translation import
2016-06-03 04:52:48 -07:00
Philip P. Moltmann
cd7b1b7cdf Do not rotate PDFPrinter pages.
- applyPrintAttributes is only used by PDFPrinter

Fixes: 29057330
Change-Id: I883cc64039f4ca2c93810e99d758f2dceec67a8b
2016-06-02 20:53:53 +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
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
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
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
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
b852d0138a Merge "Declare no print services if 0 print services are enabled." into nyc-dev 2016-05-18 19:45:05 +00:00
Baligh Uddin
576a32da20 Merge "Import translations. DO NOT MERGE" into nyc-dev 2016-05-18 17:57:26 +00:00
Philip P. Moltmann
e951a13916 Declare no print services if 0 print services are enabled.
Fixes: 28833953
Change-Id: I94e77dc23107fab10d45f51169d71e4da574ee66
2016-05-18 08:27:02 -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
Philip P. Moltmann
f1413249db Handle printers selected by SelectPrinter activity
- Declare a printers availability when changing the removed state.
- Set printJob.printerId to current printer when returning from
  SelectPrinter

Change-Id: Ie4680be04fa614a4088f2f32a527e80928c957cc
Fixes: 27643305
2016-05-17 14:26:13 -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
9a40a32ae9 Clear state when ProgressMessageCtrl. is canceled
Otherwise the following can happen:
- The progressController is _not_ running and we are running through
  an update.
- Then onUpdateCompleted is called which cancels the not running
  progressController. This then reset whatever state was previously
  stored as mPreviousState leaving the PrintActivity in a weird state.

Fixes: 27945565
Change-Id: Id46b8853ba634634198a74921c8a1790c435678c
2016-05-12 10:35:39 -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
Philip P. Moltmann
383189f494 Merge "Handle more config changes and handle onDestroy" into nyc-dev 2016-05-02 16:43:52 +00:00
Philip P. Moltmann
8582909cae Merge "Visibility of pageRangeTitle =!= pageRangeText" into nyc-dev 2016-05-02 15:50:01 +00:00
Philip P. Moltmann
f24285d7b3 Visibility of pageRangeTitle =!= pageRangeText
Before if we had only a single page we showed the title, but not the
text

Change-Id: Ie2c178eaf19885e0b1dcc803b9da23ed687764a7
2016-04-29 16:16:08 -07:00
Philip P. Moltmann
172d840cd1 Handle more config changes and handle onDestroy
- The PrintActivity has to handle all config changes to not loose track
  close the connection to the printing app
- In the case where onDestroy is called we need to make sure to
  - not do any more UI operation
  - on async calls after destroy is already called, handle failure to
    unbind services.

Change-Id: If21335543fbfa16ecfe77d1965b2e8a13dfa14b8
2016-04-29 15:40:23 -07:00
Philip P. Moltmann
3c757036a3 Delay callback from printerRegistry after Constr.
If the leader inside of the printer registry can immediately initalize
the callback is called in the same thread as the contructor is
executing. Hence in this case the mPrinterRegistry field is used before
written.

Change-Id: I45239d2792f6c31ec215ddb01131038882ff0136
2016-04-28 15:11:26 -07:00
Philip P. Moltmann
4bd8fac48e Send update notifications when the status of a print job updates and
make sure to only access mPrintServicesChangeListenerRecords when
locked.

Bug: 28315242
Change-Id: Ie41ee695e6b1b0394e55538b9d9edaee0610f1e0
2016-04-21 15:33:42 -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
Philip P. Moltmann
d0e1239e81 Add a log if the printing activity died unexpectly.
Bug: 27861927
Change-Id: I431ba996e113043c224039a62a76ae23e9c7494a
2016-04-13 08:57:49 -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
1a1f24980c Merge "Prefix printer description with service-label instead of package-label." into nyc-dev 2016-04-06 16:09:02 +00: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
3df18a9465 Prefix printer description with service-label instead of package-label.
Change-Id: Ibe98e0037ad8d62b27b10b72d75fb2e548d0ee90
2016-04-01 17:16:01 -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
Philip P. Moltmann
a97415b0b7 Merge "Make sure to update the selected pages when needed in the right order." into nyc-dev 2016-04-01 16:46:20 +00:00
Philip P. Moltmann
9e4bbc60a9 Do not rely on documentInfo.pageCount when selecting which pages to
scrap

documentInfo.PageCount might be set to "unknown" == -1. Hence we don't
know where the last page to scrap ends. Hence defer this decision all
way until PdfManipulationService.removePages as then we know the actual
pages of the document.

Change-Id: I063c3cd084d65a3ac5c60c3d85cec3a346be2680
Fixed: 27948632
2016-03-31 15:39:16 -07:00
Philip P. Moltmann
7b92d3c04d When we update slow we override the current state. Make sure to reset the state the operation finishes.
Bug: 27945565
Change-Id: If3dc3ad54bbf9bedae0e82aeef7b295ae16e1bf0
2016-03-31 14:18:51 -07:00
Philip P. Moltmann
c309d7155a Make sure to update the selected pages when needed in the right order.
Fixes: 27945066
Change-Id: I9c83a5283d6bf093a35ad835532d3c8690b4b989
2016-03-31 13:49:44 -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
Philip P. Moltmann
02add6aa91 Merge "Rewrite workflow on how the destination printer is selected." into nyc-dev 2016-03-30 22:42:49 +00:00
Philip P. Moltmann
456f1e33b8 Merge "Update print preview when option is changed and clear ranges when they layout changes" into nyc-dev 2016-03-30 21:44:19 +00:00
Philip P. Moltmann
7134fcc07c RemotePrintDocument might get destroyed in constructor
... if it cannot connect to remote PrintDocumentAdapter. Then the state
will be set to destroyed and the print activity will be aborted via the
onDied callback.

Bug: 27899066
Change-Id: Ieb287b92ac21fc71a56b491a1035feaff6cd2837
2016-03-29 14:47:04 -07:00
Philip P. Moltmann
c7927cb648 Merge "Update printers even if there are no printers found." into nyc-dev 2016-03-28 21:59:40 +00: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
Philip P. Moltmann
b5be5ec3b7 Merge "Handle all configuration changes in PrintActivity as it cannot be destroyed synchronously." into nyc-dev 2016-03-26 18:13:24 +00: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
ebf397625e Merge "Change hasCustomPrintIcon and setStatus as requested by API council." into nyc-dev 2016-03-25 16:50:36 +00:00
Philip P. Moltmann
d74d1e5491 Change hasCustomPrintIcon and setStatus as requested by API council.
Bonus: null advanced keys produced a exception deep in the print
       spooler. Hence prevent null keys on the surface from now on.

Bug: 27716355
Change-Id: I3c064956f4e670cd7091437ade06605aa8d797b0
2016-03-24 16:53:36 -07:00