133 Commits

Author SHA1 Message Date
Svetoslav
e0ac69db93 am ea7f975b: am dcd05b44: Merge "Fix a crash in the select printers activity." into klp-dev
* commit 'ea7f975b957e3361211e250abdc3e46d995001cf':
  Fix a crash in the select printers activity.
2013-10-08 14:35:16 -07:00
Svetoslav
ea7f975b95 am dcd05b44: Merge "Fix a crash in the select printers activity." into klp-dev
* commit 'dcd05b440d81ededd567a417a6e10a02ccdfa07b':
  Fix a crash in the select printers activity.
2013-10-08 14:32:19 -07:00
Svetoslav
53e8a26d61 Fix a crash in the select printers activity.
When the search view is attached and detached we announce that
 for accessibility. The trouble is that if the activity is being
 torn down we are trying to access resources from a fragment that
 is detached and the qcrash occurs. This change does not try to
 access resources if the activity is finishing and also we do not
 load resource strings if accessibility is not enabled.

bug:11127814

Change-Id: I4a47a8ed3b6a13544cf17b4395560246a33f0e2d
2013-10-08 12:05:24 -07:00
Svetoslav Ganov
bd91ecfa0d am 84e95d19: am c2242aac: Merge "Show unavailable printers disabled and grayed out." into klp-dev
* commit '84e95d19d2f97dc03b235076e3134541cf161676':
  Show unavailable printers disabled and grayed out.
2013-10-08 09:42:36 -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
61b1e48afc am 06c74315: am 92f8648e: Merge "Make the print dialog floating." into klp-dev
* commit '06c74315e920f91feb9536d4aa25e1dc7fc0afa9':
  Make the print dialog floating.
2013-10-08 09:39:04 -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
Baligh Uddin
a44c31bda0 Import translations. DO NOT MERGE
Change-Id: I107cb20c67c52a5d2c6d82cb31f5ac41a75cdf4d
Auto-generated-cl: translation import
2013-10-07 09:20:44 -07:00
Svetoslav Ganov
d64d41b334 am 719e486f: am 9470cd95: Merge "Polish print dialog accessibility." into klp-dev
* commit '719e486f54b668d13680552f96558ee30d220a00':
  Polish print dialog accessibility.
2013-10-06 18:32:31 -07:00
Svetoslav Ganov
016e163f30 am 13c64b1d: am 253b628d: Merge "Update all printers activity\'s empty state and avoid selected printer flicker." into klp-dev
* commit '13c64b1d957b65a0cc0fc8e9ac8963b4e850baad':
  Update all printers activity's empty state and avoid selected printer flicker.
2013-10-06 18:32:28 -07:00
Svetoslav Ganov
f3f2738283 am f2bbe037: am 589a5505: Merge "Update the empty state for the "all printers activity"" into klp-dev
* commit 'f2bbe03726df6dd24a34444ec3a583bf1f23d886':
  Update the empty state for the "all printers activity"
2013-10-06 18:32:25 -07:00
Svetoslav Ganov
22df192aaf am 455def39: am a99cedc6: Merge "Update the "add print service" dialog as per UX spec." into klp-dev
* commit '455def3967109c7553625bc0985c0699057afcb2':
  Update the "add print service" dialog as per UX spec.
2013-10-06 18:32:22 -07:00
Svetoslav Ganov
56ddf1ffa5 Polish print dialog accessibility.
bug:10983508

Change-Id: I7391e06b661caac18d04ae279639ff447701f151
2013-10-05 19:56:19 -07:00
Svetoslav Ganov
24c686b8b5 Update all printers activity's empty state and avoid selected printer flicker.
1. Updated the empty state of the all printers activity to show no printers message
   if the user is searching and there are no matches and a searching for printers
   message if the user is not filtering the printers list.

2. Adding the fake PDF printer after the historical printers are loaded to avoid the case
   where we select the PDF printer and immediately after that the most used printer is
   selected resulting in an undesirable UI flicker.

3. Fixed a bug where if the most used printer which is initially considered unavailable
   is reported by the print service as available but the UI is not properly updated
   leaving the user in no way to click on the print button.

bug: 10983508

Change-Id: I60fdb7761332850fd5b9ffc0cb572a6213024dba
2013-10-05 19:18:08 -07:00
Svetoslav Ganov
264c566a7f Update the empty state for the "all printers activity"
The empty state is now showing searching for printers hint if
the user is not searching, otherwise the empty state's hint is
a searching for printers message.

bug:10983508

Change-Id: I3df79c167546998c8055d9ff85efa8b460a15e48
2013-10-05 12:58:22 -07:00
Svetoslav Ganov
0ea7d1e869 Update the "add print service" dialog as per UX spec.
The dialog button is now the last item in the adapter if the
search for print service settings is not empty and resolves
to an intent.

bug:10983508

