History log of /packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d90639004a3551d7fb7086f318d4c576d54d2b86 03-Aug-2013 Scott Kennedy <skennedy@google.com> More warning cleanup

Change-Id: I22970341bf11eb355aa495f61c022efb8db61bcb
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
b6f1998c9151ad236dd3c6c5d0be3280df3ae895 01-Aug-2013 Mark Wei <markwei@google.com> Fix nit 7. Remove preview list uri.

We no longer open photoviewer from the conversation list.

Bug: 10083052
Change-Id: Idccfefe792c1f01acd8842758362de626c7debb2
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
db5356a92ebc593e9eb564aaadad8dac8cd83554 16-Jul-2013 Paul Westbrook <pwestbro@google.com> Fix mock provider

A subsequent test will add some more unit tests

Change-Id: I7e584dae397a4100de3495a3f9c597a09917aad4
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.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/providers/Conversation.java
b0eda8d009e77cdedf0a85c9d2e3de5bbefef635 05-Jun-2013 Andy Huang <ath@google.com> fix flashing labels in conversation view

No reason to cache the filtered list of folders, so remove the cache.
Its presence broke conversation view's display of folders because we're
now reusing the same Conversation objects from the list view.

Filtering the folder list only happens once per row upon bind(). If
anything, we could move it into the worker thread, but there's no
particular benefit to caching the filtered version.

Bug: 9277845
Change-Id: I12dd2cdd93f87e3f24c0ea6de9c0b715b0e34c61
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
f8b613c1103952ae5cc1f8a5e6ae60aa62d73dec 25-May-2013 Andy Huang <ath@google.com> patch up respond() results with cache contents (the easy way)

Bug: 9112331
Change-Id: I9688f272d82c760b118822dd5d4485c975b5090f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
d521baf3a51c9fc1306bd55e027ce57d0a1d18aa 22-May-2013 Andy Huang <ath@google.com> not all respond() calls require locking

The UI thread uses respond() to signal user-visibility on each list
item, so we definitely don't want to block the UI thread on those kinds
of respond() calls. Add an options bitfield whose inaugural value is a
bit that hints that the cursor position must be safely moved prior to
respond().

This fixes some big hiccups that result when syncing + scrolling with
the respond CLs yesterday.

Bug: 9032162
Change-Id: I1c927453b9f474c89861a7295de1e318279e3a49
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
7f39bbd358f7003a72ae2b480dfe38a84e830e5f 21-May-2013 Andy Huang <ath@google.com> use Cursor.respond() instead of blobs

Using Cursor.getBlob() to pass complex objects from provider to UI
requires us to serialize a perfectly usable Parcelable, then de-
serialize that byte array. Let's cut out the middle man by shoving the
Parcelables into a Bundle from Cursor.respond(). Since Gmail is single-
process, this is nearly free, but even in multi-process situations,
respond() should not be any more expensive than getBlob().

respond() must now be thread-safe in the wrapper, and it should trigger
a position move like getBlob() does. I found that the async task that
marks lists visible was sometimes running when the position is -1, so
start ignoring this. I think this is a red herring, as AbstractCursor
just doesn't like moving to -1.

On Galaxy Nexus, this cuts Conversation construction 30% from 2.11ms to
1.46ms. It also avoids creating 4 large objects per row, which should
make for less object churn and heap fragmentation.

Bug: 8642220
Bug: 9032162
Change-Id: Ic4cea27e8e84d85b160e6cf8fe0d3cc6a836249f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
5f578144cc01738d5f9988d61674a643df19fdae 09-May-2013 Scott Kennedy <skennedy@google.com> ObjectCursor support for Conversations

Change-Id: I653e21bbbc9c516438161748a9cea42d3eacb973
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
dbb587f15c723ae80edb33f65c29cc2b6c15eba0 11-Apr-2013 Scott Kennedy <skennedy@google.com> Always open the thread we click

Conversation.position is not something we should be using. It can be
wrong, and it's difficult to keep in sync with what we want.

Bug: 8441077
Change-Id: I34d4c2568ec38dca62505bd629dbccdfb5b06b5c
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ff8553f20964f4c31b0c503a9e1daff6ae08a9c7 06-Apr-2013 Scott Kennedy <skennedy@google.com> Cleanup

Change-Id: Iee8abf75639450d469632e43fe0e102b687558db
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.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/providers/Conversation.java
40ada66d5dc6a0d5ad02f4a319acc03d126e9fc9 22-Mar-2013 Scott Kennedy <skennedy@google.com> Remove a bunch of unused methods

Change-Id: I9c7fa70d42335694fc6ae9d9acc3955a922c96d7
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
67aa9e5162a15fb8b46b4113ac627cd20668f095 20-Mar-2013 Scott Kennedy <skennedy@google.com> Exclude all inbox labels when we're viewing an inbox

