681 Commits

Author SHA1 Message Date
Svetoslav
5668348138 Fix ANR in print spooler.
Saving to PDF a subset of the pages requires trimming the
undesired pages and when this is done writing the ready doc
to a URI. To write the file to URI we have to obtain it but
it is aquired by the shredding task and never released. Now
we are releasing the document immediately after trimming it.

bug:17631301

Change-Id: I4db7966c65c75f0f14c3cb52fd83b4d8fd5a4687
2014-09-23 16:25:54 -07:00
Svetoslav
254361f136 Print spooler crash on back before first layout is complete.
If the user presses back before the remote print document
update has completed we get a crash. The reason is that
after the update completion we were trying to finish the
activity if we are in a cancelled state but this is not
needed as we aready handled the back key so we will finish.
Handling finish twice was creating the problem as classes
with lifecycles are not designed to be used after being
finished. In particular, we were calling doFinish() twice.

bug:17630561

Change-Id: If418f237a2def7c8e4a072ac8826283f4dd7fc85
2014-09-23 15:54:24 -07:00
Svetoslav
5e7eeccd05 am 515c7c94: am cd343325: am e821fc43: am 87c9fb76: am e9456781: Merge "Loosen the constraint for releasing a shared file." into lmp-dev
* commit '515c7c9416e33f17c9a937931d43ebfb391dcd44':
  Loosen the constraint for releasing a shared file.
2014-09-23 16:20:43 +00:00
Svetoslav
8b366ef3ee am cd343325: am e821fc43: am 87c9fb76: am e9456781: Merge "Loosen the constraint for releasing a shared file." into lmp-dev
* commit 'cd3433251e0a1e1141ee11fd5b72864b56f6b807':
  Loosen the constraint for releasing a shared file.
2014-09-23 15:48:51 +00:00
Svetoslav
b889173558 am e9456781: Merge "Loosen the constraint for releasing a shared file." into lmp-dev
* commit 'e9456781c0b4d6ccc70a5378ecd802fd28554796':
  Loosen the constraint for releasing a shared file.
2014-09-22 21:51:24 +00:00
Svetoslav
ca506af8b0 am e9456781: Merge "Loosen the constraint for releasing a shared file." into lmp-dev
* commit 'e9456781c0b4d6ccc70a5378ecd802fd28554796':
  Loosen the constraint for releasing a shared file.
2014-09-22 21:50:33 +00:00
Svetoslav
cf3a86b559 Loosen the constraint for releasing a shared file.
In the spooler we have the renderer reading a file to visualize
content and the app writing a file to produce the content. Since
we have to swap the file under the renderer we have a mutex file
provider that both parties can request, use when released, and
release when required. This enables us to request the file which
closes the renderer and when the renderer is closed ask the app
to write some more pages, then open the renderer, and so on. The
mutex file provider was throwing of a thread that does not own
the file thries to relase it which is not needed, this should be
just a nop.

bug:17607134

Change-Id: Id6a2ce92d70077f57978b95315648faf02c13c68
2014-09-22 13:48:44 -07:00
Baligh Uddin
ed9b1a848d Import translations. DO NOT MERGE
Change-Id: Ieb412ac9804570a48077a9cf8f425d7fe306016e
Auto-generated-cl: translation import
2014-09-20 13:00:56 -07:00
Baligh Uddin
d5270550b1 Import translations. DO NOT MERGE
Change-Id: I87cc837c719968aa778af92a4f119a266d2c2c42
Auto-generated-cl: translation import
2014-09-20 12:59:23 -07:00
Baligh Uddin
78ec95e714 Import translations. DO NOT MERGE
Change-Id: Ib08e8991a092d8404352d9709d837be2eb392b55
Auto-generated-cl: translation import
2014-09-20 12:56:55 -07:00
Svetoslav
40f1a329d1 am e289f35b: am e5350332: am 63f3936c: am 0d397697: am a2201272: Merge "Fix a print spooler crash when printing." into lmp-dev
* commit 'e289f35bb7a0ec003e9707ce6ffb7e3279fb3a39':
  Fix a print spooler crash when printing.
