91 Commits

Author SHA1 Message Date
Svetoslav
d2b27cbde9 am 6874bfe1: Merge "Created print jobs should not be persisted until they are queued." into klp-dev
* commit '6874bfe19b6bc1522e07e53eb96a07e21d148b41':
  Created print jobs should not be persisted until they are queued.
2013-11-14 22:27:35 -08:00
Svetoslav
885810de69 Created print jobs should not be persisted until they are queued.
Print jobs in a created state should not be persisted. However,
if a print service sets the tag to a print job that is queued,
we were persisting even print jobs in a created state. This
change adds a simple check while persisting to avoid storing
created print jobs.

bug:11696785

Change-Id: Idf28f3634b91fd5bf345f376114af4ed478ed3c6
2013-11-14 18:02:31 -08:00
Svetoslav Ganov
852a8895e1 am d697ba73: Merge "Fix NPE at PrintSpooler in Japanese environment." into klp-dev
* commit 'd697ba73b5a5fc5dc502a117a8f06e8f1a5359b9':
  Fix NPE at PrintSpooler in Japanese environment.
2013-11-13 14:24:23 -08:00
Keiji Ariyama
1a8c7135f0 Fix NPE at PrintSpooler in Japanese environment.
MediaSize ID have to be upper cases.

Change-Id: I84af01dbd185df210b5ebb1de282a4091e06df05
Related-issue: https://code.google.com/p/android/issues/detail?id=61984
2013-11-13 11:43:26 -08:00
Baligh Uddin
9c530e1855 Import translations. DO NOT MERGE
Change-Id: I75eb5e47f9851174f7bd7e8301537bf7c94a8b5a
Auto-generated-cl: translation import
2013-11-11 08:11:33 -08:00
Baligh Uddin
3b79bf493c Import translations. DO NOT MERGE
Change-Id: I13dd4dfd6492c31975cd61e28caeea940a5f66cb
Auto-generated-cl: translation import
2013-11-06 11:53:23 -08:00
Svetoslav
628264c4f3 am 4033c94b: Merge "Add way for the user to forget previously used printers." into klp-dev
* commit '4033c94bb7566a652442ae1fa164d1efa7562761':
  Add way for the user to forget previously used printers.
2013-11-04 19:35:35 -08:00
Svetoslav
1c664b6def Add way for the user to forget previously used printers.
We keep track of historical printers but some of them may disappear
forever, say the user changes his printer. In such a case the print
system has no idea that the previous printer will never appear so
this change allows the user to remove historical printers.

In the all printers list the user can now long press on a printer
and if the printer is available he can select it from the context
menu. If the printer was used before regardless if it is active the
user may choose to forget it.

bug:11282742

Change-Id: Idc2dda70920ad045149eea1bcfc75ad1992827e9
2013-11-04 14:25:11 -08:00
Baligh Uddin
f1228e3550 Import translations. DO NOT MERGE
Change-Id: I6275ae5da91b961e11974efd80e6b4947bd44972
Auto-generated-cl: translation import
2013-10-30 08:53:01 -07:00
Svetoslav
60fb1e2837 am 714ba345: Merge "Complete implementation of the advanced print options." into klp-dev
* commit '714ba34556572d36b1f9f8d9b860c4da24da6361':
  Complete implementation of the advanced print options.
2013-10-28 15:09:12 -07:00
Svetoslav
b4fda13476 Complete implementation of the advanced print options.
1. Implemented the advanced printer options integration. Now a print service
    may declare an advanced print options activity which may be launched by
    the user if the current printer supports advanced print options. These options
    are visible only to the print service that added them and it is the only party
    that will interpret the options.

2. Fixed a couple of bugs in the saved print jobs parsing. One was that if there
    are more than one page range, a half of the print job properties was not
    properly parsed. The other was that the media size constructor was using
    incorrect argument order, thus creating a media size with wring width.

3. Fixed and edge case where old print jobs and their docs can get stuck in
    the spooler. If the app did not write the requested pages we were not showing
    an error message, rather just finish the activity without canceling the print
    job and this print job is stuck in the spooler. Now we show an error message
    and the user may retry, cancel. If the user cancels the print job is also
    cancelled, thus no leftover in the spooler.