Bug: 8426563
Change-Id: Ib9256fcdb658cb3df9b67485f7768f75bb8b6539
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
b39aaf53a555c1046ef31b3fecf15d086acca013 07-Mar-2013 Scott Kennedy <skennedy@google.com> Make widgets work again

We can't send Folder parcelables to RemoteViews, so let's just send
what we need: two URIs and a String.

Bug: 8330949
Change-Id: I67bf7668d5eeef3f3b2e6225cf8697a4c5533f16
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
8ebc2ce34ed7d979662cf88b1c9fa60d63142fe4 08-Mar-2013 Andy Huang <ath@google.com> add RAW_FOLDERS to columns that can be applied from cache

Bug: 8341255
Change-Id: I4fe3e3ad9cbd2be5a3d66fe0cd207eb2f490d08f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
7f4b6140b40c1d1d2624ca1dabe229fbb5c6959a 07-Mar-2013 Andy Huang <ath@google.com> add SEEN to columns that can be applied from cache

Bug: 8339202
Change-Id: Ie2cd754a1fb00637968957c05b6e5f1137cf8e70
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
1bca265b7a8a3f9ea08e0ae51eeb145f0883a266 12-Dec-2012 Andy Huang <ath@google.com> aggressive pre-caching of Conversations

In the spirit of eliminating all unnecessary work on the UI
thread during scrolling, pre-load all Conversation objects
in a cursor in the Loader thread.

Although it's slow to process all such conversations at once,
the impact on initial load time of the conversation list is
minimal because we always load a small (n=50) conversation list
first.

Now the only work done during scrolling is layout-related, some
of which can also reasonably be pre-cached.

Bug: 7690709
Change-Id: I910f85f9b6830f9b059379da9f16a19dc3e6036a
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
61bd0e84a3b0545a722bbfe931233b47afdf52e2 11-Dec-2012 Scott Kennedy <skennedy@google.com> Preliminary sectioned inbox support

Add basic support for sectioned inbox. This does not include the
teaser view or other less important UI features.

Bug: 7685676
Change-Id: I2cba26dc4acc1021f5b8ab0ca81d4e0a65f744a8
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
817d6658562f7a2bbbc8255b2e10ea3ff1864e20 01-Mar-2013 Andy Huang <ath@google.com> resolved conflicts for merge of 9e4ca799 to jb-ub-mail-ur9

Change-Id: Ia0d3b2234cefe100ada97efa9b918301cebd323e
9e4ca7993213d296043d20fe9cf4e166b5d595e8 28-Feb-2013 Andy Huang <ath@google.com> better logging of conversations, folders, fragments

More info will be logged at DEBUG level.
Also fix crash when DEBUG logging enabled.

Change-Id: I15fbb944128d5fed18086a2eae33f080bff9117e
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
54ed5c67919c7a7a3f26d286de91f196d664b1c8 17-Feb-2013 Andy Huang <ath@google.com> am c1fb9a9c: Single-message zoom using a floating WebView

* commit 'c1fb9a9c2730178105977fca629e80951bfc3cdc':
Single-message zoom using a floating WebView
c1fb9a9c2730178105977fca629e80951bfc3cdc 11-Feb-2013 Andy Huang <ath@google.com> Single-message zoom using a floating WebView

Protected by an experimental pref for now
Restores scroll position
Preserves 'show pics' state
Speedy animation
Fade-in animation begins right after onNewPicture (ICS compatible!)
add UpOrBackController role for fragments to get a whack at back/up

And because this approach avoids using the CSS 'zoom' attribute
within single-message mode, double-tap works well and there are no
line-height issues.

Bug: 7400516
Change-Id: Idedfa6e35edc291c9169fbd9b1315b39b4253f60
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
d5edd2d02649dffb40065fdb6a16acf91552b800 05-Dec-2012 Scott Kennedy <skennedy@google.com> Move notifications to UnifiedEmail

This involves redoing the persistence model, to split general,
account, and folder settings into separate SharedPreference stores.

It also requires some preferences to be moved into UnifiedEmail.

Depends on I71802444add85dc01f6645906a629ff80b964222 (UnifiedGmail)
Depends on Ie6ec389b5b5d2e7ab1b299d0877811ae716526e2 (Email)

Change-Id: Ibe2e3f93ec164370535ffc5f5b2409544cc8d36d
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
c046e4a310462aa6998a34ff50439eb5e2508d85 19-Jan-2013 mindyp <mindyp@google.com> Fix all issues related to subject text getting cut off early/ too long

Fixes b/8029665 conversation list subject/snippet sometimes too short (seems like it should be ellipsized), sometimes too long

Can't use the original plan of just concatenating the width because of
LINE BREAKS, so instead, created a special kind of textview that overrides
the usual ellipsizing behavior by allowing just the last line to be
ellipsized.

