History log of /packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8a5eddd4b512f16177e0004cbc8963394455db89 20-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Updated anonymous avatar.

Fixes b/17476433

Change-Id: Icff94bc766cedcc8172a5dd6a6d31b25aef0add6
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
e31750ae518e505f89c943559638ea0b408243cd 18-Sep-2014 Andrew Sapperstein <asapperstein@google.com> New generic avatar. b/17476433

Change-Id: I75f143584e1cea15f1507b500c54c478e5475ec1
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
d267498a916882165afb88e7e42cd898d5e748d0 05-Sep-2014 Régis Décamps <regisd@google.com> Allow LetterTileProvider to use a defined fontsize

Also refactors the bitmap cropping into a circle from MessageHeaderView into
BitmapUtil and makes NotificationUtils use that method as well.

Bug: 16875798 SetupAddressesActivity: Show letter avatar if none
Bug: 16378212 Draw letter tile for non-Gmail avatars in Account switcher

Change-Id: I375990e3df331ff9952652d5f06a4f4f8d133e48
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
ced3b3c93afd2225b803584f700bdb1531b85810 01-Sep-2014 Régis Décamps <regisd@google.com> Refactoring in ContactDrawable to pick a color.

Strategy pattern to pick a color in the letter tile.

Thanks to this, subimplementations can draw the letter tiles
for avatars differently, and still use the all the features
of the ContactDrawable.

Bug: 16378212 Draw letter tile for non-Gmail avatars
Change-Id: I999aa43724ba0e4dd23f2106133aaa34ee3ba008
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
ad215836214c524509aae0f6a1f6c6b1b740634c 18-Jul-2014 Andrew Sapperstein <asapperstein@google.com> New letter tile palette. b/16219169

Change-Id: If0ec83382974aa5e1b34fcba2187b03c7b31371d
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
dbfe3799f1c5e1eafa9f9fbdea869809eb9cde52 26-Jun-2014 Brian Attwell <brianattwell@google.com> LetterTileDrawable colors from Contacts & Babel

Right now gmail is
1) using different LetterTileDrawable colors than Contacts or Babel.
2) picking colors by based on a different hash function

This CL only addresses (1).

Bug: 15889179
Change-Id: I4cab1669e448fc47350777a3ed69127e1fcb2a40
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
a8301e2eb5a083a73f58331279c86e8ec7b11a48 22-Aug-2013 Mark Wei <markwei@google.com> Use Drawables for senders image. Less animation jank, less GC jank, less memory.

Protip: When testing sender images, go to your Sent folder. Tons of senders
images appear because you are most likely to talk to people in your address
book.

Rewrite UI to use modular Drawables. It's much easier to understand, since
Drawables with different functionality can be composed.

Flipping animation is 10x smoother. Handles quick double-tap on senders image
correctly.

Letter tiles are not allocated bitmaps anymore. They simply draw a rect and a
letter to the canvas.

We are no longer allocating large bitmaps for every list item. We reuse Bitmaps
whenever possible the same way that attachment previews do.

Much smaller 339KB cache since we don't share with attachment previews anymore,
just enough to fit 10 off-screen contact images.

Bug: 10429228
Change-Id: I463b63520d881eefe3974dccf295366831adaf9e
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
479505d71969e26b0785d8e0e1b81108731cf827 21-Mar-2013 Mark Wei <markwei@google.com> Attachments in Conversation List: Backend changes so that the appropriate
attachments are passed to the UI. Implement PhotoManager so we can start showing
images.

Upon sync, we extract two image attachments from the first unread message, and
add them to the conversations table.

UI changes as well.

Load BEST if that is available, else load SIMPLE.
No vertical dividers in attachment previews.
Attachment previews are above labels.
Round badge appears for unread conversations when there are more images than
shown. Only appears after the previews have loaded.
Clicking on the attachment previews launches photoviewer.
Attempt to load bigger images than necessary to prevent reloading during mark
read/unread and rotate.
Show animated loading icon while previews are loading.
Previews load from top to bottom, from left to right.

Big performance improvements:
No longer decoding bitmap on UI thread. This kills most of the jank.
Only load when we are not scrolling. This kills a lot of jank.
Remaining jank will be delt with later:
DividedImageCanvas.setDimensions() creates a huge empty bitmap on the UI
thread, which causes a GC. ath will fix.

Multiple images in one line now load whatever's ready first. Added tracing.
Bitmap cache given more memory.
Following ath's advice, decode Bitmap from InputStream rather than byte[]. Don't
compress into BitmapHolder. Only use the bigger Bitmap cache.

