289 Commits

Author SHA1 Message Date
Svetoslav
b066a136d7 am d4879eec: am 628264c4: am 4033c94b: Merge "Add way for the user to forget previously used printers." into klp-dev
* commit 'd4879eec5f1749d34d59a19ccde820c4eaabdfcf':
  Add way for the user to forget previously used printers.
2013-11-05 14:22:41 -08:00
Svetoslav
d4879eec5f am 628264c4: am 4033c94b: Merge "Add way for the user to forget previously used printers." into klp-dev
* commit '628264c4f3828e0c4c997bb91f289a91d54c75c4':
  Add way for the user to forget previously used printers.
2013-11-05 13:26:40 -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
e63f9ded6b Merge "Import translations. DO NOT MERGE" 2013-11-01 14:34:45 +00:00
Baligh Uddin
2bc2574e60 Merge "Import translations. DO NOT MERGE" into klp-dev 2013-11-01 14:34:40 +00:00
Svetoslav
7b4bb2f75e am 4379bd75: am eccfe65f: am 6ce161d1: Merge "Cancel current work in PrintDocumentAdatper if printing is cancelled." into klp-dev
* commit '4379bd751877056ffa236d0eb8a6cf59b8732d2c':
  Cancel current work in PrintDocumentAdatper if printing is cancelled.
2013-10-31 14:51:45 -07:00
Svetoslav
4379bd7518 am eccfe65f: am 6ce161d1: Merge "Cancel current work in PrintDocumentAdatper if printing is cancelled." into klp-dev
* commit 'eccfe65f9daf459342ebc658b8a40584dfcea016':
  Cancel current work in PrintDocumentAdatper if printing is cancelled.
2013-10-31 14:48:22 -07:00
Svetoslav
eccfe65f9d am 6ce161d1: Merge "Cancel current work in PrintDocumentAdatper if printing is cancelled." into klp-dev
* commit '6ce161d1762a1c74b1ed6931c1d54f1f553267b0':
  Cancel current work in PrintDocumentAdatper if printing is cancelled.
2013-10-31 14:44:50 -07:00
Svetoslav
d270cb9264 Cancel current work in PrintDocumentAdatper if printing is cancelled.
Layout and write may take some time during which the user can
cancel printing. Currently we wait for the last operation,
being write or layout, to complete before closing the print
dialog. Now in such a scenario we request a cancellation of
the ongoing operation.

bug:11329523

Change-Id: Ia9d747163cc73509369a86c8b5afc83b7ee54859
2013-10-31 14:30:58 -07:00
Baligh Uddin
407fd711d3 Import translations. DO NOT MERGE
Change-Id: I1a818740cb5af5e65e17c7d3716b59b261e560b1
Auto-generated-cl: translation import
2013-10-30 08:53:50 -07: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
cdc2280a6e am 0298ebb2: am 60fb1e28: am 714ba345: Merge "Complete implementation of the advanced print options." into klp-dev
* commit '0298ebb2db5b7c24d68fd3817b11e2f887471d0c':
  Complete implementation of the advanced print options.
2013-10-28 15:15:45 -07:00
Svetoslav
0298ebb2db am 60fb1e28: am 714ba345: Merge "Complete implementation of the advanced print options." into klp-dev
* commit '60fb1e28375b9c0dc7505214f3ab33bdd38f7aa8':
  Complete implementation of the advanced print options.
2013-10-28 15:12:26 -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
Svetoslav Ganov
9f598351ca am 01b1e661: am 1aae2c47: am 2a40da55: Merge "Update the documentaton of the android.print package." into klp-dev
* commit '01b1e66135f3e727be47300510443d149d8679cd':
  Update the documentaton of the android.print package.
2013-10-25 14:04:56 -07:00
Svetoslav Ganov
01b1e66135 am 1aae2c47: am 2a40da55: Merge "Update the documentaton of the android.print package." into klp-dev
* commit '1aae2c477772378b447da35717882c76aa39fb67':
  Update the documentaton of the android.print package.
2013-10-25 13:54:07 -07:00
Svetoslav Ganov
1aae2c4777 am 2a40da55: Merge "Update the documentaton of the android.print package." into klp-dev
* commit '2a40da558b267b91ed0b0c9090656bdc02db2833':
  Update the documentaton of the android.print package.
2013-10-25 13:51:45 -07:00
Svetoslav Ganov
2a40da558b Merge "Update the documentaton of the android.print package." into klp-dev 2013-10-25 20:48:45 +00:00
Svetoslav Ganov
4d4c66dd38 Update the documentaton of the android.print package.
bug:10551786
bug:10551697
bug:10705082
bug:10741641
bug:11318976
bug:10550979
bug:10551761

Change-Id: I46ceb66a69b6d32d6b417356178f67f2e25e891a
2013-10-25 11:33:34 -07:00
Baligh Uddin
383813e33f Import translations. DO NOT MERGE
Change-Id: I5fb89f28b23b715dc5de02a0c507cb5eba9ff7f5
Auto-generated-cl: translation import
2013-10-21 08:30:11 -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 Ganov
e9ffeac138 am 8a51e2f4: am a53e1f81: am 23757527: Merge "Hide the print dialog if the printing activity is destroyed." into klp-dev
* commit '8a51e2f48cb24113e8463eb251a097080eb46a7f':
  Hide the print dialog if the printing activity is destroyed.
2013-10-18 17:35:31 -07:00
Svetoslav Ganov
8a51e2f48c am a53e1f81: am 23757527: Merge "Hide the print dialog if the printing activity is destroyed." into klp-dev
* commit 'a53e1f81380c018705dc56ee82ec2db155f23489':
  Hide the print dialog if the printing activity is destroyed.
