924 Commits

Author SHA1 Message Date
Philip P. Moltmann
2eae8eb7e2 Prevent PrintRegistry callbacks when finishing
Previously these callbacks could happen while we clean up the print
preview controller. Then these callbacks called in destroyed and cleaned
up modules.

Fixes: 29874802
Change-Id: I5d8497e3364b97a33a837f8e3e825e5d254592f9
2016-06-30 17:38:06 +00:00
Philip P. Moltmann
3cf17ad26d Syncronize renderPage vs. onServiceDisconnected
An async renderPage request might be in progress while the service is
getting disconnected.

Fixes: 29639740
Change-Id: I8a33e5fba96dd76ecb1e14d0e3a26334eb8965a5
2016-06-27 21:06:42 +00:00
Philip P. Moltmann
ce7fc6c0a1 Merge \"Do not launch non exposed add printer activity\" into nyc-dev
am: 737be111cc

Change-Id: Ief45b4a87071215700eaba8c21d0aff8ab0c8911
2016-06-23 01:55:52 +00:00
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
c6bddb8261 Merge \"Cache resources needed to sort media sizes.\" into nyc-dev
am: 142fc425c4

Change-Id: I368ffa5269029801ed191351fb1fff9bde72778a
2016-06-09 20:43:18 +00: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
4ae6354467 Import translations. DO NOT MERGE
Change-Id: I53789d03049f5647fff50cf5521b461bf5481afd
Auto-generated-cl: translation import
2016-06-03 04:57:35 -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
1eabaff2cb Merge "Do not rotate PDFPrinter pages." into nyc-dev
am: 5d6a4f582e

* commit '5d6a4f582e0e1d6e8aee88fc16b3a7f4850dbd56':
  Do not rotate PDFPrinter pages.

Change-Id: Ib428e9af14a8271545862189649780975053de86
2016-06-02 22:41:15 +00: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
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
d8e82000d6 Merge "Declare no print services if 0 print services are enabled." into nyc-dev
am: b852d0138a

* commit 'b852d0138ab84817b042791e0e204459d87038ce':
  Declare no print services if 0 print services are enabled.

Change-Id: Id6a97654dcc889d0fe73e10210e649cb62c0861b
2016-05-18 19:50:30 +00: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
Baligh Uddin
eb93f0668c Merge "Import translations. DO NOT MERGE" into nyc-mr1-dev 2016-05-18 17:57:21 +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
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
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