Change-Id: I348e1ede1097d6f3b78c72e871bf3097b99004b6
2013-10-05 11:56:01 -07:00
Svetoslav
06aecf1bcb am 9dd0b996: am fd65373d: Merge "Print UI tweaks." into klp-dev
* commit '9dd0b996f93413ac44b5d8195f11b29af34663e2':
  Print UI tweaks.
2013-10-04 18:05:14 -07:00
Svetoslav
5ab717f21a Print UI tweaks.
1. The refresh button in a print notification was using
   wrong asset.

2. If the page count is unknown, just not show the page
   count instead unknown.

bug:10983508

Change-Id: I15f1fcbff60fe1f30d37868864da41550bb14487
2013-10-04 17:50:31 -07:00
Svetoslav Ganov
0d9ff1613a am 538df343: am 331f9e79: Merge "Print attributes hint not honored." into klp-dev
* commit '538df3437b80d15b07cda2464b2ae4e5bae8219b':
  Print attributes hint not honored.
2013-10-04 15:14:15 -07:00
Svetoslav Ganov
331f9e79ad Merge "Print attributes hint not honored." into klp-dev 2013-10-04 22:08:25 +00:00
Svetoslav Ganov
7be27acac9 Print attributes hint not honored.
1. Initially we have a single printer, the fake PDF printer, and
   wait for printers to be discovered. This printer was handling
   only a couple of media sizes. Hence, if the app provides a
   media size hint and the PDF printer does not support it, we
   were essentially ignoring the suggested media size since it
   was not supported by the selected printer and we fell back to
   the default paper size for that printer. The fake PDF printer
   should support all predefined media sizes.

2. The list of available paper sizes was shown in the order they
   are added ignoring the current locale. It is much better user
   experience if the media sizes used in the current locale are
   shown at the top and all others after that. Also the media
   sizes for the current locale should be alphabetically ordered
   so the user can quickly find the desired one.

3. The orientation was reset on media size or printer change.

bug:10564537

Change-Id: Iaa0d42242730ce69cea3effd4d0f4bc087068804
2013-10-04 11:45:15 -07:00
Baligh Uddin
3eb6b8d626 Import translations. DO NOT MERGE
Change-Id: Id91951dbb1084dd04fd93aa1cd26b6b558ff33ef
Auto-generated-cl: translation import
2013-10-04 11:02:34 -07:00
Svetoslav Ganov
57f1c60f41 am 2658f35a: am 6bf10299: Merge "Deleting print job files when we do not have to." into klp-dev
* commit '2658f35a5e58c65b9d5ff063f16a22dae4472669':
  Deleting print job files when we do not have to.
2013-10-04 09:53:16 -07:00
Svetoslav Ganov
2658f35a5e am 6bf10299: Merge "Deleting print job files when we do not have to." into klp-dev
* commit '6bf1029900d09d0432fb82f8c076bdb3eefc1f6c':
  Deleting print job files when we do not have to.
2013-10-04 09:51:40 -07:00
Svetoslav Ganov
6bf1029900 Merge "Deleting print job files when we do not have to." into klp-dev 2013-10-04 16:50:53 +00:00
Svetoslav
6077037abf am 2f6aabd7: am 5c126892: Merge "Print UI tweaks as per UX request." into klp-dev
* commit '2f6aabd7c399377e4ea033e5882b71420737017c':
  Print UI tweaks as per UX request.
2013-10-04 09:03:23 -07:00
Svetoslav
2f6aabd7c3 am 5c126892: Merge "Print UI tweaks as per UX request." into klp-dev
* commit '5c126892ec53772d784fcf9cef9165acf1d92ce3':
  Print UI tweaks as per UX request.
2013-10-04 09:00:52 -07:00
Svetoslav
5c126892ec Merge "Print UI tweaks as per UX request." into klp-dev 2013-10-04 15:58:10 +00:00
Svetoslav Ganov
2b40c83ae1 Deleting print job files when we do not have to.
The print job file name was not properly parsed. This resulted
in incorrect mapping from file to print job, thus deleting the
file when we do not have to.

bug:11069354

Change-Id: I7b8a7a7f98dd77b34119f2a9cd16a6ec3c22b63b
2013-10-04 08:49:32 -07:00
Baligh Uddin
a6b90f39f1 Merge "Import translations. DO NOT MERGE" into klp-dev 2013-10-03 03:40:55 +00:00
Svetoslav
39e71de6b4 Print UI tweaks as per UX request.
1. Limit the width of the dropdown of the printers list.

2. Add icons the the list in the all pritners activity.

3. Update the empty state view for the all printers activity.

bug:10983508

Change-Id: I19effcf32770fdda278009a060b5170a3f29988e
2013-10-02 19:30:43 -07:00
Svetoslav
7132b9b88a am 57344fea: am 913f87ef: Merge "IndexOutOfBoundsException in the PrintSpoolerService dump." into klp-dev
* commit '57344fea1cba51c179dd153ba60f87391595fec8':
  IndexOutOfBoundsException in the PrintSpoolerService dump.
