429 Commits

Author SHA1 Message Date
Svetoslav
2047df6f5f Merge "Page content sometimes missing while scrolling." into lmp-dev 2014-09-13 18:45:52 +00:00
Svet Ganov
922507026a Fixing controls allignment in print UI.
Making some allignment tweaks based on UX feedback.

bug:17489187

Change-Id: Ife1c7cb0f55eb0398bca4a5e015ace24437ff2a6
2014-09-12 19:54:09 -07:00
Svet Ganov
05ff998fd8 Fix a crash in print spooler.
A recent bug fix exposed another one where we were not updating
the internal state of the remote print document after it finishes
updating. This resulted in a crash on every print.

bug:16966145

Change-Id: I398ff7976533241e3d4cb6cd27f69cdc25e67be9
2014-09-12 19:25:32 -07:00
Svetoslav
e6ecba59fd Page content sometimes missing while scrolling.
The logic when a page view to request the content had a logical
error and it was getting in a bad state where it never requested
the content anymore. This change simplifies the logic and minimizes
the kept state.

Removed unnecessary calls to recycle for a bitmap as according
to the graphics folks we should not be calling this API anymore.

bug:16966145

Change-Id: Idda8314b43343136d3b867167261790481116fac
2014-09-12 14:31:07 -07:00
Svetoslav
2fb64a5cb1 Fix crash in spooler if printing app dies.
bug:16966145

Change-Id: I092c489a7f1b4000a96d3f12f2996ccabf734b9a
2014-09-12 13:55:35 -07:00
Svetoslav
139ba7fb0e Fix a crash in print preview on multiple rotations.
bug:16966145

Change-Id: I8266315bd9253953cb6c3b9dab1ba36f104a74a5
2014-09-12 10:35:38 -07:00
Svetoslav
36f6951e32 Merge "Fix back button behavior and clean up in print preview activity." into lmp-dev 2014-09-11 23:24:20 +00:00
Svet Ganov
c946e9ab46 Merge "Fix edit text error state in the print UI." into lmp-dev 2014-09-11 22:15:59 +00:00
Svetoslav
e17123dd6d Fix back button behavior and clean up in print preview activity.
The print preview UI owns and drives the lifecycle of several objects.
These objects were torn down too late resulting in an attempt to use
the activity as a context when it was no longer valid and service unbind
resulting in causing a crash.

Fixed a bug where if the back button is pressed mutiple times when
the print UI is being initialized a crash occurs.

bug:17454041

Change-Id: Ic1455b467586f0ad65f907e2160ec5cfb2d17d05
2014-09-11 14:12:22 -07:00
Svet Ganov
43212264dd Fix edit text error state in the print UI.
If the user input in the print UI is invalid we show an error icon
next to it. The design requires no error message being shown in a
popup but TextView does show the popup all the time.

bug:16966145

Change-Id: I7aa1ec8093bc76e2f440bcb243609e92e049786b
2014-09-11 10:35:26 -07:00
Svetoslav
e03ddd0bcc Merge "Fix a crash in print spooler." into lmp-dev 2014-09-10 23:00:42 +00:00
Svetoslav
c65510a7bc Merge "Accessibilty support for the print UI." into lmp-dev 2014-09-10 22:59:50 +00:00
Svetoslav
3ef8e203c8 Fix a crash in print spooler.
1. Leftover code was setting the state to configuring
   before initialization is complete.

2. We were not cancelling the print job if cancelled
   when initializing.

3. The remote print document was cancelled even if
   doing nothing.

bug:17451600

Change-Id: I79a80b723af8537da260012470748b4e8831fd9e
2014-09-10 15:00:11 -07:00
Svetoslav
fc81bfe3fb Merge "RTL support for print UI." into lmp-dev 2014-09-10 20:06:18 +00:00
Svetoslav
e652b02d45 Accessibilty support for the print UI.
bug:15816751

Change-Id: I5dcdbdd0357843b870ddd47d7c41cfba114d194c
2014-09-10 11:54:37 -07:00
Svetoslav
3ab1ec0549 RTL support for print UI.
bug:16966145

Change-Id: I488d11f1941545630d52eea4c4d48c43667c6067
2014-09-09 21:30:35 -07:00
Svetoslav
dfa3e7c6fd Fix page spacing in preview list.
bug:16966145

Change-Id: I2c4bde3a50ee0fc202fc169a63d4eeeb43c5f4ae
2014-09-09 19:04:51 -07:00
Svetoslav
62ce332c14 Trim unnecessary pages when printing.
A user may request a subset of the document's pages to be printed.
In this case the expectation is that the resulting document does
not include not selected pages. While print serivices can do the
trimming themselves or the printer may do so, moving, potantually
many, redundant pages is inefficient. The real problem is when
saving to a PDF file where the saved file must not have the pages
the user did not select. This change adds shredding of undesired
pages from the PDF before saving it or passing it to a print service.
:
bug:17285994