Change-Id: Ia9a3d3bf9910b7ead6cdb28275c18cfa1c04c28f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ed06bfed2cd77d2674ba09aa93ad9a8a338ef61f 17-Jan-2013 Mark Wei <markwei@google.com> Fix StringIndexOutOfBoundsException when subject and snippet are empty.

Bug: 8014655
Change-Id: If5b5631c003bd0840a6083e0c784f6a6d81abf5e
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
167bddc283a66f210e0484eeca609f4e7f35dac4 15-Jan-2013 mindyp <mindyp@google.com> Fixup the width of the subject when folders are present.

Measure at runtime based on whether folders are showing, the font size,
the font weight, and the the max width of folders being drawn inline.
This does not affect wide mode.

Change-Id: Ia0293fd5036ba93f5bfc03e1693b5f4acbf33103
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
f2caf91209e4e2d4182d6b379a3cd79eed81af71 02-Jan-2013 mindyp <mindyp@google.com> Set font sizes, colors, and types for subject/senders/ snippet. Set max length for subject.

Also, a fix for:
b/7937635 Senders text displayed as "e": need to figure out why the single sender was being
marked as elided at all so leaving the issue open
Considering an option in which I divide the subject into 2 textviews and ellipsize based on
length...

Part of matching redlines.

Change-Id: I109001fb1d52c032d489bf7d3a0a6e925a9d7f1a
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
b2033d855ab0f13e253e5403ce25989bcbc49488 08-Dec-2012 Andy Huang <ath@google.com> Convert rawFolders from String to FolderList

Continuing in the Parcel > String vein, switch rawFolders to use
FolderList, a small immutable Parcelable class. Individual
Folder objects are still stringified when used alone, but those
are not time-sensitive cases (e.g. generating a view intent).

Traceview on Nexus 7 shows 61% speedup in serializing and
deserializing folder rawFolders. Overall time for Conversation
construction appears to go up, but that's because the previously
lazy-deserialization is now done in the constructor. I think
this is okay, since the only performance-sensitive codepath
that constructs Conversation objects is the conversation list,
which always needs rawFolders.

Bug: 7690709
Change-Id: I42eadd79aaeb260f3d9642bf930437a69e510282
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
351ad4e87e0b0b98df9ca88266a8a63541dc5a81 07-Dec-2012 Andy Huang <ath@google.com> use parcel intermediate format for ConversationInfo

Instead of passing ConversationInfo/MessageInfo around as
Strings from provider->UI, use Cursor's blob functionality where
the blob is the marshalled form of the parceled Info objects.

This should be a acceptable use of Parcel, given that we are not
persisting this form, and it only exists to facilitate
provider/UI communication through the generic Cursor interface.

Parcel blobs are fast, well-tested, and do not require
input sanitization.

Traceview testing reveals pretty good gains in Conversation
construction (29% faster on Nexus 7), which is most of the work
in getView().

Change-Id: I05451fba2201ca2f2c3ee76c80fb356c36e8ccad
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ae7e6a0786a2d890b77c783d7ac39a90523b8154 29-Nov-2012 mindyp <mindyp@google.com> Update dropping into starred folder to match web

Dragging to starred folder: remove from starting folder, add star
Dragging from starred folder: move to new folder; leave starred state
Fixes b/7633742 Mails are disappearing after Drag and drop mails to Starred folder

Change-Id: Ibcbaa482f6d913cf486f0716e58bcd491efd1841
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
2909b7442130800d6c6c20c1227d65295262f03e 10-Oct-2012 mindyp <mindyp@google.com> reduce allocations: No need to alloc a new string builder here; store formatting string

Can just append to the existing string builder.
Dont make a conversationinfo/messageinfo object to then just turn it into
a string to be turned into an object
just make it a string representation to begin with
Change-Id: Ie7d4e382a5e97a28860f90e7597974074e52e130
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
b8361c9f8938b74977316319885998aae09aab77 27-Sep-2012 Paul Westbrook <pwestbro@google.com> Move account cookie query into account object

Move account cookie quert into the account object. This will
prevent looking up the account cookie from blocking the conversation
list query

Bug: 7244921
Change-Id: I9761fe29bb05d9f29eb8cae640a749545362c770
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
3bcf180f8104bc27319086a9a6ece5a3c2917c37 09-Sep-2012 mindyp <mindyp@google.com> Add loading animations to conversation view

fixes b/6272925 jank - conversation loading isn't animated
fixes b/7131797 Blank scren shown for live conversation, when in airplane mode
Note: need to do a next cl that puts off showing the spinner
until at least XXX ms have passed
Also, we cant use the software layer for rendering like we did
in gmail1
it looks like there is a skia crash that triggers when we try
to use software / switch to hardware rendering for the browser
need to investigate that more

Change-Id: I96a30b700c3e88d52e603fe2f11b44d113e013d2
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
cd5c5eeae167885ffa2959c200233fea2f39c5f7 13-Aug-2012 Andy Huang <ath@google.com> refine message cursor update accept/reject logic

