1109 Commits

Author SHA1 Message Date
Philip P. Moltmann
308b84e87a Merge "Update print preview when option is changed and clear ranges when they layout changes" into nyc-dev
am: 456f1e3

* commit '456f1e33b808052377a79b91d34091a356652f2c':
  Update print preview when option is changed and clear ranges when they layout changes

Change-Id: I3fcb5c9041ce0268751010e84fb2e94a0a723b29
2016-03-30 21:53:35 +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
273e539076 Merge "RemotePrintDocument might get destroyed in constructor" into nyc-dev am: c37a323
am: 2ff245e

* commit '2ff245e3ec47148a88c869a25f1ee118ab2cd83f':
  RemotePrintDocument might get destroyed in constructor

Change-Id: I7f75a23dc9ca3a1750252ef5a5a6ff8c64ca25ea
2016-03-30 16:16:46 +00:00
Philip P. Moltmann
2ff245e3ec Merge "RemotePrintDocument might get destroyed in constructor" into nyc-dev
am: c37a323

* commit 'c37a32365d10448aa860813163b8a647e594bba7':
  RemotePrintDocument might get destroyed in constructor

Change-Id: Ib408de348136afa88ccf7e5401e11e57cd1f414a
2016-03-30 15:21:35 +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
37d7976647 Merge "Update printers even if there are no printers found." into nyc-dev am: c7927cb
am: 1d21cbd

* commit '1d21cbd76d2151689d88813022a7238178c89abf':
  Update printers even if there are no printers found.
2016-03-28 22:09:34 +00:00
Philip P. Moltmann
1d21cbd76d Merge "Update printers even if there are no printers found." into nyc-dev
am: c7927cb

* commit 'c7927cb648c77ae80d18f39c222692f51130e1a9':
  Update printers even if there are no printers found.
2016-03-28 22:05:15 +00: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
Geoff Mendal
a05047cf6c Import translations. DO NOT MERGE
Change-Id: I20c740e74d15274a80933bf75219da873e0fd045
Auto-generated-cl: translation import
2016-03-28 05:41:19 -07:00
Philip P. Moltmann
df61ed4cbd Merge "Handle all configuration changes in PrintActivity as it cannot be destroyed synchronously." into nyc-dev am: b5be5ec
am: c0c7ecb

* commit 'c0c7ecbea1ed88625109c7fa1162e2cc66dba45a':
  Handle all configuration changes in PrintActivity as it cannot be destroyed synchronously.
2016-03-26 18:22:30 +00:00
Philip P. Moltmann
c0c7ecbea1 Merge "Handle all configuration changes in PrintActivity as it cannot be destroyed synchronously." into nyc-dev
am: b5be5ec

* commit 'b5be5ec3b70c2c310601e9d035b4e8fd0db8b085':
  Handle all configuration changes in PrintActivity as it cannot be destroyed synchronously.
2016-03-26 18:19:47 +00: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
25aa8013ad Merge "Import translations. DO NOT MERGE" 2016-03-26 04:47:02 +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
Bill Yi
2ef68aafb9 Import translations. DO NOT MERGE
Change-Id: I1e5f140ca6c5d0d8dd2140285772e26374c3449e
Auto-generated-cl: translation import
2016-03-25 18:05:47 -07:00
Philip P. Moltmann
62dc6583e6 Merge "Change hasCustomPrintIcon and setStatus as requested by API council." into nyc-dev am: ebf3976
am: e3221b5

* commit 'e3221b5488aad3898abac47f6e28f4779c54543b':
  Change hasCustomPrintIcon and setStatus as requested by API council.
2016-03-25 17:08:26 +00:00
Philip P. Moltmann
e3221b5488 Merge "Change hasCustomPrintIcon and setStatus as requested by API council." into nyc-dev
am: ebf3976

* commit 'ebf397625ea5ee41af531da251d8d0cb89c26beb':
  Change hasCustomPrintIcon and setStatus as requested by API council.
2016-03-25 17:00:11 +00: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
Joe Onorato
93373b3bfc Merge "Turn off verbose logs and remove log that is covered by verbose logs." into nyc-dev am: a8a644e
am: 5e1ba06

* commit '5e1ba06ef295189fef2500d1512006468e233587':
  Turn off verbose logs and remove log that is covered by verbose logs.
2016-03-24 23:29:36 +00:00
Joe Onorato
5e1ba06ef2 Merge "Turn off verbose logs and remove log that is covered by verbose logs." into nyc-dev
am: a8a644e