Change-Id: I7deba535af99457bea3c118202314f0f3812e809
2014-09-09 09:38:07 -07:00
Svetoslav
6552bf3da6 Print spooler UI polish and bug fixes.
1. Added an empty state for pages that are being rendered.

2. Fixed a NPA on a binder thread when destoroying the
   remote print adapter.

3. Fixed a rare crash when the print activity gets an
   activity class callback while initializing.

4. Changed the preview pages on phone in land to four.

5. Fixed a flicker from a list of pages to an empty state
   and then back to the list of pages.

bug:15704969
bug:16966145

Change-Id: I0eea2f30a102d8fefcbf90187fa6d8612fb19434

Conflicts:
	packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
2014-09-05 15:21:50 -07:00
Svetoslav
d0c362de1c Fix broken aidl
Change-Id: I2187abd75b4f60e790b747a492ad610592f2ef53
2014-09-05 10:19:39 -07:00
Svetoslav
53dcd394aa Update FrameStats API per api-council request.
bug:17390382

Change-Id: I50518834569f4d0ec394709294537256f03530e0
2014-09-05 10:07:02 -07:00
Svetoslav
d97bf6920b Add a missing dependency on a shared JNI library
bug:17389508

Change-Id: I38e1ad7daf991f37458eac391b472eb3816d7838
2014-09-04 12:37:52 -07:00
Brian Carlstrom
191cbad91f Used LOCAL_SHARED_LIBRARIES for proper dependencies
bug:15938254
Change-Id: I710f689e8bcad66988ef3aa0aa189b185c8ad662
2014-09-04 09:52:31 -07:00
Svet Ganov
def58cbffc Merge "Switching to raw byte copy of bitmaps for print preview." into lmp-dev 2014-09-03 23:33:30 +00:00
Svetoslav
8c07e8d2a3 Merge "Fix some print UI issues." into lmp-dev 2014-09-03 23:18:30 +00:00
Svetoslav
baa5bccb19 Merge "Update print chooser drop down width." into lmp-dev 2014-09-03 22:46:30 +00:00
Svetoslav
e04dcca593 Update print chooser drop down width.
bug:16324744

Change-Id: I1f0b79ae5da06de97ca80a800537d815ce59bf41
2014-09-03 15:02:14 -07:00
Svetoslav
9e795e19c7 Unregister from the remote renderer only if bound.
bug:8213791

Change-Id: Ia9efa33331437c4db447acf0c510d4cb4932a593
2014-09-03 14:34:01 -07:00
Svet Ganov
df6444931b Switching to raw byte copy of bitmaps for print preview.
Using compression and decompression for moving bitmap data
acorss processes is slow as compression is expensive. This
change switches to using direct streaming of the bitmap
data.

bug:15938254

Change-Id: I78bc450031ee60ada4c3b66f14586a73c72ce34f
2014-09-03 12:34:23 -07:00
Svetoslav
6f249835a4 Fix some print UI issues.
1. Fixed a crash when orientation changes and the content
   is scrolled due to wrong size bitmap being requested.

2. Closed a file dscriptior that was being left open.

3. Clearing the bitmap before passing it to the renderer to
   ensure it is white for pixels not touched when rendering.

4. Removed debug logs.

5. Switched to the correct layout manager for RecyclerView.

bug:16966145

Change-Id: I8ab9d22635c93cac5ff85c6f4b5d82e58cd8df5c
2014-09-03 12:29:53 -07:00
Svet Ganov
561b893174 Merge "Move print rendering in an isolated process." into lmp-dev 2014-09-02 21:51:47 +00:00
Svet Ganov
13f542cabd Move print rendering in an isolated process.
Security review of the PDF rendering code revealed that it is
not sercure. Therefore, this code must be run in a sandbox.
This change moves the rendering code in an isolated process.

bug:16897933

Change-Id: I711ce42a56892db1837950137bfaa79e1d61a7c4
2014-09-02 11:40:44 -07:00
Svetoslav
c404cacd3a Print UI polish.
1. Fixed an issue where input focus is given to the copies
   edit text every other time we expand the options UI. We
   want focus there only if the user touches the control.

   bug:16966145

2. Fixed the all printers list view to have item dividers
   reaching the left and right ends of the list view.

   bug:17288761

3. Fixed an issue where the user can deselect all pages
   which is not only an invalid state but also causes a crash.

   bug:17286198

4. Tweaked the minimal size of the preview in landscape on
   phone to better accomodate the page.

   bug:17288904

5. Fixed a regression introduced by a change from the UI folks.