Bug: 7481049
Change-Id: Icf823f56abc9345e6d0b800a1e6d45444d8fa028
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
c94c80c8b8c92c019f19f2e315dea1ff03ad573f 27-Jun-2013 Scott Kennedy <skennedy@google.com> Use letter tiles in notifications

For notifications where we would display a contact photo if it
existed, we will now show a letter tile if we can make one.

Bug: 9597536
Change-Id: Idb060d2c055074ff930154c12ddfff7d960dbf75
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
3b965d78774a42358ce6bbdcc43b4c8df130a60e 25-Jun-2013 Scott Kennedy <skennedy@google.com> Clean up a bunch of warnings

Bug: 9565838
Change-Id: Ie3a380581e81c63aaa0764875c55bfdccd5f2b13
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
296bac875c2932d0bf3f7388a873fa250222804d 06-May-2013 Andrew Sapperstein <asapperstein@google.com> Use icon with colored background for sender image.

Fixes b/8794452. Instead of defaulting to boring grey man,
we now use the same colored background when
we don't have a sender image and draw a generic
white icon on top of the color.

Also, deleted LetterTileUtils since we no longer
use it.

Change-Id: I3b905afdffbc70eeeca4f030dc57f5ab3748ee64
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
d94312288286017a38603cb10becd2ad52580524 01-May-2013 Paul Westbrook <pwestbro@google.com> Revert "Add analytics support"

This reverts commit cebb805a486d38bca50009905777e170b375b066.

Bug: 8764535
Change-Id: I70092a456bcfeda2e60f93e747e5e9097df0b77e
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
cebb805a486d38bca50009905777e170b375b066 26-Apr-2013 Paul Westbrook <pwestbro@google.com> Add analytics support

This adds support for analytics, and tracks how popluated the letter
tiles are.

Change-Id: I59e699cf455f1b80d585bf809786912a67d9aed6
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
b0beaae8e9dac52b42ce4ea14a7948e9d6ce782b 26-Apr-2013 Alice Yang <alice@google.com> am 65e5a530: Merge "Everybody loves colors" into jb-mr2-dev

* commit '65e5a530c22295d3572b64c0703060979fd93f39':
Everybody loves colors
bd390369b0b4e503463b92a0bbffdbaf5c7d0b9a 26-Apr-2013 Alice Yang <alice@google.com> Everybody loves colors

Bug 8701175

Change-Id: I1509856f61763f05971b28a20e5fbfd771d8254e
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
bbe7f92b35c39d80cdd1c0ee88ee12b0ec0564dd 22-Apr-2013 Andy Huang <ath@google.com> don't generate a default tile again when contact lookup fails

a small win.

Bug: 8051779
Change-Id: Icd0af6be6b9f5646af9d202253cae12d0ab10eb3
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
8b7fab5413a3359b41a603b0567c3e375135676f 15-Apr-2013 Andy Huang <ath@google.com> optimize contact photos in list

Overhaul the photo manager:
* lower the thread priority of the worker thread
* in addition to having the worker thread load JPEG images from disk,
have it decode those images into exactly-sized, properly cropped
bitmaps that the UI thread can use without further processing
* ignore stale requests that are now more likely to occur when list view
recycling reuses a canvas before a default image for an old request
is applied

Minor optimizations throughout photo and tile loading codepath.

Recreate bitmaps when the canvas size changes, as it does on 2-pane
when switching between wide and normal layouts.

Fix default bitmap drawing (for non-English senders) when applied to
HALF or QUARTER scale.

Bug: 8051779
Change-Id: Ic3a5451538ddc2c955b645eb06816266542363d8
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
ff8553f20964f4c31b0c503a9e1daff6ae08a9c7 06-Apr-2013 Scott Kennedy <skennedy@google.com> Cleanup

Change-Id: Iee8abf75639450d469632e43fe0e102b687558db
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
9b19e3f794f150709dfa921f8fe44d502e06e2a6 04-Apr-2013 Alice Yang <alice@google.com> Give color to letter tiles

Change-Id: Ic94cd0d5e138ebec13fd43a5e409d43a50a3c2e2
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
d198fa7ddb2d0c730847af34f06aa2e940b2537d 01-Apr-2013 Mark Wei <markwei@google.com> Attachments in Conversation List: UI changes to display attachment previews
in the conversation list.

Depends on:
PhotoManager: https://googleplex-android-review.googlesource.com/#/c/285814/
Backend: https://googleplex-android-review.googlesource.com/#/c/289305/