Conversation view should ignore no-op or irrelevant
MessageCursor changes, but certain other changes should refresh
the view. Use hash codes for each message and for the entire
cursor to distinguish.

Updates from the server confirming a client-side read/star
change no longer cause the conversation view to reload.
Other cases that do cause a reload:
* edit draft locally or on the server
* read/star change on the server
* discard draft locally or on the server

Now that mCursor is changing all the time, and not always
reloading the view, we have to be extra careful to not keep
stale references to the old mCursor after a change (because
CursorLoader will close the old cursor after onLoadFinished).
This meant mPendingCursor wasn't needed.
This also meant ConversationMessage needed an intermediary to
get the current cursor.

Bug: 6951782
Bug: 6437156
Change-Id: Ibd94eb9dc0e72fae371e47db08dff0d7c09ee145
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
bf9508d3877d05742b2f5d23e1780366d3e1aa2e 10-Aug-2012 Mindy Pereira <mindyp@google.com> Dont display null text in the widget.

Takes code from the conversationitemview and shares it

Fixes b/6958924 Blank message in a widget displays text "Null"

Change-Id: Ib9a3b0b1ccabea6498d5710bbf11b7ef78d25988
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
cebcc64fbd69618ff89f9fac0bfe9b9e7d7ce104 08-Aug-2012 Paul Westbrook <pwestbro@google.com> inline attachment handling

Allow the provider to specify the real base url that should
be used for relative urls.

Also allow the provider to specify a cookie that should be used.

Bug: 6951268

Change-Id: I6f5ecf69b262b6c877eecbd1944aa03c46c85382
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
f98bc898cbc7014a203c35a13427d3f949bce705 08-Aug-2012 Andy Huang <ath@google.com> add "isRemote" for live conversations

Change-Id: Ifaf4d661acf47a4f9856ed607a792bdbedc6246b
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
41dca185f7683b36bdafd9520c0648c897a95834 07-Aug-2012 Paul Westbrook <pwestbro@google.com> Support for content provider inline attachments

Change-Id: I1c356487bb38f7feae6437de21c52e35fcaa53fa
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
820f051b37b45b3e3729bda5c4302a879ee6aa4d 06-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix NPE

This just prevents the crash if the UI provider is sending null for the
sender string. (also not specifying a conversation info string)

We should still investigate why null is being returned.

Bug: 6938728
Change-Id: I4c35139d436c520d265154d90154bd636cc06919
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
0972e0793cc321670391d063348aecb5031b2677 02-Aug-2012 Mindy Pereira <mindyp@google.com> Don't bother with nummessages/numdrafts if we have conversation info.

Cutting out more work we don't have to do.
it is essential to get making a Conversation as fast as possible

Change-Id: Icb80cd8c68de3685f5dbdaafce8f6d44a24105cd
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
e8a3eecf0a481665c5e886ebfb4a6184b5125f78 02-Aug-2012 Mindy Pereira <mindyp@google.com> Dont bother with senders/ snippet if we have conversation info.

Make all the things faster!
Reduced the number of calls to conversationcursor.getString()
by removing these unnecessary calls.
Change-Id: I18f45693c0065214919cd277f7e1578c703a956f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
b1cbb89f72631bb7e34822b98e8d0842ebd01b83 31-Jul-2012 Mindy Pereira <mindyp@google.com> Use priorities to decide who to elide.

Not sure its perfect, but its LOTS better
Test cases in a later CL
Fixes the subject showing in sendres in widget

Change-Id: I711ff6d8b1343aa01e5a38193a76467910425a9d
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
4f2224c70d4d07df85b325fa3faf78218f92aae6 31-Jul-2012 Mindy Pereira <mindyp@google.com> Since star can change via a user action, don't cache the bitmap.

That way, when we draw the star, its always up to date with what the
conversation has.

fixes b/6897152 Changes made in message view (star/unstar, read/unread) aren't reflected in conversation list
Change-Id: Icd841b3c60d37b8a453529423f51304577691bb8
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
8eca4db9069941d2b8afbe6f75e3af75a4310f27 31-Jul-2012 Andy Huang <ath@google.com> show "displayable" system folders in folder lists

Gmail1's "displayable folder" logic is already implemented in
the Gmail provider. The UI now assumes 'rawFolders' is already
filtered and suitable for display in list, view, and folder
dialog.

Browsing a label now shows Inbox for inbox conversations.
Conversation view shows Inbox for inbox conversations.

Change-Id: Ib4c08ecb182b74c4067d5e2e898bb501dad605be
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
5f424372f9a801120b5dc8d3f56e907baaa04e25 30-Jul-2012 Mindy Pereira <mindyp@google.com> Splitting strings == faster than json