Change-Id: Ida7dad7eea413295a840028060810b2619c616e8
2014-08-27 18:46:23 -07:00
Svetoslav
9c9888b8c5 Fix a crash in PrintSpooler.
If the user cancels printing we cancel the current
pring operation in the RemotePrintDocument which is
a state machine enforcing valid state transitions.
A valid transition was not allowed: finishing after
canceled.

bug:17182301

Change-Id: Iccf3a78d7dc736a64bf5c44941a8f8064dcd0ec3
2014-08-26 15:19:56 -07:00
Alan Viverette
a1fe772bd7 Update material colors
BUG: 17212898
Change-Id: Ic0806db57e88d5143b4241e419970ffeb2468d50
2014-08-25 16:15:06 -07:00
Baligh Uddin
4879a5c9e2 Import translations. DO NOT MERGE
Change-Id: Ic42db2aebb4777ec9a7107851b5479d0b25e048f
Auto-generated-cl: translation import
2014-08-24 09:21:39 -07:00
Svetoslav
49cbfcc10c Merge "Using default system icon for print spooler" into lmp-dev 2014-08-21 00:11:43 +00:00
Svetoslav
fed7173306 Using default system icon for print spooler
bug:16568027

Change-Id: I87c7e7d60864b6d28899210bb400e56e21bf43f8
2014-08-20 20:28:22 +00:00
Svetoslav
3c238245eb Update the "More options" button in printing.
The "More options" button needed changes to match the
new UX spec. Also fixed some identation issues as well
as a missing marging in the erorr UI.

bug:16301066

Change-Id: I29f0d41915d1816d754f2c6288a7387aafeba2c2
2014-08-20 19:57:16 +00:00
Selim Cinek
255dd04271 Added notification color to all system notifications
Bug: 17128331
Change-Id: I81a94510ef51b99916f314c0dd65852426a1fbeb
2014-08-20 14:25:18 +02:00
Svetoslav
c558220b07 Update the print spooler theme.
bug:16966145

Change-Id: Ib72642bf8f9002d8bcf9cbfce19fa364b2487876
2014-08-19 17:12:36 +00:00
Svetoslav
309f6a0e1b Update the print spooler icon.
Removed a duplicate resource also defined in the platform
resources. Added a tint to the print spooler icon.

bug:16568027

Change-Id: I1c0b9a7bd75bc59d1d86653c05d8fc2bb77056c1
2014-08-18 23:37:56 +00:00
Baligh Uddin
291eacdd13 Import translations. DO NOT MERGE
Change-Id: I31fd074b4124de3fabbc62a7a161497bd2865a4c
Auto-generated-cl: translation import
2014-08-15 20:16:39 -07:00
Svet Ganov
38781bd2c2 Fix some minor print UX bugs.
1. The last row of print options was not visible on a phone.

2. The preview page size on a phone in landscape unusably small.

3. Updated the Save to PDF icon.

bug:16966145

Change-Id: I25ce1572758c62f34344683af2452fb045bb857e
2014-08-13 04:07:21 +00:00
Baligh Uddin
10b363434b Import translations. DO NOT MERGE
Change-Id: I05a1dc49c04d92092723d84c7fdadf7e190b5476
Auto-generated-cl: translation import
2014-08-11 12:52:01 -07:00
Alan Viverette
ec9d464a59 Update branding colors
BUG: 16845793
BUG: 16851916
Change-Id: I79a15752b5dda8f3c9f159826c61e3d2a6c8bd48
2014-08-07 01:13:23 +00:00
Geoff Mendal
fddc4e9578 Import translations. DO NOT MERGE
Change-Id: I9416cdb82f88c7cf05339c23a241100b0fb09bc4
Auto-generated-cl: translation import
2014-08-04 17:06:17 +00:00
Geoff Mendal
bead503b15 Import translations. DO NOT MERGE
Change-Id: Iec046e9a3d34bef3d8055f3eb00e243baf69c8fa
Auto-generated-cl: translation import
2014-07-30 10:40:00 -07:00
Svetoslav
b59555ca74 Print to PDF putting a pring job in a wrong state.
When printing to a PDF file we get a Uri from the storage APIs
and write the content. Once the file is written to storage the
print job is completed and there is print service involved. Th
spooler was wrongly putting the job in a failed state instead
of a complete state.

bug:16522267

Change-Id: I4741c9b9eb763e118e7dfb2c7c502bd7fc13f7a1
2014-07-24 17:17:07 +00:00
Svetoslav
5ef522bc19 Handle wrong file format when printing.
PDF is the only format suppored for printing but a buggy app
can write content in another format which was crashing the
print spooler. Now we are generating an error instead of
crashing.

bug:16487161

Change-Id: Ic59d2ac6d57213f4e8f364659d8dc7df2140e61d
2014-07-24 03:18:47 +00:00