2014-09-19 23:30:17 +00:00
Svetoslav
52dc625669 am e5350332: am 63f3936c: am 0d397697: am a2201272: Merge "Fix a print spooler crash when printing." into lmp-dev
* commit 'e535033270273ce07384647c99828ab11a5564d0':
  Fix a print spooler crash when printing.
2014-09-19 22:26:14 +00:00
Svetoslav
cfcce6bddd am 0d397697: am a2201272: Merge "Fix a print spooler crash when printing." into lmp-dev
* commit '0d397697d0df2b08f5aa0b0e27108e79ea04f764':
  Fix a print spooler crash when printing.
2014-09-19 22:04:58 +00:00
Svetoslav
518b9dd923 am a2201272: Merge "Fix a print spooler crash when printing." into lmp-dev
* commit 'a2201272b5b27f3ac9cf90d6332e81fb474c1dbb':
  Fix a print spooler crash when printing.
2014-09-19 21:49:22 +00:00
Svetoslav
8b91705169 am a2201272: Merge "Fix a print spooler crash when printing." into lmp-dev
* commit 'a2201272b5b27f3ac9cf90d6332e81fb474c1dbb':
  Fix a print spooler crash when printing.
2014-09-19 21:49:16 +00:00
Svetoslav
9424b733c7 Fix a print spooler crash when printing.
The spooler communicates with he remote PDF renderer asynchronously.
When print is confirmed we close the renderer, destroy it, and unbind
from its service. If we unbind from the service after the print activiy
is finished we get a crash. The bug was that we did not wait until we
disconnect from the remote renderer before finishing the print activity.

bug:17583115

Change-Id: I55b0135f9c5658b3a4fda2901b8b3bdef044e211
2014-09-19 14:24:40 -07:00
Svetoslav
d373c032bc am 4b725f70: am 64ae6b01: am 5fe3bb76: am d972e2df: Merge "Print UI stuck when backing out of documents UI." into lmp-dev
* commit '4b725f701ba65b61716e3f572cf4a5238e91cf2d':
  Print UI stuck when backing out of documents UI.
2014-09-18 21:23:43 +00:00
Svetoslav
25754ff475 am 42c1c428: am 1c46bae1: am d972e2df: Merge "Print UI stuck when backing out of documents UI." into lmp-dev
* commit '42c1c4289cf5c693a407a35f8d1a8dfbfe4e1fd4':
  Print UI stuck when backing out of documents UI.
2014-09-18 21:17:53 +00:00
Svetoslav
f14783bc51 am 5fe3bb76: am d972e2df: Merge "Print UI stuck when backing out of documents UI." into lmp-dev
* commit '5fe3bb76eb26707b096e20565a39fd3963c47134':
  Print UI stuck when backing out of documents UI.
2014-09-18 20:57:34 +00:00
Svetoslav
11549dd258 am d972e2df: Merge "Print UI stuck when backing out of documents UI." into lmp-dev
* commit 'd972e2dff33679a3c7fddd058396fd6437266709':
  Print UI stuck when backing out of documents UI.
2014-09-18 20:46:14 +00:00
Svetoslav
f05441f21b am d972e2df: Merge "Print UI stuck when backing out of documents UI." into lmp-dev
* commit 'd972e2dff33679a3c7fddd058396fd6437266709':
  Print UI stuck when backing out of documents UI.
2014-09-18 20:46:00 +00:00
Svetoslav
688a994f4d Merge "Print UI stuck when backing out of documents UI." into lmp-dev 2014-09-18 20:34:23 +00:00
Svetoslav
b75632c736 Print UI stuck when backing out of documents UI.
When user chooses to save to PDF we open the document chooser UI.
Now if the user now backs to the print UI without choosing a file,
the print UI has all options disabled and the back button does
not work - the user is stuck. This is because we were not
transitioning the print UI in the correct state.

bug:17557454

Change-Id: I385129e106ed41564b89137ca54d409127ba8ff0
2014-09-18 13:32:38 -07:00
Baligh Uddin
9bbf280b97 Merge "Import translations. DO NOT MERGE" 2014-09-18 18:11:42 +00:00
Baligh Uddin
6641c1051f Merge "Import translations. DO NOT MERGE" into lmp-dev 2014-09-18 18:00:17 +00:00
Baligh Uddin
2f70e40f34 Merge "Import translations. DO NOT MERGE" into lmp-sprout-dev 2014-09-18 18:00:16 +00:00
Svetoslav
1551a1075f am 0489737e: am 0b7ca62e: am 3193edac: am 0bb6e05d: Page content sometimes missing in preview when scrolling.
* commit '0489737e0b0dea2b6372791ad5ce666e9194a914':
  Page content sometimes missing in preview when scrolling.