4. Fixed the background color of the print dialog to meet UX spec.

bug:11241800

Change-Id: I352440bc86aec824a805883fc9579d96a06d11e6
2013-10-28 11:44:07 -07:00
Baligh Uddin
d33e5f4d99 Import translations. DO NOT MERGE
Change-Id: I1609ae278c6e7fe7af1d440df91940e0a0b07e45
Auto-generated-cl: translation import
2013-10-21 08:29:27 -07:00
Svetoslav
0acad1de81 am 30d9161b: Merge "Printer list items have wrong width." into klp-dev
* commit '30d9161b8e84652d9ac504b70adacaf729fdb58b':
  Printer list items have wrong width.
2013-10-18 13:28:32 -07:00
Svetoslav
30d9161b8e Merge "Printer list items have wrong width." into klp-dev 2013-10-18 20:27:06 +00:00
Svetoslav Ganov
a225bbddec am 54e55759: Merge "All printers list has incorrect padding and item height." into klp-dev
* commit '54e5575924d3abba8129268d2d0553efc9a841eb':
  All printers list has incorrect padding and item height.
2013-10-17 11:11:35 -07:00
Svetoslav Ganov
ed513d7e4a All printers list has incorrect padding and item height.
1. We were using the layout for the printer drop down from the
   print dialog as the list item in the all printers activity.
   This layout was not high enough. Now we have a separate
   layout for the drop down and for the list. Note that they
   are almost identical but this is better that writing java
   code to lookup the height from the theme and change it
   programatically since the java code is almost half the size
   of the layout and leads to spreading the logic in both the
   layout file and the java code.

2. The padding of the printers list was not correct. Now it
   mimics the bahavior in settings where we change the padding
   based on orientation.

bug:11261157

Change-Id: I8507c4ee86e9196fe1777cf9577f1886ccfbb1ad
2013-10-17 10:33:14 -07:00
Svetoslav
b196106a43 Printer list items have wrong width.
1. There was leftover code in the printers adapter that was
   hard coding the item width with no reason to do so.

2. Changed the icon view visibility to invisible to allow
   the text of all list items including save to PDF and all
   printers to be left aligned.

bug:11225340

Change-Id: I5b51d0d30577699f5cd73c7c58521358653d135b
2013-10-16 16:45:33 -07:00
Baligh Uddin
d232a6f988 Import translations. DO NOT MERGE
Change-Id: I45af8da3d23c08e5f32133336e1805149dbdba64
Auto-generated-cl: translation import
2013-10-16 14:40:31 -07:00
Baligh Uddin
ffe8b79f36 am e1b6b6c5: Bring deleted files from the dead. These files were dropped by the translation pipelines because they do not contain any translated elements, but in reality they are needed.
* commit 'e1b6b6c5816b321864b6a5d72a46860fda8fa7cd':
  Bring deleted files from the dead. These files were dropped by the translation pipelines because they do not contain any translated elements, but in reality they are needed.
2013-10-15 16:00:13 -07:00
Baligh Uddin
e1b6b6c581 Bring deleted files from the dead.
These files were dropped by the translation
pipelines because they do not contain any
translated elements, but in reality they
are needed.

Bug: 11226380
2013-10-15 22:47:02 +00:00
Svetoslav Ganov
0ec8b5282e am 5a736fcd: Merge "Adding a missing resource file." into klp-dev
* commit '5a736fcd203f67c1d4d072fc4e96bb123d083800':
  Adding a missing resource file.
2013-10-15 10:20:25 -07:00
Svetoslav Ganov
5a736fcd20 Merge "Adding a missing resource file." into klp-dev 2013-10-15 17:17:31 +00:00
Svetoslav Ganov
2d996fb687 Adding a missing resource file.
This is a resource file cotaining the media sizes for the Catalan
locale. Without it the print spooler crashes all the time for that
locale since it cannot construct the PDF printer correctly.