Cut the time to create Conversation() nearly in half
Went from 43ms/per to 26ms/per
Change-Id: I3353c5406ba40116ce2906376369acde8d30cb7d
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
85c4a77abd849f5f3f0236d51554bb1bb99fe8f6 30-Jul-2012 Mindy Pereira <mindyp@google.com> Cache displayable folders.

Change-Id: Ibb2766e5a197a86adb0a456dc1fb58cdd98fd610
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
7269c6fe45420cebf90841497e74d55783ea3a46 27-Jul-2012 Mindy Pereira <mindyp@google.com> Defend against null raw folders.

Saw this crash in email/ exchange.

Change-Id: I47dedf6ff0ac534a359ca56353b9766cb68a07c4
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
00ffece08e94ff5774b2a53c0adeb2f3d0815d66 27-Jul-2012 Mindy Pereira <mindyp@google.com> Remove folderlist

Theres is probably some more caching I can do with the getRawFolders() call
on conversation.
Next CL.
Change-Id: I171ba2ec08c2dd557efafe01d1e59b6c7f563971
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
192fac189e6aed434556a4e37bd3c5c29ef02f29 26-Jul-2012 Vikram Aggarwal <viki@google.com> Eliminate some poor pager/list/destructive action interplay.

Change-Id: Ib7f3a7dfd194fe7f5df0f59b5b2989d31b55a631
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
7e854f52f0890b9621846ac7fe201a5681e65666 24-Jul-2012 Andy Huang <ath@google.com> ensure ConversationInfo is populated from notification

Bug: 6867243
Change-Id: I5e22978bdbd15506d8e9d5a0a671402756a41671
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
00c67ae6212de5b56c0c94af185061ee2fa36925 23-Jul-2012 Mindy Pereira <mindyp@google.com> Unparcel conversation info when restoring a conversation.

Change-Id: I987612417c190ad1e0f1478401c2a795b08d9bfc
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
d97782206889a5508279b75cce19d7c0fb8a3bca 23-Jul-2012 Mindy Pereira <mindyp@google.com> Gmail won't be providing first/firstunread/last snippet at this time;handle "me"

Fall back to snippet from conversation
When the sender is empty for a message, the sender is "me"

Change-Id: Ia68ee623797b41456f152a683fcd601c429472d6
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
aa1f945612847bc4cf5c8909b8acfab4b5ecf54e 23-Jul-2012 Mindy Pereira <mindyp@google.com> Add snippet logic when marking read/ unread.

Change-Id: I497344c4361616c8ec293ee89ea99ce9c1a5f2fc
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
6c2663dc9cade8aff34c462d244e3d72c475c664 21-Jul-2012 Mindy Pereira <mindyp@google.com> Update conversation read state on the ui side.

Change-Id: I372464e23c39131b45c20ad8bd72ddd6207a1bb5
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
648df3f0b0ebcd3c4adf907d70ff0938e5dfc78f 19-Jul-2012 Mindy Pereira <mindyp@google.com> JSON objects for conversation and messageinfo.

Used by UI to pre-update sender fields instead of waiting for a content
provider updatee

Step 1. Not checking in until all the CL's are ready to go.
Change-Id: Ib75e4f875fde7989e43fe15297030a4c7e7241b5
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ebdfd98264104cb5a6888acd663970b7c0b31382 13-Jul-2012 Mindy Pereira <mindyp@google.com> Add ability to change multiple values at once for a conversation.

Change-Id: I597bd33c5f647170f8cc06aba79091ac2090f696
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
76b2062b8c6d18a7b3a05292c385b47b0fcbd09f 12-Jul-2012 Paul Westbrook <pwestbro@google.com> Support for report phishing

Bug: 4161858
Change-Id: I8b12cfde7e19e388ece83c4df3069f1f65445945
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
e623a0f6e3caa9cafec913cf826e946628833517 13-Jul-2012 Andy Huang <ath@google.com> more docs

Change-Id: I63dea9ac00c8a937d950e6f4fe3af140ffa9b8dd
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
a6b671dd9f5ba358a05888b3ab3bf1c5cb5cf493 25-May-2012 Marc Blank <mblank@google.com> Only move selected convos if from same account

* Add accountUri column to Conversation
* Also add IS_VIRTUAL capability to Folder (for combined folders)
* Check that all conversations to be moved/relabeled from a virtual
folder are from the same account

Bug: 6280990

Change-Id: Idfc5b3017b16a9f8c1ae5063ba22c66f89d8ca4f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
7dd054e39986de84a213c56a3c11ac94731402e6 21-May-2012 Vikram Aggarwal <viki@google.com> Fix auto-advance on tablet.

Two issues have been fixed:
1. We get the next conversation *before* deleting the existing conversation.
2. Conversation View Fragments are not available in the same manner as
ConversationListFragment's are. Instead on relying on the existence of a view
fragment, rely on the conversation view visibility.
3. Next conversation with batch-selected conversations is now correct.