2014-09-18 00:04:48 +00:00
Svetoslav
aaf53c42ad am f64e9294: am d0d98c75: am 0bb6e05d: Page content sometimes missing in preview when scrolling.
* commit 'f64e929453a7d8b527a5549e4c28f6c34b01a2b2':
  Page content sometimes missing in preview when scrolling.
2014-09-17 23:42:39 +00:00
Svetoslav
9af14fbc3b am 0bb6e05d: Page content sometimes missing in preview when scrolling.
* commit '0bb6e05dcd5e809ca25ac79fc4d81c4c5957a8e2':
  Page content sometimes missing in preview when scrolling.
2014-09-17 23:14:00 +00:00
Svetoslav
ba34368920 am 0bb6e05d: Page content sometimes missing in preview when scrolling.
* commit '0bb6e05dcd5e809ca25ac79fc4d81c4c5957a8e2':
  Page content sometimes missing in preview when scrolling.
2014-09-17 23:13:13 +00:00
Svetoslav
0d2d9637ed Page content sometimes missing in preview when scrolling.
Removed the restriction for the page content providers to
be singletons as the RecyclerView may hold on views with
providers and ask us to bind other views for the same page.
Note that the views that RecyclerView is holding will be
soon rebound or recycled just they are not at the time we
bind other views for the same position. We were guarding
against this but caused some pages not appearing sometimes
on scrolling. Also now keeping the media size and magins
of recycled page view (will be updated if needed on
rebinding) or avoid changes of the background to null as
setting it to not null later causes an undesired layout pass.

bug:17537922

Change-Id: If029f6c413e15d4f5c1ba1ac5e4d52ad2cad5904
2014-09-17 23:03:19 +00:00
Svetoslav
e57e91ba7d am 45a0a909: am cafb35db: am 809041d8: am 84ad5f75: Merge "Page content sometimes disappears when scrolling a long doc in print preview." into lmp-dev
* commit '45a0a9095849f61bfcad0363b59bb3cffc2ea92b':
  Page content sometimes disappears when scrolling a long doc in print preview.
2014-09-17 19:36:35 +00:00
Svetoslav
4fcaa85cf3 am 74953519: am 1110de7b: am 84ad5f75: Merge "Page content sometimes disappears when scrolling a long doc in print preview." into lmp-dev
* commit '7495351927b383e7b236d854deb98c4f498188ad':
  Page content sometimes disappears when scrolling a long doc in print preview.
2014-09-17 19:25:45 +00:00
Svetoslav
f58fe2518e am 84ad5f75: Merge "Page content sometimes disappears when scrolling a long doc in print preview." into lmp-dev
* commit '84ad5f75e1c7d4f4d5113b413e814bde3aaa1747':
  Page content sometimes disappears when scrolling a long doc in print preview.
2014-09-17 19:03:52 +00:00
Svetoslav
6cdeaaa291 am 84ad5f75: Merge "Page content sometimes disappears when scrolling a long doc in print preview." into lmp-dev
* commit '84ad5f75e1c7d4f4d5113b413e814bde3aaa1747':
  Page content sometimes disappears when scrolling a long doc in print preview.
2014-09-17 19:03:44 +00:00
Svetoslav
7fd5ada98a Page content sometimes disappears when scrolling a long doc in print preview.
The operations of the remote renderer have to be performed in order, open,
render some pages, close. One of the tasks was executed on the wrong executor
resuling in a race and an occassional bad state.

Also fixed a NPE if the preview list is flinged and then the user presses
back.

bug:17537922

Change-Id: I5048078ba2b875a2a8335f3a4324afaa34d014a2
2014-09-17 11:11:08 -07:00
Svetoslav
59fc6fb95b am 34a7ef08: am 5c151cae: am d6a1b7ed: am 03371fde: Merge "Print preview disappearing on screen off/on." into lmp-dev
* commit '34a7ef08958a3304a77346a24695683126a69a36':
  Print preview disappearing on screen off/on.