bug:11226380

Change-Id: I7fa9c9bf4ed073e5f4ddf0d0fe9de4998e3467d4
2013-10-15 00:18:13 -07:00
Svetoslav Ganov
f62e262932 am fe3b58fb: Merge "Update the print spooler action bar icon." into klp-dev
* commit 'fe3b58fbed7a02d3e9f559ed2f814b42934dc784':
  Update the print spooler action bar icon.
2013-10-14 17:19:36 -07:00
Svetoslav Ganov
2f0ec7af06 Update the print spooler action bar icon.
1. Updated the print spooler icon shown in the action bar
   when searching for printers in the all printers activity.

2. If the current printer's capabilities are not immediately
   available the page count label in the dialog contained the
   argument placeholders.

bug:10983508

Change-Id: Id4f78d6cc31647f043f8e3044ab54f30584d1ebe
2013-10-14 13:49:17 -07:00
Baligh Uddin
d898bb0003 Import translations. DO NOT MERGE
Change-Id: Ic05225f9a7ed59b8534c5637187ced07b660252a
Auto-generated-cl: translation import
2013-10-14 09:16:10 -07:00
Baligh Uddin
0c679b02b3 Import translations. DO NOT MERGE
Change-Id: I68d6709509ea86f19862bb7ea5319d405dcd7c10
Auto-generated-cl: translation import
2013-10-11 16:33:07 -07:00
Baligh Uddin
3532cb4bba Import translations. DO NOT MERGE
Change-Id: I66efc38992968ef463f4d02f1af101053adfb41e
Auto-generated-cl: translation import
2013-10-11 16:31:18 -07:00
Svetoslav Ganov
9ce7ae3e20 am f22a767e: Merge "Added UI for errors during layout and write." into klp-dev
* commit 'f22a767e872ec8f5c2531a88819e0f4574c78fe3':
  Added UI for errors during layout and write.
2013-10-11 10:08:00 -07:00
Svetoslav Ganov
f22a767e87 Merge "Added UI for errors during layout and write." into klp-dev 2013-10-11 17:06:12 +00:00
Svetoslav Ganov
caff38821a Added UI for errors during layout and write.
1. If an error happens during layout or write we show an error
   message with the string provided by the application which
   has an OK button to retry or tap outside to cancel.

2. Updated the targed and min SDK version for the PrintSpooler.

bug:11127269

Change-Id: I4301cf3716119b1e33b95347a8451fc1c128343b
2013-10-11 10:04:02 -07:00
Baligh Uddin
576124688b Merge "Import translations. DO NOT MERGE" into klp-ub-dev 2013-10-11 15:08:29 +00:00
Baligh Uddin
d32e9b7ffb Merge "Import translations. DO NOT MERGE" into klp-dev 2013-10-11 15:08:10 +00:00
Svetoslav
5b8f01b62a am 466c046f: Merge "Fixing jank when transition from print dialog to generating one." into klp-dev
* commit '466c046f204e98b44506dfb1718f0b56094486f7':
  Fixing jank when transition from print dialog to generating one.
2013-10-10 18:44:22 -07:00
Svetoslav
466c046f20 Merge "Fixing jank when transition from print dialog to generating one." into klp-dev 2013-10-11 01:39:09 +00:00
Baligh Uddin
9a9eef2894 Import translations. DO NOT MERGE
Change-Id: I23fe12c08af8ee2eeaf1e6d92a1f8c2ccb69a74e
Auto-generated-cl: translation import
2013-10-10 17:48:26 -07:00
Baligh Uddin
454d33ad89 Import translations. DO NOT MERGE
Change-Id: I902ff15c7df70eef8986dc2dcfbac59551f085fa
Auto-generated-cl: translation import
2013-10-10 17:47:20 -07:00
Svetoslav Ganov
92aa5f4ed2 am 896a9b17: Merge "Adding missing resourcs for the defaul PDF printer media sizes." into klp-dev
* commit '896a9b172627ec318f908e734941afb06cc68169':
  Adding missing resourcs for the defaul PDF printer media sizes.