Fix b/6516141

Change-Id: I7a023ff50415347a9cdaf4bd5a9f24fe89f7530e
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
d503df4f0c31bbf842c6a1d3cba18df8c074bf67 11-May-2012 Vikram Aggarwal <viki@google.com> ActivityController commits folders, nobody else

Change-Id: I3ff870f275821ebc3cd08cfad0875eb229094f2e
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
440fe79194314b25ef5829702494735ce2f1e2e8 11-May-2012 Vikram Aggarwal <viki@google.com> Safely create Collections.

Change-Id: I5fb740195b7aa9cd683485609ad50312b6840555
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
92939fc7b40a56e17fb0d2fde987133ca1614e29 30-Apr-2012 Marc Blank <mblank@google.com> Support color block for combined views

Change-Id: I3097cb4c37311cbe4b2b8702c26a7edf5eebdd24
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
3c9bcef43b4f103697034abbf2eab99111e8d987 29-Apr-2012 Marc Blank <mblank@google.com> Fix crash when deleting last item via swipe

Bug: 6359069
Change-Id: Ia59c5109d264d98451a33434b5c66f29592077e9
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
bf232c3735f65b1a4746943e4a134e59e36f0bde 18-Apr-2012 Paul Westbrook <pwestbro@google.com> Major refactor of ConversationCursor

* ConversationCursors are now associated with a particular loader;
there are no static methods or static state fields
* ConversationCursorLoader maintains a list of current loaders
(for tracking/debugging)
* AbstractActivityController acts as a router of conversation
changes to/from fragments (currently message view -> conversation
list)
* Comment out some ConversationCursor tests for now

Change-Id: I9b8425a19c77501796b6681142e1bc0ad20b3693
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
cf164d64bcb1da92b427bda99b97f7ec310ef704 20-Apr-2012 Marc Blank <mblank@google.com> Revert "Major refactor of ConversationCursor"

This reverts commit 5150f03723af8019169aeed8e406784da9c5f8f1.
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
5150f03723af8019169aeed8e406784da9c5f8f1 18-Apr-2012 Paul Westbrook <pwestbro@google.com> Major refactor of ConversationCursor

* ConversationCursors are now associated with a particular loader;
there are no static methods or static state fields
* ConversationCursorLoader maintains a list of current loaders
(for tracking/debugging)
* AbstractActivityController acts as a router of conversation
changes to/from fragments (currently message view -> conversation
list)

Change-Id: I0eb554615b4bf93b3547ff28e2bd5913e8703a97
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
e1d1b07cdb0026097eb80f6c2912a16353aacec1 14-Apr-2012 Marc Blank <mblank@google.com> Lots 'o ConversationCursor goodness

* Throttling the cursor!
* Almost dead list items!
* But wait! There's more!

Change-Id: If0fe7b3d22e2dfa0e1d7bb2eaa307d20c52dc21c
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
acf6039a23382f18c35f6b487d90d53cb67b5858 06-Apr-2012 Mindy Pereira <mindyp@google.com> Drag and drop into folders.

Change-Id: If80c43fb5643d328bf061c2bed87bd9acb6e4661
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
e49c56c8a136e1d64c0d2e9034f4564be32084c5 23-Mar-2012 Mindy Pereira <mindyp@google.com> Remove deprecated method.

Change-Id: I0597f64a845d8e0f2ace3dcf596a667c12ddf47b
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
863e44160d9175023d30e7e225ecb69ad3892eec 23-Mar-2012 Mindy Pereira <mindyp@google.com> Update everything to read mute/ spam.

Conversation menu items now reflect if mute/ spam should be shown.

Change-Id: Ic4694c3feb3261c02d546e8befd9d999fdfefc85
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
87d535fe423d782c3a0343c649330d309976f655 23-Mar-2012 Mindy Pereira <mindyp@google.com> Add spam/ mute flags to conv.

Change-Id: Id5bf4606f394f707b02beafaca69eccb3f426375
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
2596f0011dcb4e86b01fc8a6362b5ac922239571 22-Mar-2012 Marc Blank <mblank@google.com> Local undo

Change-Id: Ifc8152d0549bc0eb4eb09fe6ef44fd5f07b3279d
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ff5c757ed2bcf7004a70b0675382ef894196558d 16-Mar-2012 Paul Westbrook <pwestbro@google.com> Allow a Conversation to be created with just the conversation
fields

Work around for NPE when marking conversation as read before
ConvrsationCursor is created
Change-Id: I495d408146287de5d6ce7253d2e082cc4d4b4d6a
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
397621b93f83f8933f7a29a9b6d7fe2b88ec4008 15-Mar-2012 Andy Huang <ath@google.com> Get 'mark read' from conversation view->list working (barely)