2014-09-17 14:12:27 +00:00
Svetoslav
a6b93b006f am 6f24a5c2: am bce7a884: am 79541afa: am ccf13317: Merge "Do not change fragments if print activity finishing." into lmp-dev
* commit '6f24a5c2a092136706f0921c4876c4a10f7a3ba6':
  Do not change fragments if print activity finishing.
2014-09-17 05:15:22 +00:00
Svetoslav
58d0353b92 am a32f976b: am 0d091661: am 03371fde: Merge "Print preview disappearing on screen off/on." into lmp-dev
* commit 'a32f976b2066052fd2b4fa7fac215aac9938fcf3':
  Print preview disappearing on screen off/on.
2014-09-16 21:46:33 +00:00
Svetoslav
a569f316d1 am d8a373f6: am 4bcd0cb1: am b4ab924b: am 42f75e9f: Merge "Missing or wrong pages in preview when scorlling large docs." into lmp-dev
* commit 'd8a373f612ecc90398e2cc4ed78b9e0ea480606c':
  Missing or wrong pages in preview when scorlling large docs.
2014-09-16 21:09:00 +00:00
Svetoslav
09cd090fdb am 5f0516b2: am e9259192: am 555d9acc: am 9208a81b: Merge "Page shredder callback invoked on the wrong thread." into lmp-dev
* commit '5f0516b2d5bc58dfcf2336c3416a67a422a24734':
  Page shredder callback invoked on the wrong thread.
2014-09-16 21:08:51 +00:00
Svetoslav
2ac9198d4f am 8c46f96e: am 9b6cc5fd: am 75500def: am c59be126: Merge "Update print preview when a printer becomes available" into lmp-dev
* commit '8c46f96ef8c1c044e6776be2a7898d13f5c2b637':
  Update print preview when a printer becomes available
2014-09-16 21:08:46 +00:00
Svet Ganov
bc7456716d am af7bd717: am f8cfe1b9: am 734a9a7b: am f7d0cd92: Merge "Fix a crash in pring spooler." into lmp-dev
* commit 'af7bd717065055ad5843ea81c0876c3b11a12055':
  Fix a crash in pring spooler.
2014-09-16 21:07:07 +00:00
Svetoslav
d05d6e985f am 03371fde: Merge "Print preview disappearing on screen off/on." into lmp-dev
* commit '03371fde628b999744cc75854ea656aa59371837':
  Print preview disappearing on screen off/on.
2014-09-16 20:57:31 +00:00
Svetoslav
c11e43f9cb am 03371fde: Merge "Print preview disappearing on screen off/on." into lmp-dev
* commit '03371fde628b999744cc75854ea656aa59371837':
  Print preview disappearing on screen off/on.
2014-09-16 20:57:14 +00:00
Svetoslav
e9f275d309 Merge "Print preview disappearing on screen off/on." into lmp-dev 2014-09-16 20:48:16 +00:00
Svetoslav
a528e0e051 am 9b75a500: am 45c692b2: am ccf13317: Merge "Do not change fragments if print activity finishing." into lmp-dev
* commit '9b75a500c35e2abef04f527e3a1fd0c046a78751':
  Do not change fragments if print activity finishing.
2014-09-16 19:50:55 +00:00
Svetoslav
95b433814f am ccf13317: Merge "Do not change fragments if print activity finishing." into lmp-dev
* commit 'ccf133173bf628df149a27481f879cd9eeacbfba':
  Do not change fragments if print activity finishing.
2014-09-16 18:57:37 +00:00
Svetoslav
863c0bf993 am ccf13317: Merge "Do not change fragments if print activity finishing." into lmp-dev
* commit 'ccf133173bf628df149a27481f879cd9eeacbfba':
  Do not change fragments if print activity finishing.
2014-09-16 18:57:08 +00:00
Svetoslav
d724a40136 Print preview disappearing on screen off/on.
We were not clearing the tracked printer when the print activity is
paused and then not setting the tracked printer when the activity
is resumed.

bug:17525271

Change-Id: Ib0fb29006bfcf5ad03dce24b3407cd96dc421442
2014-09-16 11:53:19 -07:00