2013-10-10 16:55:15 -07:00
Svetoslav
3aa2e2b3ab Fixing jank when transition from print dialog to generating one.
Initially we show the print dialog and when the user presses print
we show a generating dialog with an indefinite spinner and a cancel
button. The transition between the two UIs which are really different
layouts show in the print activity is animated. In the middle of
the animation from print to generating UI there was a jump of the
content and an undesired window animation kicking in. This is a
side effect of changing the activity to floating so now changing the
container size was causing window resize and hence animation. Fun!

bug:10983508

Change-Id: I7d88e073c55863b945cdb50822401592f32d44c3
2013-10-10 16:52:54 -07:00
Svetoslav Ganov
896a9b1726 Merge "Adding missing resourcs for the defaul PDF printer media sizes." into klp-dev 2013-10-10 23:52:07 +00:00
Svetoslav Ganov
bf74156f59 am 0ea16e9e: Merge "Coalescing multiple print job notifications." into klp-dev
* commit '0ea16e9e763b5815707971f503d5408dc1b66c10':
  Coalescing multiple print job notifications.
2013-10-10 10:14:23 -07:00
Svetoslav Ganov
4ba9254824 Adding missing resourcs for the defaul PDF printer media sizes.
Some regions have different media size standards and the fake PDF
printer shows the media sizes for the current locale. Interestingly,
these files were skipped in my previous change while I remember
adding them - maybe did not upload the patch.

bug:11147920

Change-Id: I819ab08fbef08305be89e3acf297328b1a0ded11
2013-10-10 00:52:42 -07:00
Svetoslav Ganov
a18661d592 Coalescing multiple print job notifications.
1. We used to show a single notificaiton for every print job but
   this is against th UX guidelines. Since we have to lead by
   example, this change adds coalescing of multiple notifications.

bug:11155212

2. Print job state callback in the PrintManager now correctly
   invoked on the main thread.

bug:10983508

Change-Id: I906e9e62198fa37cb4d2f71fce07ed475d61e1bd
2013-10-09 23:43:11 -07:00
Svetoslav Ganov
84e95d19d2 am c2242aac: Merge "Show unavailable printers disabled and grayed out." into klp-dev
* commit 'c2242aac0cd6c214422a1507dfd4b4673642cd98':
  Show unavailable printers disabled and grayed out.
2013-10-08 09:39:21 -07:00
Svetoslav Ganov
06c74315e9 am 92f8648e: Merge "Make the print dialog floating." into klp-dev
* commit '92f8648ebd5b569d489420badd1895df763085ae':
  Make the print dialog floating.
2013-10-08 09:35:45 -07:00
Svetoslav Ganov
c2242aac0c Merge "Show unavailable printers disabled and grayed out." into klp-dev 2013-10-08 16:34:59 +00:00
Svetoslav Ganov
92f8648ebd Merge "Make the print dialog floating." into klp-dev 2013-10-08 16:32:52 +00:00
Svetoslav Ganov
69b91e0ecb Show unavailable printers disabled and grayed out.
1. If a printer is not available it has to disabled and grayed out.

2. Cancle a print job if the app does not provide the requested pages.

3. Fix current printer selection flicker when the print dialog is
   showing up. Often the current printer is initially set to the user's
   favorite and then it is changed back to the PDF one.

bug:10983508

Change-Id: I8d53eb992cf1c92675ec09f61b2ec272b962fa68
2013-10-08 09:08:19 -07:00
Svetoslav Ganov
b20d63a671 Make the print dialog floating.
The print dialog was full-screen which was not really needed and was
causing the dialog to jump instead of animate up/down when the IME
shows/hides.

bug:11116648

Change-Id: Ifb46fd80a90948270a1fa9c875258b8d0cdfc111
2013-10-07 18:21:59 -07:00
Baligh Uddin
a5ea69ff28 Import translations. DO NOT MERGE
Change-Id: Ie31c027871b65270af282ba9253c35be93d7490d
Auto-generated-cl: translation import
2013-10-07 09:22:06 -07:00