2013-10-18 17:32:57 -07:00
Svetoslav Ganov
a53e1f8138 am 23757527: Merge "Hide the print dialog if the printing activity is destroyed." into klp-dev
* commit '237575278de8cae5d20ee333fcb2ccceee257d67':
  Hide the print dialog if the printing activity is destroyed.
2013-10-18 17:29:05 -07:00
Svetoslav Ganov
237575278d Merge "Hide the print dialog if the printing activity is destroyed." into klp-dev 2013-10-19 00:26:44 +00:00
Svetoslav
d431ffbe30 am 1fb5ea38: am 0acad1de: am 30d9161b: Merge "Printer list items have wrong width." into klp-dev
* commit '1fb5ea38533b0a163194441f4f28cd64a5835446':
  Printer list items have wrong width.
2013-10-18 13:34:07 -07:00
Svetoslav
1fb5ea3853 am 0acad1de: am 30d9161b: Merge "Printer list items have wrong width." into klp-dev
* commit '0acad1de81799f765863118092caef0b6d306df5':
  Printer list items have wrong width.
2013-10-18 13:30:28 -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
858a1850e2 Hide the print dialog if the printing activity is destroyed.
1. For an app to print it creates a PrintDocumentAdapter implementation
   which is passed to the print dialog activity. If the activity that
   created the adapter is destroyed then the adapter, which may rely on
   the activity state, may be in an invalid state. For example, an app
   creates an adapter and calls print resuting in the app activity and
   the print dialog activity being stacked. Now the user rotates the
   device which triggers the recreating of the activity stack (assume the
   app does not handle rotation). The recreated print dialog activity
   receives the intent that originally created it with containing the
   adapter that was constructed in the context of the old, now destroyed,
   app activity instance.

   To handle this we are limiting an app to be able to print only from
   and activity and when this activity is destroyed we mark the adapter
   as invalid which will result in hiding the print dialog activity. Note
   that if the app process is killed we already handle this in the print
   dialog activiy by registering a death recipient on the adapter binder.

2. In the PrintManager.PrintDocumentAdapterDelegate some of the state is
   accessed only on the main thread and some from miltiple threads. The
   code was trying to avoid locking for state that is not accessed by
   multiple threads but this is error prone and the benefit does not
   justify the complexity and added fragility. Now grabbing a lock all
   the time.

3. The PrintJobConfigActivity waits for it to bind to the print spooler
   service before instantiating its print controller and editor. However,
   these can be accessed by invoking some of the activity cycle callbacks.
   This change is adding null checks for the case where the activity
   callbacks are called before the binding to the spooler is completed.

bug:11242661

Change-Id: Id906b3170e4f0a0553772dfa62686f06fdca0eaf
2013-10-18 13:12:06 -07:00
Svetoslav Ganov
da5132c2b0 am 6f570bd8: am a225bbdd: am 54e55759: Merge "All printers list has incorrect padding and item height." into klp-dev
* commit '6f570bd8c08df3eac750b7b0d7dae470bb23673d':
  All printers list has incorrect padding and item height.
2013-10-17 11:18:22 -07:00
Svetoslav Ganov
6f570bd8c0 am a225bbdd: am 54e55759: Merge "All printers list has incorrect padding and item height." into klp-dev
* commit 'a225bbddeccff76b92f18e620df0a8b773d4befd':
  All printers list has incorrect padding and item height.
2013-10-17 11:14:56 -07: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
19d0448512 Import translations. DO NOT MERGE
Change-Id: I60e1dfdf59f5790fb58d59946d25b2e14cd252bb
Auto-generated-cl: translation import
2013-10-16 14:41:47 -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
809ddcf1c9 am a3378956: am 2c163ee4: am 1e639d2d: Merge "Update the message for unavailable printers." into klp-dev
* commit 'a337895682d86e9d71b04562a8b6e0dae889c8ac':
  Update the message for unavailable printers.
2013-10-15 04:03:16 -07:00
Svetoslav Ganov
b3918ae418 am 2f807975: am f62e2629: am fe3b58fb: Merge "Update the print spooler action bar icon." into klp-dev
* commit '2f8079753d40e7ee3f3af0d709c83c1e42480349':
  Update the print spooler action bar icon.
2013-10-15 04:02:37 -07:00
Svetoslav
a8068cb02d am 9773b379: am 79662942: am c89e5a6a: Merge "Layout may be called with invalid print attributes." into klp-dev
* commit '9773b379fecb7671bc02c1096ee23875d727f827':
  Layout may be called with invalid print attributes.
2013-10-15 04:02:33 -07: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
a337895682 am 2c163ee4: am 1e639d2d: Merge "Update the message for unavailable printers." into klp-dev
* commit '2c163ee4eb1e1ec835bba1c906e4ba1f86983c46':
  Update the message for unavailable printers.
2013-10-14 19:02:00 -07:00
Svetoslav Ganov
2f8079753d am f62e2629: am fe3b58fb: Merge "Update the print spooler action bar icon." into klp-dev
* commit 'f62e262932daaea8b5eda3893a56e2fdbb17ea0a':
  Update the print spooler action bar icon.
2013-10-14 19:00:41 -07:00
Svetoslav
9773b379fe am 79662942: am c89e5a6a: Merge "Layout may be called with invalid print attributes." into klp-dev
* commit '796629422f3023c1cc3c8d970f5b66c1b34599d2':
  Layout may be called with invalid print attributes.
2013-10-14 19:00:38 -07:00