2013-10-02 15:06:11 -07:00
Svetoslav
57344fea1c am 913f87ef: Merge "IndexOutOfBoundsException in the PrintSpoolerService dump." into klp-dev
* commit '913f87ef637fc1d9a006c543833b6815090b94e8':
  IndexOutOfBoundsException in the PrintSpoolerService dump.
2013-10-02 15:02:44 -07:00
Svetoslav
913f87ef63 Merge "IndexOutOfBoundsException in the PrintSpoolerService dump." into klp-dev 2013-10-02 22:00:50 +00:00
Svetoslav
b67a637e60 IndexOutOfBoundsException in the PrintSpoolerService dump.
The dump code in PrintSpoolerService was relying on being
called only as a result of "adb shell dumpsys print" which
is apparently wrong. As a result the code was making wrong
assumption about the input arguments.

bug:11046234

Change-Id: Ie38f3cc5f17cac98b808fef6d6bbeaca22a62ef0
2013-10-02 12:40:18 -07:00
Svetoslav
7f0e8be082 am c114e19c: am 228a7d2a: Merge "Sometimes printer selection from all printers activity does not work." into klp-dev
* commit 'c114e19c10a7485d8b7c10c94a268a2703b29217':
  Sometimes printer selection from all printers activity does not work.
2013-10-02 12:19:41 -07:00
Svetoslav
c114e19c10 am 228a7d2a: Merge "Sometimes printer selection from all printers activity does not work." into klp-dev
* commit '228a7d2a157c4e6ceee5fdea389f207bbf4990ba':
  Sometimes printer selection from all printers activity does not work.
2013-10-02 12:17:54 -07:00
Svetoslav
228a7d2a15 Merge "Sometimes printer selection from all printers activity does not work." into klp-dev 2013-10-02 19:15:10 +00:00
Baligh Uddin
82b8c8c73c Import translations. DO NOT MERGE
Change-Id: I4aa7e1ed8ccce520518231a116608bc8e013bb4c
Auto-generated-cl: translation import
2013-10-02 11:12:53 -07:00
Svetoslav
f7851e3f80 am 2f5440bd: am cbf3f2cd: Merge "Adding an empty state UI for the printer search activity in the spooler." into klp-dev
* commit '2f5440bd3bfbd102051928b9e38711ffb3ad59fe':
  Adding an empty state UI for the printer search activity in the spooler.
2013-10-02 09:37:18 -07:00
Svetoslav
2f5440bd3b am cbf3f2cd: Merge "Adding an empty state UI for the printer search activity in the spooler." into klp-dev
* commit 'cbf3f2cde569aac3a49d888d2bd52d77dc139738':
  Adding an empty state UI for the printer search activity in the spooler.
2013-10-01 19:24:31 -07:00
Svetoslav
4e4874bb71 Sometimes printer selection from all printers activity does not work.
1. Sometimes selecting a printer from the full printer list does not
   work if the selected printer was not in the initial drop down list
   of the print dialog.

   The reason was that there is a race. We use loaders in the print
   dialog activity and the all printers one. When these loaders are
   stopped we stop printer discovery since we do not want to keep this
   potentially expensive process on going if the activity is paused
   because say the user decide to press home and start playing his
   favorite game while the printers dialog is up. As a result the
   loader does not get printer updates until it is started.

   The loader of the print dialog activity is stopped while the user is
   selecting a printer from the all printers activity whose loader is
   getting discovered recent printers. Now when the user selects a printer
   the loader of the print dialog activity is started but may not get
   the latest printers by the time onActivityResult is called with the
   selected printer. Now we cache the selected printer id and if the
   loader reports it we select that printer.

2. In the print dialog we show only a few of the discovered printers.
   If the user selects a printer from the all printers activity that
   is not in the initial list we shuffle the adapter data to make sure
   the selected printer is in the shown subset. Now if the printers
   change, i.e. the printers loader reports new result we were not
   respecting the reshuffling made before so the short list of
   printers changes yet again.

bug:11034216

Change-Id: I54fe3619e3328b65839d9f4b02309699eae7f8eb
2013-10-01 19:12:27 -07:00
Svetoslav
976b4e6312 Adding an empty state UI for the printer search activity in the spooler.
The user can select all printers from the print dropdown to get to
a search for printers activity where one can filter out the list
of a available printers. We did not have an empty state UI for the
case when the query yields no printers.

bug:11009053

Change-Id: I6b45517b8a7b319992019a1bf65858319a19a0de
2013-10-01 15:32:57 -07:00
Svetoslav
82d2d7e4b0 am c6568719: Merge "Ignore historical printer records for installed services" into klp-dev
* commit 'c6568719671206e726f260fad390680f7fb0ee9e':
  Ignore historical printer records for installed services
2013-09-30 17:10:21 -07:00
Svetoslav Ganov
b84aa9fee3 am b415525a: Merge "Print job files and print job records not always cleaned up." into klp-dev
* commit 'b415525a16074b6dc8e295655648b7c7c1074bbb':
  Print job files and print job records not always cleaned up.
2013-09-30 17:10:08 -07:00