* commit 'a8a644e5f659b32d824426d7f6236a6a9e27796b':
  Turn off verbose logs and remove log that is covered by verbose logs.
2016-03-24 23:26:52 +00:00
Philip P. Moltmann
4ef83c4647 Update print preview when option is changed and clear ranges when they
layout changes

Before we updated the print preview when the paper size changed but not
when the page ranges changed. This is not consistent. We always change.

Also if there is a change to the options that changes the layout (i.e.
papersize, orientation, minMargins) then clear the selected ranges as
this does not make sense anymore.

This also fixes a bug that when having pages selected while we reduce
the number of pages in the preview we got a NPE.

Bonus: do not constantly re-update the options UI when range or copies
text is updated.

Bug: 27830850, 27741420
Change-Id: I7abe4a74b44ac5c5ee54d12cc0c1ca1540793f0e
2016-03-24 16:20:20 -07:00
Joe Onorato
13460a6cba Turn off verbose logs and remove log that is covered by verbose logs.
Bug: 27744135
Change-Id: I436cfd325f87b3b9205d50e92e2a70a50dd33344
2016-03-24 11:32:17 -07:00
Philip P. Moltmann
940fa80cd1 Handle all configuration changes in PrintActivity as it cannot be
destroyed synchronously.

Also: Always destroy print spooler provider when it was initialized to
      avoid service leakage if print activity was finished after
      onCreate but before onPrinterRegistryReady.

Bug: 27814338
Change-Id: I8401dc6e447cbd726b1a8f7c361b4ddf42e7e11d
2016-03-23 17:04:35 -07:00
Philip P. Moltmann
75a6e7fb3b Merge "Remove unnecessary strings and labels." into nyc-dev am: a785c80
am: 31c3688

* commit '31c3688d0f67450a8d55c40d0c9e9ef1d2cab8c2':
  Remove unnecessary strings and labels.
2016-03-23 20:53:26 +00:00
Philip P. Moltmann
31c3688d0f Merge "Remove unnecessary strings and labels." into nyc-dev
am: a785c80

* commit 'a785c80a5ec3cdd4c14dc8519a2d8cbcc716a0f2':
  Remove unnecessary strings and labels.
2016-03-23 20:48:59 +00: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
2b47d01183 Merge "Deal with print-preview renderings that do not match the correct number of pages." into nyc-dev am: 49435a7
am: e2125f4

* commit 'e2125f4cdbb55dfa091a73a0a7db157f08c12b34':
  Deal with print-preview renderings that do not match the correct number of pages.
2016-03-23 17:36:30 +00:00
Philip P. Moltmann
e2125f4cdb Merge "Deal with print-preview renderings that do not match the correct number of pages." into nyc-dev
am: 49435a7

* commit '49435a72955fd6d2673ac33c34e2417c96fd87fb':
  Deal with print-preview renderings that do not match the correct number of pages.
2016-03-23 17:32:17 +00: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
Philip P. Moltmann
cf58bf48a1 Merge "Don\'t mix UI and print job state" into nyc-dev am: b9893ec
am: de77a33

* commit 'de77a33437d7773129acb9d5e69a194b90ec849f':
  Don't mix UI and print job state
2016-03-21 22:37:24 +00:00
Philip P. Moltmann
de77a33437 Merge "Don\'t mix UI and print job state" into nyc-dev
am: b9893ec

* commit 'b9893ec603a1527e7129bf5513a7f95f926ffeb9':
  Don't mix UI and print job state
2016-03-21 22:34:44 +00:00
Philip P. Moltmann
b170c08387 Don't mix UI and print job state
In PrintActivity.OnPause we set the print job state based on the
PrintActivity state. The issue was that FINISHED was interpreted as
"cancel print job". Actually with FINISHED does not tell what state the
job should be in.

The only purpose of the finished state was to guard against
double-invocation of doFinish().

Hence remove this recently introduced state and use a simple boolean to
guard against doule invocation of doFinish().

Bug: 27760331
Change-Id: I0767c2b0b9c28e8904647cc832c236f67f92bcfe
2016-03-21 12:53:06 -07: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
Geoff Mendal
1ab0d7fa30 Import translations. DO NOT MERGE
Change-Id: I21e03e1fd18cd86cbdd9f1f44150ac1e91d0b807
Auto-generated-cl: translation import
2016-03-18 20:23:57 -07:00
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
Philip P. Moltmann
cdb43e6e60 Merge "Treat all remotedocumentadapter-command results as cancel in the case we are canceling the command." into nyc-dev am: ef5577a
am: 909befe