Conversation view updates a bit on its conversation model.
The model goes through the ConversationProvider caching proxy
to do the write.
After caching the write, ConversationProvider optionally
notifies anyone observing on the global ConversationCursor. This
part is weird and should be replaced by the Controller notifying
on its held reference to a ConversationCursor.
The conversation list adapter is registered for data set changes
to its ConversationCursor (thanks to
FLAG_REGISTER_CONTENT_OBSERVER).
The ListView is registered for data set changes to its adapter.
And the list redraws upon 'mark read'!

Change-Id: Ia465b90733f1cd19dc890a82ca4506178d840f04
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
22657529437c160dec072115c5982409306c1313 14-Mar-2012 Mindy Pereira <mindyp@google.com> Add flags to conversation columns and add the personal indicator flag.

Flag -> used by email; if there is no flag view conversationitemview
shows nothing
personal indicator -> used by gmail; if there is no personal indicator
flag, then conversationitemview shows nothing.

Leave low/ high in for now to avoid breaking the build.
Move email/ gmail provider over THEN get rid of this.
Change-Id: I0807ddf38ae660d7bd99ffa55bde78e42479ed76
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
17a9cde3b0e28fc98fdeda19de81e18056eb09db 10-Mar-2012 Andy Huang <ath@google.com> mark conversation as read upon open

Conversation list does not yet reflect the state change, but if
you force it to reload (e.g. switch accounts), you'll see that
the state did change.

Change-Id: I88117226e3579d2739497b03354dda2bb96a5984
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
cc8211df898ba9dac17a766b89f28d6e6f0afef0 12-Mar-2012 Mindy Pereira <mindyp@google.com> Add rawFolders column to conversation.

Can be left null if the provider does not wish a conversation to display
its associated folder(s)
otherwise this is a list of serialzied folder information

Change-Id: I0cc1dc168efea578a51ef4eefb3f0149eca08806
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
5c765b9c5dd8a9a9421260ba8b46d06073391c73 10-Mar-2012 Mindy Pereira <mindyp@google.com> Make sure we check for a uri before parsing it.

Change-Id: I5b78fa92ed31516d508506c7cce3f0535a349800
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
7f0a962513503cb01aec093b14c1b48dfae08f12 01-Mar-2012 Mindy Pereira <mindyp@google.com> Hookup ui for marking a conversation important/ not important.

Change-Id: Ic699aa172adccb335d67978abf4c0bd95d958a61
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
cfb7f33ff8ef9dc60b9143af32de64c7a3d71f36 28-Feb-2012 Mindy Pereira <mindyp@google.com> Store URI's in Uri instead of String.

Change-Id: I5492a61b80442afc7cebc5b3d560688aebae8820
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
9ae8ce0578b5b097e59fbd1b09fbfb8f824500fb 28-Feb-2012 Mindy Pereira <mindyp@google.com> Add launch intent for viewing a conversation from widget.

Also cleans up some cursors properly; these issues were caught
by strict mode.
Change-Id: I632dbd3a9b170711e3b5740afc919e6b37be51e6
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
a831b2f1ba6d3c18d5e54563df8bae1f589c4257 24-Feb-2012 Mindy Pereira <mindyp@google.com> Use a constructor to create a provider object.

Some were using from(Cursor), and it was confusing.

Change-Id: I49655b4ed013fb4dd47cdefea0bfd850a3fa4517
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
830c00f18b199f4eb2b2cc05b7038b8b05d8eca9 22-Feb-2012 Mindy Pereira <mindyp@google.com> Add mute/spam.

These only show when the account supports the operations.

Change-Id: I2e4852f748ee4653ac8593a6df5f74308cdefa53
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
f98b318572750dae998a55a60199598933770b68 22-Feb-2012 Mindy Pereira <mindyp@google.com> Seperate undoable ops (destructive) from not undoable (not destructive)

Added archive, folder changes that delete conversations
Set archive to only show if the app supports it.

Change-Id: I85babea1083a41168a6f036dddb4abad707e629f
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
8e915724b6e4374da9b70161ee0a55f0c763e563 16-Feb-2012 Mindy Pereira <mindyp@google.com> Take loading of messages associated with a conv off the ui thread.

Also, removed unused activities.
Change-Id: Ib80e71dce03a3821a0e27e9e2d638280dad0ce83
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ee62fced125d020ee175cb48efcd1d6517314d51 16-Feb-2012 Mindy Pereira <mindyp@google.com> Remember to call "start" on the undo runnable.

Change-Id: I572ccba6448e1c6b5c97789b6ee00dea25d32c21
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
0825efd09986173b90d7c7d45617fb22d18b1b96 16-Feb-2012 Mindy Pereira <mindyp@google.com> Fix up conversation label change logic.

This wasn't working correctly in the test app, and that is what
I think we should be maintaining from now on.
This handles crashes, passing around account, selected conversations.