Bug: 7481049
Change-Id: I284ec722bb0ed0ddb8b27804c0ee5591ef672032
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
47cb510ea11c8886434575118068fc91eaa25fac 19-Mar-2013 Mark Wei <markwei@google.com> Refactor ContactPhotoManager so we can reuse its preloading and caching
mechanisms for other tasks.

I've elevated all the generic preloading and caching code to an abstract
PhotoManager class. ContactPhotoManager now extends this class, and contains all
the contacts specific code. I will be creating a new AttachmentPhotoManager
subclass later, so that I can take advantage of PhotoManager.

Other refactored classes are DividedImageCanvas and PhotoLoaderThread.

Bug: 7481049
Change-Id: I2535ab33af9c1cd074ca1ee29153499383ed5389
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
98d80988c8d1186773f885aba92d4ad93e2668bb 25-Jan-2013 mindyp <mindyp@google.com> Speedup creating letter tiles

Fixes b/8051779 Framerate is slow for the list view with tiles

When this becomes a library, will want this to be fast
Minor cleanup
Since creating the sized background bitmaps is the most expensive op,
creating them once and caching the backgrounds for re-use makes this more efficient.
Change-Id: Ie178ab662bf5f8f9234d20abd6c30f37ee90239a
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
4adba92065d153fcbc1966894e965b5119a39d9a 25-Jan-2013 mindyp <mindyp@google.com> Make it possible to show numbers or letters in scrabble tiles.

Fixes b/8051960 Gmail scrabble tile doesn't show content for senders who names starts with a number

When this becomes a library, will want this functionality

Change-Id: Iecf9fc6ec793822c8a4699d34a978a1d580214d1
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
3f22573bf75c103df761cc093703737e8f2c63b1 17-Jan-2013 mindyp <mindyp@google.com> Small tweaks to polish the tiles

Change-Id: I776ebf36a2b6d36b308a13cfc021ff96084eb1ad
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
b47828febe6238af8d367b62ed893a4ad65800a5 17-Jan-2013 mindyp <mindyp@google.com> Add white line dividers between multiple contact images; better centering of tiles; use roboto for tile letters

Change-Id: Id3d8531019783518e4df75cf5c2f1d35dac8d48c
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
205e40d18ebb530f538d157787446836cf0180a0 17-Jan-2013 mindyp <mindyp@google.com> New redlines for scrabble tiles; use people default contact icon as fallback

This is ic_contact_picture provided from the chips library
Change-Id: Id3f51949f11a3017362d89bdc40daf54e0e158db
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
539555569b773c722374d0746fa756568e37811a 11-Jan-2013 mindyp <mindyp@google.com> Improved scaling for letter tiles; match only us letters

Change-Id: Ic9b89d5fdd262a5a8bcb0ca797ae005db8d65783
Note: tiles are still disabled

Conflicts:
src/com/android/mail/photomanager/LetterTileProvider.java
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
0d55cd03e8dad56b88bda83b25d090c727aa74fc 10-Jan-2013 mindyp <mindyp@google.com> Fix issue with "me" contact photo never showing up; show gray guy for default image

Change-Id: I9b02c17fc389737cb63831b5075610f39f510aa7
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
b209cf2c25e3dbf72021557b639bf0bf8a746fd9 08-Jan-2013 mindyp <mindyp@google.com> Make sure the character rendered in the default tile is always upper case

Change-Id: I77966f64ff45992ce7fb7ecc84c2df5ddb71d947
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
c76ab94c69e09ade8036f47d370d56902f0e1f6e 03-Jan-2013 mindyp <mindyp@google.com> fixup algorithm for which sender photos we need to show pictures for

Algorithm:
1) show pic for first sender
2) show pic for last 3 senders, ellided or not

Also, messages from "me" should show my contact icon

Make sure we just use characters for the tiles:
fixes b/7959815 Problems with sender "letter"
Change-Id: I1b713df0cd12b3ca324fa4f6492ed337f867a434
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java
6d11c8fbca5d54a013d78c85d6eb28f590093e3c 03-Jan-2013 mindyp <mindyp@google.com> Sender emails are now available. Use the senders email to lookup their contact photo.

Creates the DividedImageCanvas, a light weight way of collecting and rendering
sender images to a canvas than a standard android view.
Also, allows us to get bitmap processing off the main thread in a future perf related cl
TODO: perf pass;
implement correct visual design for letter tiles once available
Change-Id: I67b8f74f40703543609d1011098062c98e3e42cc
/packages/apps/UnifiedEmail/src/com/android/mail/photomanager/LetterTileProvider.java