* commit '909befe2110ffcc2ef375019077dc563c33e00cd':
  Treat all remotedocumentadapter-command results as cancel in the case we are canceling the command.
2016-03-18 16:53:09 +00:00
Philip P. Moltmann
909befe211 Merge "Treat all remotedocumentadapter-command results as cancel in the case we are canceling the command." into nyc-dev
am: ef5577a

* commit 'ef5577a15dfc652edcfeaab46cdea830b749f1b8':
  Treat all remotedocumentadapter-command results as cancel in the case we are canceling the command.
2016-03-18 16:48:44 +00:00
Philip P. Moltmann
27db6611a7 Treat all remotedocumentadapter-command results as cancel in the case we
are canceling the command.

Before it could happen that we have a pending cancel on a layout command
but the layout command finishes normally. This enqueued a new write
command before the PrintActivity is notified. This in turn prevented the
printactivity from finishing as the write command was still pending.

Bug: 27642724
Change-Id: I3c532d53b0c66c40d2e48ab8b4419251ff473a79
2016-03-18 09:44:28 -07:00
Philip P. Moltmann
63f27bd4af Merge "Do not finish multiple times." into nyc-dev am: 74f9a2f
am: 199ef2f1

* commit '199ef2f1aa36ea418f9f58738b3fb29559961ddf':
  Do not finish multiple times.
2016-03-18 16:25:44 +00:00
Philip P. Moltmann
199ef2f1aa Merge "Do not finish multiple times." into nyc-dev
am: 74f9a2f

* commit '74f9a2fc2e87b63ad7e367dff455f934c8a9d396':
  Do not finish multiple times.
2016-03-18 16:23:17 +00:00
Philip P. Moltmann
74f9a2fc2e Merge "Do not finish multiple times." into nyc-dev 2016-03-18 16:19:45 +00:00
Philip P. Moltmann
2edb3fc9b6 Merge "If we finish before the the remotePrintedDocument is initialized" into nyc-dev am: 5849f20
am: 1cf0fa1

* commit '1cf0fa140e456e83055d1f37782018a6910c844a':
  If we finish before the the remotePrintedDocument is initialized
2016-03-18 14:33:52 +00:00
Philip P. Moltmann
1cf0fa140e Merge "If we finish before the the remotePrintedDocument is initialized" into nyc-dev
am: 5849f20

* commit '5849f20124181f35063902829fdfc4c926b4424f':
  If we finish before the the remotePrintedDocument is initialized
2016-03-18 14:30:48 +00:00
Philip P. Moltmann
5849f20124 Merge "If we finish before the the remotePrintedDocument is initialized" into nyc-dev 2016-03-18 14:25:25 +00:00
Philip P. Moltmann
4ae2d597fc Merge "The PageAdapter update might be caused by the RecylerView." into nyc-dev am: 610bcf3
am: 1822985

* commit '1822985e11032197850ad68a47903ed0487f80be':
  The PageAdapter update might be caused by the RecylerView.
2016-03-17 19:09:23 +00:00
Philip P. Moltmann
1822985e11 Merge "The PageAdapter update might be caused by the RecylerView." into nyc-dev
am: 610bcf3

* commit '610bcf378197df173d19fa7b9c0461976622f947':
  The PageAdapter update might be caused by the RecylerView.
2016-03-17 18:01:59 +00:00
Philip P. Moltmann
e7f06a874a The PageAdapter update might be caused by the RecylerView.
In this case it cannot call back into the recyclerView and update the
data. For the call path please see the bug.

Bug: 27614499
Change-Id: I84733fea30429c20a2c96085efb47d4da5e1948a
2016-03-16 16:24:38 -07:00
Philip P. Moltmann
63ce0b737c Rewrite workflow on how the destination printer is selected.
This fixes two bugs
(1)
1. Printer was unknown when "all printer" activity was opened
2. Printer gets selected in "all printers" activity
3. Printer is unknown at the time the activity returns and thereby does
not get selected

(2)
If a print service gets disabled _all_ printers of the print service
will be marked as "removed" but do not removed from the adapter. This
is superflous as none of them can be selected anymore. The only thing
we want to make sure of is that the currently selected printer does
not get removed.

The workflow is now always:
- set mCurrentPrinter if needed
- Adjust mPrinterHolders
- adapter.notifyDataSetChanged()
  -> PrintersObserver.onChanged()
     -> onItemSelected

Bug: 27643305
Change-Id: I35ea7078367ad5a918c6362c04a26c4326e6c3f4
2016-03-14 10:18:23 -07:00