Change-Id: I86242c980945771c73ce57c642e3f70fece4e3a9
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
3f1eb8517cf7db29ceafa1912ae999af186e2856 04-Feb-2012 Marc Blank <mblank@google.com> Add nicer undo support and some debug logging

Change-Id: I2b2c36e1be6ef7d07890e16b0721cd133421c830
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
ce53818e1e185a845bd2f7f601c20e7085b40725 03-Feb-2012 Marc Blank <mblank@google.com> Support string updates & update-with-local-delete

* Works for Email "move to folder"
* Moves animate away (like deletes) - yay!
* See TODO's for Gmail support

Change-Id: Ibb75fb1c3c5ac3df32f8f1da93274313299170da
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
c43bc0a606e41144a780c4f873b5450e0ede0c91 02-Feb-2012 Marc Blank <mblank@google.com> Use uri rather than messageListUri for Conversation operations

Change-Id: Icc30cdfd3cce1fcb3b0119ef6008e981e1c14ac4
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
dd10bc8736282262da0cd9a5f9a0236c10b47028 02-Feb-2012 Marc Blank <mblank@google.com> Don't recycle animating views, etc.

* And a few twiddles to ConversationCursor
* And make Conversation.delete/updateBoolean return
a sequence number

Change-Id: I79867e1ce562246eabecfd1c4eff686647578503
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
1b9efd9beb715927e0db7b138ddbb2925bc2c06f 01-Feb-2012 Marc Blank <mblank@google.com> Make Conversation operations return a sequence number (for undo)

* The implementation for undo isn't done, but the plumbing exists
now for the UI to pass a sequence number with the undo URI

Change-Id: I2c57c475464d828bbcb21ec0d1f42588bb238f63
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
f892f0a57d5c24b09fdc805f0fe2007ecd0d0e91 30-Jan-2012 Marc Blank <mblank@google.com> Refactor of some ConversationCursor code

* Quickly return positions of items deleted/updated

Change-Id: Ia1cc20bfcc5ab1958ec8c514321a1cc046dd81c3
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
374863eeb0ee37f1ca7d57840e6f02aaa052e284 27-Jan-2012 Marc Blank <mblank@google.com> Prevent NPE in list code by guaranteeing non-null subject in convo

Change-Id: I2bcb29b790d189cde2446a5ad9d5d69269a83535
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
8d69d4e10a9a36ff790babb2f3a098a12d0dc732 25-Jan-2012 Marc Blank <mblank@google.com> Enhancements to Conversation/Cursor/Provider

* Added methods in Conversation for doing batch update
and delete (e.g. from selection screens). The batched
changes reflect immediately in the conversation provider
and are then executed in a single transaction in the underlying
provider.

NOTE: If called from the UI thread, these operations will
not block (the underlying provider is called on a new thread);
it's expected that update/delete will almost always be called
on the UI thread. Where the result of operations is needed
(i.e. a Uri return from an insert), synchronous operation is
required; this can be done by calling on a non-UI thread.

* Support for selection -> add star

* Also, quick and dirty implementation of read/unread, both
by reading mail and by using selection -> mark read

Change-Id: Ia060cdf21b2f9f3960315c746e81c04ae3afc6a1
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
c8a994227b9c686d88ee05840544162711a85712 19-Jan-2012 Marc Blank <mblank@google.com> Prototype ConversationCursor/ConversationProvider

* Handles updates/deletes from the list instantly, then forwards the request
to the underlying provider
* Only starred/delete are implemented currently for Email types; the Gmail
provider doesn't yet support updates to UIProvider uri's
Note: Email types support read there's no read/unread support in the prototype
UI
* Updated UIProvider/MockUiProvider with latest adds to Conversation class
* Underlying provider must notify ConversationCursor of changes via newly
defined notifier URI

TODO: ConversationCursor wants unit tests

Change-Id: I91babcd5c27109acaa1f7479d584524e8a508a56
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
4db59c58c0af9f44d95a12dbe21322bed58cc518 12-Jan-2012 Mindy Pereira <mindyp@google.com> Senders logic.

Have a senders info field in a conversation
Have this just have senders in it (Gmail knows how to parse out JUST the senders, so it makes sense to me to just let Gmail do that, since other providers just have senders in that field and the info doesn't NEED to be together for display purposes)
Add other field(s) for catching unread counts, message counts, etc

Change-Id: I50b85b25e9e7e96f1a8afade663ea72ba6e79491
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java
732600e38891db139bae02dc91dd0c5b0987e8e9 11-Jan-2012 Andy Huang <ath@google.com> conversation activity plumbing

Short circuit UI usage of unnecessary ConversationColumns.URI
indirection. Conversation view can be passed a model from the
list view rather than querying again. Add Conversation
parcelable to be a model that the UI can pass around.

Fix minor misc issues.

Change-Id: Ifdbdc914d1522066bfce757e1237caa67d85fea2
/packages/apps/UnifiedEmail/src/com/android/mail/providers/Conversation.java