• Home
  • History
  • Annotate
  • only in /packages/apps/UnifiedEmail/src/com/android/mail/browse/
History log of /packages/apps/UnifiedEmail/src/com/android/mail/browse/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f4bb971c2da34f2dbef505af5159333cb510e781 18-May-2017 Aurimas Liutikas <aurimas@google.com> Remove usages of ActionBarActivity.

ActionBarActivity has been deprecated for 2+ years and has been
extending AppCompatActivity for all that time. These changes
should be no-ops.

Bug: 35253513
Test: None
Change-Id: I5d1295b253381810b8e6936705ea4bd4198a700d
(cherry picked from commit 69951ecebbf58d0d2ea41c3200174e9ebe91e964)
mlMessageViewFragment.java
bb6b28214b48ef0d74769c35bdc73979e379c401 10-Apr-2015 Jeff Brown <jeffbrown@google.com> Implement missing Cursor.setExtras method.

Bug: 19369537
Change-Id: I02f35d5010c5393a5c8082f2260e3fe2934815b7
onversationCursor.java
f9b96e244e6c6a19cb1920ff129f424997db2727 17-Oct-2014 Jin Cao <jinyan@google.com> Save the focused conversation via id instead of position

Don't rely on saving the position in the adapter because the position
might change as the adapter's data set changes (e.g. new mails via sync),
and we have no way of modifying the focused position accordingly.

Instead, save the focused conversation with its id (tried using the uri,
but the uri might change when the conversation gets cached). This way,
no matter what happens to the items in the adapter, the focused item
remains consistent.

b/18027602

Change-Id: I51aa68bc15c5892c3b34bde5c199de281390ce7b
onversationItemView.java
wipeableConversationItemView.java
0532b0edb999c6e131bfd1f2e1eccefed049ba49 16-Oct-2014 Jin Cao <jinyan@google.com> Programmatically set selected state to correspond to peeking conv

I can't simply rely on ListView#setSelection to programmatically
set the selected item because setSelection only caches the
selection internally if the view is currently in touch mode. Thus,
in touch modes, isSelected() will *always* return false for an item
in listview.

In order to know what's the current selected item, I keep track
of the selected position that corresponds EXACTLY to the listview's
selected position. Again, I can't use ListView#getSelectedItemPosition
because it will always return INVALID_POSITION in touch mode.

I change the selected position whenever a child calls setSelected()
or we programmatically call setSelected. I tried using onItemSelectedListener.
However, the listener's callback is called after the selected state
is changed AND the re-draw happened, so the UI gets inconsistent since
the selected state didn't properly update during the re-draw.

When we programmatically select an item that's visible on the screen,
we have to use ListView#setSelectionFromTop and pass in the current y
value since the default behavior is to scroll such that the selected
item is at the very top.

Also, another caveat is that I am now saving the ConversationItemView's
position in the adapter when the adapter binds data to it. I find that
this approach is much more dependable than using ListView#getPositionForView
because sometimes (for reasons beyond me) in ConversationItemView#setSelected
the listview ONLY HAS ONE CHILD (even though on the device I can see a
full list), thus getPositionForView will return index 0 since it thinks
it's the only child.. I have no clue, so I'm saving the position myself
instead.

b/18015875

Change-Id: I11897056fc9fa630eb4019532b1fd4cf41c7486a
onversationItemView.java
wipeableConversationItemView.java
87a8982af83168453b6dc219fe984bff68047beb 15-Aug-2014 Andy Huang <ath@google.com> Peek mode for 2-pane landscape

Peek mode allows CV fragments to be visible but not marked viewed and
read. TPC keeps a global flag for whether the current conversation
should be peeked vs marked read. I have tried to manually reset the
flag in the 6 cases that cause the current conversation to change:
1. tap another conversation (don't peek)
2. swipe to another conversation (don't peek)
3. keyboard-advance to another conversation (peek)
4. auto-advance=newer|older (don't peek)
5. auto-advance=list (go older & peek)
6. empty CV and a list cursor has loaded (peek at i=0)

Swipe, in particular, required a new onConversationViewSwitched() call
in CPA because onPageSelected() is triggered both when swiping around in
the view pager AND when simply setting the initial page as part of
constructing a view pager.

Thankfully, there is only ever one copy of this peek flag in the app, in
TPC, since AAC/TPC is where all the work is done both to mark
conversations seen and to switch to new conversations.

Rotation to portrait on tablets now requires tearing down a ViewPager;
this code and thought process is documented here: http://go/xqaxk

TODO: selected indicator for transition from peek->read state in-place
TODO: touches in CVF should mark it read

Bug: 17291366
Change-Id: I24f71a2b7985773814d8caad9f3ab3fe5c3609c8
onversationPagerAdapter.java
onversationPagerController.java
07c30f88abfefb9109f7b6a211e2229340d7ee49 14-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Catch ClassCastException. b/17975945

No idea how this state would ever happen. Added logging for that case.

Change-Id: I48e60ed1f9fc4fc73b10d9d78a115c928e86c839
onversationViewAdapter.java
e64d20ca9e541ef9f48b31bd5ae92fa02b64327a 10-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Use locale-specific number for CAB count.

b/17627434

Change-Id: Ia5a63ba3b1e69dbe4d77ce38abd479becfc778ca
electedConversationsActionMenu.java
9e700c59ccd35fb243fbfa207b530d4184d7ad3a 09-Oct-2014 Andrew Sapperstein <asapperstein@google.com> More logging for b/17662578.

Change-Id: Ic6a9e6c75609b2a7cf92b0f0a10f0d562e73a869
onversationContainer.java
ead0f081264b7b9224a17b193f1bf95c45c048a8 08-Oct-2014 Jin Cao <jinyan@google.com> Merge "Add folders to conversation item content description" into ub-gmail-ur14-dev
2cff0881131d3cd4469d3494a3f7bf0ee3f2f09e 07-Oct-2014 Jin Cao <jinyan@google.com> Add folders to conversation item content description

b/16574780

Change-Id: I7c9ec0da374c89364633158e65bbb7fbdc317873
onversationItemView.java
onversationItemViewModel.java
5e0a5cacbe7fad3307986eb9e830c06d0674a8dc 07-Oct-2014 James Lemieux <jplemieux@google.com> Merge "Speculative fix: ensure avatars are not created with empty email addresses" into ub-gmail-ur14-dev
7909e6a7d08dc02a6ea36f0b16cd153f1a648548 07-Oct-2014 Jin Cao <jinyan@google.com> Merge "Add optional vertical offset for folder chips" into ub-gmail-ur14-dev
68f13c29322c756c9c4049dca08c07d3d933df0a 06-Oct-2014 Jin Cao <jinyan@google.com> Add optional vertical offset for folder chips

And add 1dp vertical offset for CV folder chips.

b/17656383

Change-Id: Ie4316a96e19598b9c461acd1c4d3cbb78139aa85
ubjectAndFolderView.java
d3083ccd730496ca26102634bcd0ffe881150c53 06-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Announce expansion of super collapsed block." into ub-gmail-ur14-dev
fc4015c6558a663fda076e681486ff94f7a101a8 06-Oct-2014 Jin Cao <jinyan@google.com> Merge "Remove retry UI state and enable delete for sending" into ub-gmail-ur14-dev
dbeb32d9895211aa06afcc469fa8938f17b5d030 06-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Announce expansion of super collapsed block.

Fixes b/16353194. Also slightly changes the language
for the content description used.

Change-Id: I3125dc72511deffc12aac322164b6fc588e37f66
uperCollapsedBlock.java
ea61dab12099606a1d385e1003dde46bf0f47d4b 06-Oct-2014 Jin Cao <jinyan@google.com> Remove retry UI state and enable delete for sending

Until the "Failed" state is fully implemented, we are going
to stick with the old behavior and remove the new Retrying UI
state. We'll also enable delete for Sending items so users
can delete messages that are perpetually sending.

b/17814043

Change-Id: I6e510a553123fa5fdf6bada0fae92bb3e82ec798
essageHeaderView.java
electedConversationsActionMenu.java
endersView.java
wipeableConversationItemView.java
25bde81003c3cfc217679db968738f218f1c79c0 06-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Logging to help diagnose b/17662578." into ub-gmail-ur14-dev
18512bd09af3a5e3d6e8ae2789a40968aa5e8f07 04-Oct-2014 Rohan Shah <shahrk@google.com> Fix TL flicker before CV shows upon opening notification

Pager no longer animates in unless we've selected a
conversation from the TL (In all other cases, it will
now directly appear).

Bug: 17808571
Change-Id: Iadabdfa6ec913b1f5f9979dfe50c74eaeb51d326
onversationPagerController.java
49b72f2736de522c8479155d08742ae8e4ba3a91 04-Oct-2014 James Lemieux <jplemieux@google.com> Speculative fix: ensure avatars are not created with empty email addresses

b/17802490

I was unable to recreate this bug using 5 different renamed gmail accounts.
But, the code lends itself to locating the bug with a reasonable amount of
certainty.

ContactRequest throws IllegalArgumentException if it is created with a null
or "" email address.

SendersView.handlePriority(...) houses the algorithm that chooses the email
address used as the avatar for the TL entry. The algorithm already avoided
choosing null email addresses, but there was at least one code path through
the algorithm that would accept an empty email address.

Specifically, if all messages were read, and the last message was sent by
someone with an empty email address (obviously this represents bad data),
the algorithm would still happily choose that sender.

If this case happens, we do something the algorithm has done since time
immemorial: set the email address to the *name* of the particpant (which
is not empty). This will produce a failed avatar lookup and result in a
letter tile or generic avatar if the letter is not in A-Z.

Change-Id: I0a0ad0e5e66cc2316ef188b833485daa3c90c4b6
onversationItemViewModel.java
endersView.java
1e191e34733699149a9e662fd2540ae4b6ec9b0d 04-Oct-2014 Andrew Sapperstein <asapperstein@google.com> Logging to help diagnose b/17662578.

My guess is that ConversationContainer.getHeight() is sometimes
wrong. I want to see what the height is when we attempt to move
the view offscreen. Also what the measured height is.

Change-Id: Ic321d9b96737ab2ca26e021a2a5767c5898d6d67
onversationContainer.java
b537167ea6f8acb3874dc6416e07a7101539639c 02-Oct-2014 Tony Mantler <nicoya@google.com> Fix message starring via overflow

Fixes a case where we were unstarring a message and then
asking a different copy of it if it's starred or not.

b/17734406

Change-Id: I1f032f11241a55743355cfac5f4b7f3bb044b872
onversationMessage.java
777885a47872772e4953dae6dc18023e310e41b6 02-Oct-2014 James Lemieux <jplemieux@google.com> Merge "Remove wide-mode and normal-mode from TL" into ub-gmail-ur14-dev
4958af88fe77f0c5c92ab0f7e1e6cbba645c3180 01-Oct-2014 James Lemieux <jplemieux@google.com> Remove wide-mode and normal-mode from TL

b/17610551

mViewMode was still being consumed by ConversationItemViewCoordinates though
it should no longer influence the layout of a ConversationViewItem. When
opening an item from the TL, the ViewMode changes and each
ConversationItemViewCoordinates object would be recomputed from scratch.
While recomputing, the date/timestamp text would shift upward as the baseline
of the date/timestamp TextView would begin to report different numbers (for
reasons not yet understood).

By removing mViewMode (and its cousin, mMode) from
ConversationItemViewCoordinates, cache misses never occur when opening an
item and thus recomputing the geometry (needlessly) never occurs, which
ultimately fixes the bug.

Change-Id: I0b8d82d582ae6839d24c98051ac89bbc3ee9a1ca
onversationItemView.java
onversationItemViewCoordinates.java
f59080ee7ddbb986a295a14578b55f17a10cff4a 29-Sep-2014 Rohan Shah <shahrk@google.com> Add fade in transition from TL to CV

Added a fade in animation for the conversation pager to
ease in the transition from TL to CV and allow for feedback
on the TL.

In OPC, wait to remove TL fragment until after the pager
is done animating in (Also addressed edge cases such as the
user hitting back rapidly after selecting an email or, in
the case of long animation durations, multiple actions
occuring - did this by checking view mode in the listener
and cancelling animation on pager hide).

Bug: 17304654
Change-Id: I24e977eb6bd335f4f6764fef58b549e7cf0edfe3
onversationPagerController.java
2c9b5856575a036071198e69a64ee27bd5f9c441 01-Oct-2014 Jin Cao <jinyan@google.com> Merge "Fix messageInfo styling" into ub-gmail-ur14-dev
11ba47161936bd8555982621d59437b367664ea7 01-Oct-2014 Martin Hibdon <mhibdon@google.com> Merge "Don't show ExtraOption1 unless the application overrides optionHandler" into ub-gmail-ur14-dev
a00a413f293b73b8b6d16c0707d08f881fd92e1c 30-Sep-2014 Martin Hibdon <mhibdon@google.com> Don't show ExtraOption1 unless the application overrides optionHandler

b/17040185
AttachmentActionHandler now takes an additional parameter for
the accountType. ExtraOption1 is only enabled if the application
override optionHandler allows it.

Change-Id: I4984e6cb020912cdaf807534a8c4de6ebed07c1c
ttachmentActionHandler.java
essageAttachmentBar.java
deee5bee475a678bc2a4efe81c2900b1e5ac54dc 30-Sep-2014 James Lemieux <jplemieux@google.com> Display sync errors using snackbar and not as a TL footer

b/16463253

The FAB compose button overlaps the action button found in the TL footer
when network errors occur during sync. To avoid this overlap, the snackbar
is used to display these errors and they no longer appear as a TL footer.

In order to signal the sync error to AAC for display in the snackbar, the
Folder.lastSyncResult needed to be encoded in the manner that AAC reads.
This was not happening for POP/IMAP/Exchange accounts, so a large portion
of this change is encoding that value properly every place it is written.

To ensure the value is read/written properly everywhere, common methods were
introduced in UIProvider that do this work. UIProviderTest was also added
to ensure the read/write methods agree with each other.

Finally, the display of the "Load More" TL footer was updated to match the
latest spec.

Change-Id: Ia44f4ca1caa77c5d76f58d75fa4ab308442d2a72
onversationListFooterView.java
1e5bccefa627306120fbfd783838e1ef8b7fe0d8 30-Sep-2014 Jin Cao <jinyan@google.com> Disable unused menu items

Since we now have keyboard shortcuts, it's no longer
enough to simply set menu items invisible. For menu items
that are no longer valid, use both setVisible and setEnabled.

b/17692730

Change-Id: Iad9fb9b6638a68a4650cba699ea430c5c6e6e0fe
electedConversationsActionMenu.java
c12da4a53eee911765975f0d8afe62f749806b60 25-Sep-2014 Jin Cao <jinyan@google.com> Prevent contact icons from cropping

The main issue is caused by DecodeTask when the decoded bitmap
is bigger than the desired size. In some situations, the algorithm
will crop the decoded bitmap down to the desired size.

Since the size returned from the API is always capped at 96px by
96px, we can just use that when building our bitmap buffer size
so that DecodeTask will rarely (I say rarely because it's possible
for the user to upload a 10px by 10px contact photo, but that is
extremely rare considering how big 96x96 is) have to crop the
resulting image when decoding. The destination (either ImageView
or an image drawable) will then scale the image accordingly.

I also noticed a LOT of overlap between AccountAvatarDrawable
and ContactDrawable, so I refactored them into a common base
class and allow child classes to override default drawable.

b/17319292

Change-Id: I96b9fe39769e434fb45cebe11f9699d3259960df
onversationItemView.java
essageHeaderView.java
030f1bdf9b392308c898a5128b38ed463d1740dc 25-Sep-2014 Jin Cao <jinyan@google.com> Merge "New keyboard shortcuts" into ub-gmail-ur14-dev
a6b45218b8d90d7fc3a5ca0901293c71df404553 18-Sep-2014 Jin Cao <jinyan@google.com> New keyboard shortcuts

Does not include ctrl+ENTER for SEND & we need a new
key for REPLY since we are not supporting shift.

b/17070243

Change-Id: Ia5f179336dfc2b6631e1a5f26ee888f82f4873c0
electedConversationsActionMenu.java
ec86c424934205dcbc21078543be116d50e1b183 24-Sep-2014 Tony Mantler <nicoya@google.com> Don't allow starring messages in trash in CAB mode

b/17460527

Change-Id: I8de879c3d3f4b89213810957fe0e4c7f1ebf8ccb
electedConversationsActionMenu.java
fc0bbdcabbadd9eb5518b68b8f3ebcaf147079d5 24-Sep-2014 Jin Cao <jinyan@google.com> Merge "More keyboard polish" into ub-gmail-ur14-dev
23f0740fc0afb44fe82cf9fbd6dff422c7d6c5bd 24-Sep-2014 Tony Mantler <nicoya@google.com> Merge "Be less brutal about updating the conversation view" into ub-gmail-ur14-dev
d3b5f89580b3d1ba0df113a185977c9bbd7c07a3 24-Sep-2014 Tony Mantler <nicoya@google.com> Be less brutal about updating the conversation view

b/17064384

Change-Id: I96b1fe8fca60e647ed68f7265e6a8e0e103c4b6c
onversationMessage.java
d126fce2f361d763b790905832f7117245ca1bd4 23-Sep-2014 Jin Cao <jinyan@google.com> Merge "Change folder chip alignment to align with the baseline" into ub-gmail-ur14-dev
091484627a207de3fceea8727439082b022748ae 22-Sep-2014 James Lemieux <jplemieux@google.com> Replace the paper clip icon asset with new one

b/17588069

Note that this new asset is used in many places:

- Thread List
- Conversation View
- Widget

Change-Id: I5a9f92c7a2849c43b8e649fd640f0a7c0b6ee64b
onversationItemView.java
42b362587928704ea17b0a09a5e4e16037d14491 22-Sep-2014 Jin Cao <jinyan@google.com> Fix messageInfo styling

- Fix bug where we incorrectly use displaySendersText (it is only
used by AdTeaserView), this was causing the draft message to
not render properly.
- Add a character style span to the split token so that it's not
white.

b/16321486
b/17586158

Change-Id: I1ad2d919813f031d00e1e9d3e5dbecdd25715edf
onversationItemView.java
endersView.java
6fce8bb099fc38a68b96486921e9bf03a5b095d4 18-Sep-2014 Jin Cao <jinyan@google.com> Change folder chip alignment to align with the baseline

b/17471973

Change-Id: Iead6dacd17c4c477a09ee092210656d1f4c4f97d
onversationItemView.java
onversationItemViewCoordinates.java
ubjectAndFolderView.java
2472be0c121615fd3edc34554d7a67fa4f70ecf9 20-Sep-2014 Rohan Shah <shahrk@google.com> Merge "Update shadows for TL (Quantum) UnifiedEmail" into ub-gmail-ur14-dev
f9fd2cf057d845c7b081a3f17482dd0b886179d1 11-Sep-2014 Rohan Shah <shahrk@google.com> Update shadows for TL (Quantum) UnifiedEmail

NOTE: I'll fix FAB issues in a different CL

Add shadows assets on L & pre-L (RTL included)
for thread list sides. To avoid overdraw, the
backgrounds have been modified (The outermost
framelayout for TL now has a white background
instead of each of the conversation items).

For both L & pre-L, we're using two shadow assets
on either side of the TL, both of which are
set as backgrounds for the drawer and
the conversation view (conv pane). Elevation
didn't work out too well and will be revisited
while fixing overdraw issues (Need to move around
swipe/leave-behind item backgrounds and it
seems a bit risky to mess with it given the
timeline)

+ Also removed the background on the loading
item under conversations in the TL and used
the default conversation item background to
get rid of the ugly divider/slight line flicker
on folder change

Bug: 17461682
Change-Id: Id9e4504b6063f21a055ed492fc8de962e6e52462
onversationListFooterView.java
31702cbfde9055e528ac43addaf1ab0eb791d900 19-Sep-2014 James Lemieux <jplemieux@google.com> Ad icon is misplaced in RTL format

b/17285804

BidiFormatter to the rescue. It was not being applied to the subject
text, which was then combined with fixed badge text from our resource
files. Chaos ensued.

unicodeWrap()ing the subject text was the solution

NOTE: the code continues to assume the ad ALWAYS appears at the
beginning of the combined string and thus before the subject.

Change-Id: I1aeefd0808284a4a85fe10e5ca1f8f18822c55e2
onversationItemView.java
2cb6c1ca2b508331ee29d16b71f5ec024cd22555 18-Sep-2014 Jin Cao <jinyan@google.com> More keyboard polish

- Weird condition where user presses right to go into a conversation,
we load the conversation then set mConversationToShow = null. But
then our posted runnable for "peeking" the conversation completes,
and we show a null conversation which defaults to the first conv.

- Don't focus if the pager can't find anything to focus. This prevents
the focus from being put to default location (top left) if
onRequestFocusInDescendants fail.

- When the user taps a conversation, the list loses selectedItem. Use
checked item as fallback for navigation. However, sometimes the
listview loses focus when the user taps a conversation, thus
it wont receive any onKey events. I'll try to figure that out later.

- Check target size before commiting the undo action for toast bar.

b/17570560
b/17567978

Change-Id: I3d471dc1c1d956957463198086112d5a352fb775
onversationContainer.java
onversationViewAdapter.java
ad3f1b7e1675531f02f12757265805b971aec61d 18-Sep-2014 Jin Cao <jinyan@google.com> Merge "Speculative bug fixes" into ub-gmail-ur14-dev
f5de30d2bccf2e5eaace2424ad91784c43d42075 18-Sep-2014 Jin Cao <jinyan@google.com> Speculative bug fixes

- change setBackground to setBackgroundDrawable for compatibility.
- Possible place for ClassCastException. root is from onKey, but
all possible paths from onKey is type-checked before cast, so
this is the only location I can see that might throw exception.

b/17549422

Change-Id: I3e3a7528c689f03704d53b7359bc2024770effd3
onversationItemView.java
ede8d9a0d55e7edbf80026538119b0bad88fba52 18-Sep-2014 James Lemieux <jplemieux@google.com> Gmail crashes when switching to Promotion tab

b/17534190

Recently, mHeader.styleNames usage changed.

Before: A new ArrayList was built and assigned to this field on each
pass through calculateTextsAndBitmaps.

After: It was changed to build the ArrayList once and .clear() it on
each pass.

This bug was caused by an obsolete NULL check of mHeader.styleNames
that would always be true post-change.

Change-Id: I9b794a96093027a2eee7b7c38b0452d273184968
onversationItemView.java
c9e00fcb05c5311633dc3a414b9bf685816b4350 17-Sep-2014 James Lemieux <jplemieux@google.com> Sending a mail to self crashes gmail

b/17517391

When emailing yourself in Gmail, the initial entry in the messages
table is written with a NULL fromAddress. When the Gmail server
responds from the call to actually send the message, the sender is
then filled in. This brief period of time where the fromAddress is
(needlessly) NULL produces cursors that report the sender name and
email address as NULL.

To sidestep this problem, SendersView now takes the current Account
as an argument and, if no proper sender information can be located,
falls back to displaying the avatar of the current account, which
should typically always match the sender.

Change-Id: Ibe052dc948ff90e319a287ee1fb8cc8b707991b2
onversationItemView.java
endersView.java
a48a0d3c8983f6b641ed7114387a5ea20368cba9 17-Sep-2014 Jin Cao <jinyan@google.com> Merge "Unify the code to construct folder chips for TL and CV" into ub-gmail-ur14-dev
5edf5fd7327691b73dcb57c3cba340fd25576d18 12-Sep-2014 Jin Cao <jinyan@google.com> Unify the code to construct folder chips for TL and CV

Refactor the code used by TL to construct the chips drawable
so that it can also be used by CV. Update the CV folder chips
logic to take advantage of existing drawing code.

b/17471973

Change-Id: Iee70f22c72969ea3d17951e3ea4c6f14d5aaccbe
onversationItemView.java
onversationItemViewCoordinates.java
olderSpan.java
ubjectAndFolderView.java
3dbfbc210a607382ba9c150d7ae373ca0508267c 12-Sep-2014 Jin Cao <jinyan@google.com> Choose thread icon more carefully

b/17298161

Choosing the avatar to draw as the thread icon follows this algorithm:

1) Prefer the sender of the first unread message.
2) If all messages are read, prefer the last sender that is not the
current account.
3) If all messages were sent from the current account (e.g. user is
emailing themselves), use the last sender (aka current account).

In the process of doing this work the last remaining dependency on
DividedImageCanvas was broken, so it could be removed at this time.

Tests confirming the new behavior have been added to SendersFormattingTests.

Change-Id: If8e066de8cb98f2f95b019a88a2fdadc2f9f5090
5750406080090ed22bf93036525c2ff30f41b28a 12-Sep-2014 James Lemieux <jplemieux@google.com> Revert the controversial color change to senders and subjects

b/17397720

Subject and senders are now back to #212121 for both read/unread states

Change-Id: Id03a86837f76102819750f6ef8710f247ab68a1d
onversationItemView.java
ff35c4d206132d389cc5b77c488bd1fd41926e4d 12-Sep-2014 James Lemieux <jplemieux@google.com> Increase contrast for read/unread state

b/17397720

Applies the following changes to both TL and the widget:

1. Use #757575 for the subject and senders for Read
2. Bold the blue time stamp for Unread

Change-Id: I26416f7b81bc5489981fd1f58ae80957dfab0afc
onversationItemView.java
eed2850edd2c0c3f339d5e84a09d1385c2cdd256 11-Sep-2014 Jin Cao <jinyan@google.com> NPE in ConversationContainer

If we want to focus the conversationcontainer but the
adapter isn't set up, default to the system's handling.

b/17455499

Change-Id: I905f39bcecb5c5b2e5050fc9459c9ae72455b4ea
onversationContainer.java
cf0fdfff922f201bff0da7113d9e205e88c4ded1 10-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Allow LetterTileProvider to use a defined fontsize" into ub-gmail-ur14-dev
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
essageHeaderView.java
5f47f3a62f4b7e90c38d5f9bba27bc31d8068113 10-Sep-2014 Jin Cao <jinyan@google.com> Force re-render header on update

When we process an inplaceupdate on message header,
set a flag to force the header details to re-render
since by default it won't re-render if the summary
is already set.

b/17409699

Change-Id: If03d334780831ddf3c278c0c60554718a4cce728
onversationViewAdapter.java
57f82d24a7f7105800eff71083e41db5b27ba183 09-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Return of the message-level stars.

Fixes b/16563881 by enabling starring/unstarring via
the message header overflow. Also restores the behavior
where starred messages are expanded when you open the conversation.

Fixes b/16349888 by turning off the conversation-level stars
in CV.

Also fixes b/17432202 where the message header overflow wasn't properly
aligned with the action bar overflow.

Also noticed a super-collapsed bug where we weren't properly resetting
state on bind.

Change-Id: I39d7ef7b49f13aad62895e743effe76c707510f0
onversationViewHeader.java
essageHeaderView.java
uperCollapsedBlock.java
f91feae85a97db624add80408c837c0d0a5d0875 08-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Show unread count in CAB mode. b/17204324" into ub-gmail-ur14-dev
ccf9a34bcdcfdb884799ea3f3ecbd425970f26fc 05-Sep-2014 James Lemieux <jplemieux@google.com> Add support for disabling email sanitization

b/16896849

HtmlSanitizer defines a public static final int VERSION that should be
bumped any time a change to the sanitizer's configuration is made.

ConversationViewPager now compares the current sanitizer version
against the target version number from MailPrefs to decide if the
sanitized output is "safe". The Html is displayed in a sandbox without
scripting if it isn't safe.

Change-Id: Ia265180893dbdd9ef209d3ee6ea87c7eb468e6b3
onversationPagerAdapter.java
onversationPagerController.java
db861e9f08677da6d685d9cffc9072d2f98c0944 08-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Show unread count in CAB mode. b/17204324

Change-Id: I20b01e7b018f625646349e9a11df630d70ba35d1
electedConversationsActionMenu.java
d8f80955c27bf4c0820169789bfa6740e4c70eaf 05-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Make CV Subject selectable again. b/17376132

Change-Id: Ifaf110a765cfc5979e865feb97402fa5cc39eeaa
onversationViewHeader.java
ubjectAndFolderView.java
080a3340a97c7707a0bf4b715dde8e834b7c4618 04-Sep-2014 Andrew Sapperstein <asapperstein@google.com> Create recent entry for preview. b/17388879.

Change-Id: I21605d9322f7025eff0799395861ca15d9183d69
essageAttachmentBar.java
6b57d9cedbe8f905d5845ef7ddebb2e1a053d3ee 29-Aug-2014 Rohan Shah <shahrk@google.com> Add ripple to TL items (UnifiedEmail)

Tapping/holding on TL now causes ripples (still uses
old blue color), but only in L. Once we have a new
color for each wave of the ripple, it'll be replaced.

Bug: 17304654
Change-Id: If6b9947a7bf576880794411c0fd02d888060420a
onversationItemView.java
onversationListFooterView.java
7ae078381e3552a63e93485b09eed68a5daf798e 03-Sep-2014 Jin Cao <jinyan@google.com> Merge "Keyboard support for focused state" into ub-gmail-ur14-dev
ec0fa48764bede0772e9c711f3e33361b62f3608 29-Aug-2014 Jin Cao <jinyan@google.com> Keyboard support for focused state

- remove focusable from FAB so keyboard won't navigate to it.
- rename selectionSet to checkedSet
- selected is a state for listview to focus one of its elements
- what we really want is checked state for checked items in CAB mode.
- show the blue focus bar when isSelected returns true
- this is auto-set by the framework as we navigate using the keyboard.
- remove blue background color for selected state

b/17258708

Change-Id: Ic9739c9b349403942f64fafa26500c08d1f1cc4c
onversationItemView.java
onversationItemViewModel.java
electedConversationsActionMenu.java
wipeableConversationItemView.java
oggleableItem.java
2c33850fc250f3089cf8e3017fe44dc377c00f69 31-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Add content description to StarView. b/16352761.

Change-Id: I11e5f5f75e7b0a0191efea9f63922af46e68ae23
tarView.java
29ee4e290045a282ffc9195a9db1ff493a190690 30-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Supercollapsed block fixes.

Fixes b/16353194 by setting a content description on the super-collapsed block
when the user taps on it to expand the collapsed messages.

Fixes b/16139209 - Loading State for Super-collapsed block.

Change-Id: Id0e885b20c468b566e8488c5bef6dfaa84cd4591
uperCollapsedBlock.java
4c92874d9acedc81184339645b24eaeebacbb782 30-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Pressing back in CAB mode should close CAB.

Fixes b/17112203.

Change-Id: Ia5aa0ff22620d429cfedff5139f6737766693b08
electedConversationsActionMenu.java
12a05d22f6ac528e96716de9a451c5b7bee7a26d 29-Aug-2014 Andy Huang <ath@google.com> remove drag/drop code

Bug: 17322937
Change-Id: Idc21156e6d5e9ea4e83e3c17e92a66388ffc7a6a
onversationItemView.java
wipeableConversationItemView.java
oggleableItem.java
2dc9846cd924145e5b3d2649f9a70d1297ffcb07 28-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Include "bcc: " in recipient summary. b/17243353" into ub-gmail-ur14-dev
c0371f579ede0a524b2a140bf899c68548693496 28-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Include "bcc: " in recipient summary. b/17243353

Change-Id: I1717eaa96da58c9b0b055441945d879a1138fa5c
essageHeaderView.java
21cee6800cd303104bc911dfc5d514a77182c563 28-Aug-2014 Jin Cao <jinyan@google.com> Merge "[Quantum TL] Support RTL in folders list" into ub-gmail-ur14-dev
6adc0bf59acb0e633d0063f16085c286b8423e1b 27-Aug-2014 Jin Cao <jinyan@google.com> [Quantum TL] Support RTL in folders list

Properly support RTL and textRTL when we
draw the folders list and text.

b/17290617

Change-Id: I3732806e41e0326e80e8eeb9ff3f98ae69bd5da4
onversationItemView.java
77db7fda313ed4c001eb05fb6b619f9f2798c635 27-Aug-2014 Rohan Shah <shahrk@google.com> Show current folder on tablet landscape

When in conversation view mode, we were not showing
any text on the title bar (setEmptyMode). Changed it to
be visible if in landscape by checking the
is_tablet_landscape boolean (renamed), which we currently
use with TwoPaneController.

Bug: 16985409
Change-Id: I9a35b3b46f024584e1c47936def5aa854c52813d
onversationItemView.java
f06f4b7bf661125a822606b626de1ab7dbdb188d 27-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Fix b/16345519 with proper RTL fallback.

Change-Id: Iaf44f9757f808b899a4906314b7e6d7e98723b9d
onversationItemView.java
66506c2e7f81d6ef5ee5209bd915cbe1608d2aeb 26-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Make TL show subject/snippet in RTL.

Fixes b/16541736 but breaks b/16345519. Seems like
setSingleLine does not work in RTL. Or if it does, I don't
know how.

Change-Id: I2baa3a74eb31177c00ab249c6c1741666c0f2425
onversationItemView.java
2c15529ceb22e7aaad6f75ef809cb908ea08b286 24-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Actually remove bottom border. Fixes b/17227986.

Change-Id: I8df817c94be3821d7bf6adab4d0841ae58eb3afe
onversationContainer.java
3f0230e85fb0d7823d3ee5ca589c13385728b553 24-Aug-2014 Jin Cao <jinyan@google.com> Merge "Focusing on the conversation pager grabs wrong initial focus" into ub-gmail-ur14-dev
1f9d070d93a61e1c452c911b79c4d72dffb6e98d 23-Aug-2014 James Lemieux <jplemieux@google.com> Merge "Dividers in TL are now back to full bleed." into ub-gmail-ur14-dev
a7003405a9f66b6a7ee6caf62c6eb746f834c64d 22-Aug-2014 James Lemieux <jplemieux@google.com> Dividers in TL are now back to full bleed.

b/17141613

Note: we still draw them ourselves in ConversationItemView for fear that
UX will again change their minds. But, the inset gone and the color is
changed to the standard divider color.

Change-Id: I726a8131ddb60641fc4b059a4508bb4cf22ae19a
onversationItemView.java
c966a8a65a75559f677574c2a53cb9d43490f04e 22-Aug-2014 Jin Cao <jinyan@google.com> Focusing on the conversation pager grabs wrong initial focus

When the framework tries to shift focus from the listview
to the conversation pane, it calls onRequestFocusInDescendants.
By default, this method will find the first child that is focusable
and call requestFocus on that child.

This won't work for ConversationContainer because we add the
children view in reverse order. As a result, it always tries
to focus the conversation footer first.

Override onRequestFocusInDescendants to always auto focus
the first header item fixes this issue.

In ConversationViewAdapter, we also prevent views that
are recycled from grabbing focus with up/down navigation.

This CL also contains a ClassCastException bug fix for
ConversationListFragment$onKey.

b/17189775 b/17113398 b/17162145

Change-Id: I739207178fe3df1087d6504fffb11bfdf854a5dc
onversationContainer.java
onversationViewAdapter.java
1b87d3f03320eaa897ce5a4712d8bf0910bfd159 22-Aug-2014 Paul Westbrook <pwestbro@google.com> Prevent NPE in ConversationItemView

Bug: 16896838
Change-Id: Ifdcc0481269763d6a5e966fc81d395e333a54e6c
onversationItemView.java
24e052ad62145bfcb1189817e750e78b60c8645d 21-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Don't remove additional bottom border in draw.

Fixes b/15771956. This was the one case we missed.
We were removing the additional bottom border during our
draw loop. Now, like all other adds and removes, we post
the removal.

Change-Id: Id6c65c8a4695e6dd973dee02a91a5c274bec0fa7
onversationContainer.java
b1480a20c6802d10638aa50c4ef837a6a65739e7 21-Aug-2014 Jin Cao <jinyan@google.com> Merge "[Quantum TL] nested folders" into ub-gmail-ur14-dev
4c59495929c9b8a57fbcc05ad419a329240dbd00 20-Aug-2014 Jin Cao <jinyan@google.com> [Quantum TL] nested folders

Update the nested folders UI to reflect the newest redlines.
Also removed all signs of list_edge_tablet since it's no longer
relevant.

b/16017301

Change-Id: I24fcb43984b595a4fed84622e79ce76deaa92d2b
onversationItemView.java
4eb909e1ef9656dfc06d2518842357827dcfb068 20-Aug-2014 Jin Cao <jinyan@google.com> [Quantum TL] support RTL for folders text fading

Folders shading depends on the text RTL and not
the system RTL. Take that into account when
drawing the gradient and the text.

b/17140410

Change-Id: Ia8face736d19a27330cda9010c6420c2b28fbfed
onversationItemView.java
a6f35a92ca72b894928deff087630b13c52f41e2 20-Aug-2014 James Lemieux <jplemieux@google.com> Merge "No longer draw an inset divider below ads." into ub-gmail-ur14-dev
0446ee5717b20583971ac5a8bf153e90e6d89a6d 20-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Fix null sender crash. b/16192463

Change-Id: Ib83b7722829161cff09718a60e1e420fb9813379
ubjectAndFolderView.java
4173d7d25b2eb0caa6ec4adc0b3757d96b7eff6b 20-Aug-2014 James Lemieux <jplemieux@google.com> No longer draw an inset divider below ads.

b/16803464

Change-Id: I2b96be0f683acaf03898d4aae50a21749a713bc4
onversationItemView.java
41eb3f399b8b3007709a4ca4fb707171119be85a 20-Aug-2014 James Lemieux <jplemieux@google.com> TL dividers do not require insets if sender images are not visible.

b/17134703

This CL also makes the dividers respect RTL settings.

Change-Id: I2e4f6276a4487062d719eb878e929419b4852280
onversationItemView.java
91fa034d624d8690905f30a13ae3ffb9601cf948 19-Aug-2014 Paul Westbrook <pwestbro@google.com> Pass Account object to attachment view intent builder

Pass the full account object to the inline attachment view intent builder

Bug: 16153528
Change-Id: I9c7d24d9b1d32f141190398cdee93a235a09d1f8
nlineAttachmentViewIntentBuilderCreator.java
312c08bba7c547159764ae25b9c5aecbb63bde86 19-Aug-2014 Ray Chen <raychen@google.com> Merge "Allows subclassing showHelp from EmlViewerActivity" into ub-gmail-ur14-dev
1b8d42f7d1711664a0bb0de0a8585ada6c24ffad 18-Aug-2014 Ray Chen <raychen@google.com> Allows subclassing showHelp from EmlViewerActivity

b/17035955

Change-Id: Id11ff4190c6cf865b139016c938a1eac26d423e5
essageAttachmentBar.java
ff404bb78dec989c1660434915b1b027a2d86bf3 25-Jul-2014 Jin Cao <jinyan@google.com> Quantum folder list in TL

Re-did logic for drawing the folder list for
TL. The maximum width of folder and chips are
calculated based on a proportion of the entire
conversation item.

b/15552002

Change-Id: I8fea84112f86f9278dae4c724b2a0bd7a9c59af8
onversationItemView.java
onversationItemViewCoordinates.java
47da4ce65aebb78dde6c3ce273e95b547360bec2 18-Aug-2014 James Lemieux <jplemieux@google.com> Merge "Implement inset dividers in Thread List" into ub-gmail-ur14-dev
cace3194e9b7b0e2b6554bda2fa8b2f98da04175 16-Aug-2014 James Lemieux <jplemieux@google.com> Implement inset dividers in Thread List

b/16795579

Because the background color of the conversation list items changes as
the items are selected, activated, focused, etc, the color of the inset
must be dynamic. As a result, these "dividers" aren't actually
traditional ListView dividers, but are instead drawn within
ConversationItemView.onDraw().

Change-Id: I1bbc28e8eee399d5c1feb44df65674c94acef4cd
onversationItemView.java
onversationListFooterView.java
69419bb35240747d14765d4c74d4c2de58f4f8c5 16-Aug-2014 Rohan Shah <shahrk@google.com> Disable Change Folder if account does not support it

Added a TODO for cleaning up
SelectedConversationsActionMenu.

Bug: 17070852
Change-Id: I03224f7e2b32b3fb623df5982a8959a70d5a01e6
electedConversationsActionMenu.java
7ee90b37599cb6717782d40a6d085849918c29df 14-Aug-2014 Jin Cao <jinyan@google.com> Keyboard polish

Some polish for our custom conversation view navigation,
e.g. pressing up when you are on the first header item
will auto focus the overlay, same thing for down and last
item.

Disable focus for conversation header since there isn't
much actionable items there (MAYBE star, can discuss later).

b/3304236

Change-Id: I06796adac09716bccdae2636c7a9da245896eb34
onversationContainer.java
onversationViewAdapter.java
ce29380a68ee4bf6d5d8cf11d9eda7caa6482de4 13-Aug-2014 Paul Westbrook <pwestbro@google.com> prevent NPE

Bug: 16949922
Change-Id: Ic542ddf5b6946816f0e7be562a4b0238abf6bb7d
onversationViewHeader.java
0b69338a45faa422ccba8faf64c9816c55d33e4a 11-Aug-2014 Jin Cao <jinyan@google.com> [KBNav] two-pane landscape navigation polish

The system default navigation doesn't work quite as well
in landscape mode (e.g. focus on conversation view's reply,
hitting up goes to the mini-drawer instead of the message
header). This is partly because our overlay views are not
in a real list, thus we can't take advantage of the framework's
navigation support for listviews.

I decided to roll my own navigation entirely for
conversation view and manually focus/scroll.

This CL also includes some polishes for interactions in landscape
mode between drawer, TL, and CV panes.

b/16636060

Change-Id: Id1de01439a118702756d52f6a8b3f02395a0f932
onversationContainer.java
onversationOverlayItem.java
onversationPagerController.java
onversationViewAdapter.java
a7404589b03ac9dd0d07b3f7d0a1ec92ac9acb62 05-Aug-2014 Jin Cao <jinyan@google.com> [KBNav CV] basic support for CV keyboard nav

Support basic navigation via keyboard in CV.

b/16636060

Change-Id: I66dbcd8015d722244b57c4e24579d0d854d3ee74
onversationContainer.java
onversationOverlayItem.java
onversationViewAdapter.java
a2b0de96fcd5f83d7929ea66dd01d7dd5ad33de7 08-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Replace wtfs with e's.

Change-Id: I476ec2d4bc8a10d15397231b0f7bce2be6f08c52
onversationViewAdapter.java
e1557036849265afc24528be9effbe299b640bff 08-Aug-2014 Andrew Sapperstein <asapperstein@google.com> CV attachments. b/16138036.

Change-Id: I612bb54ccd2710754be03d9b4a566da544780d09
onversationViewAdapter.java
essageFooterView.java
afaab1752ab5b507cdaad7b3619ffc1c9728368f 08-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Remove above attachment promo. b/16138036.

Change-Id: I611f0f7e6eeea0247956e0f1a9f2ec3ec51c9eef
ttachmentActionHandler.java
onversationViewAdapter.java
mlMessageViewFragment.java
essageAttachmentBar.java
essageFooterView.java
9d4b37f0572a8f876b1cc6d873f9ccf0805dd0e4 06-Aug-2014 Jin Cao <jinyan@google.com> Merge "Properly check CursorStatus.ERROR" into ub-gmail-ur14-dev
ee6766a2c6938dbb4c975d93732d7033eecd90a5 06-Aug-2014 Jin Cao <jinyan@google.com> Properly check CursorStatus.ERROR

ConversationCursor is considered to be ready to show
if the status is error (e.g. no connection).

Move the check for adapter's count to after we try
to show footer based on the cursor status.

b/16739103

Change-Id: Ia94672710ce46d4b8035a0f8eba7e0827d453b3d
onversationCursor.java
81edb47b20a4ec56c233937217166a9f3cebeb7b 06-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Disable snap headers for SCV." into ub-gmail-ur14-dev
f8e065aab2cbff4dee86cc931a4d9c88dec37345 06-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Disable snap headers for SCV.

Change-Id: I69666b72d94bdb70f997f6324c69db27ccf152fc
onversationContainer.java
52882ff08fe9420fe2dbb3f681545a330222e9c8 27-Jul-2014 Andrew Sapperstein <asapperstein@google.com> switch to appcompat. b/16664350

Currently only for MailActivity, ComposeActivity,
and FolderSelectionActivity.

Any activity that inherits from ActionBarActivity must
use an Appcompat-derived style. Three styles currently
exist: UnifiedEmail.Appcompat, UnifiedEmail.Appcompat.Toolbar,
and ShortcutWidgetTheme are all based on appcompat.

go/appcompat-material-doc contains the full migration guide.

The fast version is:
All MenuItem-related work that relates to actions must use
the MenuItemCompat-equivalent.
Any theming should use the appcompat versions which don't require
a namespace prefix. For instance, use actionBarStyle instead of
android:actionBarStyle.

There are a few missing styles on views that can't use appcompat versions.
Those still use style overrides for v21 changes. All others use appcompat versions.

A few methods on activity should now use the support equivalents:
getSupportActionBar()
supportInvalidateOptionsMenu()
startSupportActionMode()

Change-Id: Ic6f5964f4115ab4bde49c19df5fe49c9086df965
electedConversationsActionMenu.java
90b60f1bc30e7b0494789365ce80e50ddf44f274 06-Aug-2014 Andrew Sapperstein <asapperstein@google.com> Migrate eml & full message viewers to appcompat.

Change-Id: If0fcff91c5b86ca634d59e98b83b1949c6460bc3
mlMessageViewFragment.java
fdc76bfe9457854495638cc4d4e168bf52fcb24b 04-Aug-2014 Jin Cao <jinyan@google.com> Merge "Support "deleting" in outbox" into ub-gmail-ur14-dev
d90a3bb006296443ea35ec3062cad11092ac2f95 02-Aug-2014 Andrew Sapperstein <asapperstein@google.com> New assets. b/16463154

Change-Id: I834a70dde51b44be793610aa174c604257633469
electedConversationsActionMenu.java
512821c11d89d49908f3cfdee0b582601f500f3d 31-May-2014 Jin Cao <jinyan@google.com> Support "deleting" in outbox

- Allow only failed items in Outbox to be swiped away/deleted.
- Same applies for multi-selection.
- "Deleting" in Outbox means remove the outbox label from the
failed message and applying the drafts label. This needs to
be implemented by both Gmail and Email providers.
- Added new ConversationOperation for this new action.

b/4080109

Change-Id: Ia9c8e386c7c65693f72fda85a49cb6a1b7d1fec1
onversationCursor.java
onversationItemView.java
electedConversationsActionMenu.java
wipeableConversationItemView.java
f58e4c3c942033fce12b5f75f9e4d9e708c9ea6a 10-Jul-2014 Andy Huang <ath@google.com> mini-drawer. new tablet UI.

New MiniDrawerView class for a minimized drawer UI with shortcuts to the
main drawer logic to switch accounts and folders. The "drawer" is now
always visible except in portrait conversation view.

Can't easily use an actual DrawerLayout because:
-drawers usually occlude other views, they don't push
-we have that omnipresent 'mini' version
-we want custom control over dragging to trigger a fancy animation (not
just edge swipe!)
(I'll revisit this later.)

Even ActionBarDrawerToggle alone can't be used w/o DrawerLayout, so for
now, all of this drawer logic (dragging not yet implemented) is from
scratch.

TwoPaneLayout no longer "shifts" its panes to transition from TL->CV in
landscape; the panes are now fixed in position. Not yet implemented is a
'conversation-visible-but-not-marked-read' state necessary to avoid the
initial gray expanse there right now.

Bug: 16147175
Change-Id: I021aaff15afebb76db6722265e2a592213674405
onversationItemView.java
onversationPagerController.java
0fd4cba8db984955729871d15a7cfebd73e9cf9d 24-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Fix NPE for singular draft string. b/16323068

Change-Id: Iaed56eaf74a24537bfb927b404d896179a0dc3e5
essageHeaderView.java
endersView.java
3047a9f03d9febaf2aba1e5ea0827e0b740d1ab2 23-Jul-2014 Andrew Sapperstein <asapperstein@google.com> stable action items

b/16167419

Change-Id: I72c7c44f5728563da1fcbd39daa31ccd41845d8a
onversationViewAdapter.java
electedConversationsActionMenu.java
7750adb207c55d61ba4693a461ba1e133940f39f 19-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Action bar update - asset swapping. b/16167419

Not all assets are ready, but those that are
have been swapped in this CL for TL and CV.
This CL does none of the changes for action item placement.

Change-Id: I7ce383806a9c9e6591b77f646bb5ba569be74810
electedConversationsActionMenu.java
f75cf1157b7168cd4c501b1b34ad473e2ab724f0 19-Jul-2014 James Lemieux <jplemieux@google.com> Not enough difference between unread/read in TL

b/16131268

This reworks the colors, fonts and sizes used to distinguish
read and unread entries in the conversation list.

Change-Id: If807ea43a4011cb36b8d39cd5aba080fbb018016
onversationItemView.java
endersView.java
63d636084fdce6c4340bb1a817251a9e1d6bc460 18-Jul-2014 James Lemieux <jplemieux@google.com> Allow partially elided words in TL subject and snippet

b/16345519

This CL removes a bunch of attributes from
conversation_item_view.xml that are red herrings which
don't influence layout behavior and adds the crucial
line to setSingleLine(true) which turns on the desired
eliding behavior.

Change-Id: I5d451d204a5838439d4c3c21b62b42279c47de71
onversationItemView.java
onversationItemViewCoordinates.java
c7d75225488f79ed0020df442cd270e4b85e6865 16-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Format SuperCollapsed number. b/16343748

Change-Id: I3b38d27e9c0df09223bb75db4b703396a57893f2
uperCollapsedBlock.java
0eb990597f23e553343c7e432271645fa4c68db2 16-Jul-2014 Ray Chen <raychen@google.com> Merge "Delegate Account creation to builder class." into ub-mail-master
4b0c0127d24e387a4f49d442b63b5c60cedb6922 11-Jul-2014 Ray Chen <raychen@google.com> Delegate Account creation to builder class.

Account contructors are no longer public and clients need
to use Account.builder().buildFrom(...) instead.

Change-Id: I8f072e893b49b64d962fa7a075e5c15364c4c05f
essageHeaderView.java
5f79af7b356c3a8ecd8cd77fcbde673de9023b50 15-Jul-2014 James Lemieux <jplemieux@google.com> Implement circular icons in Conversation List

This crosscuts three UI elements:

- the border around contact images
- the border around letter tiles
- the border around checkmarks

Change-Id: I86dee47282cded696d7658a87e69223244358d68
onversationItemView.java
735a22a197215ec4787ad9f3cbaf465cce54f4d0 11-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Quantum CV - drafts. b/16138121

New assets, new red color for drafts.
Super-collapsed becomes red when there's a draft.
Conversation footer is hidden when last message is a draft.

Change-Id: I89a58971a19475be79f56cae53934f3c7b2ab894
Missing: properly re-sizing the footer.
onversationFooterView.java
onversationViewAdapter.java
essageHeaderView.java
endersView.java
uperCollapsedBlock.java
0e29e769c74e385342fc5dc8e9c85517771aaa34 11-Jul-2014 James Lemieux <jplemieux@google.com> Remove attachment previews from Conversation List

This includes:

- all references to the 3 attachment preview columns in the Gmail
conversation table (except for migration code in MailStoreInitializer)
- all layout and drawing code for attachment previews in conversation list
- all assets related to attachment previews
- all preference and analytics code that aided attachment previews

NOTE: This does not alter, in any way, the display of attachments in
conversation view.

Change-Id: I0aa5a32c8cce0ba98758827b973b323896932c39
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
wipeableConversationItemView.java
e9001d2d49b54f18448e3145bc4e654ebf091e4a 09-Jul-2014 James Lemieux <jplemieux@google.com> Merge "Stop throwing exceptions while displaying ads" into ub-mail-master
961aada3d12af6cd31ae620e53358beb7e5d5062 09-Jul-2014 James Lemieux <jplemieux@google.com> Stop throwing exceptions while displaying ads

b/16162794

Computing the indexes of the subject when Ad badges are present was
wrong and causing IndexOutOfBoundsExceptions to be thrown.

Change-Id: Iffecb15de99085de5f16cb8d10c0a24e95b13689
onversationItemView.java
64f56828a81ad7e29cad3a254a6ecdc05c9284e8 08-Jul-2014 James Lemieux <jplemieux@google.com> Move folders to share space assigned to snippet in Thread List

b/15552002

This CL merely moves the drawing of the folder chips to the correct
location. It does *NOT* implement any new folder chip drawing specs.

Change-Id: Iacaaf90b1e0da2855fa4faf230469038482b6420
onversationItemView.java
onversationItemViewCoordinates.java
ubjectAndFolderView.java
0580c34576afdf9969c23935ff1c9381632acdea 09-Jul-2014 Paul Westbrook <pwestbro@google.com> Stop using API that isn't available in KitKat

Change-Id: I210cd0e839d97fa3a52bf7194c0085cab46755e2
onversationItemView.java
84872d07eb0247a14c1e883e12f5ad642488fc96 04-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Turn off snap headers :( b/15595931

Change-Id: I05a3cd6d4757faca31e6d191b588e81c3ad3490c
onversationContainer.java
605dcfcefab6b222db6178f9c64a9d7a1c464da9 03-Jul-2014 Andrew Sapperstein <asapperstein@google.com> super collapsed block b/15595931

Change-Id: I197cff27874feac2317603783c65388d12be8d48
onversationViewAdapter.java
essageHeaderView.java
uperCollapsedBlock.java
e2a30e19a9fff0e4368c4ec36280a3fcd4ca03e2 03-Jul-2014 Andrew Sapperstein <asapperstein@google.com> conversation footer b/15595931

Change-Id: I9eda1060f4e49a0448a321f603aec0a254daf86a
onversationContainer.java
onversationFooterView.java
onversationOverlayItem.java
onversationViewAdapter.java
94033deeb31df739a27fce15887a3f0a2e808b12 03-Jul-2014 James Lemieux <jplemieux@google.com> Show "(no subject)" When the Subject is Empty

b/16046050

Change-Id: I60b60c03d8314dcfbdff6b9314020b7f04acb520
onversationItemView.java
ubjectAndFolderView.java
928308d6b10d353493492ad05e0227f960ddaa7e 02-Jul-2014 James Lemieux <jplemieux@google.com> Implement general layout and colors for Thread List items.

This includes:

- separating the subject and snippet lines
- RTL support
- new layout sizing (common to phone and tablet)
- new font sizing
- new colors
- mirroring these changes in the widget version of Thread List

Change-Id: I92fda7ca9936a8d7f96bc5f584a7a11e0e0fe72e
onversationItemView.java
onversationItemViewCoordinates.java
essageHeaderView.java
58aea286155200751000d5ceefbfa3d6f55fe68d 02-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Fix some UI nits in CV. b/15595931.

Change-Id: I0156d2153a22e670ce789dd29520ea144fc12a88
essageHeaderContactBadge.java
essageHeaderView.java
de40dd3a292531c7dd8a5741eb0980f666a88b84 01-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Message header ui update. b/15595931

Change-Id: Ic3ce06409707e326e4dc2eef6bb8617f5f03d1b8
mailAddressSpan.java
essageHeaderContactBadge.java
essageHeaderView.java
rlSpan.java
26407717f0b20021f369be52dab0f2ac3a93e673 02-Jul-2014 Andrew Sapperstein <asapperstein@google.com> Update attachment asset.

Will need updates to UI to fix paddings and such.

Change-Id: I51493b46d00e69a70a7351597e7818899bd67dcf
onversationItemView.java
eb58a092961773a8da67c0e0dd5770346381d938 24-Jun-2014 Andrew Sapperstein <asapperstein@google.com> Updated conversation header for quantum CV.

b/15595931

Using a combination of breaking and non-breaking spaces
to ensure that labels start on a new line if they don't
all fit in the remaining space of the first line they can
be drawn on.

Starring works now.
Can click the labels to open change labels again.
Priority indicator is now baseline aligned.
Properly drawing the label chips.
Label chips moved up to the baseline
RTL support.
New star asset.

Change-Id: Ife32339f174bff7beafc979f9cc9761cefffed72
onversationItemView.java
onversationPagerController.java
onversationViewAdapter.java
onversationViewHeader.java
olderSpan.java
olderSpanTextView.java
riorityIndicatorSpan.java
tarView.java
ubjectAndFolderView.java
fa501472f11a7f9b34d081a34e4d75d2c673cc8b 23-Jun-2014 Andrew Sapperstein <asapperstein@google.com> Remove message level stars. b/15595931

Also don't expand starred messages in conversation view.

Change-Id: If6b499d12525bed00f7d8db0d2a8e80ba2afc226
essageHeaderView.java
59ccec3db4710f2aea6a4a9a30160ad19331367d 19-Jun-2014 Andrew Sapperstein <asapperstein@google.com> Remove borders/cards from conversation view.

b/15595931

Change-Id: I51b5ce1d9387d6354d421b0e399a2003c6e84c54
orderView.java
onversationContainer.java
onversationPagerController.java
onversationViewAdapter.java
essageHeaderView.java
1c6d71b47e7af11b3cf7bd6da4a89594941be968 17-Jun-2014 James Lemieux <jplemieux@google.com> Adjust colors of timestamp in conversation list

The timestamp is blue if unread messages exist in the conversation and
light gray otherwise.

Change-Id: Ie7d2664ff729c66715d06463603e9411923fee0c
onversationItemView.java
b0b9e69c68f48b45b8bf840d84d79cd3ca794f95 13-Jun-2014 Jin Cao <jinyan@google.com> Fixed conditional for checking if cursor is ready

Because the cursor can be mutated by user input, we should deem
the cursor to be ready to show if it either has a count of 0 or
it has a COMPLETE state. Prior we were checking if it's not in
LOADING state, which can be wrong if the cursor is partially
loaded but the user removed all of the loaded conversations. In
that case, the cursor's size would be 0 but the state would be
LOADED, and it would wrongly show the empty state.

b/15583795

Change-Id: I7c953a477922d10c027e40b19e8fe83a09b968e4
onversationCursor.java
661aaca1c4a831f79975e74b682866e48a9bc9ee 12-Jun-2014 Andy Huang <ath@google.com> Merge "Take adapter's teasers/footers into account when showing empty view" into ub-gmail-ur13-dev
402817434733dfd63bfbc844e6df7ef8c85ed455 02-Jun-2014 Ray Chen <raychen@google.com> Remove selected count for CAB mode

b/10094624

Change-Id: If5db664945dd68dd13423ce606af101d2f9a6e77
electedConversationsActionMenu.java
0647f7d71e908562e7420ff2a9908ec9a93dc551 30-May-2014 Jin Cao <jinyan@google.com> Typo on last commit

Change-Id: I3d06db9342cb3d952716453675314d02a3889b15
endersView.java
6a2df258316b267151296556dbbdba20200ecb1f 30-May-2014 Jin Cao <jinyan@google.com> Provider support for different sending states for messages

Add support at the provider layer to differentiate among different
sending states (not sending, sending, retrying, failed).

b/9805976

Change-Id: Icb47412ad6f961f36adb6223a6289b0c4dcd7a2c
essageCursor.java
essageHeaderView.java
endersView.java
bc29ed3a5fe96ac144d5157150551febfb4d1355 08-May-2014 Jin Cao <jinyan@google.com> Take adapter's teasers/footers into account when showing empty view

Avoid showing anything until the cursor is partially/fully loaded.
Once the cursor is loaded, use mAdapter.getCount instead of
cursor.getCount to check for list count since mAdapter might have
special views that it wants to show despite the empty list.

b/14651214
Change-Id: Ife9de623110adbd191991fd9d8746f9ce93fbf5f
onversationCursor.java
b790e4e6006839e136bb0ea077ae469512132b27 29-May-2014 Alex Gawley <alexg@google.com> Merge "Update Attachment Handlers." into ub-gmail-ur13-dev
aa4c9941269cc7815dd80e649e24d0257f83d5d5 29-May-2014 Alex Gawley <alexg@google.com> Update Attachment Handlers.

Change-Id: Iddd3c6e6ae7ef152db8143acfe9dfcc0ab6ec7af
ttachmentActionHandler.java
essageAttachmentBar.java
essageFooterView.java
8913ca6aebe6017efe8060b61b8ad38eda95aa8b 15-May-2014 Andrew Sapperstein <asapperstein@google.com> Allow alternate sources for contact images.

Makes some classes that overridable in order
to provide alternative implementations:
ContactResolver, ContactResolverTask, ContactLoaderCallbacks,
and ContactPhotoFetcher all can be subclassed to provide new
behavior. Also added hooks in ControllableActivity
and MailIntentService to override building these classes.

NotificationUtils was also updated to force all calls
through MailIntentService which can be overridden.

Finally, moved the BitmapCache used in conversation list
to the activity level instead of at AnimatedAdapter-level
(which is effectively fragment level). This speeds up subsequent
queries for images dramatically. We reset the cache when changing
accounts.

b/11387812.

Change-Id: Ie70d800862b073163ccbfa5295d6950e57d64009
essageHeaderView.java
07fe9320d65d33b0d99b580eb47c5859ee7a7be6 23-May-2014 Andrew Sapperstein <asapperstein@google.com> Fix NPE. b/15163241.

Change-Id: I1b8358470b5bbbb0e423268f8757f2413a743471
onversationContainer.java
a839fd0af18f53574128e32dc0900339280fba05 22-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Revert the CLs that updated the message headers.

Revert "Remove padding for message details. b/13329913."

This reverts commit 42c39c4026970508a536099085d5155196bbee42.

Revert "Fix UI issues caused by new attachment asset."

This reverts commit b6a6a5c2cd6d8b07e93c07b8a2cafa2276d9bec7.

Revert "Redesign of message headers. b/12933316."

This reverts commit 2ed8c0409cd7d8e64c58ada6f63a519517ddaf7d.

Revert "Ensure expanded details always shows. b/13348592."

This reverts commit bac524cc0575ff3cf54aa93247bf33c06edcdd9d.

Change-Id: I1d70329504dd788e4b2879137bae43eb4c4167fe
essageHeaderView.java
89bf7ce646a0ee67e0a8ee10d8834bcf54257d97 14-May-2014 Andrew Sapperstein <asapperstein@google.com> Truncate mailing list prefixes in notifications.

Fixes b/14872144. Also consolidates the logic into
one location. Previously we had near identical code
for both the conversation list and the widget.

Change-Id: Ib99f941cdb1b775c3666952ac3c9af5fbc0ee152
onversationItemView.java
c1cc0c44c3471be83321d61a81533ee0b0d23060 07-May-2014 Jin Cao <jinyan@google.com> Add special case for international numbers

Special case international numbers so we do not decode '+' into a space.

b/10640197

Change-Id: I084c7fcb3f32c64f00d62ad2c0c5896a8b182e29
ebViewContextMenu.java
7a0467d8bf269831c171f10e0d16fb6f71894550 06-May-2014 Andy Huang <ath@google.com> am f21787ad: allow the user to recover from stuck-cursor issues

* commit 'f21787ad2ac7d68e3620ffa3ae6e8e7fadf0bd54':
allow the user to recover from stuck-cursor issues
f21787ad2ac7d68e3620ffa3ae6e8e7fadf0bd54 02-May-2014 Andy Huang <ath@google.com> allow the user to recover from stuck-cursor issues

Treat swipe-refresh as a trigger to clear stale adapter state that may
prevent normal cursor refresh from happening. While it's important to
delay cursor refresh until animations are complete (to prevent jank),
there was previously no way to get out of buggy states where the adapter
though an animation was happening but never did.

Bug: 14297883
Change-Id: I0d279770246e93c939b589cd0ac5eba76358b47e
onversationCursor.java
a2519e3a1444b8421261348279883108ad1d00be 02-May-2014 Greg Bullock <gregbullock@google.com> Perform a null check on mAccount before it is dereferenced.

http://b/14385033.

Change-Id: I5344302b933c902ec8a05e0d49314e37917f6344
essageAttachmentBar.java
70d584e5372c46f81dc5707a76253bc9c697617d 29-Apr-2014 Jin Cao <jinyan@google.com> Properly destroy old loaders in MessageFooterView

Each MessageFooterView assumes that it only gets updates from one
corresponding attachment uri for its attachment information. However,
this can be broken if we change the underlying uri in MessageHeaderItem
without informing the footer view. When the next bind operation comes
around, MessageFooterView will see the new uri, assume that it's the old
one, and deduce that the uri hasn't changed. It will then attach a
loader to the new uri, and now it has two loaders feeding information
on two different states of the attachment list.

And this will then cause (50% of the time depends on which loader
finishes last) the view to render both the 2 attachments and 1 attachment,
and depending on which one is rendered last, the one with more attachments
will either completely cover up the other, or the one with fewer
attachments will incorrectly overlay on top.

b/14293222

Change-Id: Ia652601d26ce14e9aa0346a98dad2597e62bdbaf
essageFooterView.java
daab4397cbfb2145f2cc899e5fa2e81fa8cac7c4 24-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am f78da980: Merge "Hide Save to drive in EML view. b/14277510." into ub-gmail-ur12-dev

* commit 'f78da98066e806450e84d6c16794eaff9392650f':
Hide Save to drive in EML view. b/14277510.
f78da98066e806450e84d6c16794eaff9392650f 24-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Hide Save to drive in EML view. b/14277510." into ub-gmail-ur12-dev
b1f7786d52e34485d6c9f1fe50c2aa6fc38ad90b 24-Apr-2014 James Lemieux <jplemieux@google.com> Merge "Gmail does not display inline attachments nor does it offer "Show pictures" within the EML viewer" into ub-mail-master
8e1ffbf042a23824a97a9f47cfc81cf6f14603be 23-Apr-2014 James Lemieux <jplemieux@google.com> Gmail does not display inline attachments nor does it offer "Show
pictures" within the EML viewer

b/13912473

The Eml viewer (and indeed all Secure Conversation Views) now
offers "Show Pictures" to display the inline images.

Those inline attachments are also displayed as tiles at the
bottom of the Secure Conversation View so that interaction with
them is possible.

Change-Id: Ida66820c98c88b222e459aa9d2559383a3b608a0
essageFooterView.java
essageHeaderView.java
833123d9c31b0b2dd23f7f74738c5bccf8a546d3 24-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Hide Save to drive in EML view. b/14277510.

Change-Id: Ia75fb95536517df576ef3c39072a423e3e244b6a
nlineAttachmentViewIntentBuilder.java
essageAttachmentBar.java
ebViewContextMenu.java
50619c7db1a5b614720ffa19c123173aa8579e14 24-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am 4b15c9e7: Merge "Add analytics for EML viewer." into ub-gmail-ur12-dev

* commit '4b15c9e7807d73a44975e974eb88ceb869d110f5':
Add analytics for EML viewer.
129995d61fbf8ac2e4e464f5ecb37bb5f47822f5 24-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Add analytics for EML viewer.

Change-Id: I0d0a3cd5b377616a35b9e346fbac703ca233b367
mlViewerActivity.java
6ecd041cf979c95b92e41957b88bdaa26d679309 24-Apr-2014 Scott Kennedy <skennedy@google.com> Remove dead code

Change-Id: I0dc0b7e62c5653107879bab6e3f60603416db3b0
essageFooterView.java
essageHeaderView.java
dd3e80d1aae8dad3b92e6184528aff89d7380dbe 23-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Fix b/13624037. Restore adding unknown contacts.

Change-Id: Iff5596626b33342409624d24d44089934c86ae0e
essageHeaderView.java
b5cfdb21796667ca2b98774ff47cfd16b501c6f7 23-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am 381c322e: Save to drive promo. b/7659807.

* commit '381c322eb30c39f63a2bb82812d63262eb3c1c1c':
Save to drive promo. b/7659807.
9e86baf73cb208f39312eca73b656f35a39bea18 23-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Merge "DO NOT MERGE Revert 4 CLs that updated the message headers." into ub-gmail-ur12-dev
381c322eb30c39f63a2bb82812d63262eb3c1c1c 20-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Save to drive promo. b/7659807.

Provides a space above the attachment bars to show
some additional content. Default behavior does nothing.
Hooks have been added to allow resizing of the message
footer.

Change-Id: Ib950091d176311bdb06c7c7a466223beb997a7b5
ttachmentActionHandler.java
onversationContainer.java
onversationViewAdapter.java
mlMessageViewFragment.java
essageAttachmentBar.java
essageFooterView.java
rlSpan.java
433d0db8a05ed14581993b2a721238ebbaf25c91 22-Apr-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE Revert 4 CLs that updated the message headers.

Hopefully this'll make b/13772061 no longer happen.

Revert "Remove padding for message details. b/13329913."

This reverts commit 42c39c4026970508a536099085d5155196bbee42.

Revert "Fix UI issues caused by new attachment asset."

This reverts commit b6a6a5c2cd6d8b07e93c07b8a2cafa2276d9bec7.

Revert "Redesign of message headers. b/12933316."

This reverts commit 2ed8c0409cd7d8e64c58ada6f63a519517ddaf7d.

Revert "Ensure expanded details always shows. b/13348592."

This reverts commit bac524cc0575ff3cf54aa93247bf33c06edcdd9d.

Change-Id: I1d70329504dd788e4b2879137bae43eb4c4167fe
essageHeaderView.java
934b1f470a646a4ca64fc63eeb823d4c5c12698e 09-Apr-2014 James Lemieux <jplemieux@google.com> Inline images are not displayed for IMAP and POP emails

b/11998344

This solution covers these use cases:

1) Inline images in the Email app.
2) Inline images in .eml attachments in the Email and Gmail apps.

The solution here was to override shouldInterceptRequest(...) in
the WebViewClients and resolve any cid urls that are encountered
within the email body.

EmailProvider and EmlAttachmentProvider both gained the ability to
query for an Attachment object using a message ID and cid (which
is stored in the database column: contentId).

With this new query in place, it was straightforward to fetch the
Attachment in the WebViewClient and then obtain an InputStream to
the file that backs the Attachment to return back to the WebView.

Change-Id: I7c0e33e62d6cdbd6a2a3fc81e8621755bdbaf704
mlMessageViewFragment.java
98d7aa0ff9cb5f43f0718e422b93de127471627c 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am 82bb8d28: Add analytics for toggling message details.

* commit '82bb8d280b0d8cdd3b4777006b18715b17bc306a':
Add analytics for toggling message details.
82bb8d280b0d8cdd3b4777006b18715b17bc306a 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Add analytics for toggling message details.

b/13172001

Change-Id: I18f19043132aee8b3f3a3c3d82f9094ec62d4750
essageHeaderView.java
312ed4cd84f3ae57e8fe37a2493b32a92b7b7fbc 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am 73c0af74: Add analytics for view clipped message. b/13172001

* commit '73c0af74555120ba0d83d4430591c230448b4a14':
Add analytics for view clipped message. b/13172001
73c0af74555120ba0d83d4430591c230448b4a14 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Add analytics for view clipped message. b/13172001

Change-Id: Ia728178f01dccfbce4008bac9f42c06519092aa0
essageFooterView.java
3e03e02993c685db571cbefb194fb1afad8ec93c 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> am 56599492: Merge "Send PLID with message instead of conversation." into ub-gmail-ur12-dev

* commit '565994920f7d1b0432288191f51275b413ec2e8c':
Send PLID with message instead of conversation.
565994920f7d1b0432288191f51275b413ec2e8c 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Send PLID with message instead of conversation." into ub-gmail-ur12-dev
d97eb8738785fd5488417098c361633721dfdb19 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE Revert "Prevent flickering. Fixes b/10994303."

This reverts commit bb6f0504c1607c89d9a3dd3e6023f36d61837016.

Change-Id: I834c3f2a2ebf89108d67ef497bfd52b1234e55cd
onversationContainer.java
onversationWebView.java
essageScrollView.java
crollIndicatorsView.java
crollNotifier.java
040b52fe85a67eeb6d9a4e9dc20322ee36ad4aec 17-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Revert "Speculative fix for b/13772061."

This reverts commit 0cf8a191dc00081c2ef3256c6d18a143404544fc.
onversationContainer.java
20c2082e85e87dc9c70b3d74e20ed31d3eff7364 16-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Send PLID with message instead of conversation.

Fixes b/13748439. Sending with conversation required
server-side changes and wasn't actually more memory efficient.
Arguably it would be less efficient.

Change-Id: I346d61387513e94a7387d7feaa68b3e6d2a7b2de
essageFooterView.java
c2a89d1afcf2d5db65360b5e5bdc32e37b923c4c 14-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Single message clipped view. b/2887917.

Change-Id: Iae86b18d645d30ecfb77e110f21b134aae29d26b
ullMessageContract.java
essageFooterView.java
30c881a7d31203fc7b233abf4a0c1413de4cd517 08-Apr-2014 Jin Cao <jinyan@google.com> DO NOT MERGE Added support for arbitrary post-undo actions

- Added interface to add arbitrary callbacks after a specific undo
action occurred. This is useful if we want to do some specific UI
modification after an undo, show the user more information, etc.
- This callback is also added to DestructiveAction so all destructive
actions can run custom callback when it's undone.
- Used the interface to add show the removed conversation when auto
advance is active.
- Removed references of inLoaderCallbacks in AbstractActivityController
where it's not being used.

Demo video here:
https://drive.google.com/a/google.com/file/d/0ByX6TliQlkICSjZub0ZyaWtxS0pmZk1kbk5WQ2V5SGlMTWxF/edit?usp=sharing

b/6769311

Change-Id: I00cc66421315091cc934e0f63188ff693b0a84b8
(cherry picked from commit f55863727de2bb15f1906944bbc88c82703a3aff)
onversationCursor.java
electedConversationsActionMenu.java
ndoCallback.java
5b18d791a38885faf3315707221804e9187e027c 29-Mar-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE WebViewContextMenu analytics. b/13172001.

Change-Id: Ia4a45a59200abb27b089dd7d236a16af4ad7afd4
(cherry picked from commit 877a4445e6e94a3f231edab8c5d4e71c165f8834)
ebViewContextMenu.java
0cf8a191dc00081c2ef3256c6d18a143404544fc 09-Apr-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE Speculative fix for b/13772061.

Posts requestLayout and invalidate instead
of just calling postInvalidate(). Only posts
if postAddView is true.

Change-Id: I27c58ed059d7af231b277975634e41ae1572de74
(cherry picked from commit 0744489dd3c80c56b9eded95ae027b7089cbf5a3)
onversationContainer.java
37bd105c144408aab23dedca4f0d39dc4939d57b 29-Mar-2014 Andrew Sapperstein <asapperstein@google.com> DO NOT MERGE Quick contact analytics. b/13172001.

Change-Id: I0b2aa77c0c631901578089ed54957b5659670d0e
(cherry picked from commit ab3837c008df53d445a3fb87f739e7e6400848c2)
essageHeaderContactBadge.java
8f1abcbb70fa4eea77eae9bbe51b238870472a47 08-Apr-2014 Jin Cao <jinyan@google.com> Disable long pressing non-inline img

Read above.

b/13718454

Change-Id: I1d12d90309f3425aa802e5fc36d4e6832ae084e9
ebViewContextMenu.java
046c6440b01c4ef46db9c32b6dd16777d0371c03 05-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Ensure expanded details always shows. b/13348592." into ub-mail-master
bac524cc0575ff3cf54aa93247bf33c06edcdd9d 05-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Ensure expanded details always shows. b/13348592.

Need to all requestLayout when we toggle.

Change-Id: I2801d17ff2dd3ea11dfc12454c07c89198291d44
essageHeaderView.java
4debeed7edb58bd19b3ca00bd7820f189b8dda4b 04-Apr-2014 Jin Cao <jinyan@google.com> Merge "Temp fix for swipe bug" into ub-mail-master
e1ba1013409486f88f06af2932546a1b366704d3 04-Apr-2014 Jin Cao <jinyan@google.com> Temp fix for swipe bug

This is a temporary fix so that when the user swipes X away and
then quickly swipes Y, both X and Y are discarded instead of just Y.

b/8465164

Change-Id: Ia911bc45b316314d458968c27a5f3253c5754cc5
onversationItemView.java
1f46d54f4812be184da20ef842af1c81f9554a7d 04-Apr-2014 Tony Mantler <nicoya@google.com> am 9d3b1dd6: Remove pointless variable

* commit '9d3b1dd6e411bba6c415e19d51e32569956a8bb7':
Remove pointless variable
9d3b1dd6e411bba6c415e19d51e32569956a8bb7 04-Apr-2014 Tony Mantler <nicoya@google.com> Remove pointless variable

b/11462391

Change-Id: I893ff983bf8ec3d673fb909dcf3c02fe8f5d413d
essageScrollView.java
5f97508cbd28a205c65e31ba45bb304040548522 04-Apr-2014 Tony Mantler <nicoya@google.com> am 3c7fd5eb: Merge "Add double-tap gesture to MessageScrollView" into ub-mail-algol

* commit '3c7fd5eb890647111ab38afdc62686d7c689d891':
Add double-tap gesture to MessageScrollView
f2dabb90c33740189112757349c49ef9e48ea541 03-Apr-2014 Tony Mantler <nicoya@google.com> Add double-tap gesture to MessageScrollView

b/11462391

Change-Id: I4ac9baa733710e6033dd2d93129acf9a5ab687ef
essageScrollView.java
0653f9f2cf6424bbd274a2016b8d72d5431f2125 03-Apr-2014 James Lemieux <jplemieux@google.com> am 10ea28ab: Show "To:<Names>" in sent and outbox index views

* commit '10ea28ab588d8e922c0f78f0f47fe479739ec2cf':
Show "To:<Names>" in sent and outbox index views
487f79d103753a3eaa51f8c2bd8b6a219534fdf5 02-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Allowing overriding conversation list load limit." into ub-mail-master
6418208353cd9eb4de32de4195675d5cc07e016b 02-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Delete unused class." into ub-mail-master
4a6b04c9d0432e82a2aa9de21acafb4e9327501f 02-Apr-2014 Jin Cao <jinyan@google.com> Merge "De-duplicate header on name/addr conflict" into ub-mail-master
3b05815c69c01526d80ccbfc3f0e4abc61cd2e12 01-Apr-2014 Jin Cao <jinyan@google.com> De-duplicate header on name/addr conflict

Only show the formatted address if the resulting address and name
are the same. This prevents names that are email addresses being shown
as linkified in the expanded header view.

b/13733037

Change-Id: I7dc9143372fdbe4acce83307c6aa8e6db5026df1
essageHeaderView.java
697646bd1fb18d7fd1e99e4ea0435adc54dd9edd 02-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Delete unused class.

Change-Id: I88b42750d7a6e1628f6c23ca8158b175ac7fd00e
essageView.java
5bb4d053519be10324752f323bcf73f13b9a2604 01-Apr-2014 Andrew Sapperstein <asapperstein@google.com> Allowing overriding conversation list load limit.

b/7280077

One issue we saw was that if the conversation was not
in the initial 50 conversations, we would get punted
out of the conversation list. Now we have an additional
extra in ACTION_VIEW intents that allow ignoring the
limit for the first load of the ConversationCursor.

Change-Id: I737c45e122df4dda7c63794ddc7036be61d5ebd4
onversationCursor.java
aaca613cd34f6169e215016195f1953a69df913a 24-Mar-2014 Martin Hibdon <mhibdon@google.com> Add loading view to conversation list

b/12421412
We are now supposed to show a full screen loading view,
which looks similar to the full screen empty view. This
should only display in the case where there are currently
no messages locally, but we are still trying to load them.
In this case, the full screen loading view replaces the
footer with the loading spinner.
The footer with the loading spinner still exists, for the
case when the user hits "load more" to retrieve more
messages.

Change-Id: Iba46caec2ff65c6be066ec3f9ab53bf86f4ef3e5
onversationListFooterView.java
10ea28ab588d8e922c0f78f0f47fe479739ec2cf 27-Mar-2014 James Lemieux <jplemieux@google.com> Show "To:<Names>" in sent and outbox index views

b/13304929

The solution being delivered introduces a new folder capability:
UIProvider.FolderCapabilities.SHOW_RECIPIENTS which indicates a folder
should display "To: " in front of its participants list because it
is a folder containing outgoing mail or sent mail (thus viewing
recipients is more useful than senders). This capability is returned
for Drafts, Sent, and Outbox.

Note that extra work was required to make this function properly in
the widget we export to the launcher. See BaseWidgetProvider and
friends for details.

Change-Id: I2fa2394224ef3911992ab8d5cb67b05fdf5f3e85
onversationItemView.java
onversationItemViewModel.java
essageHeaderView.java
endersView.java
023f8bd83674dcb780656159aab8767c158a49cd 27-Mar-2014 Andy Huang <ath@google.com> ensure account is passed to attachment option1

whoopsie!

Bug: 13654223
Change-Id: Idc82aa2fe2982dfa84fe6af4cc8bf8c2da334961
essageAttachmentBar.java
4f347e811052f446c3958c76db278bcd7b39a44f 26-Feb-2014 Andy Huang <ath@google.com> allow an extra option on attachments (in bar and tile UI)

Bug: 7659807

Change-Id: I4c1294d2ba772a70139e0b37429b17bc6096cafd
ttachmentActionHandler.java
onversationMessage.java
essageAttachmentBar.java
essageAttachmentTile.java
essageFooterView.java
3c6fd44f9ae0cf60248dc64ee74d46afed633c45 25-Mar-2014 Andy Huang <ath@google.com> streamline inline attachment view param passing

Put more logic in CVF (or its secure/eml equiv) and pass fewer objects
of lower specificity to the intent builder.

More concretely, the viewer intent builder now accepts a Message, which
can be quite useful.

Bug: 7659807
Change-Id: I6be3bf87c3e01367a20c062d1e59f4ca6e1dd85e
nlineAttachmentViewIntentBuilder.java
nlineAttachmentViewIntentBuilderCreator.java
essageCursor.java
ebViewContextMenu.java
61f26c2d1c1d3735cf883b58fe7e45550bb1a54c 14-Mar-2014 Andy Huang <ath@google.com> add floaty footer to the drawer

* settings now moved to drawer
* swapped out footer assets to match sectioned inbox icons
(TODO: even newer assets)
* tweaked footer misc to match mocks
* split out the drawer list's scrollbars a la conversation view
* disable floaty footer on short screens (e.g. landscape phone)
* move AAC's drawer-related APIs from Account Controller into
DrawerController and expose more, like raw access to drawer state
* drawer is now white, footer is gray (expansive tablet unchanged)
* align footer items with sectioned inbox items
* only activate the footer items after closing the drawer (smoother,
better fit for Feedback)

TODO: tweak animations, especially when scrolled near the bottom

Bug: 11061485
Change-Id: I3e70d994934c846061efbfb8d118604a965d344f
crollIndicatorsView.java
4e87a08e295e775f9a30b4f49f95f983410da784 14-Mar-2014 Andrew Sapperstein <asapperstein@google.com> Merge "View entire message UI." into ub-mail-master
f59d01c3116dc2adde97a5b52aa6094144c2d315 20-Feb-2014 Andrew Sapperstein <asapperstein@google.com> View entire message UI.

We need the per-message plid server support,
but we are forwarding the clipped bit to
the UI and showing a button based on that
bit. Clicking that bit will open the
plid viewer for gmail. Email should be
unaffected as it does not ever return clipped as true.

b/2887917.

Change-Id: Iddb54e37cf650ca16a75fcbe69f1861becdd81b9
onversationAccountController.java
onversationViewAdapter.java
mlMessageViewFragment.java
mlViewerActivity.java
ullMessageContract.java
essageAttachmentBar.java
essageFooterView.java
essageHeaderView.java
e6bf30d6e98eb6140b7a5f301efe631ff35c9f7b 14-Mar-2014 Andrew Sapperstein <asapperstein@google.com> RTL - Align conversation header with viewStart.

Fixes b/13432564.

Change-Id: I97954654b829579d481780ddd0c550d4caa58086
onversationViewAdapter.java
onversationViewHeader.java
10fcd645f703799326da326630b663df69f91508 03-Mar-2014 James Lemieux <jplemieux@google.com> Move Help & feedback to Nav drawer of Email.

b/11061485

Gmail remains unchanged due to this checkin.

HELP and SEND FEEDBACK are now the two bottom-most drawer
items in the Navigation drawer of the Email application
when it is present or in the overflow menu when it is not
present.

SEND FEEDBACK still behaves as always.

HELP has been redesigned so that it displays the help
content in a local webview rather than using an external
browser in the Email application.

Change-Id: If1bdba26ac2caca79c81205a409c67659cd49653
mlViewerActivity.java
55d0725ebe4d12c7d1d02f5ee13840c1f200503d 30-Jan-2014 James Lemieux <jplemieux@google.com> Keep on getting a couldn't sign-in notification

b/11551107

This is caused by ImapConnection.doLogin() only throwing
AuthenticationFailedExceptions and not other varieties of exceptions.

Our best guess based on the reported bug is that the IMAP server should
be returning "UNAVAILABLE" indicating the IMAP server is up and
responding but some resource it relies on (e.g. LDAP) is currently down.
We translate the "UNAVAILABLE" response code into a Server Error value
and display a message to the user and a Retry button.

While fixing this bug, I discovered that the ConversationListFooterView
that is displayed in response to a authentication failure contains a
button called "Sign In" that didn't actually do anything. I made it
navigate to the incoming account settings fragment where the user is
free to change the relevant account credentials.

Change-Id: I2c772ecab18f3e57059eceeae01de08f1fdab4c2
onversationListFooterView.java
17646055214b9ab3abc2553379bf046ca3e53fb2 07-Mar-2014 Andrew Sapperstein <asapperstein@google.com> Show priority indicators (chevrons).

Fixes b/7961430. Creates a new account setting
called showChevronsEnabled that, if true, results
in the UI showing chevrons. Also properly distinguishes
showing chevrons from the show importance marker setting.

Change-Id: I767341457ed610309b5729887d121c6fb7c94eba
onversationItemView.java
onversationViewHeader.java
wipeableConversationItemView.java
26bff17101ac0808864122ad892be6705658bd52 05-Mar-2014 Tony Mantler <nicoya@google.com> Merge "Null check result from EmlMessageLoader" into ub-mail-master
cd10aee59ff768745d0a75bfd659e0ec53ac88de 25-Jan-2014 Tony Mantler <nicoya@google.com> Null check result from EmlMessageLoader

b/12762903

Change-Id: Ia2e09b1bc6a4dadcf5b70b30ef974bb1906e4b15
mlMessageViewFragment.java
c0f7716721d7d7c725597d221b713ac9a29efa3d 05-Mar-2014 Andy Huang <ath@google.com> Merge "Redesign of message headers. b/12933316." into ub-mail-master
2ed8c0409cd7d8e64c58ada6f63a519517ddaf7d 28-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Redesign of message headers. b/12933316.

Pixel perfect.
Re-architected a bunch of the layouts.
Revised some of the string building for the new formatting.
Removed unneeded references to some Views.
Fixed a visual nit in SecureConversationView with the snap header.
Removed a bunch of unnecessary BidiFormatter uses.
Deleted dead assets.
Removed padding around attachment icon and thus revised the
margin/padding for it for both conversation list and conversation
view.
Aligned star when collapsed to top of date.

Change-Id: I4b1fae35206e1f4713687c44a1c226e1257b13e4
essageHeaderView.java
d4dae4817fdddbd7a43f18ddbef38815d6e0a182 04-Mar-2014 Tony Mantler <nicoya@google.com> Add scale gesture bypass to MessageScrollView

b/11459843

Change-Id: If5ebe3a82287acdeca3c44beb690f12223e7a736
essageScrollView.java
5a1f16ed20a9fb823163ad3401590974690926da 03-Mar-2014 Tony Mantler <nicoya@google.com> Merge "Get rid of Account#name" into ub-mail-master
26a20758413f0f8629ea71a0943304e3ae740165 01-Mar-2014 Tony Mantler <nicoya@google.com> Get rid of Account#name

b/13249115

Change-Id: I5478b139cba9e3e37924c3af1c7a4f818a803fa3
essageHeaderView.java
a5dfa98bbafd402fa15c32efe4a0b55ebdfd7d11 01-Mar-2014 Andrew Sapperstein <asapperstein@google.com> Release static drawables on config changes.

Fixes b/12905423.

Turns out there were two separate bugs.
One bug was an alternate resources bug where it didn't
use the proper integer value in a shape drawable.
The other was that we held onto all the static drawables
in ConversationItemView across config changes. We now release
them and acquire the new ones when config change occurs.

Change-Id: I8ab772b1d0d8ded24a4b60f5e70f2549f12bd2e0
onversationItemView.java
7348cf23d9df1ea3c58674b2c67d8219a6094fcf 20-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Fix yet another unicodeWrap NPE. b/13108784.

Change-Id: I5d1df39b8f49641a3a9a8fe9187049a590d820ed
essageAttachmentBar.java
00a2afcd35637c7dda692ad0c44111428ca865a3 08-Feb-2014 Venkat <svreddy@google.com> Adjusting spam warning banner as per the mock.

Change-Id: I86d673cb2b08fb40c3eb715ec3b92de4f7357fb5

Conflicts:
res/values/dimen.xml
pamWarningView.java
228c248ca2107490bdf86b1703016688a71eff15 13-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Merge "Hide inline attachments in compose. b/12553195." into ub-mail-master
77f4af1767a61b50558200b94597d3682e4bc1e9 12-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Set visibility for "view image" properly.

Fixes b/12568123.

Change-Id: Idf008ff88cc41d8e14826346b0ee6ce5d8ed559f
ebViewContextMenu.java
865ae9ca2606d901ce33259bae5cfe71beaa18ba 11-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Hide inline attachments in compose. b/12553195.

Just hides the attachments visually. They still
exist and are counted against the max attachments
size.

Change-Id: Ia8c026fa083c3a95b7bc22b1564349d455f0030a
essageFooterView.java
2160d53e6ae0bfb797569d616e735e46c21522ff 11-Feb-2014 Andy Huang <ath@google.com> fix text sizing inaccuracy from 980px switch

The side margin was in CSS px, but goalWidth was in dp. This caused the
goalWidth to be smaller than it should, which caused scrollWidth to be
smaller, which caused each message's zoom factor to be larger, which
caused text to be larger than it used to be.

Now. goalWidth and documentWidth both have body margins accounted for in
the proper units.

Bug: 12579959
Change-Id: Ice36b48f381cf3171b092ba27152aa56b64f4100
onversationWebView.java
4dc732387454eef3ee6d89f9fa393630eb6213f9 05-Feb-2014 Andy Huang <ath@google.com> Render conversations to 980px viewport

Expand all conversations to 980px width to allow double-tap to continue
to work on newer Chromium builds. See
https://codereview.chromium.org/18850005.

cool side effects
* much more usable double-tap zoom factor on KK+ (now "it just works")
* better text rendering fidelity in complex layouts (text no longer
escapes bounds as it tended to do before)
* fixes text sizing edge cases where text was unexpectedly large and/or
line heights messed with text rendering

Initially enable these changes on both JB- and KK+ WebViews. Disable
NARROW_COLUMNS layout on JB- to prevent very short columns.
pros on JB-: better rendering fidelity like on KK+, consistency with KK+
cons on JB-: some power users will miss pinch-then-double-tap-to-reflow
functionality

Possible future improvement: use device-width viewport when full convo
fits to inherit Chromium's new fast-click-handling behavior.

Bug: 12579959
Bug: 10695551
Change-Id: I13f85a6df909a966fcd0862e5bd292ec6ae77212
onversationWebView.java
e7ac3c2aae204147a02e0e4217da3be15e8e7f54 07-Feb-2014 Venkat <svreddy@google.com> Merge "Update Spam Warning View." into ub-mail-master
68d9594842dc05426c5baaa3c1dd64f23e0d4b2c 07-Feb-2014 Venkat <svreddy@google.com> Update Spam Warning View.

Change-Id: I13632cda3b3feecc144ab313d2d2254419af9a98
pamWarningView.java
3b59b333ad0693f74f9a8cfb24a468a8acbaca8c 10-Jan-2014 James Lemieux <jplemieux@google.com> Mail in Sent, Drafts and Outbox should show addressees, not sender.

b/10847599

This is the second attempt at fixing this bug. The strategy has changed entirely to accommodate
GMail as well as reuse formatting rules that squish the list of conversation participants into an
abbreviated line for display in conversation lists.

ConversationInfo used to include a List<MessageInfo> which was used to answer questions about
which senders had read which messages in the thread. This has been removed and replaced with a
List<ParticipantInfo>. The backend should populate that list with appropriate conversation
participants (e.g. recipients of the last message in the case of Sent, Drafts or Outbox; senders
for all other mailbox types)

Change-Id: I834223c55296bcd2509fdf544634c155594739b0
onversationItemView.java
onversationItemViewModel.java
endersView.java
773f2e6e6994f38bf7d2679f2412d2f14f22c424 05-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Use MergedAdapter in FolderListFragment.

Instead of using one adapter that contained the accounts
and the folders, the adapter now contains two sub-adapters,
and AccountsAdapter and a FolderAdapter. Functionality
should be unchanged.

Change-Id: I18c945cdcf9519549ab3c2886be033b398af086c
ergedAdapter.java
ultiAdapterSpinner.java
2a757d7b27ff54e49307316c8a993100a99fd527 04-Feb-2014 Andrew Sapperstein <asapperstein@google.com> Fix Email crash on rotation. b/12885310.

Change-Id: Id4eae8d284f60f75420d2907918621d3602f91e9
essageFooterView.java
essageHeaderView.java
e2c36b0565d19806fe941496299b3a4f3fca4295 04-Feb-2014 Scott Kennedy <skennedy@google.com> Fix a NPE

Change-Id: I0d6f5771f8879644b4ed4b6e31995f1150ca930f
essageHeaderView.java
c00709ba11f83afa950832c18a0261d6e77ee668 31-Jan-2014 Tony Mantler <nicoya@google.com> Line length

Change-Id: Ic5cac9f5410bf76fbc50329d6f1eaaf5b7c010c6
essageHeaderView.java
f55d4c8f31c0dafd0b16cba94e2ecd29d003864c 31-Jan-2014 Tony Mantler <nicoya@google.com> Null check adapter before grabbing bidi formatter

b/12807578

Change-Id: I0c3d9b4cfc312f517fb2da10cc5220139d69052f
essageHeaderView.java
2fd167d6131482da984768b5ee75cefa32ed3e32 28-Jan-2014 Andrew Sapperstein <asapperstein@google.com> RTL - conversation view fixes.

b/12681840 - Properly align attachment details.
b/12681242 - Message header expanded details are locale aligned.
b/12681528 - Message header title and snippet are locale aligned.
b/11989230 - Set each overlay view's layout direction.

The first three bugs were fixed by adding unicode wrapping
to a bunch of fields.

The final bug was slightly more complex. In some scenarios,
the overlay views's layout direction was not properly resolved.
But it should always be the same as its parent so we forcibly
do it now when adding new views.

Change-Id: I9e065e0deaf1958ee87d098231238f6d976e9e68
onversationContainer.java
onversationViewAdapter.java
onversationViewHeader.java
essageAttachmentBar.java
essageFooterView.java
essageHeaderView.java
1801b32a2977ca97ca194a3c9e9633b03e5496a4 23-Jan-2014 Andrew Sapperstein <asapperstein@google.com> Unicode wrap subject and snippet in convo list.

Fixes b/5987892.

Change-Id: Iaff34c3ca725dd3023a53ba30b916db6fa571232
onversationItemView.java
be0cb1e421831672f49c30ecb46e6eee765cb661 16-Jan-2014 Andrew Sapperstein <asapperstein@google.com> Ad teaser redesign.

b/12243411.

Change-Id: I993b326bc36de8edf1f2f40202d8f32551de4d94
adgeSpan.java
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
onversationViewHeader.java
olderSpan.java
2c13cfa0c78263b9e3b4c6b0039dcd023a359fd6 17-Jan-2014 Andrew Sapperstein <asapperstein@google.com> Fix NoSuchMethodError crash. Fixes b/12591171.

Was calling TextUtils.getLayoutDirectionFromLocale
before API 17.

Change-Id: I14978c61f4947202990a500e8c4f711d22571af4
onversationViewHeader.java
a4296c179cd4eb12e7c4912d72c22dd2ec724a7e 11-Jan-2014 Andrew Sapperstein <asapperstein@google.com> RTL the conversation list and two pane layout.

Fixes:
b/12451886
b/12452546

Change-Id: If2bd3d63c07eda3190d16fd95746c0105b251406
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
onversationViewHeader.java
essageHeaderView.java
endersView.java
9a4f91281f4978c43f8f9801bae16ffa31959840 09-Jan-2014 Tony Mantler <nicoya@google.com> Merge "Deduplicate Address class" into ub-mail-master
821e578a71c7015646522e729600618f0ec16fc0 07-Jan-2014 Tony Mantler <nicoya@google.com> Deduplicate Address class

Change-Id: I4f6df51f5641475ffaf96b0189ccc00748880cc0
onversationItemView.java
onversationViewAdapter.java
mlMessageViewFragment.java
essageHeaderView.java
endersView.java
napHeader.java
pamWarningView.java
50554de30bfe85befac6edf5376b600eb3a1f462 08-Jan-2014 Martin Hibdon <mhibdon@google.com> Implement snappy headers for email

Change-Id: I3bc066f573f217ac1767d46fdf9f68a6b946eb36
essageScrollView.java
55820dbe438d6c6a8ac1efaf23e3af20a6dd5020 08-Jan-2014 Andrew Sapperstein <asapperstein@google.com> Merge "View inline images in photo viewer. b/5555553." into ub-mail-master
9261dd632bf81395e967b15bb1c71d0bb0df6b0e 08-Jan-2014 Andrew Sapperstein <asapperstein@google.com> Fix MessageHeaderView NPEs. Fixes b/12439154.

Eml viewer will leave some fields empty that MessageHeaderView
previously choked on. Now that's no longer true.

Change-Id: Icf83f134ee9ccc781a32006c7c4ac3832580df2a
essageHeaderView.java
8ec43e877a9c1925514f066655984e21fbd255e8 18-Dec-2013 Andrew Sapperstein <asapperstein@google.com> View inline images in photo viewer. b/5555553.

Uses the existing javascript image src rewriting
step to build a mapping of urls to message ids.

This mapping is passed into the InlineAttachmentViewIntentBuilder
so that it can use this information along with the
conversation id and account name to build attachment
and attachment list uris so that a photo viewer open
intent can be created.

Additionally, SecureConversationViewController will need a different
mechanism for this UI to work in Email/the eml viewer.

Change-Id: If14800348fe2191d0633bf768b8cb4e9746f6578
mlMessageViewFragment.java
nlineAttachmentViewIntentBuilder.java
nlineAttachmentViewIntentBuilderCreator.java
nlineAttachmentViewIntentBuilderCreatorHolder.java
ebViewContextMenu.java
bb6f0504c1607c89d9a3dd3e6023f36d61837016 31-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Prevent flickering. Fixes b/10994303.

The problem was that we were calling positionOverlays
from onScrollChanged in WebView which is called during
draw. Since positionOverlays adds views, this is broken.
Two manifestations of it were flickering message headers
during flings and flickering of the drop shadow for the
snap header.

To fix the flickering (which was really not drawing for
a frame), we have slightly changed the recycling behavior
of ConversationContainer. Instead of adding and removing
views, we just move them offscreen (where they're no
longer drawn) until they're needed again. If we don't
have a recycled view, we will still add the views
(via a post) but we don't ever remove when a view is
scrolled off anymore.

Additionally, we stop overriding dispatchDraw to forcibly
draw the topmost overlay. This resulted in flickering of the
snap header gradient because it would be drawn sometimes twice
and sometimes once. We no longer need to since we don't
add or remove views during draw anymore.

Change-Id: I937a4cc67f04ed005439c1fab2103287a986148d
onversationContainer.java
onversationWebView.java
crollIndicatorsView.java
crollNotifier.java
d1617bc7560d04659c61548d5e234c8539e4431c 16-Dec-2013 Tony Mantler <nicoya@google.com> Convert EmlMessageLoader to use MailAsyncTaskLoader

Also tidy warnings.

Change-Id: I96a865750d5ef05876fc051ee8f0f342b44db138
mlMessageLoader.java
f83cbac2922104f7ec2dd8f56f88b4aabe1ca545 13-Dec-2013 Tony Mantler <nicoya@google.com> Merge "Convert FolderSelectionDialog to a DialogFragment" into ub-mail-master
2a4be2459962700e1a38ba897de5d2f5913412f5 12-Dec-2013 Tony Mantler <nicoya@google.com> Convert FolderSelectionDialog to a DialogFragment

Also clean it up to use loaders

b/11538664

Change-Id: I5810f0c4423c0c30d9785723672b3535eebcf998
electedConversationsActionMenu.java
e307785b44deec1eb2aad5ecf83ea4b581779baa 12-Dec-2013 Andrew Sapperstein <asapperstein@google.com> Hide inline attachments from message footer.

b/5555553.
Now skips all attachments with type != STANDARD
in conversation view display. Also fixes
b/11559781.

Change-Id: I232e2d59e0605d3ab52ac382b2b96d85c72d4ad8
essageFooterView.java
ebViewContextMenu.java
b7eac4739e2180b68d5d428438393581a3b5cfa7 07-Dec-2013 Martin Hibdon <mhibdon@google.com> Update date format

This is according to the new android date format rules.

Change-Id: I3d6ca4579ddd3ecb63a6f67e88fb00545fe0ffaa
onversationViewAdapter.java
essageHeaderView.java
9b09cec94c9e6b56949f5b32238602ee7ed1e2c0 09-Dec-2013 Tony Mantler <nicoya@google.com> Merge "ConversationInfo is now always populated" into ub-mail-master
edd6c1a2807d2ade930dfd4622707298dc470d64 08-Oct-2013 Tony Mantler <nicoya@google.com> ConversationInfo is now always populated

Get rid of conditionals for when it isn't, and associated duplicated fields

b/11120430

Change-Id: I63d8ef5d190b9a4d42e3029bb4a45004b5543de5
onversationItemView.java
onversationItemViewModel.java
endersView.java
93405645e9b637c89e1d2d3be4fe507179c4a854 04-Dec-2013 Andrew Sapperstein <asapperstein@google.com> Shift label spaces to right of labels in RTL mode.

Fixes one part of b/11971620. Previously, when leaving
space before the label (so that multiple labels would
have a gap between them), we would always assume before
meant to the left of the label. Now, we check if we're in
RTL and if so, draw the space to the right of the label.
This has the noticeable effect of not having a gap between
the left edge of the header and the left edge of the first
label when in RTL mode.

There's still a bug in ConversationViewHeader where the
layout direction of the view is getting resolved to LTR
even when in RTL mode. Need to do more investigation.

Change-Id: Ic3a62a0678c905fe18aaf165bc7b1bb3d7631f4e
onversationViewHeader.java
olderSpan.java
riorityIndicatorSpan.java
25a8a76fab08f862d7ba78b66b841a3aec58cb8d 26-Nov-2013 Andrew Sapperstein <asapperstein@google.com> Delete dead code. b/11708307.

Change-Id: I82cca1daa5c3fae375e72f24c76b68e44517e0f5
onversationWebView.java
3034f4449c52e30d285303c6c251b8ba24170fc7 26-Nov-2013 Andrew Sapperstein <asapperstein@google.com> Show message details inline, not in popup.

Fixes b/11576631. Code deletion CL is best CL.

Change-Id: I22b10b7078a4a8ae89fa3e7667d5dae191ad6f5f
essageHeaderDetailsDialogFragment.java
essageHeaderView.java
e6c9fb6835247d98898e2af581ad9449ad7f3184 15-Nov-2013 Andy Huang <ath@google.com> misc analytics

* lots of new menu items
* log auto-advance setting
* log message header taps
* log photo-viewer menu items
* log conversation views (including enclosing label, synced state,
message count)
* log folder views (including bucketed total counts)
* log pager swipes (including folder type)

Bug: 11253673
Change-Id: Iffdcbf19b202fbb3b6b33e0f7f0e9e4c24fa948d
essageHeaderView.java
0423e2fcde33668e238d550594ebc17853d52a68 06-Nov-2013 Alon Albert <aalbert@google.com> Fix build

ur11 already has getNotificationUri()


Change-Id: Iffb22e2542470c28e30b41b7a619efa736a00822
onversationCursor.java
ea4b10af8cb96db95fa35d6c70bf4588ca044567 06-Nov-2013 Alon Albert <aalbert@google.com> am 2a8a3d85: Merge "Implement Cursor.getNotificationUri" into jb-ub-mail-ur10

* commit '2a8a3d85d9b199492611e009f370d0fc9d81c88f':
Implement Cursor.getNotificationUri
d114baceac4106d19de6818492e076470c7938b9 05-Nov-2013 Alon Albert <aalbert@google.com> Implement Cursor.getNotificationUri

Due to SDK Version 19

Bug: 11533662
Change-Id: I9237c593d4231cd8319c4e64f4a4e4c5fb16176b
onversationCursor.java
b08a9156561bb0e469ad64b70432ed916d81a07b 30-Oct-2013 Alice Yang <alice@google.com> Merge "Use server prefs for show images setting" into jb-ub-mail-ur11
f323c046034b4658a80438575d8e9f01d92e57e6 30-Oct-2013 Alice Yang <alice@google.com> Use server prefs for show images setting

- Change setting from a checkbox to list pref (popup)
- Use synced preference "bx_eid" for whether to always show images setting,
in order for UnifiedEmail to read this pref, it's added to the account's
Setting field
- Dismissing the teaser now sets "bx_eidps" pref which gets synced to
the server (once server changes are in)

Bug 11158252

Change-Id: Ibd28690ccd95e0bdd399aaad9c9e205968a0ef39
essageHeaderView.java
234d35352eeaaa8d3928e31028be49112607bd29 29-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Use activity instead of context for printing.

Fixes b/11432054.

Change-Id: I0a56b4498d8e4f1231436b9965c91246c730717e
mlMessageViewFragment.java
a467d40eeb9c598fc6d7cb2dbafa2a331292d23e 16-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Clean up SnapHeader interface & remove ad border.

b/11132059

Change-Id: I509263f27fe904353cd608989c173510a2ef1462
onversationContainer.java
onversationViewAdapter.java
essageHeaderView.java
napHeader.java
napHeaderView.java
85ea6188b3c62ede2eb0427379f050717f79562c 15-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Abstracted out snap headers for ads UI refresh.

b/11132059
Rather than directly including the snap header
in conversation_view, we inflate it at runtime
via an override-able method in ConversationViewFragment.

Change-Id: Icaec39f6461313a894eef5506448b3f7513df044
onversationContainer.java
essageHeaderView.java
napHeaderView.java
62297d85d9e8539a25d03cb4373e4c3e870b26fe 11-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Show "(no subject)" in conversation view header.

Fixes b/10299458.

Change-Id: I3fe3a610e7c40cef3c0597c8458bbd21da8ccd7f
onversationViewHeader.java
562c5ba7235948cf1d20a9afa40e67cd62f43cf7 10-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Print single message and offscreen webview.

b/10712542.
Also supports Eml printing and secure printing (though
that's email only and has some buggy rendering).
Also fixes the no subject crash. b/11136365

Change-Id: Ie5f6e7d7e1762c115df3169b6e62dc439545f08c
mlMessageViewFragment.java
mlViewerActivity.java
essageHeaderView.java
6293ef09d934e191148279a72036f927366f82f0 08-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Printing: support tablet message header overflow.

b/10712542
Adds new behavior for v19 devices, both phone and tablet.
On phone, new printing option in MessageHeaderView overflow menu.
On tablet, new printing option in same place but since we now
have an overflow, we use the reply/reply all setting to show
only one of reply/reply all on tablet as well.

As a result, we also changed the string for that setting for
v19 tablets.

Change-Id: I71db88ce4a50479b03775b9d50d65e3626231589
essageHeaderView.java
da5c69660cf74d9518907398c4698ad1a3857dcc 09-Oct-2013 Mark Wei <markwei@google.com> Merge "Remove from Observers list to avoid leaking memory." into jb-ub-mail-ur11
f4ff7675cbc23c56b9b35f9f26574afef030f0af 09-Oct-2013 Mark Wei <markwei@google.com> Remove from Observers list to avoid leaking memory.

Bug: 11032096
Change-Id: Ib20cc1385c080994d7a69d4e38f93306e7a82515
onversationItemView.java
e8221483ce5f013f02a4ef63d6682cc36313cda7 03-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Show images by default. b/11044804.

Needs final UX on preference placement
and strings but otherwise, it works on Gmail.
It's off and the setting is hidden in Email.
Currently a checkbox preference.

Change-Id: I97ce4361e9093e5ce7b3300205cba8f58e27b3d6
onversationAccountController.java
mlViewerActivity.java
essageHeaderView.java
07005a9831a20d28ce23417803689ab8c157ed67 01-Oct-2013 Andrew Sapperstein <asapperstein@google.com> Removed Mimetype.isBlocked and all usages.

Fixes b/11016967.

Change-Id: Ic85b89c3c82a39c511cedb0f938ed9286a1470af
essageAttachmentBar.java
0e3474ea7e1449990edba4d2bb3b8dbfdb43b173 27-Sep-2013 Andrew Sapperstein <asapperstein@google.com> am 9f913efc: Merge "Fix eml crash. b/10945826." into jb-ub-mail-ur10

* commit '9f913efc3af44bc3c3a1f2b78ea4d1b5dd5f749c':
Fix eml crash. b/10945826.
9f913efc3af44bc3c3a1f2b78ea4d1b5dd5f749c 27-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Fix eml crash. b/10945826." into jb-ub-mail-ur10
69cf9b01cb53bff82cccbe125cf847fbdcfc0848 26-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Initial printing support." into jb-ub-mail-ur11
1623b9aa3273068b8acc5438547f1619590d2b6b 26-Sep-2013 Tony Mantler <nicoya@google.com> am 53b34250: Don\'t show label-specific actions for non-gmail accounts

* commit '53b34250c0029ac3dae4c72822f79d9fad85caa4':
Don't show label-specific actions for non-gmail accounts
459e2e7829cc53c911cc9c153e08a5deed7c1b97 26-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Fix eml crash. b/10945826.

Change-Id: I0acdaaa61b602e4ece2422fa3b6bdf253a0d8a46
mlMessageViewFragment.java
53b34250c0029ac3dae4c72822f79d9fad85caa4 26-Sep-2013 Tony Mantler <nicoya@google.com> Don't show label-specific actions for non-gmail accounts

b/10903244

Change-Id: Iec6b900431ca6aa4c1a022c06c49920bc46067f4
electedConversationsActionMenu.java
5c1692a5faeab220881a17a3427a8986ef874403 16-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Initial printing support.

Needs mocks and redlines and such.
b/10712542

TODO:
Logos for Email and Gmail.
Attachment support.
Use offscreen webview.
Secure conversation view support.

Change-Id: Iec37a9a46e506ccf12fbbb775c1b47b08a0d9724
mlMessageViewFragment.java
essageCursor.java
essageHeaderDetailsDialogFragment.java
essageHeaderView.java
ae3a5e05f5e02a5399f0d764f69c466ee35dad8b 24-Sep-2013 Martin Hibdon <mhibdon@google.com> am ffc9c39a: Merge "Improve display of attachments in pop" into jb-ub-mail-ur10

* commit 'ffc9c39a97ee3ea84e11e31a92eb4ef7cb619220':
Improve display of attachments in pop
ffc9c39a97ee3ea84e11e31a92eb4ef7cb619220 24-Sep-2013 Martin Hibdon <mhibdon@google.com> Merge "Improve display of attachments in pop" into jb-ub-mail-ur10
519c218db6109003ca72a35ffe276ed69b0230a4 21-Sep-2013 Martin Hibdon <mhibdon@google.com> Improve display of attachments in pop

b/10714298
Prior to this CL, attachments that had not yet
been downloaded for POP would appear as "text/plain",
regardless of what type they really were. Also, the
filename displayed about always be a non localized
string like "click here to download".
Now, attachments in this state are flagged as dummy
attachments, so when we display them, we display a
localized instruction for how to download, and hide
the mime type (because we don't yet know it.)
Also, when we download, we will not automatically
try to launch a viewer for these kinds of attachments.
We'll just download them, and replace the old dummy
attachment with a valid one.
There is still a bug that even though the dummy
attachment has been removed from the database, we
still display that tile until the user leaves and
reenters the screen. That's ugly but not so broken
as it was before.

Change-Id: I1021baae659ca2d9ee2909f78b414c271d8ca90b
ttachmentActionHandler.java
essageAttachmentBar.java
ef1a6c894ab7060921bb4095988094775247b3e9 24-Sep-2013 Scott Kennedy <skennedy@google.com> Allow tapping ad icon on N10 portrait

The star button was intercepting the click.

Bug: 10731863
Change-Id: Ia62f9936abe910dc85b73dbc196901554567d229
onversationItemView.java
6af70772b2037d3527337f220fc053af73d4c81d 21-Sep-2013 Scott Kennedy <skennedy@google.com> resolved conflicts for merge of 4df54f8f to jb-ub-mail-ur11

Change-Id: I7d3e7edab211f7b713d75b2b020c746bcdf87d1a
f1566b1e77e9d7ac66ebb47897b5c652e2b18943 20-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Fix crash when opening ad teaser.

Also improves debug dumping of html content
to allow overriding of file path.

Change-Id: If5b85da5e9f444c72fe2c0a78e52bc852dec6768
onversationItemView.java
0e8dc84326ad3e6d146a203538665f98dd98f688 10-Sep-2013 Scott Kennedy <skennedy@google.com> Hierarchical folders in conversation list

Use something similar to the sectioned inbox teaser.

Allow expanding/collapsing when there are too many folders.

Bug: 9604590
Change-Id: I6cc79bd7c033bbf13c750e7720fe71227b38cc85
onversationItemView.java
903dc5be259cb0be30d7769886d5ae863ca1a15a 19-Sep-2013 Andrew Sapperstein <asapperstein@google.com> am 708da729: Merge "Separate RTL margins and paddings into ldrtl." into jb-ub-mail-ur10

* commit '708da72918ca9786cd7d1a43950791007de78be8':
Separate RTL margins and paddings into ldrtl.
708da72918ca9786cd7d1a43950791007de78be8 19-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Separate RTL margins and paddings into ldrtl." into jb-ub-mail-ur10
ca4f947523e19ef8e658ead0bf5f70b45b64e9da 19-Sep-2013 Andrew Sapperstein <asapperstein@google.com> Separate RTL margins and paddings into ldrtl.

b/10751781

Change-Id: Ibc6d795c2899802eefb199f32081adc0a0b53e68
onversationViewHeader.java
6ce22d95c85d766b7ae11c00bd907a351bd38dac 19-Sep-2013 Tony Mantler <nicoya@google.com> am 3f2069e6: Merge "Show the conversation list footer in spinny mode when the cursor is null" into jb-ub-mail-ur10

* commit '3f2069e6d21827efaa5f6d16ca0a8630c2a7b8e1':
Show the conversation list footer in spinny mode when the cursor is null
8f28e11e791662148e4729e9e58993e437550ec0 18-Sep-2013 Tony Mantler <nicoya@google.com> Show the conversation list footer in spinny mode when the cursor is null

b/9177086

Change-Id: I625af980fd7aee03950e28086e8455627be6a8da
onversationListFooterView.java
e8b77589e54ec73a8464e40111c3b7a503251cf0 13-Sep-2013 Mark Wei <markwei@google.com> resolved conflicts for merge of 440f4ba3 to jb-ub-mail-ur11

Conflicts:
src/com/android/mail/browse/ConversationItemView.java
src/com/android/mail/preferences/MailPrefs.java

Change-Id: I34c01c69b54ca46cfe026b6e2927330a82091fba
5e43c93578fba021060f1974a5e594a23e3c90a7 13-Sep-2013 Mark Wei <markwei@google.com> Merge "Use Drawables for senders image. Less animation jank, less GC jank, less memory." into jb-ub-mail-ur11
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
onversationItemView.java
wipeableConversationItemView.java
440f4ba393696ebd3b5ee777d43dc6df1e6c0c42 13-Sep-2013 Alice Yang <alice@google.com> Disable attachment previews

Change-Id: Ie1b075a22b6a62f710f98aafdce4b8933fd5480e
onversationItemView.java
3d5ea425bce684d8fdd0a51f055025a663f3dc2e 12-Sep-2013 Alice Yang <alice@google.com> Disable features for Svelte

Disable following features for svelte (low memory devices):
- Sender images in conversation list always off and hidden in settings
- Attachment previews in conversation list always off and hidden in settings
- Auto-download attachments over wifi default to false, but still show in settings
- Conversation cursor precaching

Bug 10708266, 9325806, 9325758

Change-Id: I9d6ed9414467041f77c2895de7a71040b9a8b32a
onversationCursor.java
51debf6562400a533ad9b0a5e56d9f60d0d3b9e3 10-Sep-2013 Tony Mantler <nicoya@google.com> am ec5b82ac: Fix string comparison to use .equals()

* commit 'ec5b82ac3fc8f914fa1efdeff36ea3dc4e55b3e3':
Fix string comparison to use .equals()
ec5b82ac3fc8f914fa1efdeff36ea3dc4e55b3e3 10-Sep-2013 Tony Mantler <nicoya@google.com> Fix string comparison to use .equals()

Change-Id: I4b0fddd06c74f9803f85f3bff019d48e1e1e4695
onversationCursor.java
f9dda1ee9be4db8b2bc4dad25230bdbff1df147b 04-Sep-2013 Scott Kennedy <skennedy@google.com> am e623fa22: Merge "Preserve advertiser name" into jb-ub-mail-ur10

* commit 'e623fa221d73a5337b2fb38f1bb501ee8a3f4b10':
Preserve advertiser name
3b2039afbcd8465ab829ecda8a5b207e988e773c 03-Sep-2013 Scott Kennedy <skennedy@google.com> Preserve advertiser name

We were previously parsing the name as an email address, which
caused problems with certain non-alphanumeric characters.

Bug: 10605932
Change-Id: I1ea17096950f50b68e44cc1c976b69c4060b46e4
onversationItemView.java
onversationItemViewModel.java
0374e8d14c872eecad55b8d642776ed725b16c35 30-Aug-2013 Andrew Sapperstein <asapperstein@google.com> am 31b828da: Show date in expanded header. b/10564577.

* commit '31b828da09beb6ef3d8ffaf4a72bf80dc4030b62':
Show date in expanded header. b/10564577.
31b828da09beb6ef3d8ffaf4a72bf80dc4030b62 30-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Show date in expanded header. b/10564577.

Change-Id: I8d59f361be68a0e7beda1584d1fd4bcdb6387959
essageHeaderDetailsDialogFragment.java
essageHeaderView.java
0736e4df51d425da9dbf65abbeef34d233f90b3b 30-Aug-2013 Andrew Sapperstein <asapperstein@google.com> am a3e81d1e: Merge "Fix infinite resizing by using RigidWebView." into jb-ub-mail-ur10

* commit 'a3e81d1e830bda0f5d0fe22ccec66a15580f647b':
Fix infinite resizing by using RigidWebView.
e45fd11ab9d362fbe3e47a7f62b77c498ee3c2ca 30-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Fix infinite resizing by using RigidWebView.

Ported some code from Email1 to fix the problem
where using wrap_content with zoom causes certain
html to expand infinitely. Fixes b/10542802.

Also turned off overscroll glow for the webview
since the scrollview already handles it for us.

Change-Id: I0ffd2b5475deab2c077cb377644fd56fa2755994
essageWebView.java
be0db57e5b42a8d7d160a3402da03be350375712 29-Aug-2013 Andrew Sapperstein <asapperstein@google.com> am 2862cba0: Add white background to message details header.

* commit '2862cba002c7805a8f8e28146c6d5504831dcec7':
Add white background to message details header.
2862cba002c7805a8f8e28146c6d5504831dcec7 29-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Add white background to message details header.

I want to revert this change.

Change-Id: I0153e7851908b183aa68b95aad23e7aa584c3aa2
essageHeaderView.java
28574c29f0714be98cf5304be35c145f51802068 29-Aug-2013 Alice Yang <alice@google.com> Merge "Fix build." into jb-ub-mail-ur11
adf9fcb5239d9194d52b5a4a554b6679cb2b31f5 29-Aug-2013 Alice Yang <alice@google.com> Fix build.

A new getNotificationUri() method was added to Cursor.java in KLP.

Change-Id: Ic9a2ad14da9111bc729ccc118a7c30d8649f6991
onversationCursor.java
e79eaca46a53e1d8d4aeef47e918f320469db46d 29-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Add another new view type. b/10488449.

Change-Id: I5ea813731e147643b2b4fb0611c6d90a58a8e822
onversationViewAdapter.java
98f6e228e0522d9e30d2043a73ae31f78fc52e62 29-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Add new view type. b/10488449.

Change-Id: I2049d3386e5920feb33aee9a9b967e1894c22712
onversationViewAdapter.java
a2640038ffe8a17fb435b0007ba4ca9ff14d00bd 28-Aug-2013 Scott Kennedy <skennedy@google.com> Temporarily handle a NPE

The real problem will be diagnosed for the next release.

Bug: 9527863
Change-Id: Ib38d833e6dac6702af41030d70fc3903289547c5
onversationItemView.java
83b460bf42d48bd8ab18ee135fab181242d13b9a 24-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Fix b/10456377.

Use WebView.getContentHeight() to compute the
additional bottom border rather than the container's
height which never actually expands.

Change-Id: Ifad68a93043ec50e75720bc53e57d830cd2abdf9
onversationContainer.java
cef97ff7118b0a30cff842129300e0633d220043 22-Aug-2013 Andy Huang <ath@google.com> avoid constructing inner URIs in common cases

Bug: 10442911
Change-Id: I15d73b54181dafee98dd5aa503822b4230089402
onversationCursor.java
1591414ed6dc829852edd219c39ae430314ff538 22-Aug-2013 Scott Kennedy <skennedy@google.com> Add the right edge line to all teasers on tablets

Bug: 9177552
Change-Id: I5270a0ae2196e9a6f732ed6d3327ffe3d30f34be
onversationItemView.java
68141df2d855af6520a19ff9127f69463d49c3de 20-Aug-2013 Andrew Sapperstein <asapperstein@google.com> New caret for tablet.

Not to be confused with a carrot, carat, or karat.

Change-Id: I3748d295a8599ffcb528bdfc1d376d3fc3b64396
onversationItemView.java
6628421ea48a56a4f09e60dae0eb66c045c76df7 22-Aug-2013 Scott Kennedy <skennedy@google.com> Merge "Use the same key for put and get" into jb-ub-mail-ur10
b26f5c755741b83417ddf302f2d0dee7d39c1b74 22-Aug-2013 Scott Kennedy <skennedy@google.com> Use the same key for put and get

We were using different keys for adding cached values then for using
those values to update conversations, so local changes were never
being applied.

Bug: 10391532
Change-Id: I285b002719851d3bcef6c5209c4510e783e7394c
onversationCursor.java
968e014c857439de821cf2590ec6aa44363352d0 22-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Rebind MessageHeaderView if on-screen.

Fixes b/10413376. Previously, if the MessageHeaderView
was on screen while its snap header was tapped (to collapse it),
it would not be updated with its new state (since they were two
separate views). The rebind takes care of this.

Change-Id: I5a24338b52e1d0f220a02f8e1ebc92b53814d16c
onversationOverlayItem.java
onversationViewAdapter.java
essageHeaderView.java
e6bd10e6e81095924eeaf36ba1ffc4d116fdb9c3 21-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Remove PagerTitleStrip from conversation view." into jb-ub-mail-ur10
57ef565892603fdcadf8aca190c790387f1d425d 21-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Remove PagerTitleStrip from conversation view.

Commence the complaints. Fixes b/10209250.

Change-Id: I111881d9d02be42be9cd8ffc6be172454f33b226
onversationPagerAdapter.java
8c843a7610fed6ecd8e4e6d9f43c4eea2a7ff3a1 21-Aug-2013 Scott Kennedy <skennedy@google.com> Stop animating checkboxes when we bind a new conversation

Bug: 10413176
Change-Id: I537e770fa5c920e859728778e4fd0af42c98d6c8
onversationItemView.java
e0d01fb7379225a0f058999d9da9050f2fcc6945 20-Aug-2013 Scott Kennedy <skennedy@google.com> Show the selected state on an ad on two pane

Also show the selected caret

Bug: 10212376
Change-Id: I075b2aebfbe869c658108f7d36109ad70402b4c7
onversationItemView.java
50ccd9d6c685cc6fd5efa65d7d641cfde1798ce3 20-Aug-2013 Scott Kennedy <skennedy@google.com> Merge "Fix some remaining ad teaser issues" into jb-ub-mail-ur10
cc139833bc5829ba70244519e9870de783c41848 20-Aug-2013 Scott Kennedy <skennedy@google.com> Fix some remaining ad teaser issues

1. Disable interaction while in CAB mode

Bug: 10212376
Change-Id: I2206ef4336bc9a2538c236479df837caa5724e8c
electedConversationsActionMenu.java
978ed3bb6127784bcb833b5222385b1ddd156a9f 20-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Remove presence from conversation view.

Fixes b/9892710 by removing presence indicators.
Huzzah.

Change-Id: I9f6ae5254ab624eeb9ffcb61ad7d47c5649d66e6
essageHeaderView.java
e5a5777568b59bfac9dbccad7fd3f05071a6465c 19-Aug-2013 Andy Huang <ath@google.com> Merge "metrics for attachments" into jb-ub-mail-ur10
e003b4cc4a23e6d394998bebe26430a361c5ac29 16-Aug-2013 Andy Huang <ath@google.com> metrics for attachments

Improve folder-switch logging with detailed data for system folders.
Also prevent exits from a blank compose from triggering a log event.

Bug: 9861033
Change-Id: Ie75323fe3704d3010acd864c6d7c646ebd7708b5
essageAttachmentBar.java
essageAttachmentTile.java
ce03eaa2663f543bbd49819515a5835dfb4ea77e 17-Aug-2013 Alice Yang <alice@google.com> Disable "Looks good/bad"

Change-Id: I031c7eef0525ff8b4442b863c5dacbe6f7d13f61
essageHeaderView.java
2b55549d4fbe25e91f673a0727fc89ff755d9327 15-Aug-2013 Andy Huang <ath@google.com> move ad analytics to gmail

Bug: 9861033
Change-Id: I30bbf5ea7b9e2a2a03588263be1afc9909e16729
electedConversationsActionMenu.java
042a530b2296487fa5899a3e871214ac4a47e3d8 13-Aug-2013 Andy Huang <ath@google.com> more metrics

Reorg category/action/label to be more economical. This gives us an
extra slot for data vs. spending on custom dimensions in the future.

Log CAB actions, some settings state, drawer toggles, CAB mode start,
swipe dismiss, and peek.

Bug: 9861033
Change-Id: I16b30356db70f60ed87749f29ddd667790acbb07
onversationItemView.java
electedConversationsActionMenu.java
f0ea4849bf7a2c11f99ca0b42307ae8ba665b1dc 14-Aug-2013 Paul Westbrook <pwestbro@google.com> Add public no-args constructors for fragments

Bug: 10311630
Change-Id: Ic7ba4783be34a9c3d185f6cbad3001f49b310aad
ttachmentProgressDialogFragment.java
onfirmDialogFragment.java
mlMessageViewFragment.java
essageHeaderDetailsDialogFragment.java
yncErrorDialogFragment.java
4b23dcad99603ec59734cb22cccebbbd3f4a4210 13-Aug-2013 Paul Westbrook <pwestbro@google.com> Fix another ISE

Bug: 10111582
Change-Id: Ic8e246c0ec71c010ac8eb95e2ae81333c47a24d1
mlMessageViewFragment.java
18a07a8ac67cdb7ad5834c7752c05b9148e3211f 10-Aug-2013 Mark Wei <markwei@google.com> Fix extra row spacing.

When there are no attachment previews and there are labels.

Bug: 10229604
Change-Id: Ie74b54191889c394bb95f266ccdbbb83aaa2db8d
onversationItemViewCoordinates.java
f27e08e98db1496610c9f216ef6eeb26c39c2da3 09-Aug-2013 Scott Kennedy <skennedy@google.com> Show our own avatar for drafts

Bug: 9762046
Change-Id: I627b459595c3ffeed3ee7fe28b4067140b980699
onversationItemView.java
e5707f86f340797d5ee1535bff86d331715cbce9 09-Aug-2013 Scott Kennedy <skennedy@google.com> Make some changes so the ad leave-behind can animate

First, rename INVISIBLE to something so we aren't hiding
View.INVISIBLE.

Second, create a static method for the fade-in animation of the text
so that the ad teaser can use the same code.

Third, modify CIV so that we don't need to be contained in a SCIV for
animations to work.

Change-Id: Ib89015529871bc2b7eba191dd88a4185948927ea
onversationItemView.java
ce9db80cf997f99b8c5d0ef8d22b074555aaf795 08-Aug-2013 Mark Wei <markwei@google.com> Fix attachments not downloading on 3g.

Add redownload menu item for photos so they can be retried if they ever get
stuck.

Change-Id: I0e3bd8014f81cf7e230e055f92d1442280307657
ttachmentActionHandler.java
essageAttachmentBar.java
383c095a73e8fd25def869c902b89c54f2445e24 08-Aug-2013 Mark Wei <markwei@google.com> Merge "Bust some jank." into jb-ub-mail-ur10
1aba32575a08da6cbad80af8446201d73c59783d 08-Aug-2013 Mark Wei <markwei@google.com> Bust some jank.

Avoid view inflation in coordinates constructor. 22ms -> 14ms.

Sleep background decode tasks sooner during fling. This avoids the 30ms GC alloc
that may occur when we create file descriptors and use them to decode bounds.

Bug: 10132860
Change-Id: I44bb731dde18efcc95e789f53247eca213d5804e
onversationItemViewCoordinates.java
022aeeffe491ed8c3deeaf7c0fc7570d57af12bb 07-Aug-2013 Scott Kennedy <skennedy@google.com> Minor change to support swipe to dismiss of ads

Change-Id: Ibe61c6ab069553044650253e7c27b77bb741abae
onversationItemView.java
aa76bdfae889b995395a7636742128b3585727f9 07-Aug-2013 Mark Wei <markwei@google.com> Add a setting for attachment previews.

Bug: 10131520
Change-Id: I861a3aa7a1131c1a089011aed7492a0e4ff1ebcc
onversationItemView.java
wipeableConversationItemView.java
c190b1ed6bbbc7ba091dda27fba343ffc92ccdf5 07-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Add new ViewMode." into jb-ub-mail-ur10
6c570db71b8adc43d7dc2f31e6fa63cf50c1426e 07-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Add new ViewMode.

Works in OnePaneController.
Need to wire up the buttons.

Change-Id: Ia9aa5e696cbba1d170038e47d4941cc6fcf0a967
electedConversationsActionMenu.java
955a766f6c9c30e06dcd504ebc4dd6db510c2fa6 07-Aug-2013 Scott Kennedy <skennedy@google.com> Fix some long-press/drag bugs related to ads

1. Do not allow dragging of an ad
2. If selection/drag mode cannot be entered, return false from
onItemLongClick(), so that we don't vibrate.

Change-Id: I8915213fa567f955268a73534fc4c5d45da1f4c4
onversationItemView.java
wipeableConversationItemView.java
oggleableItem.java
2214f44c56a45f08729c334ab59ad5c1cb032457 06-Aug-2013 Andy Huang <ath@google.com> improve senders display of the form "last, first <email>"

This doesn't exactly fix the root cause of spurious line-wrapping, but
it should reduce its incidence. We were displaying the <email> portion
of an address when the name contained a comma.

Turns out the Rfc822Tokenizer is built for comma-separated lists of
senders, with some logic to handle a sender which may itself have a
comma. Let's use that instead of TextUtils.split().

Bug: 9594770
Change-Id: I2812fb560b7395fb87f4215b211d5e824aa23083
endersView.java
152cbe4d3b6364aad92684c0c0238d1ee9320197 06-Aug-2013 Scott Kennedy <skennedy@google.com> Fix double flip while exiting CAB mode

Under certain circumstances, a checkbox might flip to a photo, then
flip again, because its animation finished while our "exiting CAB
mode" timer was running.

Bug: 10148310
Change-Id: I91695e4e6b2c3b1c2a82a7ae3ce23cb426bcc342
onversationItemView.java
121c8b877090e780b4a16d5a14507c3649e61d7f 05-Aug-2013 Andy Huang <ath@google.com> always confirm draft discard action

Bug: 10098652
Change-Id: I4984a38ef6c7d24f73a3a5e857108163f6bea1b7
electedConversationsActionMenu.java
ef6367d9ec71fc5022a06c4f87504637a010a0b7 05-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: Fake Bottom border.

Now using the actual bottom value of the final overlay
item to position the fake bottom border instead of the
speculative value coming from the web view.

Fixes b/10128257.

Change-Id: I4d67444c4b816f55229a16fd95c67228e2bea98a
onversationContainer.java
eb1274e1739a49b31b5ef30183e5ab9ceab804cc 03-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: Cards for SCVF." into jb-ub-mail-ur10
e7e2c0aa7b9dbb0c649aa5b430296b829f337dc5 03-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: Cards for SCVF.

SecureConversationViewController (and thus
SecureConversationViewFragment and EmlMessageFragment)
now have card-like UI.

Change-Id: Ia573809e1577280318bb90a897ef2c987856a551
orderView.java
d35dcd8d74d2cc95ccaf28a5bc28344fda309fc3 02-Aug-2013 Scott Kennedy <skennedy@google.com> Support clicking on the info icon of an ad

Change-Id: I3176bcd1a1da8f915a28ccecbc0a66d0b8fb6357
onversationItemView.java
670c280136f587688d41027ce1ff1596068a35e0 01-Aug-2013 Mark Wei <markwei@google.com> Fix nit 5. Do not decode in background thread if cache is not warm.

When the ReusableBitmap pool is initially empty, all decodes must construct new
ReusableBitmap objects, which often causes GCs that cause jank during scroll.
This prevents the jank by notifying the ReusableBitmap pool that a scroll is in
progress, which causes the pool to block on poll() if no ReusableBitmaps can be
returned.

Bug: 10083052
Change-Id: Iaf8b244617a05d4736df041e888c9140d182c3a3
onversationItemView.java
df9e82d13ab8c7b75c83a149930aa7eff4a5399c 02-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: bottom borders." into jb-ub-mail-ur10
aa27bc0e1c3bb6be4609b00007637a9d3e960f5e 02-Aug-2013 Scott Kennedy <skennedy@google.com> Fix more warnings

Change-Id: I78c6df845aae3475c1e2469b29b52cc995d8d3ae
onversationPagerController.java
mlViewerActivity.java
essageAttachmentTile.java
yncErrorDialogFragment.java
e2ea40f7a718ab372bc160de0a2798963b166ec2 02-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation UI Visual Refresh: border fixes." into jb-ub-mail-ur10
888388c1485fd8c694abacb638fb54273c5f411b 02-Aug-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: bottom borders.

Bottom borders now extend to the end of the screen.
There is one small temporary hack that I will fix for
real tomorrow where there's a difference of 2 pixels.
For now, we cheat since the extended border can bleed
into the real border by a few pixels with no real problem.

Change-Id: I1ccfbfe3fd1eca30be1c8eb5928649dd5f1a6619
orderView.java
onversationContainer.java
onversationViewAdapter.java
52a61db87c487fe5bb7cc673037887a6d35b0f0f 02-Aug-2013 Mark Wei <markwei@google.com> Fix nit 9. Add setting to change parallax speed and direction.

Change default speed to 2.0 multiplier.
Change default direction to normal (new) parallax. This looks like you are
looking through a window, at the attachment previews which exist in another
pane.

Bug: 10083052
Change-Id: I91f91ae57cda2da22cc5e3330f67982df454e7bc
onversationItemView.java
cee3c90574b48ccaa0f8b9f9341383c231ed41d2 31-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation UI Visual Refresh: border fixes.

Borders now expand and collapsed based upon the state
of the messages above and below them. Also fixed a bug
where replying to a message added an additional border.

Change-Id: Ia90caf4ea595767a90213fe33b29e1bd75c0aca0
orderView.java
onversationContainer.java
onversationOverlayItem.java
onversationViewAdapter.java
essageHeaderView.java
4503d8cd22fd866ba114d3f486b78bbbfa0c83dc 01-Aug-2013 Scott Kennedy <skennedy@google.com> Merge "Don't show ad image if sender images are disabled" into jb-ub-mail-ur10
2838681e487508af50e8d682728726c0722d00ec 01-Aug-2013 Scott Kennedy <skennedy@google.com> Merge "Clean up AdTeaserView" into jb-ub-mail-ur10
65b6d180f50922a3393795203cae68a5a2f6a33d 31-Jul-2013 Mark Wei <markwei@google.com> Fix attachment nit 4.

Add ContiguousFIFOAggregator to aggregate decode results and display them in the
correct order.

Bug: 10083052
Change-Id: I28b00fe44818f7882e44ef222d85d58ce111c7fe
onversationItemView.java
cc8ed8dca4080649c4fff3f6b0e3b35dbf0145f2 01-Aug-2013 Scott Kennedy <skennedy@google.com> Don't show ad image if sender images are disabled

Change-Id: Ic3902cebe75f2076a8fe81abf4641394c91015aa
onversationItemView.java
52b280a82df262f62632bd12bba84b4752f14634 31-Jul-2013 Scott Kennedy <skennedy@google.com> Clean up AdTeaserView

The info icon is now in the right place

Change-Id: I04d120b0940d4b92de174e9081ed24e2a9bd81a1
onversationItemView.java
onversationItemViewCoordinates.java
1b6fe5b1181ed3d0d0dde44baf5766db1e9c32e6 01-Aug-2013 Andy Huang <ath@google.com> fix 2x1 attachment grids not parallaxing

For 2x1 previews, make sure to pick more a appropriate aspect ratio
that's taller than for 1x1. The dimensions are based on that tile's
drawable bounds.

Because the requests are now specific to tile bounds, add the new
variable to Request objects so requests and cached data don't get mixed
up.

Change-Id: Ide447c5eb07ddd61bf85e77b235ac1c9ccd2eced
onversationItemView.java
2b9d80eb16156173f11a02eae4f770d8c975927c 31-Jul-2013 Scott Kennedy <skennedy@google.com> Change all resid switches to if-elseif-else

I really want to get this building in an IDE.

As per http://tools.android.com/tips/non-constant-fields, library
projects (like UnifiedEmail will be) have non-final R constants. They
are not final until packaged into the main application project's
(Gmail/Email)'s R.java.

As such, they cannot be used in switch case statements, and we must
use if-elseif-elseif-elseif-...-else instead.

"This is typically in UI code and the performance impact is
negligible."

Change-Id: Ie699c13e1becd51c59c1b2ea81bc902d4f2e28d9
onversationListFooterView.java
mlViewerActivity.java
essageAttachmentBar.java
essageHeaderView.java
essageInviteView.java
electedConversationsActionMenu.java
pamWarningView.java
ebViewContextMenu.java
897d7be9941f61a2d486e7ba3d0ae99d6f0315cc 31-Jul-2013 Scott Kennedy <skennedy@google.com> Fix a NPE

This may be null for special teaser views.

Change-Id: I45a634f368b99396bdf846526275412e49fdd446
onversationItemView.java
215ac5e5f127918d80bd4e4eb4fcb6ce801ae6b4 31-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Remove ad code." into jb-ub-mail-ur10
606dbd7a44b8445e872c25c0fe080e3e12a47adf 31-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Remove ad code.

Moved to UnifiedGmail. Also refactored
HtmlConversationTemplates to use HtmlMessage,
a new interface instead of the Message class.

Change-Id: Ie14694b37800ed9eb9fc692d434508f66660d55b
onversationPagerAdapter.java
onversationViewAdapter.java
9ba7fba9213027c6f763001d32d4c88f0d086388 31-Jul-2013 Scott Kennedy <skennedy@google.com> Add peek support back

Bug: 9592097
Change-Id: Id3fe6746bd616ffac03da9e8385b2cc2c10ee826
onversationItemView.java
55afb91a9794e74c2da4ca1ba1c7b3f763670d16 30-Jul-2013 Alice Yang <alice@google.com> Merge "Attachment preview parallax fixes." into jb-ub-mail-ur10
bb594cc2fcb06a9205d834cf4330959c816bd86b 30-Jul-2013 Mark Wei <markwei@google.com> Attachment preview parallax fixes.

Fix nits 1 and 3.

Bug: 10083052
Change-Id: I70285f0da1e4edb60fef576285ad6736eb0d977a
onversationItemView.java
103319aaed26bce257de55b2fe93d4f78d3c59b9 26-Jul-2013 Scott Kennedy <skennedy@google.com> Ads in conversation list

Change-Id: I3095409211d6a6bdc42212bcd6a330333a9da411
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
f44ddd8cf69686f4b0991bd6a560c0ef2f9f0f2b 30-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: Card Borders." into jb-ub-mail-ur10
e539880d39620d7e26b31c8b5b381a7e9d1a722e 30-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: Card Borders.

Also some tablet stuff. Top borders aren't
working. Need a new asset for them. But this'll
do for tonight.

Change-Id: I6501b39c1d89f025ff68aa3cf19b3c29365c3f92
orderView.java
onversationViewAdapter.java
onversationViewHeader.java
74db99555be46ccf44691805c359839268326d2e 30-Jul-2013 Andy Huang <ath@google.com> (re)add rendition support to attachment previews

Create new FAILURE state, which is also used when no renditions are
available. In this state, only a static placeholder appears.
Fix state transitions into failure state not clearing pulse animation.
Transitions from thumbnail->full rendition are special cased to not
cause transition effects.

Bug: 9566006
Change-Id: I0b833960a8839b1b6945c3c1fb749eedb14b6157
onversationItemView.java
79c3e1ed9cb1e1660c5d34b7bf3f3ab5c5dd5162 22-Jul-2013 Andy Huang <ath@google.com> new allocation-minimizing bitmap decoder

Use a new image decoding and caching framework. This one maximizes
bitmap reuse by decoding into fixed-sized Bitmaps and relying on
BitmapRegionDecoder to only decode a desired region. The ultimate goal
is to allocate memory less often, as each large allocation triggers
GC jank.

The overall request/response abstraction and threading model are now
cleaner, and caching is no longer a required fixture. Multi-core
decoding is now supported, with a currently fixed thread pool size of 4.

Attachment images are the only client for now, but contact photos will
switch to this framework next.

Bug: 9566006
Change-Id: I7c437941fd984cc0038da8f0ffd1df1a9ced4dd3
onversationItemView.java
onversationItemViewCoordinates.java
wipeableConversationItemView.java
8afccad8b03701577bb4b734a0f4fe76f6cab487 29-Jul-2013 Scott Kennedy <skennedy@google.com> Remove the eye/starflip from conversation item view

The eye is creepy, and nobody knows what it means.

Change-Id: I53a39f3e0ab39b56445eacc66130487469d912fa
onversationItemView.java
onversationItemViewCoordinates.java
wipeableConversationItemView.java
f00173c70afb46f2bee52a822786a9ea54a9c8a8 27-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Eliminate a layer of overdraw in the pager." into jb-ub-mail-ur10
b7de3defcbc36221402bf9d08d95e5e61a85ea0e 27-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Align all name/email address pairs." into jb-ub-mail-ur10
3213ffdac10adb0905cb5440c725345979d4eacf 27-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Eliminate a layer of overdraw in the pager.

The conversation pager no longer has a background
and the page margins use a custom drawable
that paints a grey background so that the
gutters have the same background as the borders of cards.

Change-Id: I4b5c473f3d8419e8e599609e82a5d8d5dcfb97a6
onversationPagerController.java
ef8d379fa5a6dadf0602159d3aa3f498327adde7 27-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Align all name/email address pairs.

In message details header, we now align
all of the sender name/email addresses.

Change-Id: I4439b1296e8737d6411164799015c70ad0930a80
essageHeaderView.java
e80a2954f3ee24f2d1fa62abf90883cdb02b9c5f 26-Jul-2013 Andy Huang <ath@google.com> fix looping draw

CIV.onDraw was indirectly triggering an invalidation.
(Animations should not be triggered by drawing to avoid this
kind of feedback loop. Will fix this soon.)

Change-Id: I45e7e2387a54bd13c6b0efd7f439c471f0ec1daf
onversationItemView.java
12c03aa47574b6d0b5326f4c55fdd28f73e4d5be 26-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Message Ads: preference manager url and new asset.

Change-Id: Ic98f4244073a68c250bd81bf29360d62d402e978
onversationViewAdapter.java
a1ab97300a6d0639952a591cf5a54a06df96c0a1 26-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: Cards." into jb-ub-mail-ur10
14f937408fe2451a91b44d3cd7d141347e716775 25-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: Cards.

Lots of changes:
New show pictures asset.
Added border as a new view type in the conversation
view to vertically separate cards. Changing its size
is TBD.
Final UI for details header (both collapsed and
expanded).
Side borders are accomplished via a new overlay layer that
is positions a view to each side of the conversation view.
Lots of dimension changes, padding and margin changes, and
other pixelpushing.

Change-Id: I4029ae46896e27fe20b005c01b8df04bb2a46c2a
onversationContainer.java
onversationViewAdapter.java
essageFooterView.java
essageHeaderView.java
1fea6a3cffcc8c4afc3d877e5dc57d29f9665942 10-Jul-2013 Scott Kennedy <skennedy@google.com> Better CAB mode

1. Flip out contact image, scale in a checkbox optionally on grey
background
2. Flip stars into peek icons
3. Only peek icon will peek

Bug: 9592097
Change-Id: Ia972132284ef62f4964c7027ab09157a525dd804
onversationItemView.java
onversationItemViewCoordinates.java
wipeableConversationItemView.java
960ff638eff61b16a2e6a5d74c477d20bd5758ed 24-Jul-2013 Mark Wei <markwei@google.com> Tapping on attachment previews should open the email.

Don't open the photoviewer.

Bug: 9888496
Change-Id: I83d82ff444947634beac61bdf3ac850eed736b83
onversationItemView.java
9f957f3463fd149d33c209409e2bba500b539177 20-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Initial Ads work.

Created AdViewFragment and AdHeaderView.

Change-Id: I6c534579ed7fb5ca53e12ca57f9f8091717cbb9f
onversationViewAdapter.java
d772bfadecebad124ae44912ad7bf02749725203 18-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Use DialogFragment for message details popup." into jb-ub-mail-ur10
21a6ed2bdd46ccfdf9aa3e8aecd4cb1af6c2539f 18-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Use DialogFragment for message details popup.

Fixes b/9888950.

Change-Id: Id6cc2b998aad8193adc04cd48bcf0f5ed2bdef76
ttachmentProgressDialogFragment.java
essageHeaderDetailsDialogFragment.java
essageHeaderView.java
371e0ad5de82585a0a0613ac5410c9ead65613ca 18-Jul-2013 Tony Mantler <nicoya@google.com> Remove unused fields in CIV

Change-Id: Iec828bd691b401c1c71660cc9c0684dd0ad1ccce
onversationItemView.java
0c788298b5dc0478dc38b25021758634424ab7a1 18-Jul-2013 Tony Mantler <nicoya@google.com> Merge "Remove some unused metrics" into jb-ub-mail-ur10
e97c18f40a946cfa344b0a77e60e133cbd6ecbd3 18-Jul-2013 Tony Mantler <nicoya@google.com> Remove some unused metrics

Change-Id: I6ad749b5dc860c85bfdc7bfbd2b80e119a71ac2e
onversationItemView.java
onversationItemViewCoordinates.java
47f98690148d70436ad6b472c57208689e0fe892 17-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: links w/o underline." into jb-ub-mail-ur10
91b957b2e803f5d1113c935d437aec1b8e61d8c9 17-Jul-2013 Tony Mantler <nicoya@google.com> Tidy up an overly verbose assignment in CIVCoordinates

Change-Id: I27aea2fe84ab90be7a066c4cdec82037f0ee6f86
onversationItemViewCoordinates.java
3de76eca03ed7ec1d40f2cce23cbbbe8e5e6d70f 16-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: links w/o underline.

Using a custom span that disables underlining of
email addresses. Additionally, uses a custom
onClick that opens ComposeActivity with the currently
selected account. Still uses autolink, and just replaces
the URLSpans with a custom replacement.

Change-Id: I30f98e124dddc4b732c7e188102928a88dbf222f
mailAddressSpan.java
mlMessageViewFragment.java
mlViewerActivity.java
essageHeaderView.java
2229eddfba6f7517c43ef49ee67c50c24d4b961a 16-Jul-2013 Mark Wei <markwei@google.com> Add fade animations.
Fix exceptions.
New layout for previews.

Bug: 9745486
Bug: 9860384
Bug: 9885937
Change-Id: Ief210b211e87898c6516d867b59d76c72a765596
onversationItemView.java
onversationItemViewCoordinates.java
259df5b9e11908c8ef7c91483924891dd96b3c27 11-Jul-2013 Scott Kennedy <skennedy@google.com> Add a new FolderUri

This will allow us to add query parameters such that Uris will still
appear to be equal, regardless of differences in the parameters.

Bug: 9780067
Change-Id: Iafe39763b3ee448cf02536df89caa736500dfdaf
onversationItemView.java
onversationItemViewModel.java
a3526f6b1f59cc6b83aa6634d6f11e22bdb22edb 16-Jul-2013 Paul Westbrook <pwestbro@google.com> Fix NPE with null cursor

Bug: 9623875
Change-Id: I03ee4e3b1f401853cec8a2bc6f02d14b70c6d4ce
onversationCursor.java
e6196842fbf33b1af33a7b67903c3dcf34d049f3 15-Jul-2013 Mark Wei <markwei@google.com> Don't show attachment previews when all images are < threshold.

Bug: 9854136
Change-Id: Ic9568d9c85f358bf0db9edce84d37cca2fcd84cc
onversationItemView.java
ef506c7033a3074e1d9c96dca702cd44761aafad 13-Jul-2013 Paul Westbrook <pwestbro@google.com> Merge "Conversation View UI Refresh: More message header." into jb-ub-mail-ur10
6a187d5113518435d13c60e2f1cabc418238c600 13-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: More message header.

Added strokes to aid in visual separation. Will change
some more. Also lots of changes to the expanded message
details header. Still need to update the link style.

Change-Id: Id6c258f7c9d2a902cdee791812f4a7fc6334ccd3
essageHeaderView.java
dea2d17d3326a3952e7d8c323390a0661d4ccbc2 12-Jul-2013 Mark Wei <markwei@google.com> Do not show small images in attachment previews.

Bug: 9786365
Change-Id: I67b1af3c7b425cd36f911136587153acdc14839d
onversationItemView.java
81aea35d45b3d0191ec595562a2fcf67009845d5 10-Jul-2013 Mark Wei <markwei@google.com> Final UI for Attachment Previews.

Placeholder pulsates for images not yet loaded.
One images loads at a time, that one image will display a spinning progressbar
after a delay.
Progress bar fixes to ensure it is rotates smoothly.
Clear section before drawing to it so transparent images look right.
Avoid PhotoManager load loop.

Bug: 9745486
Bug: 9816053
Change-Id: I2e65b3e3484d6da47d4e2523404dc745b99dd04c
onversationItemView.java
onversationItemViewCoordinates.java
c9524ef7a38c0f949fe614e96af3a5313f36aa0f 11-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Fix hard dependency on account uri in eml viewer.

Fixes b/9739075.

Change-Id: Ia5e3b04dcbd050deb89755609c4de0ae95eac8d9
mlMessageViewFragment.java
mlViewerActivity.java
b0352422fff13e9a70a34f36952cd7789c13db87 11-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: more message header." into jb-ub-mail-ur10
35c3bb793ac3ea8f63ff73d282c0dabfee5a49ce 11-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: more message header.

Revised design of the upper header. Some work on the
expanded and collapsed details header and the other
sub-headers. Still needs some UI resolution before
this can be finished.

Change-Id: I925e3b50f06519fbe41ffe7470e2fbfa50e337c7
essageHeaderView.java
219e1361ec2e22c75787091d2d90807d3488da8e 11-Jul-2013 Alice Yang <alice@google.com> Merge "Fix stale conversation list after undo." into jb-ub-mail-ur10
c3ccebce4a82e103ce7cae618166ca435c9969a0 10-Jul-2013 Alice Yang <alice@google.com> Fix stale conversation list after undo.

After performing an UNDO operation, mDeferSync was not being reset to false,
which means any updates to underlying conversation cursor (such as new mail
arriving) were being ignored and not reflected in the UI.

Bug 8332559

Change-Id: Ia2e4696bc0dc15e9faee03c9dd1d2d3b1feed989
onversationCursor.java
fa13f135741eb4a1aa372cf6066759c94661401f 10-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: supercollapsedblock.

Not finished. Still requires some assets that won't be
ready for a few days.

Change-Id: I8adeedcfacff46420cf4c43d00b94d84a3d10d9e
uperCollapsedBlock.java
bcc4f7d8474865ad956e39ae90177c08c540a3d7 10-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Fix bug where some sender tiles were not showing." into jb-ub-mail-ur10
0a1ea456ba52dad30f85a736400021a6bf6223a6 10-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Conversation View UI Refresh: conversation header." into jb-ub-mail-ur10
5fbc58bc22df9642385e35da34f0ba8e218620b4 10-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Fix bug where some sender tiles were not showing.

Change-Id: If56b1e42e87ee8fed1650b6cb4b49144f91e0a66
essageHeaderView.java
b2c9f9f54cfe3b6d9014e48ffe2718381da8e41c 09-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh: conversation header.

Changed conversation header to a linear layout since
it is simpler now that we don't realign the labels
to fit on the same line. The rest of the commit is playing
with margins/padding/text sizing/etc.

Change-Id: Id73fd3f0d8f3662aa998fc505c0131655b9fc385
onversationViewHeader.java
olderSpan.java
olderSpanTextView.java
riorityIndicatorSpan.java
ba73fdddc4e85ef810a7b8d3aa6449656c44a317 09-Jul-2013 Alice Yang <alice@google.com> Fix NPE in ConversationItemView

Bug 9754211

Change-Id: I1b201103f24001be1e3ccf4b8d4791d7613e344e
onversationCursor.java
onversationItemView.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
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
essageAttachmentTile.java
c5499cdd4627df39b935c3569c2b8e6e4b6ed38e 04-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Conversation View UI Refresh Message Headers.

Still need to do the new snap header spec
and the icons are a bit too small, but it's a good start.

Change-Id: I0e2e622a1100c96dab022fd3836bc6666d6330cd
essageHeaderView.java
8173cf41d2acf48c7b45ae3e7868fc391aae0359 01-Jul-2013 Andrew Sapperstein <asapperstein@google.com> More bidi notification fixes.

Change-Id: Id0934adf6a41025ad54131de874fc344e5689086
endersView.java
744c43e317053f1f6329e93b38121fd46bcdb2b9 01-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Return when reset." into jb-ub-mail-ur10
8bf51f17e48e8571db466a6e2421b29dfa815fb3 29-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Return when reset.

Change-Id: Ia356ad3f0bfdb929ea872d6749ed1aa64e9292d9
mlMessageLoader.java
c4e230fd260e8d80cffc0515bb9322f7553853f9 28-Jun-2013 Andy Huang <ath@google.com> list caching tweaks

* stop background caching earlier - it's pointless to continue caching
when the dataset changes and a new cursor is inbound. avoids creating
unnecessary garbage.
* add explicit GCs to sidestep common cases that usually result in
GC_FOR_ALLOC: after a query and after background caching

Bug: 9032162
Change-Id: Ic2e7819e6887b965515a63db3cac7e4dfdf70969
onversationCursor.java
0c7f1c183c90c14a9920372b71434b9b29bd5b4d 28-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Hide Dial&SMS actions if no apps can handle them.

Fixes b/9057637.

Change-Id: If00a322225676c9075cfbd6170ab04c2b43f7e77
ebViewContextMenu.java
144bfe739b93afdee0a1700a34806b0b287e5887 11-Jun-2013 Andy Huang <ath@google.com> yielding cache construction to reduce scroll+refresh jank

Background caching of conversation objects triggers GC_FOR_ALLOC, which
blocks the main thread and causes jank. We do want to cache to improve
scroll framerate, but we also want to avoid causing GCs while drawing is
in progress.

Add cancel-handling to the cache's async task, and connect it to a new
DrawIdler class that monitors a view hierarchy for draws. Together, they
cause any drawing to pause background caching until 100ms of drawing
silence.

If you scroll before the cache is filled, scroll framerate will not
benefit from the cache, so it will be somewhat lower. Previously,
caching would continue during the scroll, so depending on where you are
in the list, it may have been faster, except that it was punctuated by
annoying GC pauses. The framerate now will be generally more even now,
although it may be lower if you scroll before the cache is allowed to be
filled.

The DrawIdler is 1:1 owned by the Activity/Controller, but a single
Cursor may be shared across Activity instances (e.g. rotate). So connect
each DrawIdler to the shared cursor in onLoadFinished. This works
because the rotated Activity's onLoadFinished is called *after* the
first Activity's onDestroy.

Bug: 9032162
Change-Id: I217dac012f2d74f47a158aee3bd2de78d9b14171
onversationCursor.java
25b8013b8b6bc6e3315f3b21323642705babb6ed 26-Jun-2013 Scott Kennedy <skennedy@google.com> Merge "Clean up a bunch of warnings" into jb-ub-mail-ur10
3b965d78774a42358ce6bbdcc43b4c8df130a60e 25-Jun-2013 Scott Kennedy <skennedy@google.com> Clean up a bunch of warnings

Bug: 9565838
Change-Id: Ie3a380581e81c63aaa0764875c55bfdccd5f2b13
onversationCursor.java
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
onversationPagerController.java
essageAttachmentBar.java
essageAttachmentTile.java
essageHeaderView.java
7638a1004e7c8ed7a85620243da3b051b60217e8 25-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Final eml viewer cleanup.

Fixes b/9560839. Now we show the title of
the eml file and we also show an overflow
button with settings/send feedback/help.

Change-Id: I5eab245d9fd47e37b83eadcb419255939117ab39
onversationViewAdapter.java
mlMessageViewFragment.java
mlViewerActivity.java
essageAttachmentBar.java
essageFooterView.java
7434e800d4313a227120ca36bd95683752a7879f 21-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Attachments in eml files.

It's kinda slow for large eml files
(because we have to parse the entire
file) but it works. Hooray.

Fixes b/6393073.

Change-Id: I2d7a87a484cd282a000a0905fe069f3ab45e2061
ttachmentActionHandler.java
onversationMessage.java
mlMessageLoader.java
mlTempFileDeletionService.java
essageAttachmentBar.java
essageAttachmentTile.java
47cd4c3b064da3aac82e4ca1a057fd51c4ebad77 19-Jun-2013 Andy Huang <ath@google.com> put UnderlyingCursorWrapper on a diet

'wrappedUri' was basically unused; having the cursor wrap URIs on demand
appears to be an old codepath we no longer depend on. All instances
where the wrappedUri is later used check the URI authority and handle non-
ConversationCursor authorities just fine.

Use the more basic UnmodifiableMap over ImmutableMap to save 10ms of
build() time and some garbage. Will still throw an exception upon
duplicate key condition if DEBUG_DUPLICATE_KEYS is true, otherwise will
log.

Bug: 9032162
Change-Id: I9851ff6b2cea9472ebbb157c35eb407c7ba8ffb3
onversationCursor.java
7fdf34185f0d41bdebf25bcf6d14927b16658136 18-Jun-2013 Andy Huang <ath@google.com> clean up 'collapsed' constants

Change-Id: I8bb38ac918f061cd9ed4ad21d9ed686672dbde15
onversationItemView.java
d4de4aa5c73a9e68e1887c2b3de233acd0c51761 18-Jun-2013 Paul Westbrook <pwestbro@google.com> Add new "me" strings

Bug: 8903354
Change-Id: Id66017793d7a430716bfba7fdf6cda6abd66e290
essageHeaderView.java
endersView.java
da954c000080442f655ce250b3780d1bf249f024 18-Jun-2013 Andy Huang <ath@google.com> am b2354b97: Merge "Fix list caret and highlight sticking when scrolled down" into jb-ub-mail-ur9

* commit 'b2354b97887559e21938ae2e182bfd568578fc47':
Fix list caret and highlight sticking when scrolled down
f0aebd32d750d6e108c8f9b551b1760682123ebb 18-Jun-2013 Andy Huang <ath@google.com> Fix list caret and highlight sticking when scrolled down

Manually clearing list item activated state wasn't working because the
item position was mixed up with list view child offset (not the same
when you have a non-zero scroll offset).

Turns out that ListView can manage this for us more reliably if we clear
the single choice using setItemChecked() instead. Hooray.

While I was in there, I disabled list caret entirely on portrait tablet
so it doesn't appear during the animation, either. Much nicer.

Bug: 9074494
Change-Id: I1f976797a81d3a5f49dadd3b5e93bdd103c250fb
onversationItemView.java
9cf625efcbc9c7eccce8101e12c9e2d33d52672b 15-Jun-2013 Andy Huang <ath@google.com> reduce pre-caching garbage

Reuse a StringBuilder for all rows when pre-caching URIs.

Change-Id: I6a00b6596e4c4c6e131d07a54063730711019697
onversationCursor.java
f82d6e7342e277f123a04fc82cc841b180655c15 13-Jun-2013 Andy Huang <ath@google.com> more systrace logging

and some small memory wins to make less garbage.

Change-Id: I09a3515ab1ab62f5282e49f161450aa93c3cbd4e
onversationItemView.java
43d2cb188e586d84db0db1da3241a615185c7d12 12-Jun-2013 Andy Huang <ath@google.com> add systrace logging

Change-Id: Iabe0f7b2d81c4fa06f8d341c20274e34fa34eb08
onversationCursor.java
f7c9d7d41b4cf6dfcca444ed7d9d6eeb216103df 12-Jun-2013 Scott Kennedy <skennedy@google.com> am caaeed38: Revert commits for old archive/delete dialog

* commit 'caaeed3837316175111bb16e6b60aeb0d523debf':
Revert commits for old archive/delete dialog
caaeed3837316175111bb16e6b60aeb0d523debf 12-Jun-2013 Scott Kennedy <skennedy@google.com> Revert commits for old archive/delete dialog

This reverts commit 1dab2bf735a942a0e45484cff8aec04824ac0982.
This reverts commit 32ecfdd22f45892a6341b11e80e6d59f563a6160.
This reverts most of commit b4cb510b1cef97580b0f29562aa7edc25257322b.

Bug: 9296856
Change-Id: I7206ab4b94109e758c9476880d41e7d3fe239e2e
electedConversationsActionMenu.java
b622d2b6750423c185a2a2463277e5e2b853fada 12-Jun-2013 Andy Huang <ath@google.com> fix crash on link open

Bug: 9396858
Change-Id: I409d0d648120d0f61b97da1c1fcfdc91ced1c0f8
mlMessageViewFragment.java
aa1e3089a9b15fc32f583e45b38010e206ca219e 12-Jun-2013 Scott Kennedy <skennedy@google.com> Merge "Move to Inbox" into jb-ub-mail-ur10
dd2ec688cf18e0ec132d936168ccaa3c43cdefb1 04-Jun-2013 Scott Kennedy <skennedy@google.com> Move to Inbox

Show this option in places where "Move to" doesn't make sense, like
All Mail and search results.

Add a new Account setting field: Uri moveToInbox
This contains the Uri to use for the "move to inbox" action, which
may differ from defaultInbox.

Bug: 9256654
Change-Id: I91062d6a602ed785d42cc52ed66712f134730755
electedConversationsActionMenu.java
8d4791ce70b3f71cc90256bc4b5b236379b56331 12-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Export Eml viewer.

There's really no reason why it shouldn't be
and having it exported prevents b/9334785 from occurring.
Additionally, so that we only use the app's eml viewer,
we check if the attachment is an eml file, and if so,
just open the viewer directly rather than letting the
framework disambiguate (which causes an activity chooser
to show when we have multiple activities that can accept
eml files).

Change-Id: I98e13f894c9218d62049b16e0f4c20c77501fcc5
mlViewerActivity.java
essageAttachmentBar.java
4ddda2f0a4ee5381a90779a6939b05b064ce5d11 10-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Working implementation of eml viewer.

Everything works except attachments.
The implementation uses a controller that is used
by both SecureConversationViewFragment and the new
EmlMessageViewFragment to do the rendering work.

Change-Id: I4d8b9b56e6609c3a81b902b102a90f1e50c115cd
onversationMessage.java
onversationViewAdapter.java
mlMessageLoader.java
mlMessageViewFragment.java
mlViewerActivity.java
essageHeaderView.java
7d257af54aba47ab662e34f0c9faf54d86ebd4a4 11-Jun-2013 Andrew Sapperstein <asapperstein@google.com> resolved conflicts for merge of f950fd5d to jb-ub-mail-ur10

Change-Id: I7ffb9ec33e74b118eb184b2794e08cec05650271
2f542873183b37fa38a0d468f46bbfebc1f537e2 11-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Reshow sender image teaser.

Fixes b/9375917. Now the sender image teaser shows
until cab mode has been entered or it has been swiped away
manually. Entering a conversation will not hide the teaser.

Change-Id: Ib3c6d56e4504680b513b2b56e9bcbc091a5da8aa
electedConversationsActionMenu.java
e84d4cb37b11460869e7d3003fc527fd53830dd9 11-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Refactoring of AbstractConversationViewFragment." into jb-ub-mail-ur10
376294bbb5ded471ad577fdb492875a837021d08 07-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Refactoring of AbstractConversationViewFragment.

In order to support EML viewing, we need a bunch of
the overhead provided by AbstractConversationViewFragment
without actually inheriting from it. Additionally, most of
the code was inner classes that had no business being such.
These are now moved into their own classes.

Change-Id: I80769d2606b52c41dc116a6bdee17c00adc66a5a
mlViewerActivity.java
0f88a8a8e1df87445864a74fcd331a72853c88e6 08-Jun-2013 Scott Kennedy <skennedy@google.com> am b4cb510b: Show a dialog to discover the removal setting

* commit 'b4cb510b1cef97580b0f29562aa7edc25257322b':
Show a dialog to discover the removal setting
f69d0394f7de5c0681b8d5d5ca0c60b55c55f815 07-Jun-2013 Vikram Aggarwal <viki@google.com> Fix the folder click problem

The SwipeHandler should never act on NestedFolderView elements since
these should not be allowed to swipe. Fixes the issue where the
folders were not clickable.

Also, remove a lot of unused code in the SwipeHelper.

Change-Id: I4495a4224e28d52560ead47ee9e3f6d34c4ab916
onversationItemView.java
b4cb510b1cef97580b0f29562aa7edc25257322b 06-Jun-2013 Scott Kennedy <skennedy@google.com> Show a dialog to discover the removal setting

The first time a user clicks "archive" or "delete", we will show a
dialog, asking if they want to see archive, delete, or both.

Bug: 9296856
Change-Id: Ibb88304eac66bb16a2f80622fb37cb9f57fcb6c6
electedConversationsActionMenu.java
00839ad20f1e8a39fa781571d33aade92f808d82 06-Jun-2013 Scott Kennedy <skennedy@google.com> Merge "Unify LogTag" into jb-ub-mail-ur10
4fcac283dfba95f1a89c1ea9c3c5240560378b94 06-Jun-2013 Paul Westbrook <pwestbro@google.com> Enable debugging for duplicate conversation keys

Bug: 9294348
Change-Id: Ib089f62ad08a54297eed9548f8f89c75278a81db
onversationCursor.java
b184bfe96fa3512af88260fce4f3cee3066fb28d 26-May-2013 Scott Kennedy <skennedy@google.com> Unify LogTag

There is now only one LogTag class. The static initializer of
GmailApplication (existing) and EmailApplication (new) will now set
the log tag to "Gmail" and "Email", respectively. Up until that code
is run, it will be "UnifiedEmail".

"setprop log.tag.Gmail VERBOSE" (or .Email) will trigger all logs to
be printed as long as they go through LogUtils, regardless of what tag
is used by that individual log. This lets us still turn on logging
everywhere in one command, but also lets us use more descriptive tags
(like the class name).

And since we no longer have three com.android.mail.utils.LogTag
classes, builds will be much easier.

Also, we now use LogUtils everywhere.

Change-Id: Iec53e87cad0a46b73d2afbbd8d44aca097a5087a
onversationCursor.java
8812d3c50e35c4f2a02d29c35c76082c4ebec0cd 05-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Refactor ConversationMessage out of MessageCursor.

Just moved the static final inner class to its own
file and fixed up the imports. Also moved the MimeMessage
parsing into Message instead of in ConversationMessage.

Change-Id: Ic35d4cf5e52b392d68898ff47efaeeee4d0865b0
onversationMessage.java
onversationOverlayItem.java
onversationViewAdapter.java
mlViewerActivity.java
essageCursor.java
essageHeaderView.java
7922528d9d4b4926f1ed3e1322d14b8e00a03465 05-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Parse eml file to UI's notion of a Message.

Uses MimeMessage to parse the file along with some
utility functions to convert the raw data into
MessageCursor.ConversationMessage so that the UI
can properly display the message. The two new
files are actually moved over from Email.
Also added in some copyright headers previously
forgotten.

TODO Use SecureConversationViewFragment.
TODO Synthesize Conversation for the Message.
TODO Handle EML file attachments somehow.

Change-Id: Idbf5a2da2197822d72a2cd0c0f07ccc4dbfb64d9
mlViewerActivity.java
essageCursor.java
290cae38e1911bbbc93e9cb057009ee424f8565c 31-May-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Basic EML viewing support." into jb-ub-mail-ur10
f86e023107de3647d6c862cc6d6b45a3d7887e77 31-May-2013 Andrew Sapperstein <asapperstein@google.com> Basic EML viewing support.

The base of an implementation is there.
We can view the plaintext right now.

Change-Id: Ib9dd37197c0592221f49b7770efb459484a4e6f0
mlViewerActivity.java
07fe8df87bde8732398434e55cce366a8528c181 30-May-2013 Andy Huang <ath@google.com> try not to grab the conversation cursor mutex on the main thread

Bug: 9186894
Change-Id: I27ad96a0cdeea354bd3fc915a6072bbf79518fd0
onversationItemView.java
onversationItemViewModel.java
onversationPagerAdapter.java
wipeableConversationItemView.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
onversationCursor.java
6cf45c601317d4b65ffb1896760fa1cb8a2b807c 24-May-2013 Andy Huang <ath@google.com> fix itemId lookup in edge cases

The last optimization to use the cache in itemId lookup had two
problems:
* CursorAdapter.mDataValid wasn't checked before lookup
* didn't translate ConversationCursor position to underlying cursor
position

Removed getConversationAt() since it's not safe for a ConversationCursor
position to be used on the underlying cursor. Any access has to go first
through moveToPosition to handle deleted rows.

Bad positions passed to getItemId() will now fail earlier and more
gracefully upon position change.

Bug: 9111205
Change-Id: I9242bf4fe841bee4f91146bd4896bb01e1cbdea7
onversationCursor.java
3663453628ab545bcba3327d972eecac72b6c2d0 23-May-2013 Andy Huang <ath@google.com> avoid URI<->String conversions

Don't generate URI objects just to splice in our caching provider's
authority. We end up using them as Strings anyway, just stick with
Strings. indexOf('://') is way faster than parsing an entire URI.

Bug: 9032162
Change-Id: I985ef38db46441996219180ba2a1ef658c080322
onversationCursor.java
55e76949ca7464c3bd55fdc25fb3daa43466ef5c 23-May-2013 Andy Huang <ath@google.com> minimize an unnecessary critical section on the UI thread

Adapter.getItemId was blocking on the cursor-advancing lock in
ThreadSafeCursorWrapper, occasionally causing the UI thread to block on
the background CacheLoaderTask.

Changed getItemId to use the Conversation cache when feasible.

Bug: 9032162
Change-Id: I19f00ceefeb52e580b1e3311c6625a4f034f0402
onversationCursor.java
dfa99af9e631d5e2f9ca91b5a03026fca1c5c193 20-May-2013 Andrew Sapperstein <asapperstein@google.com> Show non-ascii sender names properly in msg list.

Fixes b/8498763. In conversation view, we properly
decoded names. We were not running through that code
path in email in the UI layer. Refactored the decoding
work into a static method that is now called when we
get the sender text.

Change-Id: Ie8212dd20b74558626e66d2c58a39e95e39b068a
onversationItemView.java
endersView.java
bcab7611959549a955be8a30115d6a4c937afd24 17-May-2013 Andy Huang <ath@google.com> fix chopped senders string

The static (sigh) paint used to measure/ellipsize the senders text was
stuck in 'date' mode, which used the tiny date font to measure.

Bug: 8715214
Bug: 8972566
Change-Id: I96480b284feae6a5d69a3dd4702365c5d1da355a
onversationItemView.java
endersView.java
983a723931447b6261a2e42b25e6f931dba6de33 15-May-2013 Paul Westbrook <pwestbro@google.com> Use the explcit provider notification

Use the new provider notification to explictly tell the provider
that the user is viewing an item in the conversation cursor.

This prevents side effects from just iterating over the result set

Bug: 8961122

Change-Id: Ie1fd0daf2909e13d331f9fe609d0daedab607196
onversationCursor.java
onversationPagerAdapter.java
c1922a93fb9540d4ff8c28a30d1ae58d3a3d73f9 13-May-2013 Andy Huang <ath@google.com> Fix undo when auto-advance is not set to 'list'

Auto-advance broke undo because undo did a sequence number check before
doing anything, and a side effect of auto-advance is to mark the next
conversation read!

Added more toString() logging to assist improve 'dumpsys activity'
output.

Bug: 8877688
Change-Id: I54597c4511780651a3a043a7752191cbad6fa1b9
onversationCursor.java
a0214391331f3248569b74788639b491732e6427 16-May-2013 Andy Huang <ath@google.com> Fix underlying change processing during reset

If underlyingChanged is called in resetCursor(), the Controller will
call refresh(), and that does nothing if a refresh task is present. It
turns out that the refresh task is expected to be present but inert in
resetCursor(), so ensure that it is nulled out BEFORE resetCursor().
This also better matches the calling order pattern in setCursor().

Fixing this fixes some cases where mRefreshRequired was stuck at true,
preventing new/more mail from appearing.

Bug: 8961122
Change-Id: I6696cfe5d7d1a612379ff2a3c11069f754807ab2
onversationCursor.java
ab25d84d0f3c73b5e8c7c80e5257b2db6e7b3e25 15-May-2013 Andrew Sapperstein <asapperstein@google.com> Disable drag&drop for non-expansive tablets.

Fixes b/8983246.

Change-Id: Ic1d16835480c3d0206d491de1ddccb939c36a568
onversationItemView.java
26ee0eac7e362b8eba9e0932360f8e76bd64d099 15-May-2013 Andy Huang <ath@google.com> disable network access on background conversation loader

Background cursor traversal was triggering live fetch of conversations.
This is not particularly safe if the user manages to scroll past the
background task's position and expects that live conversations will
load.
But this is better for now.

Bug: 8971881
Change-Id: Ia063200259e621a493e0d0136cb2709beeac0806
onversationCursor.java
842deb10767f10c20263ee47ff1cb40c5787f391 15-May-2013 Paul Westbrook <pwestbro@google.com> Merge "Catch potentially missed update" into jb-ub-mail-ur9
745bff38627bba3f0786eb1ce3a6d1a03cdb917c 15-May-2013 Mark Wei <markwei@google.com> Cap the number of labels in conversation list.

Each label must not be less than 48dp. This allows us to see 2-3 characters per
label. Phone portrait will show around 5 labels on a Nexus 4.

Bug: 8970027
Change-Id: I769f468e5e546f583f3aa0c949b62c2546b3261f
onversationItemView.java
onversationItemViewCoordinates.java
2ed31f4c45316b65af0e4db02e76366b58d66768 15-May-2013 Paul Westbrook <pwestbro@google.com> Catch potentially missed update

If an update to a cursor happens before the call resetCursor()
any provider change wouldn't trigger a refresh

Bug: 8961122
Change-Id: I10b7e959bee2f845f3432bf8e84bb1ff1ed114e4
onversationCursor.java
1892261a7dfa66b1c967ede0842a0cb2802f4187 14-May-2013 Paul Westbrook <pwestbro@google.com> Don't drop notifications

If onChange() of the ConversationCursor's CursorObserver is called
before the AbstractActivityController has had a chance to register
a listener, nothing would call
ConversationCursor#notifyRefreshRequired(). This would cause:
1) No content observer registered on the underlying cursor, so no
other provider changes would get propegated to the UI
2) The cursor would be in the "refresh required" state, but until
the next resume, nothing would trigger the refresh

Now, when the first listener is registered, if the cursor is in the
"Refresh required" state, ConversationCursor#notifyRefreshRequired() will
be called

Bug: 8961122
Change-Id: Iec16c9b8e69b66bbef833ee38252b7f1798de716
onversationCursor.java
6de11b098c86f45a3c21dd59b548da91cb736892 11-May-2013 Paul Westbrook <pwestbro@google.com> Allow ConversationCursor to be populated in background

Added a "thread safe" cursor wrapper, which can allow a cursor
to be used by multiple threads

The constructor for UnderlyingCursorWrapper will load 100
conversations. If the there are more rows, an AsyncTask will
be started to load the remainder

Bug: 8642220

Change-Id: I665b7a57d3264b6347e5d8bc8588629e320d8382
onversationCursor.java
315bd43f773b924e63689e993d9473d0f4b7f055 11-May-2013 Paul Westbrook <pwestbro@google.com> Disable duplicate key debugging code

Change-Id: I7c88025c111d51f60e25a9eb36cad98267513e95
onversationCursor.java
25dec14269fe2be190a4bb0a6e3f6d2ef6c39b22 10-May-2013 Alice Yang <alice@google.com> Merge "Menu items to spec + cleanup" into jb-ub-mail-ur9
c42ad5ea3a49e6045a79d1fde3d858033176e67b 10-May-2013 Paul Westbrook <pwestbro@google.com> Use an ObjectCursorLoader for Messages

Bug: 8763530
Change-Id: I0a70c92dd52eff5d10c067fdb78b371bfd8178ac
essageCursor.java
b905d08f25ca7255201c21aa8a504c9ffaf9c79e 08-May-2013 Scott Kennedy <skennedy@google.com> Menu items to spec + cleanup

NS: 2 in portrait CAB, 3 elsewhere
N4 (sw340dp): 3 everywhere

Bug: 8832952
Change-Id: Ie576a54331731cf07b8557e1e9c3a5d5619d8b0d
electedConversationsActionMenu.java
bbb186583f4beeec8e5eea537c73f991003be2a6 08-May-2013 Andy Huang <ath@google.com> use darker blue for 'pressed' state

But first, I had to prevent using a custom 'mSelected' state from
bypassing the usual selector. Now, the 'selected' state corresponds with
whether an item is in the selection set.

Bug: 8853914
Change-Id: I3b564c92d5e3697a10b70fe1af5e5ed9f56c3e15
onversationItemView.java
ce2c0a15773909bfd09935673c4974b5922eba68 08-May-2013 Alice Yang <alice@google.com> Add 8dp touch slop for sender image.

Increase touch target for selecting sender image to make them easier to select.

Bug 8850526

Change-Id: I2e7114017a916b0f1014443924bf8c7c5c76bb66
onversationItemView.java
ca9d57ed8dfc24cbab1cb1d6eb5f4780871b550f 07-May-2013 Paul Westbrook <pwestbro@google.com> Fix sender images for Email

Fixed the case where when the deprecated SENDER_INFO field
is used, we weren't pulling the email address out correctly

Bug: 8850702
Bug: 8737081
Change-Id: Idd0aec2260a1fd5845f49f0ac575814324311cec
onversationItemView.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
etterTileUtils.java
2102b2c87a6cb39bc63fb7eff13dda64da56b72e 03-May-2013 Mark Wei <markwei@google.com> Add teaser for new conversation photo checkboxes.

The teaser shows up for the first time the user sees the conversation photos. If
they change to no photos, and later change back, the teaser comes back.

The teaser sits immediately in front of the first real conversation item (unless
other special views also try to have the same position behavior, in which case
the current implementation gives undefined behavior dependent upon which special
view is added to the adapter first).

Bug: 8772762
Change-Id: Ica79482f2a2eae0cf3409f6accb7ae5b0fc0fd45
onversationItemView.java
193e05a8c38b87c400ac594b53b54eb211d35602 05-May-2013 Alice Yang <alice@google.com> Add some logging

Adding more logging at INFO level for hard a hard to repro use case where
multi-select then archive/delete from menu highlights but does nothing.

Bug 7486078

Change-Id: I9a4647858c14e196f83c82fa98903f054bff2ba7
electedConversationsActionMenu.java
ef91f8bc06c24014224d6129231ed0583dc719e8 04-May-2013 Scott Kennedy <skennedy@google.com> Don't show "Change folders" for unsupported accounts

Bug: 8808491
Change-Id: Id8b37f2ca37bc63810aa0834164f16f9b2f69f79
electedConversationsActionMenu.java
b0be3fcbc7b9f99cc6fc0a01e517b0f83e67c1f0 03-May-2013 Andy Huang <ath@google.com> tablet visual tweaks. more caret.

bump the star up a bit on 'normal' and 'spacious' layouts.
add back the caret for tablets.
because the caret is drawn as part of a list item, move the edge effect
line into the list item as well so it draws underneath the caret.
get the divider between selected list items appearing again by using a
9-patch instead of a solid color.

Fix an issue on portrait tablet where the last opened conversation would
stay blue in the list. The activated state wasn't being cleared on view
mode change.

Change-Id: I616f5d2b9eb9506995a74a4772ab7f50f95b2a33
onversationItemView.java
7495273e21e52d44aa23fcbd59c5a45998769c4f 02-May-2013 Vikram Aggarwal <viki@google.com> Merge "Two options on narrow; Three on wide" into jb-ub-mail-ur9
cd5de8b5aa8d812a5d12ab4e7d853fadd2df63b5 01-May-2013 Vikram Aggarwal <viki@google.com> Two options on narrow; Three on wide

In the CAB mode, show two options on narrow screens (so the unread
count is visible) and three on wider screens.

Bug: 8733601 Selecting more than one message in portrait mode is not
showing total number of messages selected

Change-Id: I5854d7856f85b485011b12b3749a069519ad2437
electedConversationsActionMenu.java
13c0535f000d0e0ce8d31066a4197a2c2a90b1e5 02-May-2013 Vikram Aggarwal <viki@google.com> Integrate the new star assets

Out with the old
In with the new

Bug: 8621556 integrate new Star assets for conversation list
Change-Id: Ie685317619b6f47b21d90fa2574666a1637f6db0
onversationItemView.java
586f2e72bf9891974dc2bfedff61cfc58507af67 01-May-2013 Andy Huang <ath@google.com> harmonize all blues, remove impostor assets

Purge assets that are various shades of blue in favor of using colors.
Per visD, remove conversation list shadow on 2-pane. This saves the
hassle of baking in shadows into all background assets.
Remove wide-mode background assets in favor of phone versions.
New darker refresh bar assets. No more need for a white frame.
Add shadow to drawer-less folders list.

TODO: delete wide selectors and assets.
TODO: implement caret on tablet.
Change-Id: Iecec3eaaa3c37b856cbed64d2b53ddf77a00582f
onversationItemView.java
d94312288286017a38603cb10becd2ad52580524 01-May-2013 Paul Westbrook <pwestbro@google.com> Revert "Add analytics support"

This reverts commit cebb805a486d38bca50009905777e170b375b066.

Bug: 8764535
Change-Id: I70092a456bcfeda2e60f93e747e5e9097df0b77e
onversationItemView.java
cf2a69115565e493b9ecb885cf9e8da84b8a48ec 30-Apr-2013 Andy Huang <ath@google.com> Merge "use the drawer on small tablets. general tablet layout love." into jb-ub-mail-ur9
12b3ee458e04ac7e0b69302e671d10b24a5c98cf 25-Apr-2013 Andy Huang <ath@google.com> use the drawer on small tablets. general tablet layout love.

Added 'spacious' variant of NORMAL list item layout.
Because the determination of whether to use tight or spacious dimensions
isn't easy with resource qualifiers (think of 7" tablet, which uses
tight dimensions for 2-pane side-by-side layout, but spacious dimensions
in portrait), I just made a whole new layout for this permutation.
Please remember to maintain NORMAL, WIDE, and now NORMAL/spacious
variants!

Use WIDE mode + drawer on landscape 7" tablet.

Make 2-pane controller and layout drawer-aware. Pull up drawer code into
the common controller base class. 10" 2-pane continues to not use a
drawer.

Don't use a resource qualifier to decide between normal and wide item
layouts (same reason as spacious dimensions above). Use the actual item
width as a dimensional test (list_min_width_is_wide).

Use default drawer scrim color.

TODO:
the conversation-open animation is janky looking.
can't open the drawer in conv mode/7" landscape

Bug: 8578806
Change-Id: I1210b1d47d1756353f7c386873465751ca21f801
onversationItemView.java
onversationItemViewCoordinates.java
08720495e48fbe84f72efe0d914396c904fd7afe 30-Apr-2013 Alice Yang <alice@google.com> Remove touch slop for contact images

Bug 8743785

Change-Id: Iaf77d1c5357e9440e48e5f20e0fdad39e4f08cb7
onversationItemView.java
7beb5ac59b1399c82984f25b0971e7cb8948ab5e 29-Apr-2013 Paul Westbrook <pwestbro@google.com> Added additional analytics

Change-Id: I2b953a0d4ad1682a8ebd4012682ea01d3dbc41ab
onversationItemView.java
5952761d1916f8568a47a55c6f6a74b90aad2b83 27-Apr-2013 Mark Wei <markwei@google.com> am 6126d72a: Fix multi-selection on tablets. We invalidated our previous assumption that tablets will always have a checkbox. This fixes new issues with tablet CAB mode.

* commit '6126d72ae2769bd39451872f45781cadb5b90515':
Fix multi-selection on tablets. We invalidated our previous assumption that tablets will always have a checkbox. This fixes new issues with tablet CAB mode.
6126d72ae2769bd39451872f45781cadb5b90515 25-Apr-2013 Mark Wei <markwei@google.com> Fix multi-selection on tablets.
We invalidated our previous assumption that tablets will always have a checkbox.
This fixes new issues with tablet CAB mode.

Bug: 8698135
Change-Id: If76f0f3d07f1b515afc5d05f57f0d8cc068b3fe9
onversationItemView.java
wipeableConversationItemView.java
oggleableItem.java
6670433c26760ff18f27d56d90a783cda77f6d05 27-Apr-2013 Andrew Sapperstein <asapperstein@google.com> Merge "Run handle/resetNotificationActions on UI thread." into jb-ub-mail-ur9
828bc86ffcb1274fb461fbb25cdc2a07ae76b6c8 25-Apr-2013 Andrew Sapperstein <asapperstein@google.com> Run handle/resetNotificationActions on UI thread.

Fixes b/8703644 by making the bodies of
handleNotificationActions and resetNotificationActions
post onto the UI thread for all of their work and thus
fixes the ConcurrentModificationException of
mNotificationTempDeleted. Also fixes b/8608274
because cacheValue is no longer being called
on a non-UI thread in these two functions.

Also contains a partial fix for notification
actions being undone while the conversation
view pager was open. Now we only update the
ConversationCursor's internal state when the
undo notification is tapped rather than whenever
it is dismissed.

Change-Id: I937dd7f7a0f7284a6f66b982fe363a63c3618f3f
onversationCursor.java
fd26b56dbe6bdb6ece9ec344673d01a9a891995f 26-Apr-2013 Paul Westbrook <pwestbro@google.com> Merge "Add analytics support" into jb-ub-mail-ur9
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
onversationItemView.java
24e4599c09eac54b11da756b9ed979b69a0d8578 26-Apr-2013 Alice Yang <alice@google.com> Show sender images in Email

Change-Id: I818ab323ac50bad11ac32b6155046b11d383cdce
onversationItemView.java
0c436a1a4d59c8f228b16fc946f5ca2b72fa949d 26-Apr-2013 Alice Yang <alice@google.com> am 8d77f09a: Merge "Make sender image behave like checkboxes" into jb-mr2-dev

* commit '8d77f09a37cfbe24eff2f1276b3a8ca0e7fcff45':
Make sender image behave like checkboxes
4758e980c21027ef1a9cacc9847170290b2ae42e 25-Apr-2013 Alice Yang <alice@google.com> Make sender image behave like checkboxes

- Tapping on sender image selects/deselects a conversation.
- Removed the "checkbox" option from settings, but didn't change wording
yet since settings text hasn't been finalized.

Bug 8713329

Change-Id: I11afe2b2ca3191f63ae5b82228fa209fdbd9295c
onversationItemView.java
onversationItemViewModel.java
wipeableConversationItemView.java
oggleableItem.java
543e709c976ce954a072020ba6f75d12f41b1fba 22-Apr-2013 Andy Huang <ath@google.com> Fix table-layout emails, blacklist transforms by sender domain

Fix Twitter emails by overriding any 'table-layout' style when
overriding table width to 'auto'.

Add infrastructure to blacklist transforms by sender domain.
Not actually used yet, because the Twitter email fix above is more
generally useful and doesn't need to be special-cased.

Bug: 8403536
Bug: 8685326
Change-Id: I9e72e8e6336c138674839724df57eef1f86a2d9b
essageHeaderView.java
a39b7a7c65d23e67f456a5f0348f5b4af19bf819 23-Apr-2013 Andy Huang <ath@google.com> am 594a1d91: pixel peeping in conversation list

* commit '594a1d9158b914c7add8da3173029640324897e5':
pixel peeping in conversation list
594a1d9158b914c7add8da3173029640324897e5 23-Apr-2013 Andy Huang <ath@google.com> pixel peeping in conversation list

* ensure photo is vertically centered at default font size
(a larger system font will align the photo with the top of the first
line instead of vertically centering. visD says this is more
important.)
* tighten vertical spacing of sender/subject on phone
* on phone, top of labels now abuts bottom of subject

Bug: 8592116
Change-Id: I5012847511c492137dc5363cb06d6ea7d4bfe81d
onversationItemViewCoordinates.java
cd67ec6cb202bd3d02218e3b7f80aefeb0c34233 23-Apr-2013 Vikram Aggarwal <viki@google.com> Merge "Clean up selected set" into jb-ub-mail-ur9
95e58a00415b26d4f310201f6bc7402d4be8d3fc 17-Apr-2013 Andy Huang <ath@google.com> DO NOT MERGE log more in ConversationCursor

Bug: 8553051
Change-Id: I14f92119b7c66f5e0f3bc3f995b4b1595b1fcccb
onversationCursor.java
b53fe05fb867685d0d3f2f37daf0f93bc6488ded 21-Apr-2013 Andy Huang <ath@google.com> misc contact photo optimizations

* Only invalidate the contact image region on async load.
* Calculate hash codes by hand to save autoboxing of ints.
* Don't parse Folder color strings at draw time.
* Switch ConcurrentHashMap to SynchronizedMap. No need for concurrent
write support, as we only have one writer thread. Write perf is much
better.

No-op stale photo requests more correctly now. Previously, a canvas that
was re-used and happened to have the same person in it would apply the
photo even if the dimensions didn't match. Now, PhotoManager makes a
record of the canvas's "generation" at request time, so the results can
later be rejected entirely if the canvas generation differs.

Bug: 8051779
Change-Id: I31c3fd0c3bcc10641f264b6e30eb133cc0bf77b3
onversationItemView.java
onversationItemViewCoordinates.java
onversationViewHeader.java
endersView.java
cb1126a3a93696e3a3788255ad82ed72179810e6 20-Apr-2013 Andy Huang <ath@google.com> DO NOT MERGE personal indicators are dead. long live personal indicators.

cherry-pick of: https://googleplex-
android-review.googlesource.com/299929

Bug: 8635214
Change-Id: If05b2b144ad25d1d4da9692003863f07d81c52b7
onversationItemView.java
onversationItemViewCoordinates.java
007de15a91f85c94ea625e31e2a105d7c51e363d 15-Apr-2013 Andy Huang <ath@google.com> DO NOT MERGE clean up old layouts

cherry-pick of https://googleplex-android-review.googlesource.com/297316

Bug: 8393227
Change-Id: Ida8efbc4634f3897e4974409fce7f81d8c2bda82
onversationItemView.java
onversationItemViewCoordinates.java
4a85e39fbc318359e8a3cacb874df2372fe9d566 20-Apr-2013 Andy Huang <ath@google.com> personal indicators are dead. long live personal indicators.

Bug: 8635214
Change-Id: If05b2b144ad25d1d4da9692003863f07d81c52b7
onversationItemView.java
onversationItemViewCoordinates.java
3d39350e5b6c8e6841f4ec40d1fa6cabaf70bd4f 19-Apr-2013 Paul Westbrook <pwestbro@google.com> Add logging for duplicate map key problem

Bug: 8460177
Change-Id: I5f303769cdef0eda995401995934be9bf8efce52
onversationCursor.java
7ee089ea2ef96e31504e88637b5f3b0969b3c7c1 25-Mar-2013 Scott Kennedy <skennedy@google.com> Add Empty trash/spam option

Bug: 4559378
Change-Id: I8dc5715a5f14f9fd6e8962ab665c4c25f3c64302
onversationCursor.java
onversationCursorMarkSeenListener.java
onversationCursorOperationListener.java
28c89a900d4b39a37d90fd7b1788c9c01e2c82cf 18-Apr-2013 Vikram Aggarwal <viki@google.com> Merge commit '43be61f1' into noShow

Conflicts:
res/values-sw600dp/styles.xml
src/com/android/mail/ui/OnePaneController.java

Change-Id: I9d669b2230581b8dc0b2bc4fd52bd5f2415660b4
43be61f1e21cd749702e87f9be3e3306d6707b00 18-Apr-2013 Vikram Aggarwal <viki@google.com> Merge "Update drawer UI (Contact Photos, Baseline Align)" into jb-mr2-dev
25a8ed222c0a61beacc081a0965b91545cafbc7b 17-Apr-2013 Vikram Aggarwal <viki@google.com> am ae4a8ecf: Merge "Fix ConcurrentModification" into jb-mr2-dev

* commit 'ae4a8ecf1856066fd8c374ad7aef90e6cf0de09a':
Fix ConcurrentModification
ae4a8ecf1856066fd8c374ad7aef90e6cf0de09a 17-Apr-2013 Vikram Aggarwal <viki@google.com> Merge "Fix ConcurrentModification" into jb-mr2-dev
7e654a970f73e3ebfd6895caa5072c6dcc9e7fb5 11-Apr-2013 Rohan Shah <shahrk@google.com> Update drawer UI (Contact Photos, Baseline Align)

More UI Updates:
1) Updating the drawer UI to have contact photos next to
account names.
2) Changed the align by removing font padding from folder
item names for now.
3) Fixed Manage labels miscolored label header.
4) Changed Widget "Choose Folder" to Theme.Holo

Bug: 8617095 (UX)
Bug: 8599771 (Manage labels header)
Bug: 8600474 (Widget)
Change-Id: I6869ede915f65152587dd6051e1c4cfc571a1339
etterTileUtils.java
84fe99431df3b989dff9b363562f09fd2757b63c 17-Apr-2013 Vikram Aggarwal <viki@google.com> Fix ConcurrentModification

Selected conversations are cleared at the end of the action.
Rather than iterate through the hashmap and delete them one
by one, it is easier to do nothing for selected conversations
and have the destructive action clear the entire selected set
at the end.

Bug: 8636404 ConcurrentModificationException when archiving a batch of conversations

Change-Id: I49973da783c94dc1b019057ced09e11feac962df
electedConversationsActionMenu.java
742ae0d9d78f2d98b7e2d7d21c8529207e000948 17-Apr-2013 Andy Huang <ath@google.com> am d6ce2fef: fix ISE upon rotating in detached mode

* commit 'd6ce2fef197dce0f294e5565d9753aac894979db':
fix ISE upon rotating in detached mode
d6ce2fef197dce0f294e5565d9753aac894979db 17-Apr-2013 Andy Huang <ath@google.com> fix ISE upon rotating in detached mode

Ensure that entering detached mode upon state restoration triggers a
dataset change notification.

Add some logging (off by default).

Bug: 8494843
Change-Id: I88f3bdd0e4ac4fa3b335e60089282b2aa2113935
onversationPagerAdapter.java
onversationPagerController.java
2992aa3cac250355c41bc6f3b4dd77b0ce4f1e1b 17-Apr-2013 Andy Huang <ath@google.com> log more in ConversationCursor

Bug: 8553051
Change-Id: I14f92119b7c66f5e0f3bc3f995b4b1595b1fcccb
onversationCursor.java
20a97ded277fdcd3c63952a23718410c2882103f 17-Apr-2013 Vikram Aggarwal <viki@google.com> Clean up selected set

Toggling values in the selected set needed ConversationItemViews which
were passed as null under controlled circumstances. It is much
cleaner to pass Conversation objects, as all the relevant information
is contained there.

Removing the view from the toggle() call. No change in functionality.

Change-Id: I88f5a91c721ff673ae5b6efd251ebd034a8d5ffa
onversationItemView.java
a98edecf4aefdd9a38c8b3f000fda7ceea84e388 16-Apr-2013 Scott Kennedy <skennedy@google.com> am a85831df: Allow configuring ActionBar items

* commit 'a85831df1721dda712be5154fb57404d8df1758a':
Allow configuring ActionBar items
a85831df1721dda712be5154fb57404d8df1758a 13-Apr-2013 Scott Kennedy <skennedy@google.com> Allow configuring ActionBar items

Bug: 8606333
Change-Id: I98182899dd8117757b77e5a66e106f85c64356e1
electedConversationsActionMenu.java
b4a222726f3f1c78b7146fa5f7d4d45974bcef47 15-Apr-2013 Andy Huang <ath@google.com> clean up old layouts

Bug: 8393227
Change-Id: Ida8efbc4634f3897e4974409fce7f81d8c2bda82
onversationItemView.java
onversationItemViewCoordinates.java
f7838b41daabb5c732e09ec949306ec895ac8e5e 12-Apr-2013 Andy Huang <ath@google.com> always FILL folder blocks

Bug: 8598158
Change-Id: I6445085a7b1bf385d72c3b5db8788d0881b1d66b
onversationItemView.java
370f868c834861e7732faaa9bdd07a0fa0105596 09-Apr-2013 Andy Huang <ath@google.com> fix shorter-than-expected leave-behind view heights

Make leave-behind heights variable, dependent on the
ConversationItemView that originated it.
Make the background on a SwipeableCIV not a separate view, but a simple
background. Also simplify the conditions under which it occurs-- it just
appears whenever translateX is non-zero. This covers all swiping and
animating cases handily, without the need for extra listeners.

Remove an old workaround that gave ListView on 1-pane an opaque background-

- it was there to mask FolderListFragments that stuck around, but those
are relegated to the drawer now. This reduces list overdraw by one.

Bug: 8570880
Change-Id: I2e2ea875d4ab58b5048d41025b8a2c48a3d63536
onversationItemView.java
onversationItemViewCoordinates.java
wipeableConversationItemView.java
0e3882b187ab8debc71fa571e8596fc3debb6123 11-Apr-2013 Alice Yang <alice@google.com> Merge "Checkbox vs. sender image setting" into jb-mr2-dev
642731419abb9037a729114d32d6ddd15af0a406 11-Apr-2013 Alice Yang <alice@google.com> Checkbox vs. sender image setting

Replace the current "Hide checkbox" setting with a tri-state setting with
choice of:
- Show checkboxes
- Show sender image
- Show neither

Bug: 8512959

Change-Id: I87f9cd373283fd600bdd23a7307d37c660f0805a
onversationItemView.java
wipeableConversationItemView.java
00d9844203f9299d3ce9b5d33d13a556f5a9ac88 09-Apr-2013 Andy Huang <ath@google.com> Merge "spring cleaning; implement new conv list redlines" into jb-mr2-dev
fbc519e976de0c0debd810ed8c7f77de44d136a1 06-Apr-2013 Andy Huang <ath@google.com> spring cleaning; implement new conv list redlines

Unify all Email and Gmail list item layouts.
App-specific features are now enabled/disabled in code rather than
through XML includes and overrides. I find this easier to understand and
maintain.
Folders now bottom-aligned.
Item heights are now dynamic and variable.
There is now room to display 5+ folders - removed max of 4.
Copy more dimensions and styles from Coordinates so layout control is
more centralized and normalized.
Make Coordinates values final.
Bundle the now-numerous configuration flags into Coordinates.Config.
Remove most fixed vertical margins in favor of values from font metrics.
Static caches considered harmful - moved coordinates cache to hang off
of adapter, which fixes configuration changes not taking effect (e.g.
font size, language).
Removed overspecified styles (font sizes).

Will remove old layouts and styles in a followup set of cross-project
CLs.

TODO: fix hard-coded leave-behind height - too short.

Bug: 8393227
Change-Id: I85239cbd97c485d7f73103a80d5ab92069b550d9
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
28f3d5c247927890a45880345b4bf6788f29a820 09-Apr-2013 Scott Kennedy <skennedy@google.com> DO NOT MERGE Enable "Move to" menu item

Bug: 8570161
Change-Id: I19c2368cac6fbe444757c17ad016934f511185b6
electedConversationsActionMenu.java
ad8b99b26bf9eff7730ab733cc8ef8b0710a9e0e 08-Apr-2013 Vikram Aggarwal <viki@google.com> Remove the subject from the actionbar

Following the new UX guidelines: no subject in actionbar anymore.

Bug: 8438223 Subject of the mail disappears from the action bar on
orientation change to landscape mode

Bug: 8492928 Action bar title switches between subject and the
folder+account name

Bug: 8529168 Remove search_actionbar_view

Change-Id: I8551fdacd7843ca0b2ba0bf1025483eee2587638
onversationPagerController.java
onversationViewHeader.java
nippetTextView.java
8edadf7e5929d284e4bbeee229ae24f11843832b 06-Apr-2013 Scott Kennedy <skennedy@google.com> am fa34c867: Merge "Cleanup" into jb-ub-mail-ur9

* commit 'fa34c8679c81e1b656a14ab0a00775a8dbb2c7cb':
Cleanup
ff8553f20964f4c31b0c503a9e1daff6ae08a9c7 06-Apr-2013 Scott Kennedy <skennedy@google.com> Cleanup

Change-Id: Iee8abf75639450d469632e43fe0e102b687558db
onversationContainer.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
mailCopyContextMenu.java
electedConversationsActionMenu.java
0096418374083b0fd6f34198f29710c1e4d3b993 06-Apr-2013 Mark Wei <markwei@google.com> am c30808f2: Don\'t allow save for blocked mime types.

* commit 'c30808f28ba0a85ed8495a5e840e137306d2a0f0':
Don't allow save for blocked mime types.
c30808f28ba0a85ed8495a5e840e137306d2a0f0 06-Apr-2013 Mark Wei <markwei@google.com> Don't allow save for blocked mime types.

Bug: 8488318
Change-Id: I477b05d53aede0af988d42d154952e8b256e2c32
essageAttachmentBar.java
fb5ebbd702eb07732dd631ac957b1fa6e10393c2 04-Apr-2013 Mark Wei <markwei@google.com> am d198fa7d: Attachments in Conversation List: UI changes to display attachment previews in the conversation list.

* commit 'd198fa7ddb2d0c730847af34f06aa2e940b2537d':
Attachments in Conversation List: UI changes to display attachment previews in the conversation list.
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
onversationItemView.java
onversationItemViewCoordinates.java
3f7dfa29d9257a69ce46ca2c00d6178d1de96387 03-Apr-2013 Mark Wei <markwei@google.com> am 01f63d12: Merge "Refactor ContactPhotoManager so we can reuse its preloading and caching mechanisms for other tasks." into jb-ub-mail-ur9

* commit '01f63d1285d8b37422359224e09fe2dc727be90f':
Refactor ContactPhotoManager so we can reuse its preloading and caching mechanisms for other tasks.
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
onversationItemView.java
c77855a6544dde604036db1a227c17b6b4db56d1 01-Apr-2013 Alice Yang <alice@google.com> am e19c0461: Merge "Fix view recycling with empty draft message" into jb-ub-mail-ur9

* commit 'e19c0461aaecd3fe339c1a44fe9442bca9eedcdf':
Fix view recycling with empty draft message
7d9143a225ef095db2ee6aa2e2d8aee237af4a8f 01-Apr-2013 Alice Yang <alice@google.com> Fix view recycling with empty draft message

Bug 8363993

Change-Id: I916a28331c279815bf0e09e9377c2ae0c73c56f5
onversationItemView.java
aaae0c32ef152534ff2f7d88b767fa914746c7a8 27-Mar-2013 Alice Yang <alice@google.com> am d7d17b65: Hide "move to" menu item

* commit 'd7d17b65dfdd2f8ed6a7f60e44ec9bda8e0debc0':
Hide "move to" menu item
d7d17b65dfdd2f8ed6a7f60e44ec9bda8e0debc0 27-Mar-2013 Alice Yang <alice@google.com> Hide "move to" menu item

Temporarily disable the "move to" menu item until it works with section inbox.

Bug 8480663

Change-Id: I2eba798dfa9d2e3f8a743aa149e5c2a487ed348d
electedConversationsActionMenu.java
2ba00dcd8ef84869fbc0a0873548a3b2f48ca771 27-Mar-2013 Yu Ping Hu <yph@google.com> am eaa5acef: Merge "Fix UI updating on undo." into jb-ub-mail-ur9

* commit 'eaa5acefa287788dd906414db9f389ca1fd5ad27':
Fix UI updating on undo.
e5ca52d91ee8482a81abbd80d625ef592db6fa8d 26-Mar-2013 Yu Ping Hu <yph@google.com> Fix UI updating on undo.

The UI assumed that the conversations being undeleted were
still in the cursor and behaved badly if the original
deletion had already been written through and reloaded into
the cursor.

Bug: 8373349
Change-Id: I8c05cb6b6694fed5579cad3d48afd8d6931b36f3
onversationCursor.java
33c2eda7ce3bddc87bca9c87fcc08389e61d377a 23-Mar-2013 Andy Huang <ath@google.com> am 0be92434: small fixes to play better with Gmail\'s conversation cursor logic

* commit '0be9243458fc713bc34b3ab76bfb0529f7e67871':
small fixes to play better with Gmail's conversation cursor logic
0be9243458fc713bc34b3ab76bfb0529f7e67871 23-Mar-2013 Andy Huang <ath@google.com> small fixes to play better with Gmail's conversation cursor logic

Prevent NotificationUtils's unseen count checking from affecting any
active network cursor. This was stealing cursor focus away from a
visible live label, causing the list to refresh and go blank (due to a
missing spinner in b/8457387).

Make sure that the ConversationCursor's pre-caching disables network
access before it even tries to move to the first row. This was
unnecessarily causing fetcher thread logic to run (although no fetcher
thread was made).

Bug: 8459867
Change-Id: Id4e6a0529d5e888ef5b843816101caa7ae85f984
onversationCursor.java
b74cc07dd0cfd9dfde10914c9b6b9ad4ee637d73 22-Mar-2013 Scott Kennedy <skennedy@google.com> am 40ada66d: Remove a bunch of unused methods

* commit '40ada66d5dc6a0d5ad02f4a319acc03d126e9fc9':
Remove a bunch of unused methods
3911554dc5c332eeff2591128c6b29d90f02eff0 22-Mar-2013 Scott Kennedy <skennedy@google.com> am 9e2d407f: Clean up a bunch of warnings

* commit '9e2d407fdafeb874e640eb84017feaf784309075':
Clean up a bunch of warnings
40ada66d5dc6a0d5ad02f4a319acc03d126e9fc9 22-Mar-2013 Scott Kennedy <skennedy@google.com> Remove a bunch of unused methods

Change-Id: I9c7fa70d42335694fc6ae9d9acc3955a922c96d7
onversationCursor.java
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
essageCursor.java
essageHeaderView.java
9e2d407fdafeb874e640eb84017feaf784309075 22-Mar-2013 Scott Kennedy <skennedy@google.com> Clean up a bunch of warnings

Change-Id: I5c75564eeb2df9ec76d682dbe5f4465ff2a1a5d4
ttachmentActionHandler.java
ttachmentProgressDialogFragment.java
onversationCursor.java
onversationItemView.java
uperCollapsedBlock.java
wipeableConversationItemView.java
ebViewContextMenu.java
f889be271a2ab1cc606c9ecc769cd1968329516b 22-Mar-2013 Scott Kennedy <skennedy@google.com> am 6be55ef0: Merge "Fix leftover issues from moving to a folder type bitmask" into jb-ub-mail-ur9

* commit '6be55ef040cf910f78571dbe4df1551a0bf2661b':
Fix leftover issues from moving to a folder type bitmask
962a6922af499db189ace88ed3ba518946764197 22-Mar-2013 Scott Kennedy <skennedy@google.com> Fix leftover issues from moving to a folder type bitmask

Bug: 8443606
Change-Id: If269b840604318b8da4342e8c1a5079fb54741ed
electedConversationsActionMenu.java
145d89ddd46f7df5148d7f7cff2b798de90f97ff 21-Mar-2013 Andy Huang <ath@google.com> am 97808b86: Merge "better scrolling in JS-less single-message conversation view" into jb-ub-mail-ur9

* commit '97808b864982d9b1bf81ba7e56162d73bc2357ea':
better scrolling in JS-less single-message conversation view
be7739bf0cebc5018c8ffb0c649fc62a74d74e69 18-Mar-2013 Andy Huang <ath@google.com> better scrolling in JS-less single-message conversation view

Allow simultaneous horizontal and vertical scrolling when the WebView is
embedded in a ScrollView by supplementally sending touch events to the
ScrollView when it normally wants to intercept AND the WebView handled
the touch. Touch interception happens as normal on any other child.

Bug: 8368615
Change-Id: I21f8721c673fd8146992b933d0c966d59c376795
essageScrollView.java
essageWebView.java
857514281a65eccd58d6f0a178c1281a48924ebd 21-Mar-2013 Scott Kennedy <skennedy@google.com> am 67aa9e51: Exclude all inbox labels when we\'re viewing an inbox

* commit '67aa9e5162a15fb8b46b4113ac627cd20668f095':
Exclude all inbox labels when we're viewing an inbox
67aa9e5162a15fb8b46b4113ac627cd20668f095 20-Mar-2013 Scott Kennedy <skennedy@google.com> Exclude all inbox labels when we're viewing an inbox

Bug: 8426563
Change-Id: Ib9256fcdb658cb3df9b67485f7768f75bb8b6539
onversationItemView.java
onversationViewHeader.java
5131312c9d8e59e15ad5c6cab37a04e2da71e0e6 21-Mar-2013 Scott Kennedy <skennedy@google.com> am 687f6934: Merge "Change FolderType to a bitmask" into jb-ub-mail-ur9

* commit '687f69342a40b191d2236d2e259430eebbc33fb4':
Change FolderType to a bitmask
687f69342a40b191d2236d2e259430eebbc33fb4 21-Mar-2013 Scott Kennedy <skennedy@google.com> Merge "Change FolderType to a bitmask" into jb-ub-mail-ur9
8c1058ee75ec4a5824a68c3c5275bc48d56bbad8 20-Mar-2013 Scott Kennedy <skennedy@google.com> Change FolderType to a bitmask

This allows one folder to have multiple types.

Bug: 8426563
Change-Id: Ide918a884cfb76022f3c03f5cc69adb149a964cc
electedConversationsActionMenu.java
40c43fc56288fa4eaaa9d6c7b53ebf4698f37a54 20-Mar-2013 Vikram Aggarwal <viki@google.com> am 71fdc400: Merge "Fix folder & account name not showing on back" into jb-ub-mail-ur9

* commit '71fdc400047182200d8e7eeac582c8f9d7241a3b':
Fix folder & account name not showing on back
2b288b35b1823eab3817cac455d6f784e65b5623 20-Mar-2013 Rohan Shah <shahrk@google.com> Fix folder & account name not showing on back

ConversationPagerController was clearing the action
bar's title/subtitle instead of immediately updating
it after the user went back.

Bug: 8428307
Change-Id: I6e6df13d37f7634328b01fd025222aac04e4c3a6
onversationPagerController.java
7268b1a398b29503cb1a41a082fbb99f25bfea27 19-Mar-2013 Vikram Aggarwal <viki@google.com> am 6bbeaaeb: Merge "Remove Folder.newUnsafeInstance" into jb-ub-mail-ur9

* commit '6bbeaaebc4d6111e4b327a7f7761047b89e20e01':
Remove Folder.newUnsafeInstance
d8c68c08dca0b45e7681a5756da73bced452c42d 19-Mar-2013 Vikram Aggarwal <viki@google.com> Remove Folder.newUnsafeInstance

Creating a Folder object just for populating three values is excessive.
Also, avoid creating and passing String objects when a simple integer
will be less convoluted.

Change-Id: I4b0a5ddd2da16310f5c7863dcb61d6d15d57aef4
onversationViewHeader.java
77fe0f43166cf53e8cba5ffb833e2b7a25a2e8e8 19-Mar-2013 Alice Yang <alice@google.com> am e451414d: Merge "Fix NPE" into jb-ub-mail-ur9

* commit 'e451414d75c8baec6aed0326a82632f2886c32e6':
Fix NPE
bcdc0f995c05ec1842a74e853a87ae5048799d0c 19-Mar-2013 Alice Yang <alice@google.com> Fix NPE

Bug 8409875

Change-Id: I296dd20feadd0b8ac38dee9228f5ccdc8ef76f6c
onversationItemView.java
b72623dde083e0bbed52dfb4ecc8813bfd657014 16-Mar-2013 Andy Huang <ath@google.com> am 75b52a50: hide rendering reporting in Email2

* commit '75b52a50a7b8382d9046d48ea8cda97b5471cbc8':
hide rendering reporting in Email2
75b52a50a7b8382d9046d48ea8cda97b5471cbc8 15-Mar-2013 Andy Huang <ath@google.com> hide rendering reporting in Email2

Change-Id: I6fc750a0369a9396fc00f4e5fe4ffac61831d5b4
essageHeaderView.java
02f060d706bbfc7a3ec9de76fc9ade671acf3f75 16-Mar-2013 Scott Kennedy <skennedy@google.com> am 0de263dd: Merge "Mark messages seen when we view a conversation list" into jb-ub-mail-ur9

* commit '0de263ddfcfe59b60bf24dd62b159df58c863128':
Mark messages seen when we view a conversation list
b1e21487e18503cc110e1cf8726b835e048ab1c1 15-Mar-2013 Scott Kennedy <skennedy@google.com> Mark messages seen when we view a conversation list

Mark the contents of a ConversationCursor seen, when we view that
conversation list. This may not be supported by the provider.

Change-Id: I38f0027dd22a372f05f93a11b40a9e2cf96d4455
onversationCursor.java
onversationCursorMarkSeenListener.java
fc32d8cacca75f82e4ace95ead85f0c763c39260 15-Mar-2013 Vikram Aggarwal <viki@google.com> am 4c983209: Merge "Create FolderObserver similar to AccountObserver" into jb-ub-mail-ur9

* commit '4c98320961677f547ab331a61fa34773f432e593':
Create FolderObserver similar to AccountObserver
4c98320961677f547ab331a61fa34773f432e593 15-Mar-2013 Vikram Aggarwal <viki@google.com> Merge "Create FolderObserver similar to AccountObserver" into jb-ub-mail-ur9
d14187f1db378deb56695b61cb2b2199ad094696 15-Mar-2013 Alice Yang <alice@google.com> am c8112ade: Merge "Add way to report good/bad emails." into jb-ub-mail-ur9

* commit 'c8112adebbddf669609eab3f20b0cb2ef54d82aa':
Add way to report good/bad emails.
1ebc2db723ed29093d724eb5da906a496ee57224 15-Mar-2013 Alice Yang <alice@google.com> Add way to report good/bad emails.

Added option in overflow menu to report an email as good/bad.
Currently forwards to the mailing list and prepopulate the compose text
with debug info.

Change-Id: Ieb468d8a13dc929dff808a3020f3d52ae7f85b07
essageHeaderView.java
50ff0e50f1a27144e55e4184f48e433439727e7b 14-Mar-2013 Vikram Aggarwal <viki@google.com> Create FolderObserver similar to AccountObserver

Reduce code duplication. The FolderObserver calls the onChanged with
the new folder, removing the need for every observer to call
controller methods to get the current folder.

Change-Id: Ia36b4f59676d9b30d39cf2c0cabd2ab1d260f450
onversationPagerAdapter.java
d1e0be61f7d3bbbd2a83f9d7b11f059dba56bdac 14-Mar-2013 Alice Yang <alice@google.com> Merge remote-tracking branch 'goog/jb-ub-mail-ur9' into merge

Merge UR9 into MR2.

Change-Id: I916879cbe469883ac0281985441d17e03d3a6250
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
onversationItemView.java
73fba691b6c158f415d7d9b7ea12c472f060cb98 07-Mar-2013 Yu Ping Hu <yph@google.com> Merge "When updating footer, read count from extras." into jb-ub-mail-ur9
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
onversationCursor.java
cbde5fa5dae7a730f916ab1ad5eda458d3dc8a34 05-Mar-2013 Yu Ping Hu <yph@google.com> When updating footer, read count from extras.

Previously was reading from the folder which is potentially
inconsistent. This change also requires changes in each app
to populate this value in the extras, and also to make sure
to update the conversation list when the folder changes.

BUG: 7480726
Change-Id: I4415aa5031980d9b350cbdd58e46ab903c18ef0e
onversationListFooterView.java
b158b8e1b4d07bbc035f9906306da0cd8c581937 05-Mar-2013 Alice Yang <alice@google.com> am 647aefbb: Protect against IllegalStateException

* commit '647aefbb36d4541362495e10e2a328d38ff8d2a2':
Protect against IllegalStateException
d6ab8548acd434af4f48d166baa6544e440c8220 05-Mar-2013 Alice Yang <alice@google.com> am 647aefbb: Protect against IllegalStateException

* commit '647aefbb36d4541362495e10e2a328d38ff8d2a2':
Protect against IllegalStateException
647aefbb36d4541362495e10e2a328d38ff8d2a2 05-Mar-2013 Alice Yang <alice@google.com> Protect against IllegalStateException

This was found in a monkey crash. To trigger this
ConversationPagerAdapter's stopListening() would need to called before
setActivityController().

Bug 8314039

Change-Id: If8c211ca83536af44a8eed5ed7ebb59c2d693929
onversationPagerAdapter.java
6b81f0c6ac2061edd56ddb620fbbb4e04161f9d1 04-Mar-2013 Andy Huang <ath@google.com> the count is a lie

Fix initializing the fake pager adapter count.

Bug: 8290267
Change-Id: I53b2d05ee08de2584cf20e1397f91928d27a6482
onversationPagerAdapter.java
0f9c6a48901482d0a47cad5fac0138216e4ed648 04-Mar-2013 Andy Huang <ath@google.com> the count is a lie

Fix initializing the fake pager adapter count.

Bug: 8290267
Change-Id: I53b2d05ee08de2584cf20e1397f91928d27a6482
onversationPagerAdapter.java
ca895f1f844c483f796a992ea0589a0b619e640f 04-Mar-2013 Andy Huang <ath@google.com> resolved conflicts for merge of 9e4ca799 to jb-mr2-dev

Change-Id: I3b1ff1051c934476e6fe99fad55f00868554fa37
243c23618b066bcdcd0ab9e36d8c01f50db2cbd0 02-Mar-2013 Andy Huang <ath@google.com> simple instrumentation for conversation load times

Bug: 8284691
Change-Id: I5273649165709425d6ce1d9e29b56bae037a7604
onversationPagerController.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
onversationPagerAdapter.java
onversationPagerController.java
essageCursor.java
fdabf1a4c82a66c9479a3321b244a5ea73965ccd 28-Feb-2013 Andy Huang <ath@google.com> pop out of conversation view when dealing with singleton drafts

Previous CLs (Ieb2753, If86b18) popped out of conversation mode
when the visible conversation goes missing from the cursor AND
the conversation's message count goes to zero.

Sadly, Gmail reassigns IDs to outbound unsynced singleton draft
conversations upon sync, so the sync makes the current draft
seem like it's being deleted, which triggers detached mode.

A longer-term fix is to prevent those IDs from ever changing,
but for now, change the scope of the original fix. Rather than
pop out when message count goes to zero, do it when a
conversation that starts out as a singleton draft goes missing.

Now that the message cursor count is not used to trigger the
pop-out, simplify the code to cut the fragment out of the loop.

Bug: 8185448
Change-Id: I0bf78b11b93c71b13ad3ffa560a4ee0e75a9e542
onversationPagerAdapter.java
c7523c17ba955b9a7c754edf6dbda7d010d06a30 28-Feb-2013 Andy Huang <ath@google.com> pop out of conversation view when dealing with singleton drafts

Previous CLs (Ieb2753, If86b18) popped out of conversation mode
when the visible conversation goes missing from the cursor AND
the conversation's message count goes to zero.

Sadly, Gmail reassigns IDs to outbound unsynced singleton draft
conversations upon sync, so the sync makes the current draft
seem like it's being deleted, which triggers detached mode.

A longer-term fix is to prevent those IDs from ever changing,
but for now, change the scope of the original fix. Rather than
pop out when message count goes to zero, do it when a
conversation that starts out as a singleton draft goes missing.

Now that the message cursor count is not used to trigger the
pop-out, simplify the code to cut the fragment out of the loop.

Bug: 8185448
Change-Id: I0bf78b11b93c71b13ad3ffa560a4ee0e75a9e542
onversationPagerAdapter.java
bc2e1b13b409086ea6e3edb5e795566b6c4ebb22 28-Feb-2013 Vikram Aggarwal <viki@google.com> am 81230ee2: Add logging to debug mark unread

* commit '81230ee24b65099109ee91add5a137d3795c454a':
Add logging to debug mark unread
81230ee24b65099109ee91add5a137d3795c454a 27-Feb-2013 Vikram Aggarwal <viki@google.com> Add logging to debug mark unread

Also, log problems with not finding the CLF only on tablets, where we
expect the CLF.

And only exit detached mode if we were in detached mode.

Bug: 7326925 Mark Unread Non-Functional When Viewing Message

Change-Id: I9eb8d8ac28f7c95c5c865f1051c5ed0baa066ec4
onversationCursor.java
af7cdd9ba9cb59139f821768a0e402d613d1a8b4 28-Feb-2013 Alice Yang <alice@google.com> Merge "Switched alert dialog to context menu for long press on message header" into jb-ub-mail-ur9
2b7bbb53344b1e2c1d970a8da051a7431565db1f 27-Feb-2013 Rohan Shah <shahrk@google.com> Switched alert dialog to context menu for long press on message header

Originally, long clicking on the upper message header led
to the creation of an alert dialog that would display
the copy email address option. The issues with that were
not limited to improper truncation and poor UI choice.

The change borrows from WebViewContextMenu to create a
context menu on long pressing on the message header when
that message is expanded. The options present for the new
popup are copy and send mail to address.

Note, I will be fixing the chips side as well.

Bug: 8254505

Change-Id: Ia2eb0759e14f8b800324f96f7e0df27cff1d6f77
mailCopyContextMenu.java
essageHeaderView.java
b66cb598593ca9b1ff43f7517fc2e0c66111c401 27-Feb-2013 Andy Huang <ath@google.com> resolved conflicts for merge of 2821aeaa to jb-ub-mail-ur9

Change-Id: Ia3ca74d7127806f8cde06288074117229996a5d1
2821aeaa8c06011d67344a0232079a69bd003ef8 27-Feb-2013 Andy Huang <ath@google.com> fix spurious 'mark unread' upon archive/delete on tablet

On tablet, when auto-advance is set to list, destructive actions
were having the side effect of marking the following
conversation read because the pager adapter no longer stops
listening during the transition. Let's bring back that behavior,
since it's generally a good thing to avoid changes during the
2-pane mode transition, but tweak it to placate ViewPager's new
dataset change requirement. When we stop listening, rather than
de-facto and unnecessarily switching to singleton mode, keep the
cursor around and use it as normal.

On the off-chance that we actually miss a real dataset change
during the transition, save off and use a frozen version of the
dataset count to placate ViewPager if it happens to ask for the
count during the transition.

Bug: 8272000
Change-Id: I9f52a50903eb5a7eb5c665b2573eb9b2d0d91c67
onversationPagerAdapter.java
onversationPagerController.java
24ac64dab8f7ca93cde7053dc87c752c9d5b2f61 27-Feb-2013 Andy Huang <ath@google.com> am ce59fca1: optimize scroll perf

* commit 'ce59fca1cfad3489bc121e9b58a9c67e765ca35a':
optimize scroll perf
ce59fca1cfad3489bc121e9b58a9c67e765ca35a 26-Feb-2013 Andy Huang <ath@google.com> optimize scroll perf

Switch date stamp back to a simple drawText(), as we had
switched to use a TextView to use font face spans, but this was
much slower. Since we are no longer using a custom font for
date, this is safe.

Tweak call ordering of measure/layout/setText of subject and
senders to be more like it was in UR7. Calling setText last
defers text layout until draw time, which is normally bad, but
when our list is already so far behind, it turns out there are
fewer draw calls than layout passes, and this saves some time.

Switch EllipsizedMultilineTextView from using its internal
layout to using a StaticLayout to determine the chop point. I
found this slightly faster for my data. I think this was because
most of my subject+snippets require StaticLayout vs.
BoringLayout, and even checking isn't worth it.

Bug: 8236797
Change-Id: I8684ed7cd58d9dbbaff1df4721a823a59635171c
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
7fc20cca82a2c24649e7d57ef17d42b6ad4f7240 27-Feb-2013 Scott Kennedy <skennedy@google.com> Revert "Pop out of a draft after discarding it. (Part 2)"

This reverts commit 589dec902e0df9f4a624aa983db7232309d29730.
onversationPagerAdapter.java
260c770b2ccf599b101882f9948e68b9ffd2e73d 27-Feb-2013 Scott Kennedy <skennedy@google.com> am 589dec90: Pop out of a draft after discarding it. (Part 2)

* commit '589dec902e0df9f4a624aa983db7232309d29730':
Pop out of a draft after discarding it. (Part 2)
589dec902e0df9f4a624aa983db7232309d29730 26-Feb-2013 Scott Kennedy <skennedy@google.com> Pop out of a draft after discarding it. (Part 2)

If the Activity housing the ConversationViewFragment is killed while
the ComposeActivity is up, interesting things happen when the
Activity is restored.

It restores its old Fragment, calls popOut() on it, but it is not
added, so it does not pop out. Then the ConversationPagerAdapter
creates a new Fragment, but popOut() is never called on it.

Now we will tell new Fragments that they are in detached mode if they
are created after the adapter has already entered detached mode, to
give them an opportunity to pop out.

This change is not necessary in UR9, because of changes in
CursorStatus.isWaitingForResults(), and will be reverted there in
another CL.

Follow-up to Ieb27536edc2a716b76d005fcbcc250aa03693dfd

Bug: 8185448
Change-Id: If86b184f7b95ef656903cece4ff74bba2897b65b
onversationPagerAdapter.java
bc7c37e4208e9b59ddeaf9c8ad9cff5d4b56692a 26-Feb-2013 Scott Kennedy <skennedy@google.com> Log.wtf for null Fragment

Follow-up to I00227565ca111aa69b6943282de38be26d4b3328

Bug: 8266003
Change-Id: I05677d28151bd1e768b8e7a516fcff83de5f2851
onversationPagerAdapter.java
9f96dbbffb2d1f100e563c871ef77ac6142d131e 26-Feb-2013 Scott Kennedy <skennedy@google.com> am b30604cd: Prevent an NPE

* commit 'b30604cd52a1bacf4f86626181a3224bafc96b42':
Prevent an NPE
b30604cd52a1bacf4f86626181a3224bafc96b42 26-Feb-2013 Scott Kennedy <skennedy@google.com> Prevent an NPE

We'll change this to a .wtf() in UR9.

Bug: 8266003
Change-Id: I00227565ca111aa69b6943282de38be26d4b3328
onversationPagerAdapter.java
2f0e098dee636d5301c00e8fea2116a56611d897 26-Feb-2013 Scott Kennedy <skennedy@google.com> am 46560de3: Merge "Better logging for NPE" into jb-ub-mail-ur8

* commit '46560de36dbd3521a5068913a45677d246cfb4f3':
Better logging for NPE
46560de36dbd3521a5068913a45677d246cfb4f3 26-Feb-2013 Scott Kennedy <skennedy@google.com> Merge "Better logging for NPE" into jb-ub-mail-ur8
345fcff8e66f1f6637aea802c117930d4f80c871 26-Feb-2013 Mark Wei <markwei@google.com> resolved conflicts for merge of 69c4ddb7 to jb-ub-mail-ur9

Change-Id: I5a14d61257774c9c8c47ea6ae5f981960b5deacf
0558150910ece60b2d8abf1104338e8ffbb0ea17 26-Feb-2013 Scott Kennedy <skennedy@google.com> Better logging for NPE

Add a bit of extra logging for an NPE so that we can determine the
root cause.

Bug: 8266003
Change-Id: I638b221c1e7fa87b959e085768c4f5ccde283b44
onversationPagerAdapter.java
69c4ddb7a49f11377143c9ff1c7b85b2450449e9 25-Feb-2013 Mark Wei <markwei@google.com> Do not request thumbnail download if there is no network connection.

Remove duplicate get identifier for attachments.

Bug: 8218823
Change-Id: Ia4ca9e6b6798b9132242ff0d9d046cd3e75e4e9b
essageAttachmentTile.java
6e729ca415df8254f0f2007793f97246f18f767f 25-Feb-2013 Scott Kennedy <skennedy@google.com> am cb85aeaf: Fix crashes related to the notification undo listener

* commit 'cb85aeaf327e2c6a326457b5a395b4d6cdb70d63':
Fix crashes related to the notification undo listener
cb85aeaf327e2c6a326457b5a395b4d6cdb70d63 25-Feb-2013 Scott Kennedy <skennedy@google.com> Fix crashes related to the notification undo listener

There were some issues with registering and unregistering the
DataSetObserver from Ib88a14142238b5553f80d59e67be5f64ab2a28fb.

This moves the observer to the AbstractActivityController, allowing
its registration to be tied to the Activity's lifecycle.

Bug: 8262838
Change-Id: I388bb54b01a6cb16df6104297791076dae120e4e
onversationCursor.java
fa35361c753dd6707268a5eb02ab1a3b44db78ce 23-Feb-2013 Scott Kennedy <skennedy@google.com> resolved conflicts for merge of 1ecdd95f to jb-ub-mail-ur9

Change-Id: If3d898d8f78e8dcfeadfed07edf544b1a75cb2d1
1ecdd95fdf7104f48030a4f979683fe4349b02c0 23-Feb-2013 Scott Kennedy <skennedy@google.com> Merge "Hide conversations from list after removal via notif action" into jb-ub-mail-ur8
7268c9012d587be9fff60f4dedaea955d97d8582 23-Feb-2013 Mark Wei <markwei@google.com> am 381c6b39: Fix line width nits.

* commit '381c6b390dfbfdf7040dcc2193438c70c6f66b9f':
Fix line width nits.
bd5b522c13cc1b52cc03e2999f19c152a0f4e97d 23-Feb-2013 Alice Yang <alice@google.com> am 9bb1a07e: Merge "Set MIME type correctly on drafts when content provider does not provide it." into jb-ub-mail-ur8

* commit '9bb1a07e3cafb02008e9ef6884018ad702b6059b':
Set MIME type correctly on drafts when content provider does not provide it.
08a079c3d2857e365736432b2691187767eb116f 22-Feb-2013 Scott Kennedy <skennedy@google.com> Hide conversations from list after removal via notif action

If a conversation is archived, deleted, or has a label removed via a
notification action, we should hide it from the conversation list
until either the undo notification is activated, or it times out.

Bug: 8248145
Change-Id: Ib88a14142238b5553f80d59e67be5f64ab2a28fb
onversationCursor.java
381c6b390dfbfdf7040dcc2193438c70c6f66b9f 22-Feb-2013 Mark Wei <markwei@google.com> Fix line width nits.

Change-Id: Ic8d33ce3d0c8c78eb461ef056f0b625d68a510b4
essageAttachmentBar.java
9bb1a07e3cafb02008e9ef6884018ad702b6059b 22-Feb-2013 Alice Yang <alice@google.com> Merge "Set MIME type correctly on drafts when content provider does not provide it." into jb-ub-mail-ur8
8750066b10f80e2a8080016973b3296d76d18266 20-Feb-2013 Mark Wei <markwei@google.com> Set MIME type correctly on drafts when content provider does not provide it.

Bug: 8235172
Change-Id: I7bbccbecb7d038f3add4503be0dcf460a4864b2e
ttachmentActionHandler.java
ttachmentProgressDialogFragment.java
essageAttachmentBar.java
essageAttachmentTile.java
838c8c9b385d5907d3dc3e52aaeec87bdde2ae22 22-Feb-2013 Vikram Aggarwal <viki@google.com> Remove count hack for message cursor.

After fixing the UnifiedGmail code, we can remove sketchy hacks that
worked around previous bugs.

Bug: 8240098 Set the extras on the cursor at cursor creation time, and
don't mess with later

Change-Id: I758643ef16f9eacbc884c725e7623d28deb6beca
essageCursor.java
fc851deda8f1a224fa5cc8294a3c8a58b7c235ec 21-Feb-2013 Scott Kennedy <skennedy@google.com> am 18176786: Pop out of a draft after discarding it.

* commit '18176786f320b4d4312ad1682da057434f201c13':
Pop out of a draft after discarding it.
efd4dded87a7f9b00fdb238582938096eb2506df 21-Feb-2013 Andy Huang <ath@google.com> am 5d6773c7: Fix second-line edge cases in conversation snippets

* commit '5d6773c773401a259e6b6db957c34f36c508816b':
Fix second-line edge cases in conversation snippets
18176786f320b4d4312ad1682da057434f201c13 21-Feb-2013 Scott Kennedy <skennedy@google.com> Pop out of a draft after discarding it.

Bug: 8185448
Change-Id: Ieb27536edc2a716b76d005fcbcc250aa03693dfd
onversationPagerAdapter.java
5d6773c773401a259e6b6db957c34f36c508816b 21-Feb-2013 Andy Huang <ath@google.com> Fix second-line edge cases in conversation snippets

Ensure that style spans are added before ellipsizing. Adding
bold spans after ellipsizing means the original ellipsizing
no longer applies.

Switching to adding spans before ellipsizing exposed another
problem where re-assembling the ellipsized pieces would
break up spans that cross the split point. I found it easiest
to fix this by assembling just the text and adding spans back
in after assembly. This ought to be RTL-safe, but needs further
testing.

Bug: 8233608
Change-Id: I7cddd700055b019c50eadc129cc86f3d705dee63
onversationItemView.java
4661dbf932378ae98cbb6723d83e0425eab9cd5f 20-Feb-2013 Mark Wei <markwei@google.com> am 441dea96: Merge "When normalizing MIME type, also infer it from filename in case it is generic." into jb-ub-mail-ur8

* commit '441dea96282cb0948701c1d3159ff2b31375d707':
When normalizing MIME type, also infer it from filename in case it is generic.
1867a56f7b9b3146829752b942285ffdc9b3f3de 20-Feb-2013 Mark Wei <markwei@google.com> When normalizing MIME type, also infer it from filename in case it is generic.

Bug: 8223790
Change-Id: Ie093eea2fb1710bfe66472e92e4f5db2b4247f53
ttachmentActionHandler.java
essageAttachmentBar.java
essageAttachmentTile.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
onversationContainer.java
onversationWebView.java
ailWebView.java
essageView.java
a49472f6aa432721431ba5417190ffaaa0a76ae2 16-Feb-2013 Yu Ping Hu <yph@google.com> Merge "Only show Load More when there's more mail to load." into jb-ub-mail-ur9
a7b53ee299a0ddfeeac91387ea4e434b5c403555 16-Feb-2013 Yu Ping Hu <yph@google.com> Only show Load More when there's more mail to load.

BUG: 7480726
Change-Id: Ib5a80bba1fb2094eb6c99a1ebb02edc7de6bebcf
onversationListFooterView.java
fc3350668e6552770b4b2dd5470002f2204175a0 15-Feb-2013 Vikram Aggarwal <viki@google.com> am f787ab24: Merge "Resolve all STOPSHIP comments in UnifiedEmail" into jb-ub-mail-ur8

* commit 'f787ab24309f36cb15df283cd70c46b3b5dd849a':
Resolve all STOPSHIP comments in UnifiedEmail
f787ab24309f36cb15df283cd70c46b3b5dd849a 15-Feb-2013 Vikram Aggarwal <viki@google.com> Merge "Resolve all STOPSHIP comments in UnifiedEmail" into jb-ub-mail-ur8
b264ea7257745758c43219469baf59c105d75fd4 15-Feb-2013 Vikram Aggarwal <viki@google.com> am bdaa8a87: Merge "Preserve adapter on view mode changes" into jb-ub-mail-ur8

* commit 'bdaa8a87f22f2bf50b92607d801f9e7f6c380c60':
Preserve adapter on view mode changes
d6020119c71ef9fe38725d0f0291cac7b9df6e79 15-Feb-2013 Vikram Aggarwal <viki@google.com> Resolve all STOPSHIP comments in UnifiedEmail

Bug 8211088 filed for the remaining case.

Bug: 8132946 Investigate the STOPSHIP comment in EmailProvider.java
wrt PII

Change-Id: I0f93e7bd68360eccbf781c144addf8a8a66ae779
onversationCursor.java
53bd9729c62572c47bc877cb2fc6192060418a92 14-Feb-2013 Vikram Aggarwal <viki@google.com> Preserve adapter on view mode changes

Currently, we stopListening() to conversation cursor changes on the
*start* of a view mode change from conversation mode to conv_list
mode. This has the side effect of changing the CPA.getCount() from
<whatever> to 1, since we don't have a controller, and thus cannot get
the count.

Change stopListening() to do nothing, while preserving all callers.
This should fix the crash with the side effect of jank in rare cases
where a conversation cursor update comes in during the transition, and
knocks off all three conversations that the pager created fragments
for.

A subsequent cleanup cl will remove callers and beautify associated
code.

Bug: 8190963 Tap/Select back key before a message is read in Gmail
conversation view shows IllegalStateException

Also fixes a UR8 bug:

Bug: 7560864 ConversationPagerAdapter: Null cursor and conversation
has non-zero position

Change-Id: I60976f65eaa820515d023526a508b582d59dfaa0
onversationPagerController.java
d71a516f674327a700b7e2b7a24965d41a33edaf 15-Feb-2013 Vikram Aggarwal <viki@google.com> am 5440bf50: Improve null cursor checking

* commit '5440bf50e6b05e1551b375f797ff4bf8ed3f39ce':
Improve null cursor checking
5440bf50e6b05e1551b375f797ff4bf8ed3f39ce 15-Feb-2013 Vikram Aggarwal <viki@google.com> Improve null cursor checking

Currently, isPagingDisabled() calls getCursor(). In many methods, a
second call to getCursor() is made. The cursor in the two cases could
be different depending on the timing of the events as the controller
could have received an updated cursor, or the controller could have
vanished in the meanwhile.

Changing isPagingDisabled() to accept a cursor instead. As a side
benefit, we can eliminate (cursor == null) checks which is either:
A. redundant: since isPagingDisabled checks these
OR
B. incorrect: if the cursor was non-null in isPagingDisabled but null later.

Change-Id: I082b0907cefcce7f358fce87ce351b22a04a71cc
onversationPagerAdapter.java
18644a048defcf780e3ed712e6f4570c7bbc5793 15-Feb-2013 Mark Wei <markwei@google.com> am bf3a5c5a: Fix cannot install APKs in Gmail. Workaround puts file:// uri into contentUri so the package manager can read the file.

# Via Mark Wei
* commit 'bf3a5c5aa46759a238b3ca197b97bc4182cba8b6':
Fix cannot install APKs in Gmail. Workaround puts file:// uri into contentUri so the package manager can read the file.
bf3a5c5aa46759a238b3ca197b97bc4182cba8b6 15-Feb-2013 Mark Wei <markwei@google.com> Fix cannot install APKs in Gmail. Workaround puts file:// uri into contentUri so
the package manager can read the file.

Bug: 8194270
Change-Id: I7fc55dff0218f7686abdeeddccd0b963e224a63d
essageAttachmentBar.java
e0cc9cee5eca170667f96c1479c0b95769e3e31a 13-Feb-2013 Vikram Aggarwal <viki@google.com> Merge "Support "Move to" functionality alongside "Change labels"" into jb-ub-mail-ur9
aab9bc71f2d8742128361dff72f77543f81dde52 07-Feb-2013 Rohan Shah <shahrk@google.com> Support "Move to" functionality alongside "Change labels"

Cherry-picking Rohan's original change since I messed something up
while fixing conflicts.

User cannot move an email from one defined label to another.
Change label is a hassle to use to only select one and a
menu item for moving is preferable.

This change introduces the "Move to" as part of the overflow
menu. It allows for users to move emails from folders, excluding
Starred/Important.

Bug: 8157593
Change-Id: Iaf8660fb01f731f5cbcb2253a3768b0d7b429132
electedConversationsActionMenu.java
6c31ac9077cb0c03820f5930b55b8ae8cd602e2c 13-Feb-2013 Mark Wei <markwei@google.com> am b6e902f2: Merge "Use getIdentifierUri() when comparing Attachment uris." into jb-ub-mail-ur8

# Via Android (Google) Code Review (1) and Mark Wei (1)
* commit 'b6e902f24986f6630cc0449a45d47b0762517503':
Use getIdentifierUri() when comparing Attachment uris.
10f8c4f1ca3619e761d4d1f874891f6d9259ac7b 12-Feb-2013 Mark Wei <markwei@google.com> Use getIdentifierUri() when comparing Attachment uris.

Bug: 7426699
Change-Id: I83514b4b01e311add414d326d0130a22eafbf19f
ttachmentProgressDialogFragment.java
08acec953aae66b72bc1a410dc3a74c7fb8de9cb 12-Feb-2013 Vikram Aggarwal <viki@google.com> resolved conflicts for merge of 49ae5116 to jb-ub-mail-ur9

Change-Id: I87876b9595adaf37f8db250f6c7b83b0b5be0756
5c4db951d8f23d59866deaa49b31f8ff0c81d694 11-Feb-2013 Vikram Aggarwal <viki@google.com> Needs to go in UR8.

Revert "Support "Move to" functionality alongside "Change labels""

This reverts commit 0a4af34f6f4dce23a8c5b39e94fb91ff0f6260d1

Change-Id: I25d0311396033fb5759596e4a56792abb7f355fb
electedConversationsActionMenu.java
00bbdef40b1d1e5fda3ac9157550f2da74b37163 07-Feb-2013 Rohan Shah <shahrk@google.com> Support "Move to" functionality alongside "Change labels"

User cannot move an email from one defined label to another.
Change label is a hassle to use to only select one and a
menu item for moving is preferable.

This change introduces the "Move to" as part of the overflow
menu. It allows for users to move emails from folders, excluding
Starred/Important.

Bug: 8157593

Change-Id: Ib5ae9f04b52f3f5d0f2d2ddb590219f7733cf171
electedConversationsActionMenu.java
0a4af34f6f4dce23a8c5b39e94fb91ff0f6260d1 07-Feb-2013 Rohan Shah <shahrk@google.com> Support "Move to" functionality alongside "Change labels"

User cannot move an email from one defined label to another.
Change label is a hassle to use to only select one and a
menu item for moving is preferable.

This change introduces the "Move to" as part of the overflow
menu. It allows for users to move emails from folders, excluding
Starred/Important.

Bug: 8157593

Change-Id: Ib5ae9f04b52f3f5d0f2d2ddb590219f7733cf171
electedConversationsActionMenu.java
6ad007364013b4da453c57ecd6f3924d5b8ad077 07-Feb-2013 Scott Kennedy <skennedy@google.com> am 4faa8e36: Merge "Start showing "from" in message details under header" into jb-ub-mail-ur8

# By Rohan Shah
# Via Android (Google) Code Review (1) and Rohan Shah (1)
* commit '4faa8e36d39a6d50bf8d8d2cfcb2cc9ab33efd2e':
Start showing "from" in message details under header
4e7037b67494c51a9f3a5664653cfde9faa0936d 07-Feb-2013 Scott Kennedy <skennedy@google.com> am 81de8bf6: Merge "Create Message Dialog upon long pressing the MessageHeader" into jb-ub-mail-ur8

# By Rohan Shah
# Via Android (Google) Code Review (1) and Rohan Shah (1)
* commit '81de8bf618381fd864320bd5e465e3b8039e23c2':
Create Message Dialog upon long pressing the MessageHeader
4faa8e36d39a6d50bf8d8d2cfcb2cc9ab33efd2e 07-Feb-2013 Scott Kennedy <skennedy@google.com> Merge "Start showing "from" in message details under header" into jb-ub-mail-ur8
8ba9791f38f1433db4a4ade5ebbf706dae77c0ff 06-Feb-2013 Rohan Shah <shahrk@google.com> Create Message Dialog upon long pressing the MessageHeader

When you're attempting to check and copy a sender's email address,
you should not have to remember or type out that person's entire
address. One way to approach this problem is to add in a dialog
that allows for an easy way to copy the email address. Upon some
user action, the dialog can then pop up for the user to copy the
sender's email address.

In this case, the user action will be a long press on the message
upper header in a Conversation View, such that a dialog with the
correct sender's email shows up (Unique to each message in the
conversation). The long press, however, will not affect conversations
that are collapsed i.e. the message header was tapped and the
message is not visible.

Bug:8142748

Change-Id: I0c736d89e6b1183ea46d852fd8574125931081ed
essageHeaderView.java
0a1720ece123f882edda14d1262fd58da73f7c77 05-Feb-2013 Rohan Shah <shahrk@google.com> Start showing "from" in message details under header

When looking at a message in a conversation, the user is unable to quickly
copy the sender's email - especially when it is a long email
address/unknown contact.

A possible way to fix this is to always display the "From" subject/email
address. This will allow for users to long press on the text in order to
copy as much as is required (From both the name/email).

Changes viaDomain boolean logic in order to always display "from" between
the "date" and "reply-to" rows in the message detail.


Bug:8142748 Look for ways to copy sender email address in conversation
view by long pressing on message details to copy text

Change-Id: I0da55258186d6b73d59d22cd07c96a7f95887b73
essageHeaderView.java
b4291e1b49307a269d3681a61ea12437725e67c5 31-Jan-2013 Vikram Aggarwal <viki@google.com> am 2d0ff269: Merge "Ignore a null conversation cursor" into jb-ub-mail-ur8

# Via Android (Google) Code Review (1) and Vikram Aggarwal (1)
* commit '2d0ff269a2adbc7e7aaabe98964fac62c6312865':
Ignore a null conversation cursor
2d0ff269a2adbc7e7aaabe98964fac62c6312865 31-Jan-2013 Vikram Aggarwal <viki@google.com> Merge "Ignore a null conversation cursor" into jb-ub-mail-ur8
ac4e18a19fb7cc19b3a061efbe41549f59d47be7 31-Jan-2013 Mark Wei <markwei@google.com> am b8b8fb5c: Merge "Show retry text and Download Again overflow item when download fails." into jb-ub-mail-ur8

# Via Android (Google) Code Review (1) and Mark Wei (1)
* commit 'b8b8fb5c62e95cd83c63e02fa9a2a7bdc67fbad4':
Show retry text and Download Again overflow item when download fails.
b5ef9a9497aeef6ccff95ce4f1e2e43912e3fcc4 31-Jan-2013 Mark Wei <markwei@google.com> Show retry text and Download Again overflow item when download fails.

Bug: 8090383
Change-Id: I353688be4e54fde8439104a8639bf6b7d573ecce
essageAttachmentBar.java
631abc9c544925fa9c02492382dd567b705bf6fe 31-Jan-2013 Vikram Aggarwal <viki@google.com> Ignore a null conversation cursor

If the ConversationCursor is null in notifyDataSetChanged(), and we
are supposed to notify a visible fragment, ignore the event.

Bug: 8099088 Crash opening single message from notification /
ConversationPagerAdapter#notifyDataSetChanged()

Change-Id: I3aac9f3de50dbabefcd8ccc1ee8d9c73b5254317
onversationPagerAdapter.java
337d2c1a79dee478afe7c204ef6c71bda534313f 30-Jan-2013 Vikram Aggarwal <viki@google.com> am b9d1d7c8: Merge "Improve choice mode in Conversation List" into jb-ub-mail-ur8

# Via Android (Google) Code Review (1) and Vikram Aggarwal (1)
* commit 'b9d1d7c87431829f152254f577adecb7c10fc73a':
Improve choice mode in Conversation List
b9d1d7c87431829f152254f577adecb7c10fc73a 30-Jan-2013 Vikram Aggarwal <viki@google.com> Merge "Improve choice mode in Conversation List" into jb-ub-mail-ur8
96031241ccccaf4ec7194ca96358c434d2a6c3d0 30-Jan-2013 Scott Kennedy <skennedy@google.com> am 281b299e: Merge "Conversation list item second line span was being removed" into jb-ub-mail-ur8

# Via Android (Google) Code Review (1) and Scott Kennedy (1)
* commit '281b299e0d0c211e3f0d6b83b5d1e0ae3c2acb2d':
Conversation list item second line span was being removed
281b299e0d0c211e3f0d6b83b5d1e0ae3c2acb2d 30-Jan-2013 Scott Kennedy <skennedy@google.com> Merge "Conversation list item second line span was being removed" into jb-ub-mail-ur8
0509bba9a80de474a24368e1f3baebd3cd32cd5e 30-Jan-2013 Vikram Aggarwal <viki@google.com> Improve choice mode in Conversation List

1. Set CHOICE_MODE_NONE by default on phone. We never show activated
state on phone, so this avoids a lot of existing list view choice mode
changes.

2. Set CHOICE_MODE_SINGLE only on tablet, and set it to NONE when in
list view.

3. In SEARCH_CONVERSATION viewmode, set the background drawable, just
like in CONVERSATION mode. This is the reason why the selection
sometimes continues in the search results mode, because it is not
redrawn. Changing the drawable on view mode changes forces a
refresh, which removes the selection highlights.

Bug: 8029180 Selection highlight often remains after viewing a
conversation from search results

Change-Id: I545fe1d4e330d0b3e102ff4f898a169b13733299
onversationItemView.java
809e2e44b462a489479938ef32343a9a4e456a96 30-Jan-2013 Mark Wei <markwei@google.com> am b337e311: Merge "Starts a pending download immediately when swiping to that image." into jb-ub-mail-ur8

# Via Android (Google) Code Review (1) and Mark Wei (1)
* commit 'b337e311209a9b1bd1020d8a8e21b586426ee910':
Starts a pending download immediately when swiping to that image.
c244f29b6f9af500fedf8aad48db4c80df52c5c1 30-Jan-2013 Scott Kennedy <skennedy@google.com> Conversation list item second line span was being removed

SpannableStringBuilder removes spans if it already includes the same
span, even if the start/end are different.

Now, we won't apply the spans until we have the final
SpannableStringBuilder.

Bug: 8091758
Change-Id: I58a4d7cf55679570ac0d4df6585fa78c998ade32
onversationItemView.java
7bed4bc31a49a2297a38eb9d7b595fba1fa1f849 23-Jan-2013 Mark Wei <markwei@google.com> Starts a pending download immediately when swiping to that image.

Add a new Attachment state, PAUSED, for when we've queued the attachment in the
DownloadManager, but it hasn't started yet.

Modified onViewActivated() so it would only get triggered once when you swipe to
that fragment.

Bug: 8023818
Change-Id: I8038b51d4750e333d9080e2277a745317a281e51
ttachmentActionHandler.java
ttachmentViewInterface.java
e7a4b6898f085782cf4c5f5c8c4091a245465f0d 29-Jan-2013 Vikram Aggarwal <viki@google.com> am a91d00b4: Many fixes to detached mode

# Via Vikram Aggarwal
* commit 'a91d00b4de3092b41af5f36436d3b49fe4586f64':
Many fixes to detached mode
a91d00b4de3092b41af5f36436d3b49fe4586f64 18-Jan-2013 Vikram Aggarwal <viki@google.com> Many fixes to detached mode

1. Unselect the top conversation in list (by un-setting activated
state), before entering detached mode.
2. Set choice mode to NONE to avoid changes to the selected state in
detached mode.
3. Allow for recovering from detached mode by tapping on a valid
conversation in the list.
4. Bypass most of the action in CPA.notifyDataSetChanged() in detached
mode.
5. Pop out of conversation view if there are no messages (when
detached and the detached conversation is expunged).

Bug: 8026749 Detached mode triggered even when not detached

Bug: 8025487 In detached mode, CPA.notifyDataSetChanged() shouldn't do
much

Bug: 7337160 Subject and message body mismatch

Change-Id: I7b578ab929ee6a7d18002567b1cf4aaac54b0480
onversationCursor.java
onversationPagerAdapter.java
67a8b48c3aaad10c2dc6556964c55cddf7012508 29-Jan-2013 Vikram Aggarwal <viki@google.com> am bcb16b98: Check tablet mode through resources

# Via Vikram Aggarwal
* commit 'bcb16b98140a83a4db3c51568d21c839595f73df':
Check tablet mode through resources
bcb16b98140a83a4db3c51568d21c839595f73df 29-Jan-2013 Vikram Aggarwal <viki@google.com> Check tablet mode through resources

Change-Id: I790fef6ef7ce3ca97ebba1fa220f44123c2d2e9d
onversationItemView.java
onversationListFooterView.java
onversationPagerAdapter.java
e22c41d168aebe3bba6781e0ef8f5a6cbe5e3686 28-Jan-2013 Scott Kennedy <skennedy@google.com> Follow-up to IntentReceiver leaking

See I5a4d8825cbbc53c2b8c6cd68a4fe5cd3e5215d0c

Wrap calls to clearResourceCache() in a finally block.

Bug: 8029270
Change-Id: I39249a893890e6044c6cdf7f5ca9ef9a639ee635
endersView.java
d5fd04656f364a209703a67debc33d91dabfb83f 26-Jan-2013 Scott Kennedy <skennedy@google.com> Prevent the leaking of an IntentReceiver

Only cache resources (and setup the related IntentReceiver) upon
request, so we don't leak it if the first call to the method is from
a Service.

Bug: 8029270
Change-Id: I5a4d8825cbbc53c2b8c6cd68a4fe5cd3e5215d0c
onversationItemView.java
endersView.java
7127c273d1995077f9c55c8abe00af3e05baad38 15-Jan-2013 mindyp <mindyp@google.com> Hide conv list photos behind an experimental pref

Change-Id: I5c12c9794fe19c12595821425ecc6c2fb4ea534f
onversationItemView.java
onversationItemViewCoordinates.java
d25c753fd348cbd98a148e434134bbe2191aad7d 22-Jan-2013 Scott Kennedy <skennedy@google.com> Don't use a custom color for senders in notifications

Bug: 8045625
Change-Id: I3d7baa2df73619c4cc3da9d464e966d9c92ee367
endersView.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
onversationItemView.java
267453587f13986acc7de3d52de95184c38fb4e1 18-Jan-2013 Mark Wei <markwei@google.com> When clicking on a MessageAttachmentTile, the images download with varying
priority.

The clicked image should have highest priority, and images further to the left
and right should have consecutively less priority.

Bug: 8023818
Change-Id: I5531971f00db68e4b99bb210c757db53fc2a936c
ttachmentActionHandler.java
ttachmentViewInterface.java
essageAttachmentBar.java
essageAttachmentTile.java
30f7675da7eb408564d18b8796b094031166441a 18-Jan-2013 Andy Huang <ath@google.com> Merge "counteract jumping in CSS-based message zooming" into jb-ub-mail-ur8
0eb46cb4c18b91ee272caca7f62f4a15ec2668ef 17-Jan-2013 Mark Wei <markwei@google.com> Modify image attachments previews to conform to UX specs

Thumbnail and full image start loading at the same time.

Once thumbnail is shown, we display a determinate progress bar while downloading
the full image.

Remove progress bar from image tiles in ConversationView.

Bug: 8021747
Change-Id: I600a8bb8337dd7ee6e7cec2a1221824b04a9e2ef
essageAttachmentTile.java
ce8565b3605c2ce47c75e259f387cd4955f017da 17-Jan-2013 Andy Huang <ath@google.com> counteract jumping in CSS-based message zooming

Adjust scroll position after a zoom to counteract jumping.
There's still a momentary flash, so it's not perfect yet. That
might be suppressable with ingenuity (i.e. gross hacks).

Suppress WebView input handling for an input sequence on
POINTER_DOWN to prevent WebView from scrolling during a scale.
I've chosen to implement message translation-during-scale
manually, so the WebView must not move on its own during a
scale, or else the translation will be doubly applied.

Bug: 7400516
Change-Id: I54c347c37d28864441c8a3bca3395bdc86f6616f
onversationWebView.java
6fbad637da287ba8e864e5b8b4548f3e261c564a 17-Jan-2013 mindyp <mindyp@google.com> Get the associated division ids from the dividedimagecanvas; don't depend on the header

Fixes a random crash when scrolling the list

Change-Id: Ie0a923af533b2f2b6f9f9c0003006922f4114cf4
onversationItemView.java
1aee17e324f204080baaabceb64f4edf73681542 14-Jan-2013 Mark Wei <markwei@google.com> Load image attachments from live conversations.

MessageAttachmentTile automatically downloads image attachment thumbnails when
missing.

PhotoViewFragment first loads thumbnail, then loads the full image. Shows and
hides the progressbar correctly.

Added ability for UiProvider to specify which rendition of an attachment to
download.

Bug: 7987412
Change-Id: Ief7f4c9a4a354d27045f6415a32211484a8527c6
ttachmentActionHandler.java
essageAttachmentTile.java
f832d5f8b490e184d0c9cd70bba8f32ed29ff51a 16-Jan-2013 mindyp <mindyp@google.com> Use position, item, email to make a unique request id.

Change-Id: Ie0fdf2f00905ae4ce66997064c24b60e0556ae97
onversationItemView.java
f6e1fefe28735e7bfa04c00f813b82162e114706 16-Jan-2013 mindyp <mindyp@google.com> My change to this file was lost; we don't care about folders width for senders

Change-Id: Iffcec301e31e226d9ce11450829ba1674528b421
onversationItemView.java
646d4fc7ba80f71feb6701b8e5ba4b24c3462f7c 16-Jan-2013 mindyp <mindyp@google.com> Make sure we don't override existing requests for the DivisionCanvasView.

Since each view could hold up to 4, this had been replacing earlier requests
with later requests for images that were intended for other positions
in the DivisionCanvasView.

Change-Id: Ica8e9d101cea0041281a155ca7ec979807559aa5
onversationItemView.java
7faa4d0a0ee25200f4fdc6dee30bb98b8e18b24a 15-Jan-2013 Vikram Aggarwal <viki@google.com> Support veiled addresses in collapsed view

Change-Id: Ib807231d71cf09889d497ca0e0432ecdcf7f16c6
essageHeaderView.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
onversationItemView.java
onversationItemViewCoordinates.java
7704d79def5e5f36a1cbe22fbbe6e9520503899c 12-Jan-2013 Vikram Aggarwal <viki@google.com> Restore the CAB mode on orientation change

Currently, the CAB mode is restored only when the Conversation List
Fragment (CLF) is available. The CLF was needed earlier because we
grabbed views from the selected conversations. We don't anymore, so
the CLF dependency can go.

However, we cannot always restore the CAB mode, we might be in
conversation view mode on the phone. On orientation change, we want to
show subject view in the ActionBar, not CAB mode. So we need to check
the view mode before doing this.

Bug: 7742352 Selected message action bar icons (delete,start) are
missing from Gmail inbox list after orientation change

Change-Id: If6dcae413f07fe708c3cd6c970b2245b58c0a23a
electedConversationsActionMenu.java
d01d1f1869f135b1e31bdb08d6df80d7de5c7c8f 11-Jan-2013 Vikram Aggarwal <viki@google.com> Merge changes I2b7d387f,I424e9642 into jb-ub-mail-ur8

* changes:
Remove views from selected set.
Just use the default directly.
35ac0874ea4fec1769af077a3f74948bdda1a502 11-Jan-2013 Mark Wei <markwei@google.com> Merge "Refactor Attachment code. Combined AttachmentStatusLoader.Result and Gmail.Attachment into GmailAttachment." into jb-ub-mail-ur8
669947bf67a3d0eed377b18099bb873604ad5009 11-Jan-2013 Vikram Aggarwal <viki@google.com> Remove views from selected set.

The views were originally being used in the ConversationListFragment
to delete items. They are no longer being used now, but we still
maintain extensive maps and pass the collections around. We can stop
doing this extra work.

This does not fix any bug, but the cleanup was found while
investigating the bug below.

Bug: 7067964 Gmail: archives wrong message

Change-Id: I2b7d387fe5ab078b2006f27cc8167b354d0bb1c8
electedConversationsActionMenu.java
41e313eedf07d234f08aebdfc08f354496520d7e 11-Jan-2013 mindyp <mindyp@google.com> If we don't have a sender email, assume old format of senders info and show the default image/tile

Change-Id: I0eebbcf1c76a9e585cecb86e25a7bf032529ec7d
endersView.java
bbe74aee04f669990e888095b0d6858dc1e17ce1 19-Nov-2012 Mark Wei <markwei@google.com> Refactor Attachment code. Combined AttachmentStatusLoader.Result and
Gmail.Attachment into GmailAttachment.

Renamed UIAttachment to Attachment, which still follows the UIProvider contract.
GmailAttachment extends Attachment, and contains Gmail provider specific data.

The DownloadListener in AttachmentStatusLoader will modify the cached
GmailAttachments directly, where previously we would create new Results to give
to the ConversationState.

Cancelling an Attachment download will cancel both cache and external db
entries.

Attachment download dialog will close only if state is SAVED or FAILED. This
prevents a NOT_SAVED state update from closing the dialog prematurely.

Simplify AttachmentRequest. Simplify AttachmentStatusLoader to a listener.

Bug: 7538447
Bug: 7538152
Change-Id: If6362473697e6735f1858619c7af83238d75469e
ttachmentActionHandler.java
essageAttachmentBar.java
essageCursor.java
essageFooterView.java
33c09dfbd3c03e2ed5c24db8426ab0a5c47d6973 10-Jan-2013 Mark Wei <markwei@google.com> Merge "Fix string formatting issues." into jb-ub-mail-ur8
fffbcdcd3eed1d05a39338be1c5c34019fec9a03 10-Jan-2013 mindyp <mindyp@google.com> Reset the photo BEFORE we request a layout

Avoids race between whiting out background and adding photo
Change-Id: I44ddeb5720a25c877adcc2631f5224f7863ba676
onversationItemView.java
ede9b8181d8a9d051038c0b011497e6c23f097f2 10-Jan-2013 Vikram Aggarwal <viki@google.com> Merge "Allow veiled address pattern to be updated through settings" into jb-ub-mail-ur8
c40e5e818876db551e8f7c6f506ebaf38f73ac7a 09-Jan-2013 Mark Wei <markwei@google.com> Fix string formatting issues.

For subtitle and actionbar text.

Bug: 7919558
Change-Id: Ie47a6a42df1c3161aed64dbfc8159d9686cb157c
essageAttachmentBar.java
69a6cdff8afde77ec9bcd75a5651ee212344019e 09-Jan-2013 Vikram Aggarwal <viki@google.com> Allow veiled address pattern to be updated through settings

Change-Id: Ibbd412308283fd2c0cae0abbec0a43be1db1b3ad
onversationViewAdapter.java
essageHeaderView.java
9092d591d07a1ebd2b75707e7abea75be8af3ae3 09-Jan-2013 Paul Westbrook <pwestbro@google.com> Merge "Optimization for detemining conversation position" into jb-ub-mail-ur8
6a4c4f62db0ddf6660d889bf1f21e37d25a99363 09-Jan-2013 mindyp <mindyp@google.com> 10" tablet style; use old fonts and read/unread colors

Change-Id: Id82c30abaffe6fdf05579f98985d28529d74f394
onversationItemView.java
endersView.java
c8f2a3c6755b3b78af810aa73ab78487567cf074 08-Jan-2013 Paul Westbrook <pwestbro@google.com> Optimization for detemining conversation position

When the UnderlyingCursorWrapper is created, the positions of
conversations are saved. When the UI wants to determine the position
of a conversation, the ConversationCursor first looks up the position
in the underlying cursor wrapper. Then for each of the deleted items
in the cache map, if the deleted items is before the desired
conversation, the position is decremented.

Note: If the ConversationCursor ever deals with insertions of items
that are not in the underlying cursor, this logic will need to be
updated.

Bug: 7543652

Change-Id: Ic46a16c6e93f9afd08835f2600cbcfbaa6f308aa
onversationCursor.java
onversationPagerAdapter.java
aab364325753161b88de05a973693d52a25d7436 09-Jan-2013 mindyp <mindyp@google.com> Merge "Make sure we verify there is a subject length for the mode before pulling it from the array." into jb-ub-mail-ur8
d370a5590d11ca4bfcf7c7667a0bd490fe133d8c 09-Jan-2013 mindyp <mindyp@google.com> Make sure we verify there is a subject length for the mode before pulling it from the array.

If not, default to conversation list length.

Fixes b/7960035 gmail crashes when searching

Change-Id: Ieaa472e8b79637615a103bf9a33ec08a3bdcd6e5
onversationItemViewCoordinates.java
69495b0a5551aaf4b70b6b29348946b730cfc3e8 08-Jan-2013 mindyp <mindyp@google.com> Reduce time it takes to render a conversation item

Re-use an existing folderdisplayer instead of recreating one each time
Remove unnecessary TextPaint call
Don't do html to plain text on the ui thread; its done when processing senders
Change-Id: Id1b4fa93b2b082fd9f69e473d6d3ee55bd852684
onversationItemView.java
endersView.java
f0798f37b4954463eb24c1f7e54b3b5e7f570351 08-Jan-2013 mindyp <mindyp@google.com> Fix position of the senders view when showing contact photos instead of checkboxes.

The priority indicator is not inlined with the subject when in 10" landscape
Move senders view down for normal mode on tablets
Change-Id: Iabe6251e7c168fe2e31af5a45f4faf16388bddf9
onversationItemView.java
onversationItemViewCoordinates.java
d2bc8e780711b4e4a063428bdb53b5a98ae84bc5 08-Jan-2013 Vikram Aggarwal <viki@google.com> Merge "First cut of veiled addresses in mail" into jb-ub-mail-ur8
1c69e784964cc17e2bcbf2f08c13933b449d05d6 08-Jan-2013 Scott Kennedy <skennedy@google.com> Show sender in notifications

This method is no longer just visible for testing.

Bug: 7958979
Change-Id: I5bf7ca4fecd99a0ee4ccbe9f94522faeae794d2d
endersView.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
onversationItemView.java
endersView.java
a8dc86faac4d1ac07901be75dc92b7a877ca46ff 08-Jan-2013 Vikram Aggarwal <viki@google.com> First cut of veiled addresses in mail

The feature is currently disabled, and there should be no performance
impact while it is disabled.

Change-Id: I57947ce4dc1ea8c6019e3df15a6754f59ee405f6
essageHeaderView.java
6496c582b5874c0be293e46b1d851222676766b7 05-Jan-2013 Vikram Aggarwal <viki@google.com> Merge "Use confirm fragments for all operations" into jb-ub-mail-ur8
b8c3171710b7f97247fd0c841ce95f5f515ef576 04-Jan-2013 Vikram Aggarwal <viki@google.com> Use confirm fragments for all operations

The previous change used confirmation fragments rather than dialogs
for actions on selected conversations. This change expands that to
all actions that require confirmations.

Bug: 6022869 Confirm actions (Deleting / Archiving / Send message) pop
ups are disappear on orientation change in Gmail

Change-Id: Id7714da8608816721089f46811be2688f34ae4f7
onfirmDialogFragment.java
electedConversationsActionMenu.java
a6483cad68543746c637876693cf92be2db36ed6 04-Jan-2013 mindyp <mindyp@google.com> Merge "Sender emails are now available. Use the senders email to lookup their contact photo." into jb-ub-mail-ur8
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
onversationItemView.java
onversationItemViewModel.java
endersView.java
8d9313bf75dc62b613d1c8a0b3f153f04171274f 04-Jan-2013 Vikram Aggarwal <viki@google.com> Remove static members in ConversationCursor

1. Turn debugging on by default to avoid shipping debugging code.

2. Remove one static member and turn one static into a constant.

3. Fix naming of member incorrectly called sMostlyDead.

4. Turn more members into final.

5. Turn comments into useful javadoc.

6. Remove unused method.

Change-Id: Ie08cc003c1b110cf9baa760cb048a13c2f6de856
onversationCursor.java
7460a1c7b617a6a67d3f24c699d0b16a78a3c02c 29-Dec-2012 Vikram Aggarwal <viki@google.com> Remove activity leak

The conversation cursor was maintaining a static reference to loaders
and the resolver. When the cursor was loaded immediately after
orientation changes, the CursorLoader framework returns the existing
cursor. This cursor contained the reference to the old activity. This
also meant that the sResolver reference was stale till the
conversation cursor was recreated.

As suggested by ath@, we remove the static ContentResolver, and rely
on a member.

Also, as suggested by ath@, we use the ApplicationContext, which
removes the inner memory leak that was being caused by the
CursorWrapper holding on to a context, which held on to the previous
application.

Just one activity on rotate (after GC).

Also contains minor code cleanup: removing unused import and cleaning
up incorrect javadoc on methods.

Bug: 7883592 mild activity leak

Change-Id: I09043c38055e5d7ed2fb345286b1f293e39bf4c3
onversationCursor.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
onversationItemView.java
onversationItemViewCoordinates.java
endersView.java
006a84fe8ec32c1269c03856d7e4a471309c89a8 02-Jan-2013 mindyp <mindyp@google.com> Move the folders boxes inline with the second line of text on phones

Centers folder name as well
Next steps will be to give a character limit to the subject when
there are folders to render

Change-Id: I53ca2e71da62cc8ab7fe6c76714261a44e7feb88
onversationItemView.java
onversationItemViewCoordinates.java
244acec5228e63006b347d2a9c8bd5f986106bbe 02-Jan-2013 mindyp <mindyp@google.com> Merge "Match redlines for new ur8 layout." into jb-ub-mail-ur8
6cadbfce032c5f8d61c873d91989bff1fb7cc4e5 27-Dec-2012 Vikram Aggarwal <viki@google.com> Use confirmation dialog fragments

1. Create a listener for the positive action in the controller to be
able to create on orientation changes.
2. Create a dialog frament for confirmation dialogs.
3. Hook up with selected conversations action menu for now, other
dialog objects to follow...

Bug: 6022869 Confirm actions (Deleting / Archiving / Send message) pop
ups are disappear on orientation change in Gmail

Change-Id: I206c8102d49df0a0f41198b7fd149fb711235a97
onfirmDialogFragment.java
electedConversationsActionMenu.java
95f9e1b167f4945adfa4ca62f4b72a102b621794 26-Dec-2012 mindyp <mindyp@google.com> Match redlines for new ur8 layout.

Change-Id: I0e23a356e366c953f1bb36a43f246ad8622a1d9a
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
endersView.java
88acafa03a87f5c84b959697d13b81df8f11a96e 21-Dec-2012 mindyp <mindyp@google.com> Make it possible to get the emails of senders we want to display photos for.

Change-Id: I32bdf23f1fdb8b94d2f0abc4d4bb05d2e2d04648
onversationItemView.java
onversationItemViewModel.java
endersView.java
4de145bb568b6963d374fa0bac199218dc494186 20-Dec-2012 Paul Westbrook <pwestbro@google.com> Minor code cleanup

Change-Id: Id9758c56795f1cedf3b89b86b0a66c0ac84ebdb8
onversationCursor.java
onversationPagerAdapter.java
842aa19e551fb6b7e76fb89c8d39f189b9dacc81 19-Dec-2012 mindyp <mindyp@google.com> Add unread state to end of content description for conv list items.

Fixes b/7391417 Mail status(Read/Unread) is not echoed when hovered through the list of mails in inbox.

Change-Id: I390b7af98d9a72cf705f4ff44ba597948a876edb
onversationItemViewModel.java
0db28c16793b12f90a6c7b2d33bacf76412aa1f0 17-Dec-2012 Andy Huang <ath@google.com> Merge "per-message zoom using JavaScript + CSS 3D transforms" into jb-ub-mail-ur8
418336e902eb91bd69371dbb3aebc0396a658d0f 15-Dec-2012 Mindy Pereira <mindyp@google.com> Revert "First round of visual refresh changes."

This reverts commit 0886b2910872b17f6cb6716ee4e92fba3c69d873

Change-Id: Ie8a78b30449f311925504bfa5bca584a0a7451ff
onversationItemView.java
02f9d18a54072db8d86c524f9c09e508092ddd7c 29-Nov-2012 Andy Huang <ath@google.com> per-message zoom using JavaScript + CSS 3D transforms

When Auto-fit is off, disable built-in WebView zooming, which
is only capable of zooming an entire document (the entire
conversation).

Use ScaleGestureDetector to trigger a CSS 3D transform to zoom
in/out just a single message div.

During the gesture, the elements above and below the message
being scaled are untouched. This is ugly.
TODO: they should either move away (tricky) or at least fade
out.

When the gesture is complete, to avoid leaving overlapping
elements, we force-scale the height and reset the transform
origin to the top left.
TODO: auto-scroll to the correct place to counteract this
perceived jump.

Double-tap is not yet implemented. We'll have to do it
ourselves.

Bug: 7478834
Change-Id: I114e4977304c7060d499d116cc75bc0488967448
onversationWebView.java
0886b2910872b17f6cb6716ee4e92fba3c69d873 12-Dec-2012 mindyp <mindyp@google.com> First round of visual refresh changes.

Limited to:
font face, size, and color changes
padding changes
bsckground color changes

Change-Id: I23288e20a380d74086041c3eafc098554c3377d3
onversationItemView.java
5cc0ab20009100e3ef259fe3d2e3ddc357f79285 11-Dec-2012 mindyp <mindyp@google.com> Update folder changes from UPDATE_FOLDER_COLUMN to FOLDERS_UPDATED

fixes b/7710067 clean up leftover cases of folder updates that aren't yet using folder diffing (FOLDERS_UPDATED)

Change-Id: I145c7ba39ea705772fdb7a47990d3ff7831401cc
onversationCursor.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
onversationCursor.java
onversationItemViewModel.java
essageHeaderView.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
onversationCursor.java
onversationPagerAdapter.java
ecureConversationViewFragment.java
26746eb4acb159f3ce0d411c10d85a1de3e958a0 06-Dec-2012 Paul Westbrook <pwestbro@google.com> Use a single operation to for updates

This combines both the delta update and the full update into a single
conversation operation. Clients that know about the partial update will
use that, while older clients will do a full update.

Bug: 7427595

Change-Id: Iab0ece2c5469d0fd7b8fc5b92acaddc4bfa26add
onversationCursor.java
cb0b30ee1d5cfcc267bc7de1e6ad78ed766c1e50 30-Nov-2012 mindyp <mindyp@google.com> Change the UiProvider contract to only send deltas when changing folders

Change-Id: Ic69807f0e8f6ddf06f9e34600089054fe868b9cd
onversationCursor.java
0c02f7c0928487eb5dd58234d10817fffff9be18 27-Nov-2012 mindyp <mindyp@google.com> Fix the width of the date background

Uses static rects to avoid creating objects in onDraw

Fixes b/7340537 Background of small label/attachment indicator doesn’t extend all the way to the right edge of the screen

Change-Id: I6755d4acf9ecda24a41d29c07db668e1563c9c5b
onversationItemView.java
496e003665698376f67ec3225426283593d1f853 22-Nov-2012 Mark Wei <markwei@google.com> Merge "Prevent message attachment bar's Overflow from disappearing when certain conditions are met. Now the Overflow will appear as long as at least one action is available." into jb-ub-mail-ur8
8335d37d0e6b6e06ba4666223945c2a3f24103c1 12-Nov-2012 mindyp <mindyp@google.com> Remove slower ops from onDraw

Per fwk team:
most to least called: onDraw (get slow stuff out of here!)
onLayout
init

Change-Id: I79bcbb4ebfe562adcd31b536b10187585366bf78

Conflicts:

src/com/android/mail/browse/ConversationItemView.java
onversationItemView.java
onversationItemViewModel.java
5aafc733841dd69488abcc733aa9a2fc451ee14d 14-Nov-2012 Paul Westbrook <pwestbro@google.com> am 4bbbf055: Merge "Revert to old conversation position calculation" into jb-ub-mail

* commit '4bbbf055bd8a03b35e47c0c9259c0a35d80f7542':
Revert to old conversation position calculation
99e379ecc14a21c595a14d58c33aeee764f647db 14-Nov-2012 Paul Westbrook <pwestbro@google.com> Revert to old conversation position calculation

Use the old way to determine the position of a conversatin
(pre https://googleplex-android-review.googlesource.com/#/c/250616)

We can't use the underlying cursor to determine position because
it doesn't know about the deleted items. Ideally the ConversationCursor
would contain the map of conversations to positions. Bug b/7543652 has
been written up to track adding this to the conversation cursor

Bug: 7541980
Change-Id: I925956d135d7b8caf73db7d3013b5baa77664f26
onversationCursor.java
25eab6dad485af385a9d47c8abc6fa6563e9c15d 13-Nov-2012 Vikram Aggarwal <viki@google.com> resolved conflicts for merge of 520172e0 to jb-ub-mail-ur8

Change-Id: If53bfdf24e9142f63669533120d980d24ae45c1e
520172e02adc400132591b9f3f5f48c8de445e0e 13-Nov-2012 Vikram Aggarwal <viki@google.com> Remove unused imports

Change-Id: I9385382f4e425992e2a09d12b4c414e32d959d4f
onversationCursor.java
b1829d68f6e41d363f45aaaa913b1cf83c5b8e5c 13-Nov-2012 mindyp <mindyp@google.com> Make sure we don't do anything with empty subject text.

I think this fixes:
b/7489856 NullPointerException when trying to pull up draft email

Change-Id: Ie165715e215341bab010a675f573d9bf65a99d6a
onversationItemView.java
c59dd8270215f97d39697dae9e69976bcfe3642b 13-Nov-2012 mindyp <mindyp@google.com> Make sure we use our version of converting from html to plain text.

Fixes b/7532730 audit UnifiedEmail and replace all Html.to / Html.from with our HTML tree parser

Change-Id: Iad23b688175b20db698fce5efccbe869c12d0b5c
pamWarningView.java
1bdfea61e8bf17a38b979fb37a258db7e812ac0d 13-Nov-2012 Vikram Aggarwal <viki@google.com> am 55d664ad: Merge "Make variables final, reduce scope overall" into jb-ub-mail

* commit '55d664ada644a637ba13128b0fc50086f2abab8c':
Make variables final, reduce scope overall
55d664ada644a637ba13128b0fc50086f2abab8c 13-Nov-2012 Vikram Aggarwal <viki@google.com> Merge "Make variables final, reduce scope overall" into jb-ub-mail
0823542b7e2238a764845bc22260d072f638b016 13-Nov-2012 Vikram Aggarwal <viki@google.com> Make variables final, reduce scope overall

Get the authority and the operation list from the batchMap to allow the
batchMap to go out of scope at the end of the method.

Make the authority final in the for to allow lexical closure without
an additional variable.

Save the isUiThread in a boolean so we don't query it repeatedly
inside the loop.

Reduce scope of try to cover ContentResolver.applyBatch()

Change-Id: I1adbce5f2e36d99b26dc240fc0835d62ff89d1f9
onversationCursor.java
4c7604e3378e8ea02366c9ab5899bdd69c4be072 13-Nov-2012 Andy Huang <ath@google.com> am 8883f228: fix position tracker issues that prevented auto-advance

* commit '8883f228890572a8d85d06b1e0bf08c65bd42db4':
fix position tracker issues that prevented auto-advance
8883f228890572a8d85d06b1e0bf08c65bd42db4 13-Nov-2012 Andy Huang <ath@google.com> fix position tracker issues that prevented auto-advance

ConversationCursor must unwrap conversation URIs before looking
up in its position table. The other contains() usage from
resetCursor() looks correct.

AAC.setCurrentConversation should init the position tracker
with the new conversation, not whatever was there before.

Bug: 7529090
Change-Id: I4ad7f4550f29a29d2ac666354ea6153da2fc8a88
onversationCursor.java
eb9a4bdc53269ee05fe11870b9ebf03f18196585 12-Nov-2012 Scott Kennedy <skennedy@google.com> Fix always show pictures for multi-message thread

The always allow pictures button only affects a single message in the
thread, so we need to propogate it to all other messages from the
same sender.

Bug: 7346217
Change-Id: I722ef284afd7b8853ddab622f54b86ebaaa5d463
essageHeaderView.java
ecureConversationViewFragment.java
856200a2abc6a90711f6eb99fc0340dd75ef6e9b 10-Nov-2012 Mark Wei <markwei@google.com> Prevent message attachment bar's Overflow from disappearing when certain
conditions are met. Now the Overflow will appear as long as at least one action
is available.

Refactored Overflow code.

Bug: 7488930
Change-Id: I198211cfaa535861f53f52d04b0391968d6004da
essageAttachmentBar.java
02133aa80d4ff68739a8b8c6f4cc00150a3cfc80 09-Nov-2012 Andy Huang <ath@google.com> fix starring after rotation

Starring a message depended on having a working
ConversationController. But while rotation retains the
Loader/Cursor/Messages, it makes the controller (actually a
Fragment) useless because a new one is made.

So have onLoadFinished ALWAYS update the Cursor's controller
to point to the current Fragment before using it.

Similarly, it isn't great that the Cursor points to a
Conversation, which may be old after rotation. That one is less
bad, since a Conversation is relatively static, but everybody
should be on the same page after rotation, so stop caching
internal Conversation references in the Message/Cursor/Loader.

No null checks on conversation/controller get(), because they
really should never be null on access. NPE is as good as
anything to catch these cases.

Bug: 7295695
Change-Id: I949f53779afc820eae0f05da4618e570db381942
essageCursor.java
essageHeaderView.java
c4e6c4f9e430d0c3509fd84ce699dbdd69ef19c7 09-Nov-2012 Andy Huang <ath@google.com> Merge "fix starring after rotation" into jb-ub-mail
0a22d4482396f3717b36796e594d5f8e9760d509 09-Nov-2012 Paul Westbrook <pwestbro@google.com> Reduce chance of ANRs

Don't iterate through the conversation cursor on the UI thread
in resetCursor(), especially since that iteration happened in a
background thread

In ConversationSelectionSet, don't iterate over the cursor on the UI
thread when receiving a new cursor update, while the user is in CAB mode

Bug: 7502843
Change-Id: I91ed861de594c9469e95d2aef01a9dd18c6d0401
onversationCursor.java
cd12e82dead8a920b060340c037d51b144966a73 09-Nov-2012 Andy Huang <ath@google.com> fix starring after rotation

Starring a message depended on having a working
ConversationController. But while rotation retains the
Loader/Cursor/Messages, it makes the controller (actually a
Fragment) useless because a new one is made.

So have onLoadFinished ALWAYS update the Cursor's controller
to point to the current Fragment before using it.

Similarly, it isn't great that the Cursor points to a
Conversation, which may be old after rotation. That one is less
bad, since a Conversation is relatively static, but everybody
should be on the same page after rotation, so stop caching
internal Conversation references in the Message/Cursor/Loader.

No null checks on conversation/controller get(), because they
really should never be null on access. NPE is as good as
anything to catch these cases.

Bug: 7295695
Change-Id: I949f53779afc820eae0f05da4618e570db381942
essageCursor.java
essageHeaderView.java
470aa42b2b33d3ec5cdffa967d47e7a7b4b7209a 09-Nov-2012 Andy Huang <ath@google.com> fix "show pictures" button state after the view is recycled

Make sure to update the adapter item so the next time a view is
bound, it restores the button state to "always show".

Bug: 7507503
Change-Id: Iaad869f4ff8b15321639f2e2c809118aae6c09f4
essageHeaderView.java
cd50d94404e45ffc62cb2fe770f07f0514377111 08-Nov-2012 mindyp <mindyp@google.com> Merge "Cleanup in conversation item view" into jb-ub-mail
fafcd17adae9b7ba5c270611d0f53608ced92e2e 02-Nov-2012 Scott Kennedy <skennedy@google.com> What's New Dialog

https://docs.google.com/a/google.com/file/d/0B9gZLUc5DY13VmlSaldIaFJ0UHM/edit

Show a "What's New" dialog to first time users, and after certain
upgrades, outlining new features.

Also link to it from the About screen, possibly showing slightly
different content in the dialog.

Also shows a dialog about auto-fit when you first enter a wide
message if auto-fit is disabled and you never explicitly set it.

Bug: 7397845
Change-Id: I2f2bf9668d3d105b8a7ccf9857eb6c76c32c6a74
ecureConversationViewFragment.java
289b45a2672e3837adf0c40ccf27f879f5aa28e6 08-Nov-2012 Scott Kennedy <skennedy@google.com> Merge "Store the "Show pictures" state on rotation" into jb-ub-mail
8960f0af431bc164003e09b3c8981aab808d9ec1 08-Nov-2012 Scott Kennedy <skennedy@google.com> Maintain to/cc/bcc state on rotation

The tokenized string was never updated after being initially set,
even if the backing values changed.

Additionally, the to/cc/bcc values were never updated once the
Message was initially created.

Bug: 7490394
Change-Id: Iae1c8ae88f9ab5b8e2e7fe10835587b61decf0c8
essageCursor.java
essageHeaderView.java
2615aea2ce57f5fa3a9cd2e672282818aee6ce94 07-Nov-2012 mindyp <mindyp@google.com> Cleanup in conversation item view

1) use a single span here to avoid creating extra spans when we don't need them
removes the need for a few variables and is generally cleaner
2) use the same caching logic for folders as we do on the gmail side for labels:
once we have the id, we can easily lookup the folder and don't have to parse the rest
of the string/ create a new folder object

Change-Id: I3cc650583ed851d2c37521ddf21f3c5af7d69bf6
onversationItemView.java
8f1877832b0f3bc55e6d63ccf70dfae7dd8328c9 07-Nov-2012 Andy Huang <ath@google.com> wire up snap headers pref

Have conversation view read the initial value upon view creation
and update the value in ConversationContainer via dataset
change, which is triggered by account change (which is triggered
by settings change!).

Bug: 7217360
Change-Id: I55ac947dea692af6ad32995d0970c69dbdf5c2ef
onversationAccountController.java
onversationContainer.java
onversationViewAdapter.java
onversationViewHeader.java
essageHeaderView.java
202738427ede23dd5863583aa3df17e4abfbf5e2 07-Nov-2012 Scott Kennedy <skennedy@google.com> Store the "Show pictures" state on rotation

Keep track of whether the user has selected "Show pictures" so that
we don't prompt them again if they rotate the device.

Bug: 7255132
Change-Id: I7109465e79a7a0d6c126dcf3cef614eae8cb81f8
onversationViewAdapter.java
essageHeaderView.java
ecureConversationViewFragment.java
0a1aa1bb89221eda2f67af52ef274612f28ecf5c 06-Nov-2012 Paul Westbrook <pwestbro@google.com> Respect "Show pictures" in email

Bug: 7384442
Change-Id: Id3ee7ffac7e4bc748e8ae2c83114d4305213746f
ecureConversationViewFragment.java
5c1d8354ce98be2fc77d458bcc5c3346765046a0 05-Nov-2012 mindyp <mindyp@google.com> Make sure that we get the expected notifications to update the conversation list.

Logging for b/7318651 gmail stopped syncing, or ui stopped updating

Change-Id: I0a6fc2af682a42092356e3038a0b3429f54d5ca6
onversationCursor.java
4baafcbb39e20a81a1585270fc270a560ec8824d 02-Nov-2012 Andy Huang <ath@google.com> add sanity checks when updating snap header in-place

If snap index points to a collapsed header, mSnapHeader will be
unbound. It's invalid to ask the snap header to refresh in this
state, so only refresh if it is bound to an affected item.

In practice, this really doesn't happen much, because you'd
have to send a message, collapse it, then scroll down far enough
(perhaps you send another message) so the sending collapsed
header intersects the scroll top.

Prevent header view rendering on null for good measure.

Bug: 7459484
Change-Id: I3bf4af97102a0f6b1af5405ffdac72f26e5c7620
onversationContainer.java
essageHeaderView.java
f74147ff72429681d488a75166ec42d434456456 01-Nov-2012 mindyp <mindyp@google.com> Decrement the deleted count.

If the item was deleted, and its gone from the cursor being synced,too,
decrement the count regardless.

Only remove it from the iterator if it was explicityly deleted by the user
or within the time window.

Fixes b/7409999 Gmail seems to be losing the last few rows of messages when archiving
tested against mark's case

Change-Id: I943fc9a40a534b53b0a7bfbbf0986241a07f7967
onversationCursor.java
6b3d0d9ab407c3d8b6bcb73bddbfd23f2513bb83 30-Oct-2012 Andy Huang <ath@google.com> update header sending status in-place (more so)

Previously, an in-place header update avoided a WebView
re-render, but did re-render all overlays. This is normally
imperceptible, but thumbnail views flicker as they are rendered.

Since only a couple of overlay views are truly affected by
sender updates, update those views in-place when they are
present. This is only supported on MessageHeaderViews for now.

Bug: 7434748
Change-Id: Ifdebea1410dadfceefae52d406891b5383e9ab15
onversationContainer.java
onversationOverlayItem.java
onversationViewAdapter.java
essageHeaderView.java
ebacbb934eefa704f00808d11cc572a7c65c6559 30-Oct-2012 Andy Huang <ath@google.com> Merge "fix attachment URIs change from causing re-render flash" into jb-ub-mail
fc0eab16cbb294dd388011dfb2b6b3a846c4731f 30-Oct-2012 Andy Huang <ath@google.com> fix attachment URIs change from causing re-render flash

Attachment.uri currently has unstable bits in queryParams, so
exclude them when calculating attachment hash code.

This ensures that a message that goes from sending to sent
doesn't re-render if it has attachments.

Bug: 7434748
Bug: 7426699
Change-Id: I5f9e45bab6f120078c86bd23d271ff69c3350af3
essageCursor.java
98aeca3818c3b696f304c1bfb5657a1e1f277a04 30-Oct-2012 Paul Westbrook <pwestbro@google.com> Prevent NPE

We need to handle the case where folder is null

(we were already handling the case when mDisplayedFolder == null)

Bug: 7436193
Change-Id: I6a3e5bf813cc1f095e2eba64f246430d7dac7b87
onversationItemView.java
4f24bb48ab2c3e8fbda2af1e1d8fda79e8a458e7 27-Oct-2012 Andy Huang <ath@google.com> fix one case of duplicate attachment bars

Message attachment bars were either being updated or created
based on the attachment URI. The Gmail provider changes query
params on this URI, so for now, strip the query params before
doing equality checking in this one case.

Bug: 7419739
Change-Id: Ide64278325b31f8f60d38af89c9a8b153bb0a2eb
essageFooterView.java
d9e49da6f1447458e43a8152ba6ae6774b957284 27-Oct-2012 Paul Westbrook <pwestbro@google.com> Prevent NPE in ConversationCursor

Bug: 7426605
Change-Id: I825ced9e89fe58b48873b97a167fc5f75b86d2d7
onversationCursor.java
6cb004b07e484259384a9c07dd0d00a07ca80eee 27-Oct-2012 Andy Huang <ath@google.com> invalidate all headers when re-rendering

Ifd2d3d introduced a regression when re-rendering that leaves
the existing headers around. This is bad when the new
conversation is shorter (e.g. on draft discard), or if the
messages are re-ordered (nearly simultaneous sending).

Clear header views when clearing the adapter as was done
previously.

Bug: 7422803
Bug: 7418910
Change-Id: Iba6a85d249917c8deeeaa978d2ebb8d59102c1ad
onversationViewAdapter.java
2a1e8e30bdd02dc08bdf2f878201b279f60d5142 24-Oct-2012 Andy Huang <ath@google.com> show "Sending..." in an outgoing message header until sent

It mostly just wasn't wired up to Message.isSending.

CVF.processInPlaceUpdates() now looks for sending state changes
and causes affected overlays to re-render.

"Sending..." changes also apply to the snap header, so I
improved how data changes generally propagate to the snap
header. Instead of manually prodding the snap header upon a
change, fix it so dataset changes on the adapter also unbind
the snap header view (to stay consistent w/ non-snap views).
The positioning pass that immediately follows will re-render it.

Bug: 7229688
Change-Id: I72930bfa7ec20788c3e4de67f4b6856a7e6a0bf7
onversationContainer.java
essageHeaderView.java
06c0362f59437f3ea2b5832272fb66158bb4b8c0 23-Oct-2012 Andy Huang <ath@google.com> optimize re-rendering a conversation for a single outgoing message

Rather than rendering the conversation from scratch, look for
the special case of a single new message from the user that is
the last message, and just append the message HTML at the end of
the existing conversation.

To avoid stacking the new header on top of the previously last
message, do not notify ConversationContainer of dataset change
in this process. (An adapter dataset change means the container
will toss out all overlay views and immediately render given
the current spacers and adapter items. Do not want.)

The overlays for the new message will be drawn later when JS
notifies of a geometry change.

Bug: 7378693
Change-Id: Ifd2d3da8c57f685bbeae18f3d42c60821a97368c
onversationViewAdapter.java
essageCursor.java
30bcfe7b69f9d8e0cad2ee62dae9d3571cd0d88b 19-Oct-2012 Andy Huang <ath@google.com> clean up supplemental software drawing on ICS

* don't allocate big bitmaps for offscreen conversations on ICS
* reduce the bitmap size to the view size (vs. screen size)
* handle OOM gracefully
* ensure the 'doAfter' action happens even for offscreen convos

Bug: 7373250
Change-Id: I976dc826bed83d5872802e6d656eff2f72f9ed3d
onversationWebView.java
fb57428d11b60ef233aa765200ae82950574ca6e 19-Oct-2012 Vikram Aggarwal <viki@google.com> Merge "Activated text span should be static." into jb-ub-mail
5d07da885ae9d4fdd373995f9c67e2d8f6ebaab9 19-Oct-2012 Vikram Aggarwal <viki@google.com> Activated text span should be static.

The SpannableStringBuilder accepts any Object as a span; the only way
to compare objects is through pointer comparison. If the activated
text span is an instance variable, we create a new instance of it for
each ConvItemView when the activity is recreated through the normal
activity life-cycle.

Making the activated text span static avoids these problems, and
guarantees that we only create a single one per process instance.

Bug: 7316164 Shows half white color sender name in Gmail conversation

Change-Id: I4c650ecd6a396547bbd13ec4a9253433ebd493a8
onversationItemView.java
9be59911221b236b10c7575e407ac587c9231bc7 19-Oct-2012 Andy Huang <ath@google.com> clean up debugging code from b/6946182

Change-Id: Ic6605e5e0fc7ba555801c7c11f5cdd2141047541
onversationContainer.java
74313d9a9ea22d21658e805600f114a78a2fb935 18-Oct-2012 Mark Wei <markwei@google.com> Avoid weird race condition that prevented the overflow from showing up.

Sometimes it is updated to GONE and then immediately to VISIBLE, but in the end
it would not show up.

Bug: 7166903
Change-Id: I80c78fd4d2e6b439bacb87963cf80fc7777ffa55
essageAttachmentBar.java
8f98ac013f775cdf186578018f926ac329070541 02-Oct-2012 Mark Wei <markwei@google.com> Prevent change folder dialog from opening more than once.

This CL has signification refactory that consolidates
Multi/SingleFoldersSelectionDialog.

Bug: 7247467
Change-Id: I1aacba68411d4b9cc586482d0f17c5c90df36e04
electedConversationsActionMenu.java
5ba812e028d7b57e1014caa762e842b25e6752b8 18-Oct-2012 Paul Westbrook <pwestbro@google.com> Show dialog on redownload

When the user asks to redownload a file, we should show a dialog

Bug: 7362656

Change-Id: I555b015dfe975b93e65c40cef269986fde522328
ttachmentActionHandler.java
47ca4e2a4c2d7387a7dd8d1925e2512acc553eab 18-Oct-2012 Mark Wei <markwei@google.com> Allow redownloading attachments.

Add Download again button to attachment overflow menu.

Bug: 7362656
Change-Id: I3bd61403205ec2c74f658f6f7f02385f72dd7aa5
ttachmentActionHandler.java
essageAttachmentBar.java
e18f42d652e171cd4e4bb193482d2e131d91f26e 18-Oct-2012 Mark Wei <markwei@google.com> Fix attachment Overflow and Cancel buttons pushed off-screen

Bug: 7368233
Change-Id: I78c26cd507626fd2c9de15cb14cdacadc7971650
essageAttachmentBar.java
0a135884c7452225bc0c86c5f768d581c0ce6c04 17-Oct-2012 Mark Wei <markwei@google.com> Hide Stars in Trash.

Bug: 6516160
Change-Id: I9f4fd099971c696379532f6b9654582fdeb8556a
onversationItemView.java
essageHeaderView.java
0d3bbc800f05d3783f963675125060b890ec0024 16-Oct-2012 Paul Westbrook <pwestbro@google.com> Fix NPE in secure conversation mode

Change-Id: I3ea4b6a31ff183cad79e6ac88a0ea40ed97208da
onversationViewHeader.java
adbf3e8cadb66666f307352b72537fbac57b916f 13-Oct-2012 Andy Huang <ath@google.com> toggle normalization & zoom on/off

and wire it all up to a pref that re-renders upon change.

separately, make a few improvements to whitespace management
when zoomed in with normalized mode:
* place attachment overlays at the top of their regions
* place overlays above the first expanded message at the top of
the conversation, instead of the usual position just above the
message.
* impose a max zoom factor to limit excessive spacer whitespace

Bug: 7312540
Change-Id: Iae3afff0ee81e4ba9367568e884a041780b24ebf
onversationContainer.java
onversationOverlayItem.java
onversationViewAdapter.java
ecureConversationViewFragment.java
90528f425e09a72b1505c3a1066051ab5a3a67b4 13-Oct-2012 Paul Westbrook <pwestbro@google.com> Show progress on attachment tiles

Bug: 7298245
Change-Id: I8f7b4e449b652d27e22b2f553292f4f4b5de27a4
essageAttachmentTile.java
949ea2185d79e3e266662766cfa07cf748493e3a 14-Oct-2012 Paul Westbrook <pwestbro@google.com> Fix NPE

We can't just keep a single static map instance, as
the thread updating the widget can be running at the the same
time as the main app.

Instead use the Object cache to reduce object allocations, but also to
prevent multiple threads from modifying the same object.

Bug: 7344709
Change-Id: I803963f2acf17eaa7cb928e90830eade86a718d8
endersView.java
2598be2e9681c24fb5746f7c5efc963378dccf0a 10-Oct-2012 mindyp <mindyp@google.com> reduce allocations: reuse a textview instead of creating a new static layout each time.

Also, picks the font color at draw time which should fix activated text issues
Change-Id: Id6928616f688bf557c569d0de05df6e707b5c976
onversationItemView.java
onversationItemViewModel.java
0d1ed12c6e70f4204ff28092ed51ce540f9f3f67 10-Oct-2012 Vikram Aggarwal <viki@google.com> Recalculate mMode if the viewmode changed

If the view mode changes, but the width stays the same, we don't
recalculate the wide/narrow mode of the conversation item view. Make
the check dependant on mode changes in addition to width changes.

Bug: 7316569 Rotating device from landscape to portrait shows janki in
2 pane window

Change-Id: I88f4732a29663a3025a4bab8efd89438f3beecea
onversationItemView.java
onversationItemViewCoordinates.java
c69cee309fb61e071ecae11e72bf2b8621eeb872 08-Oct-2012 Andy Huang <ath@google.com> don't use ViewGroup.detach/attach

ConversationContainer was misusing ViewGroup's detach/attach API
by holding onto detached views in the scrap heaps for an
arbitrarily long time, rather than re-attaching within the same
draw frame.

Switch to always use the regular ViewGroup add/remove API, which
is slower, but not enough to make a difference here.

Bug: 7299364
Change-Id: I59e15d4e4912b9d38a56b7243c1809d380ef5074
onversationContainer.java
ce499a669a8008397e3fd92e3b0c5e44e0ae4ab6 05-Oct-2012 mindyp <mindyp@google.com> HtmlParser not thread safe; let widget supply its own version of the parser/tree builder

Fixes b/7292288 gmail crashes on launch/loading msg

Change-Id: I2a7f3c6c8593ff5f704c9df6baec9125f9c954a6
onversationItemView.java
endersView.java
43046befa588ede8629769800b4d42210328b06f 05-Oct-2012 Scott Kennedy <skennedy@google.com> Merge "Reload the "me" string when the locale changes" into jb-ub-mail
c926762f1d4a787ce5342e40cb67afe41a2fa0d7 05-Oct-2012 Scott Kennedy <skennedy@google.com> Reload the "me" string when the locale changes

Since we were caching the string in a static field, if the locale
changed, the cached string was never updated. This changed forces
it to be reloaded from resources if the locale changes.

Bug: 6117697
Change-Id: I18c4b62192bbc4adab8b74ed742d64dc5b09859d
endersView.java
66db04cd71b5096b4496bf6d9468dd2ef8dc86f9 05-Oct-2012 Vikram Aggarwal <viki@google.com> Use the cursor to get a conversation

Rather than read the fragments to find a conversation at the given
position, read the cursor directly.

Bug: 7288478 Auto-advance breaks something with position
mail_targetedTo_JB-MR1

Change-Id: Ic4bce97af7db6d81f845cb95c3441b78b47b21ad
onversationPagerAdapter.java
7f55c685376659550ed11b047a78cd8d70158ad9 04-Oct-2012 mindyp <mindyp@google.com> Use initial version of the cc cache fix.

We need to selectively do a few things:
1) dont update the conversationinfo if we haven't changed the read state;
this means we wont override the cached conversation info unless totally necessary
2) add sendingstatus to the set of flags we check to see whether or not to redraw
the conversation item

uses marc's initial cc fix

Fixes b/7258975 Reading conversations doesn't immediately mark them as read in UI

Change-Id: I647ebb3d20115b5f73ef50ad0fb860d067d4dfd7
onversationCursor.java
onversationItemViewModel.java
7a6dd6e34ad1f6bf672e59f1a60e1c4f8bd758cf 04-Oct-2012 Mindy Pereira <mindyp@google.com> Revert "Preserve cached values for at least 10 seconds"

This reverts commit 37d7a141445d3535f4de779196d8bcc12eba3a30

fixes b/7281777 sending text not disappearing
Change-Id: Id95fab462a3c3da7c44f1aa15009db60f27145da
onversationCursor.java
0a648c9b8f9d02f89e8711e97215b0e30f2cf0b6 02-Oct-2012 Andy Huang <ath@google.com> Apply snap header overlap as layout offset, not draw offset

Using a homebrewed draw transformation alone doesn't transform
event dispatching. Oops.

Bug: 7256664
Change-Id: I2404e3b965e5291990beaf1d3e67957b4a8f104e
onversationContainer.java
essageHeaderView.java
6d15a75aac7dd468ed94a97f324f6920d89cf28d 03-Oct-2012 Mark Wei <markwei@google.com> Prevent Gmail attachment preview tiles from covering mail content.

Fixed tablet-specific bug where margins were messing with width measurements.

Bug: 7258969
Change-Id: Id4632e607ae58434d42f186789393f5a377de56c
onversationContainer.java
6d603e1527e8fd4404ec2a330a46d1d7c1a10993 02-Oct-2012 Mark Wei <markwei@google.com> Merge "Prevent change folder dialog from opening more than once." into jb-ub-mail
9eb1c9a76a400f84c002b58c831119119ebf4870 01-Oct-2012 Mark Wei <markwei@google.com> Prevent change folder dialog from opening more than once.

Bug: 7247467
Change-Id: I0b5583830d7c8c2f63e01714b4a7fa2976d0eefb
electedConversationsActionMenu.java
9be3a97325bf7b4d17b1a1bf347bc1d89653e48d 02-Oct-2012 Vikram Aggarwal <viki@google.com> Senders String color and NPE fix

Two fixes:

1. The senders string is not available till ellipsizeStyledSenders()
runs. *After* it is run, we need to recalculate the activated span.
And we always need to call layoutSenderSpan() after every run of
ellipsizeStyledSenders.

2. If the styled senders string is not available or is empty, we need
to return from layoutSenderSpan rather than crashing.

Bug: 7268380 First message tapped in conv list does not make sender
text white

Change-Id: I820b6970094da6d81909006447c8f189091fbccd
onversationItemView.java
84f7d32bdc79263004ed5241480988e02f8e618c 02-Oct-2012 mindyp <mindyp@google.com> We want deferred actions when doing anything destructive when a list is present.

Fixes b/7257433 Archiving from gmail label fails, but only on nakasi 3g?

Change-Id: I6e10d792f7f9ebd433072ad2af10d1f60eb90ef1
electedConversationsActionMenu.java
f8b0046eb5249907e44ded2ae0a7a57da29c31d2 01-Oct-2012 Marc Blank <mblank@google.com> Merge "Preserve cached values for at least 10 seconds" into jb-ub-mail
d00f346a1b0b1ea3a1029ed95c9beb693b418187 29-Sep-2012 Andy Huang <ath@google.com> add gutter effects to conversation pager

Bug: 7255962
Change-Id: I85e649809e7c0f58f53bd9749844fa5eae841949
onversationPagerController.java
1a740351df94d879bade5024f6f05e05d5d4ae12 01-Oct-2012 mindyp <mindyp@google.com> Merge "Make sure we force a measure of the textview." into jb-ub-mail
7e4242d8462175d2c72a1185c36a68503bff0906 01-Oct-2012 Paul Westbrook <pwestbro@google.com> Merge "Fix crash on ICS" into jb-ub-mail
eaf3080a25306ae009d9002aca4e77767763dc22 01-Oct-2012 mindyp <mindyp@google.com> Make sure we force a measure of the textview.

setWidth doesn't force a meausre
onlayout doesn't force a measure
measure is needed to properly ellipsize/ create ellipsized state

Fixes b/247249 Message count not appearing for some threaded messages in the list view

Change-Id: Idcece78555584d20e209395395e259e91412dba6
onversationItemView.java
916f819b1dfde084b8bd7941fd6f6d70d564e3e9 01-Oct-2012 Paul Westbrook <pwestbro@google.com> Fix crash on ICS

ICS had a bug where calling recycle on a bitmap could
cause a native crash see bug 6048952

Since this code is only used on ICS, just don't call recycle

Bug: 7232717
Change-Id: Iafaf8708b34ca10e4cb5e424d7f3bb138dddb5eb
onversationWebView.java
f40fc842ff3d1f08445a9c3144a2427b42abb476 01-Oct-2012 mindyp <mindyp@google.com> Merge "Fix crash in on draw" into jb-ub-mail
f8fc1125b9130f42c97d6ce233afc7751dc020d6 01-Oct-2012 mindyp <mindyp@google.com> Fix crash in on draw

We already check for the presence of a folderdisplayer in other cases,
just not this one
fixes b/7263233 Random crashes in Gmail
Change-Id: I33c8082458a898f52caf41020710d45367a43452
onversationItemView.java
37d7a141445d3535f4de779196d8bcc12eba3a30 01-Oct-2012 Marc Blank <mblank@google.com> Preserve cached values for at least 10 seconds

* Instead of using REQUERY, we'll save the last changed
time of a conversation and make sure there's a minimum
time until that cache entry is cleared
* Remove unneeded Wrapper class
* Remove commented out code

Bug: 7258975

Change-Id: Id618d91c52397a1a7fed162b85c32b975f10b313
onversationCursor.java
1b3cc47f54072105c161d6ed557550e0e149b8bb 27-Sep-2012 mindyp <mindyp@google.com> much better reaction to opening/ closing details for a message after zooming

when the user taps show / hide details, scroll the webview up (show) or down (hide)
enough to compensate for the difference in header height.
fixes b/6319197 After pinch zooming, expanding the message details causes the message headers to jump
Change-Id: I64ced1b9a1d411fa0fa34a179f2ae629fc993088
essageHeaderView.java
ecureConversationViewFragment.java
ca87de41285bde382a894b6cb2d13c112c5d7a2f 29-Sep-2012 mindyp <mindyp@google.com> only get content description when accessibility is enabled.

Getting the date is the most expensive part of the bind operation
takes ConversationItemView.bind from ~5ms to .5ms
bind is called whenever we get a list item view, so its important that its FAST

Part of b/7188066 Gmail inbox list fling is jankier comparing to previous release

Change-Id: If789382df6429f61ac80c4be08611c5391da5618
onversationItemView.java
onversationItemViewModel.java
febb64e286ed3d202bad701a6f664bffcb333c0e 29-Sep-2012 mindyp <mindyp@google.com> Merge "added interface for toggling" into jb-ub-mail
c03b05aa74346d10151cb8624af78e6ef0393cea 28-Sep-2012 mindyp <mindyp@google.com> added interface for toggling

Fixes b/7254474 gmail crash

Change-Id: Ic07d5951d4fbef838ddcd7e2484f094ccfd13ead
onversationItemView.java
wipeableConversationItemView.java
oggleableItem.java
6766b6e5468d2f1935587b3bc1f8e65be94cd6fb 28-Sep-2012 Andy Huang <ath@google.com> fix conversation flicker when sending on a thread w/ attachments

Conversation state hash comparison was taking attachmentsJson
into account, but that's not safe to do because it's mutable.
(conversation render re-generates that JSON string, not
guaranteed to be identical)

However, we still need attachment state comparison to reload
conversation view enough upon saving a new draft w/ attachments.
So replace simple but unsafe JSON string compare with
order-agnostic attachment URI set comparison in
getAttachmentsStateHashCode().

Bug: 7183109
Change-Id: I99c2c6d5eca2d2d3858f2cc004e1dc63ff8255aa
essageCursor.java
58c701459d308c0cc87d08f8d62322b142b22f45 28-Sep-2012 Vikram Aggarwal <viki@google.com> Fix white sender font from notification.

When selecting conversations from a single-message notification, the
sender font gets set to white. Later, it gets changed but we do not
change the styled sender string because layoutSenderSpan() is never
called if the layout is not valid.

Bug: 7254616 Conversation Items from notification retain a white
sender font

Change-Id: Ic3ef452ed6de7bc426f347e24933c5536c2297b5
onversationItemView.java
81a4f08b1657bb297cd977e3df92660fab05a1ab 28-Sep-2012 Vikram Aggarwal <viki@google.com> Update the conversation cursor state in CLF

1. Fix lack of adapter update in CLF.onCursorUpdated().
2. Call ConversationCursor.sync() in onActivityCreated() rather than
onCreateView().
3. Pre-emptive NPE fix in FolderObserver.onChanged().

Bug: 7243503 Selecting notification attempted to load wrong
conversation

Change-Id: If097e3fcf07c68609c8f620160ef598897ab41af
onversationCursor.java
1abfcaf0ee345acee28f0b4892314119082b28a2 27-Sep-2012 Mark Wei <markwei@google.com> Prevent possible NPE when initializing a ConversationViewAdapter.

Bug: 7245702
Change-Id: I56953211df536bc6aef616b93d8ccd321bda96bb
ecureConversationViewFragment.java
9d3fd92ed6091dbd0d38799222a1cf841f1c3f29 27-Sep-2012 Andy Huang <ath@google.com> Wait for visible conversation to load before loading others

add conversation load observation APIs to CLC interface
save/restore CVF user-visible flag
move CVF state restore to ACVF's onCreate
start using FragmentRunnable to avoid doing work too early
(before ViewPager settles)
clean up unused onConversationLoadError codepath

fixes undefined conversation load order on rotate
improves conversation load speed a (tiny) bit

Bug: 6268986
Change-Id: I4670d0c04cb1a36d5aa2c5355e2a79de17d042dd
onversationPagerAdapter.java
onversationPagerController.java
ecureConversationViewFragment.java
9c4daa5cd30a5863502ec1e5ba0e53b347cca385 27-Sep-2012 mindyp <mindyp@google.com> Merge "If the conversation is detached, dont optimize moving to another conversation." into jb-ub-mail
77fb5be70d76f22a64850aa7a40f6a9553960e4e 27-Sep-2012 mindyp <mindyp@google.com> If the conversation is detached, dont optimize moving to another conversation.

Jumps back to conversation list or first conversation in list, but tapping
next conversation works as expected.

Fixes b/7113908 pager's detached mode doesn't let you select a new conversation in 2-pane landscape mode

Change-Id: Ic3bad6739df04aa9b7b9fb2db3fb683355071691
onversationPagerAdapter.java
onversationPagerController.java
16164a1e5c3e20b6f577b0c5c6cb211a79c44523 26-Sep-2012 Vikram Aggarwal <viki@google.com> Merge "Fewer toasts when there are connection issues." into jb-ub-mail
41b9e8f7bea47bbcae71b9ae81c3608a00a90e70 25-Sep-2012 Vikram Aggarwal <viki@google.com> Fewer toasts when there are connection issues.

1. We don't show the toast on synced labels.
2. We don't show a toast when background syncs fail.

Still TODO:
1. Showing a toast when the user hits the refresh icon
2. Showing a toast when we enter the app for the first time & no connection exists.

Bug: 7202801 "No connection." error

Change-Id: I312a5670aeedfc2f8e3dda11e662f2905027993f
onversationListFooterView.java
d2f279ff7f4d257ff268b27be7379d4195354798 26-Sep-2012 Sara Ting <sarating@google.com> Fix possible NPE when sharing attachments.

Bug:7225162
Change-Id: I30255e70ced95f1fa20d2b0eecc6e809a83afe07
ttachmentActionHandler.java
c84d251f5cc63ab398ffc6cecc06f801664d0368 26-Sep-2012 Paul Westbrook <pwestbro@google.com> Always return false from moveToPosition(-1)

If a caller were to call moveToPosition(-1) on an already reset ConversationCursor,
true would have been returned.

If a caller was relying on the return value before using the cursor,
(for example, CursorAdapter) we would have attempted to access an invalid
row in the curor

Bug: 7227834
Change-Id: I8a5dec0b7bc1b9cd0cc1a91ba51a61650118d911
onversationCursor.java
cc399081e9f39d6c3238791b7116e36de66e4ac7 26-Sep-2012 mindyp <mindyp@google.com> Make scrolling less janky

Part of b/7188066 Gmail inbox list fling is jankier comparing to previous release
reduces time for processing sender names that have html content from 5ms
to < 2ms
Change-Id: I85cac378b57d857bd01844e7731f1fc644e573a3
endersView.java
7388dba58aecafacd91ded0f787cf01bfc7af232 26-Sep-2012 Andy Huang <ath@google.com> cleanup. fix minor logging errors.

Don't notify JS of a height change during initial render.
(it's not a height change if it's the first time.)
Don't even bother measuring the conversation header during
initial render, since the view that's being bound is temporary
and not attached yet.

Bug: 7154554
Change-Id: I8c8147123bb15173888a3ad95e1ca3703018a520
onversationOverlayItem.java
onversationViewAdapter.java
onversationViewHeader.java
ecureConversationViewFragment.java
51735c77f44b7dd1cd9d2ebe93a7646a482695ed 26-Sep-2012 mindyp <mindyp@google.com> Merge "Add logging to try to catch the CIOBE issue." into jb-ub-mail
35f6bba5e600342fb47dc5bd7a90c02fe9e576de 26-Sep-2012 mindyp <mindyp@google.com> Add logging to try to catch the CIOBE issue.

part of b/7227834 positon -1 requested from conversationcursor

Change-Id: I5eb82ba02200215751bfc676e03b59b7f37c4305
onversationCursor.java
ab2d998506c83e82ddae25b6ba1419414e1e8122 25-Sep-2012 Mark Wei <markwei@google.com> Fixed conversation label header doesn't increase height when adding labels

Bug: 7154554
Change-Id: Iacdf4bb7466978c0da3e3985d14e42894dac2ff7
onversationViewAdapter.java
onversationViewHeader.java
3c0d58eecd71df146283cba410088dd95e671dd2 26-Sep-2012 mindyp <mindyp@google.com> Merge "Only create bitmaps in the case where we actually use them" into jb-ub-mail
014ea4c15d147794789b9c5bf4e243fa08781ad9 25-Sep-2012 Andy Huang <ath@google.com> handle sender/body changes in-place

Sending a new message updates sender string (for custom froms
and such) and the body (for elided text), after the message is
sent and synced. Avoid conversation view flashing (re-render)
in those cases by applying the changes in-place.

Sender string changes will update all dependent adapter items,
and a dataset change on the adapter re-renders all overlay
views.

Body changes are handled by sending affected IDs to JS so it can
request individual message bodies. Quoted text collapsing is
then re-applied on each new body.

Bug: 7183109
Change-Id: I630187c276ffc63448e6b457c9cd02afd452c438
onversationOverlayItem.java
onversationViewAdapter.java
essageCursor.java
essageFooterView.java
essageHeaderView.java
ecureConversationViewFragment.java
b84fba3b19aef87144a069407b1cdb5980eedf0b 26-Sep-2012 mindyp <mindyp@google.com> Only create bitmaps in the case where we actually use them

Part of b/6268986 Perf regression (~5 seconds) in loading messages on orientation change in new gmail

Change-Id: Ib461c008a434da7b9f298e71acc660f9fc88076f
onversationWebView.java
a743a43092fdc9f4c8378208bf4396e0d0df6e21 25-Sep-2012 Paul Westbrook <pwestbro@google.com> Merge "Second fix for attachment reliablity" into jb-ub-mail
a25b65e95e90e785012ea4e5ad53408e76e87139 25-Sep-2012 Paul Westbrook <pwestbro@google.com> Second fix for attachment reliablity

If an APK had been pre-cached, we would fail to launch the package
installer. This is because the package installer's intent filter
only handles file:// uris

Now if the UI has specified that the destination is external, it will
make sure that the attachment has been saved on the external storage
before sending the view intent.

Bug: 7133835

Change-Id: I408dc70f1d12a65e15535280484b59cf1a6e810a
ttachmentActionHandler.java
a825aae102a6112a0b4395eb3c5417c7b0c24262 25-Sep-2012 mindyp <mindyp@google.com> Make sure if we update the conversation we give it the correct positon

Fixes b/7225679 landscape 2-pane conversation list scrolls to the top when opening a conversation

Change-Id: I735ca2f6955f14f020712a2e3131674dac3db92b
onversationPagerAdapter.java
d987aa5a3ad4854c814bf27043120034073aae85 25-Sep-2012 mindyp <mindyp@google.com> Merge "In some cases, we dont have styled senders." into jb-ub-mail
43ac9a0d56faa5cf72a771468838b4c413c82d6f 25-Sep-2012 mindyp <mindyp@google.com> In some cases, we dont have styled senders.

Fix b/7228573 Recurring NPE scrolling around in convo list

Change-Id: If34dc73461d6a701accc7a009eaf64c19a19df54
onversationItemView.java
afc9b365dc9199ee9b2a1e598b8f40b3c78b6d9f 25-Sep-2012 mindyp <mindyp@google.com> Add ics content ready signal.

Uses a software layer to show content asap.
Part of b/6268986 Perf regression (~5 seconds) in loading messages on orientation change in new gmail

Change-Id: I8ae2e86685187108aa704c8d6d19202b2a2a4d7e
onversationWebView.java
b2b98ba97983f225eec19dc9bc5333e6ef80ee15 24-Sep-2012 mindyp <mindyp@google.com> Make sure we update the conversation object the currentconversation is based on.

When there are updates to the current conversation, we must update it in the controller
as well.
Fixes b/7209123 After setting a label for a mail via the "change labels" icon, opening the "change labels" again doesn't show the label as ticked

Change-Id: I7f23232797e87db69bc9a9146baad262e228bfd6
onversationPagerAdapter.java
7beefc4970c2cb154af8a13551a8014627eb6c1c 24-Sep-2012 mindyp <mindyp@google.com> Merge "Num senders used can only be zero, so why divide at all?" into jb-ub-mail
beeec8d9688445b87ef4124e4fc5ccfe1c867574 24-Sep-2012 mindyp <mindyp@google.com> Num senders used can only be zero, so why divide at all?

if we hit this case, just truncate

Fixes b/7216813 Divide by zero from com.android.mail.browse.SendersView.handlePriority

Change-Id: I95df14a05176d8e33af3e22c37195fb7a0fde3f3
endersView.java
0e8a95148f7fdc9c6a33971924b0d29a202d73ec 24-Sep-2012 mindyp <mindyp@google.com> Correctly format plaintext

Just a missed case
We do this in the convview correctly
Maintains nbsp, formatting
Fixes b/7216083 Formatting (new-lines) missing from email message

Change-Id: If318b0eff8c8a4194e81013cebcad9a9d7d238bd
ecureConversationViewFragment.java
35fa007206cf77f4e4e44acd0f99a084e098f59f 23-Sep-2012 Marc Blank <mblank@google.com> Merge "Fix CC edge case" into jb-ub-mail
9735cdca3abbe813f0b9d8f13a4c586c9c0acd8e 23-Sep-2012 Marc Blank <mblank@google.com> Fix CC edge case

Bug: 7103907
Change-Id: I7c23a9996e574a6ae8f8dd6484177ae0d8eecbb0
onversationCursor.java
439bb7932a4998b6988c21efc19679d89d4d4a57 21-Sep-2012 Vikram Aggarwal <viki@google.com> Merge "Not in conversation view -> unset current conversation" into jb-ub-mail
49e0e991fe8880852b936a0f8d7d57c5b36f2154 21-Sep-2012 Vikram Aggarwal <viki@google.com> Not in conversation view -> unset current conversation

When the current conversation goes out of visibility, we should unset
the mCurrentConversation because many objects get the conversation
from AAC.getCurrentConversation().

I tested this with both one pane and two pane, with search and
otherwise. But I wouldn't be surprised if this breaks something. If it
does, revert!

Fixes Bug: 7205219 Message list is scrolled down by itself until it
reaches last read message

Change-Id: I263c07e8063e7094a1defca76dde788b52df71ff
onversationPagerAdapter.java
0004f6fd46bd231b3a383057afcde52e605c2a18 21-Sep-2012 Marc Blank <mblank@google.com> Merge "Revert "Use correct position when moveToNext() in underlying fails"" into jb-ub-mail
44d5f0af86423462e80b845fbe00b4633321acc0 21-Sep-2012 Marc Blank <mblank@google.com> Revert "Use correct position when moveToNext() in underlying fails"

This reverts commit 2b35105ac3b111e212504d7f77419c3c7fd559c0

Change-Id: I850557ac8967bcbb35bbb4c3474a5223dd3a6b93
onversationCursor.java
4d8cad5e37ade03903a23cca8ea3e782af21170f 21-Sep-2012 Paul Westbrook <pwestbro@google.com> Fix Messages not being marked as read

Bug: 7210456
Change-Id: Ic5fe0a2c16ee15660552d9331ba67ff097022045
ecureConversationViewFragment.java
0c3c2058f75487713c64634c7f08025fd78ba012 21-Sep-2012 Vikram Aggarwal <viki@google.com> Explicit Intent to view Inbox

The Compose Activity was creating an intent with a folder object
populated with uninitialized values. Using this object is very
unsafe. Since the entire goal was to view the default inbox, that is
easily done by passing an intent without a folder. AAC.handleIntent()
shows the default folder when only an account is specified in the
intent.

Since using new Folder() is very unsafe, the method is made private,
and a static method with a suitably dangerous name was created to
ensure that callers are aware of the peril involved.

Fixes Bug: 7139995 Empty conversation list

Change-Id: Ic3e254630afd59a59caba10f2249e3e451005d63
onversationViewHeader.java
e5e917c10cbc4afd31358c0425954e2c27e0fb8e 21-Sep-2012 Vikram Aggarwal <viki@google.com> Don't show two archive icons

Since both R.id.archive and R.id.change_folder correspond to the same
action, they have the same drawable: drawable/archive. Only one of
these is ever selected, based on whether we are in the inbox or in a
user label. The selection is done in onPrepareOptionsMenu, and one of
them is disabled. However, in the time between when the menu is
loaded, and when the actions are selected, the user can see two
archive buttons briefly. The solution is to remove one of them,
doesn't matter which one.

This fixes the issue of showing two archive buttons, but still has a
problem: When visiting a non-Inbox label for the first time, an
archive button is shown in the ActionBar and then hidden.

Fix b/7161358 Duplicate "Archive" icon displayed temporarily when an
email is loading in the Gmail Android app

Change-Id: Ibb9e0291ae8ca73063c4de80c37aa5aa894f54fa
electedConversationsActionMenu.java
63f9b48ee0d54faf9ddc802e4582b7e499d87e04 20-Sep-2012 Paul Westbrook <pwestbro@google.com> Fix Crash when reexpanding message details

Bug: 7201975
Change-Id: I7be973a8b8ff61db3b2f90c2151b34f0af29f255
essageHeaderView.java
6e4c01675df374929d055f3dd4bd99990d9b1612 20-Sep-2012 Yorke Lee <yorkelee@google.com> Fix NPE when archiving mails

Bug: 7170476
Change-Id: Ic835dbd841fef65076063aaefec7c5ada77dc52d
onversationItemView.java
0d1c3eb2d567de98649e5e2cc01d5cb7f13f6e54 20-Sep-2012 Paul Westbrook <pwestbro@google.com> Merge "Show progress attachment bar" into jb-ub-mail
4dabcc9f74ea5f75467f6f581d8ef7cd65c2f06e 20-Sep-2012 Paul Westbrook <pwestbro@google.com> Show progress attachment bar

Show download progress in the MessageAttachmentBar

Bug: 7194891
Change-Id: I847cfa562d5ecb48a953a7a23f8b3eed7d442251
essageAttachmentBar.java
essageFooterView.java
c4607e1c10f374db20fa87557956a4eeb5e24cf6 19-Sep-2012 Mark Wei <markwei@google.com> Merge "Draw scrollbars above conversation view content." into jb-ub-mail
56d83850db72592a16f4e6ee9e0d59b60ec0824a 19-Sep-2012 Mark Wei <markwei@google.com> Draw scrollbars above conversation view content.

Bug: 6319192
Change-Id: Id4ba584f1e90c80d9085b6b3d962ee2783975427
onversationWebView.java
crollIndicatorsView.java
crollNotifier.java
692e441b1d41b9a25b9823f59d0591917593e4aa 19-Sep-2012 mindyp <mindyp@google.com> Reduce time it takes to render senders by using 1 textview.

If I just render it in draw, I don't have to worry about caching.

Part of b/7188066 Gmail inbox list fling is jankier comparing to previous release
Cuts time for getSendersView from 4ms to .004ms
The combined total for onLayout/onDraw per convitem pre this change was 14ms
After this change, it is 10ms, with time added to onDraw/removed from onLayout,
but overall 4ms faster
Change-Id: I9f7357c8b7f3443c86e671aecfa3a3c3f5cb357a
onversationItemView.java
05e522165c415f0a16a23117cd7d91a033780890 19-Sep-2012 mindyp <mindyp@google.com> Dont let webview get focus.

This causes the view to jump as we swipe between conversations.

Fixes b/7190221 conversation view jumps sometimes when swiping left/ right

Change-Id: Icfdda512871eb23c7c2c02932cae011d18e552b1
ecureConversationViewFragment.java
26d4d2d9c43c499f458808f050ec73ea3c28dec4 19-Sep-2012 mindyp <mindyp@google.com> ATTACHMENTS

Also, the whole screen is now wrapped in a scroll view which
decomplicates a lot of things, including putting attachments
below the webview content.
I should probably go ahead and show attachments for imap and pop
Fixes b/7186329 Unable to view any attachments in Email (IMAP & POP)
Change-Id: Ia2abb90171b5d03e2dddcbc9d4f349a3e798254c
onversationPagerAdapter.java
ecureConversationViewFragment.java
ecureConversationWebView.java
90ec281b204fca1c2d38e147a47391e8bc1a5ec5 19-Sep-2012 mindyp <mindyp@google.com> Merge "Since I can't repro at all, just taking a guess at what the issue might be." into jb-ub-mail
fb05201c2c5c53f58846112240a05849319317a9 19-Sep-2012 mindyp <mindyp@google.com> Since I can't repro at all, just taking a guess at what the issue might be.

Fixes b/7189943 NPE at com.android.mail.browse.SecureConversationViewFragment.markUnread, on tapping "Mark unread" in email

Change-Id: I7db8e10c58933054240bbb66ab1bdf4a86a0509d
ecureConversationViewFragment.java
7b9b8d14205541671d8c5dc1698a5ab0bba4e671 19-Sep-2012 mindyp <mindyp@google.com> Merge "Update conversation header immediately when conv changes." into jb-ub-mail
a7e154530add87e05d1fcee980e1a1fc34a456e7 18-Sep-2012 mindyp <mindyp@google.com> Lots of fixes to move to folder dialog.

Fixes b/6919987 bring back divided "move to folders" sections

Change-Id: Ia7d709c5cd1f8787e2e1083442aa4eaf50d6babb
essageAttachmentTile.java
electedConversationsActionMenu.java
16982472f8431aecfdb5f32aa7a97dce9064ac22 19-Sep-2012 mindyp <mindyp@google.com> Update conversation header immediately when conv changes.

Fixes b/6305908 After applying label in the message view, the label is not displayed

Change-Id: I82a5f999cc311f3da56d94ec7cbb881f52b5ec27
onversationPagerAdapter.java
418ba6481913a16845375cc20779b270a69c41d5 19-Sep-2012 Marc Blank <mblank@google.com> Merge "Use correct position when moveToNext() in underlying fails" into jb-ub-mail
542fec98d011c78782b63b33d29cf81044e96f75 18-Sep-2012 Paul Westbrook <pwestbro@google.com> Prefer to launch activity from apk

If the UI provider specifies a view intent proxy, prefer an activity
that is in the same package. If one is not found in the package,
use the default activity resolving logic

Fix links being clicked from the SecureConversation fragment

Bug: 7187766
Change-Id: Ic4f620f4eb1a42d2abc43b2114f8d99a0444b3d0
ecureConversationViewFragment.java
2b35105ac3b111e212504d7f77419c3c7fd559c0 18-Sep-2012 Marc Blank <mblank@google.com> Use correct position when moveToNext() in underlying fails

Bug: 7103907
Change-Id: I74f26e65e3b63b02502910509c446dd3ad5f9f5f
onversationCursor.java
604f7716eaac3bc0989cdb2ff129c383b6dfe4d6 18-Sep-2012 mindyp <mindyp@google.com> Make sure we properly set the subject, hide the area where folders would go

Fixes b/7178668 Unnecessary white space above email message headers

Change-Id: Id72b6e01be1663c201519e70728c5d2dd97d5af3
onversationViewHeader.java
ecureConversationViewFragment.java
77a4605e6fbc368b2b87b4888f2ffd6329620807 18-Sep-2012 mindyp <mindyp@google.com> Show message details in a popup window for secure conversaton view.

Fixes b/7056611 Alternative design to expand/collapse message details in Email2

Change-Id: I557b661798f78e957c7973dd3df593d3bd65e45a
essageHeaderView.java
ecureConversationViewFragment.java
48c25b33e76f9f763f25852ee960acf21ce5bdd5 17-Sep-2012 mindyp <mindyp@google.com> Add pishable title bar to secure conversation view.

Change-Id: I6e50f04813f9521d0da541ac5046012ae6e7162b
essageHeaderView.java
ecureConversationViewFragment.java
ecureConversationWebView.java
ff282d0ef252dbdaf6e9f4e2a7fd640287c01e6b 17-Sep-2012 mindyp <mindyp@google.com> Share progress logic between secure and regular conversation view.

Fixes part of b/6383847 Implement secure/sanitized conversation view for unsanitized message content from IMAP and POP server

Change-Id: Ia2ba1185997c46952221f4ee7a57f3f198a749de
ecureConversationViewFragment.java
f4fce1227d8b49f45e6569f1590565f2df9e8d6e 15-Sep-2012 mindyp <mindyp@google.com> Stripped down view for email that uses no javascript.

TODO: push message header off the top of the screen like browser url bar
TODO: use spinner in the secureconversationviewfragment while waiting for the page to load;
should be able to push logic to the AbstractConversationViewFragment
fixees b/6383847 Implement secure/sanitized conversation view for unsanitized message content from IMAP and POP servers
Change-Id: I03299a2d193ad1dc8fb5cc509eaf5d9f3dae6b0f
onversationPagerAdapter.java
onversationViewAdapter.java
essageHeaderView.java
ecureConversationViewFragment.java
5ef5e0f82082a7e7b31aa185a47843b98ed9afae 16-Sep-2012 Marc Blank <mblank@google.com> Cache uri's in Wrapper to prevent wasteful looping through cursor

* Lazily initialize so that we only make the single iteration
through the cursor when needed
* Also, try to do the single interation in the background

Bug: 7166983
Change-Id: Ic1078daea8d8f6ddf01aaf1275bc08abc9ecf23c
onversationCursor.java
d9aa120b31077ee08ee9c99afe93272f4159382a 14-Sep-2012 Paul Westbrook <pwestbro@google.com> Merge "Restore download progress dialog" into jb-ub-mail
8081df46ef5a7794374e41cd1836e778a2da9b31 11-Sep-2012 Paul Westbrook <pwestbro@google.com> Restore download progress dialog

Now the attachment download progress is using an DialogFragment
so the dialog correctly gets restored on orientation change

Bug: 7137689
Change-Id: I90a225f423bf75fd4dbeb464051374919a3cff62
ttachmentActionHandler.java
ttachmentCommandHandler.java
ttachmentProgressDialogFragment.java
onversationViewAdapter.java
essageAttachmentBar.java
essageAttachmentTile.java
essageFooterView.java
1dc5753d6d55bc45123c94a2f0696e600d86208b 13-Sep-2012 Mark Wei <markwei@google.com> Fix when pinch to zoom on a wide message displays part of the message on the
sides of the snappy header

Bug: 7153691
Change-Id: I9b4d111b04ffdac0aeb636c9746817082cd78638
essageHeaderView.java
a8e4318bb9921e2ec6045c5f7187a4b78c55fe10 13-Sep-2012 Vikram Aggarwal <viki@google.com> Remove listview reference from selected menu

Fixes b/7093261 delete not working with multiple selected email

The selected conversation action menu keeps a reference to the
listview, which becomes stale in one-pane when we show a conversation.
Going back creates a new list fragment, with a new listview. Rather
than keep a reference to a list view, delegate the swiping delete
directly to the controller which knows about the newest list fragment
and list view.

Change-Id: I8cdd43875c9e3f2c3a003eac8bea250acc7c5a19
electedConversationsActionMenu.java
62066e47fe69c33b60ed970e46809ba81d044064 13-Sep-2012 Mark Wei <markwei@google.com> Prevent photos attached during Compose from showing generic thumbnail briefly.

Cache the loaded previews on save instance state, so when the configuration
changes, we don't have to re-download all the previews.

Bug: 7140604
Change-Id: Ic3fd640cb0116729868548cdd620b67bc06f3967
essageAttachmentTile.java
9365a826b46b0e274df88e92534f7d871eef2aa2 12-Sep-2012 mindyp <mindyp@google.com> Make sure that if we have selected the current conversation we autoadvance properly

Fixes b/7149402 Respect Auto-advance to conversation list when focused message is in the batch that is archived
Fixes b/7148741 Change behavior for - Swipe to archive focused message in tablet when auto-advance is set to conversation list
fixes b/7148988 Auto advance to previous/next not respected in tablet
Change-Id: Ic033782dffc5982b20090a358b5b972e3d1abce0
electedConversationsActionMenu.java
1857e9e382b28a1aeb65d5191b44d96d73d4bf33 10-Sep-2012 Marc Blank <mblank@google.com> Handle edge cases in ConversationCursor

* Handle the case in which a DELETED_COLUMN entry is still in the
newCursor
* Rewrite comment to reflect the various cases

Bug: 7131798

Change-Id: I0e5bc55929fafde0a903f3b82242339bb6e536e5
onversationCursor.java
8995554b8c55dd9e573e68572fa41b6417b87f0c 13-Sep-2012 mindyp <mindyp@google.com> Fix the class of pager adapter bugs where we show the wrong conv on destructive changes.

Change-Id: Id40db0f184852e00bd84019096ea06d6c5cad5d7
onversationPagerAdapter.java
dc2a2c1e7500f60e1d1cde1a6c8925a2763ada32 12-Sep-2012 mindyp <mindyp@google.com> Make sure the next conversation always gets selected in the conversation list.

Make sure the conversation has a position asigned.

Change-Id: Idaf76e20405e08cdf8e8a0894969ad69a9e4e5ce
onversationPagerAdapter.java
2b24e995cfcdb6ab0579b2fbcccb399a53632395 11-Sep-2012 Mark Wei <markwei@google.com> Fix rounding errors that caused conversation subject displays higher than
expected and slightly cut off for threads with many messages.

Bug: 6406245
Change-Id: Iee5114cd479cfdac001c2a9d5c9f15a79482c427
onversationWebView.java
0d27ba45a0cfdd372872c00bd05fbeeb7eb4d600 11-Sep-2012 mindyp <mindyp@google.com> Use snippet instead of convinfo.

Change-Id: I57bcb9ccc124c70c304d30a2787ccda916df4953
onversationItemViewModel.java
97f573d41eb1ab6e0b3683f081452391cf2a76ae 10-Sep-2012 Vikram Aggarwal <viki@google.com> Senders white only when list visible

Fixes b/7087113 White sender text after losing highlight
and its dupe
b/7137930 Sender's name shown in white for last viewed message

Change-Id: Ia64aef5053881004baed5e1bd1cdc1768342a43d
onversationItemView.java
972f263eb00e9d19a294b0a4c512a87a10995ba4 10-Sep-2012 mindyp <mindyp@google.com> Best guess fix since exchange not working right now

Fixes b/7113982 java.lang.IllegalArgumentException in android.text.Layout

Change-Id: Ib495e064662fb677e73234ec842174bfe1d85e5a
onversationItemView.java
6b5b299ceee104ba16a7563da5944520399bb51a 10-Sep-2012 mindyp <mindyp@google.com> Make sure to notify when items have been brought back locally.

Part of b/6761733 Hitting Undo After Archive When Advancing to Another Conversation Does Nothing

Change-Id: Ic60218ca856ef8efbc7788dc508990b73227cea0
onversationCursor.java
85598e86ee18fdf6c52e638c24701fccca66be04 10-Sep-2012 Paul Westbrook <pwestbro@google.com> Fixed crash with detached cursor

Make sure that we move the specified position before
loading a conversation from the cursor

In the ConversationPositionTracker, make sure that the position is
within the bounds of the cursor.

Bug: 7080023
Change-Id: I09e894e89845ccb686ab1a2f1b9aeb2ca5593d4f
onversationPagerAdapter.java
b74c351e9f76a79c76253d75015d7ea1eef76648 10-Sep-2012 Paul Westbrook <pwestbro@google.com> Fix NPE

If the view pager hasn't instantiated the conversation fragments,
don't bother updating it.

Bug: 7133525
Change-Id: Ic9397dd69d9f10b0b0379ac86f7b3bb9fa278b41
onversationPagerAdapter.java
0c30fcc80d2eebfbb0f96241e375a4cab30d277f 10-Sep-2012 Paul Westbrook <pwestbro@google.com> Merge "Use ConversationCursor to optimization validation" into jb-ub-mail
fe7f5bb113014365746c9e1368773c5448645a9d 10-Sep-2012 Paul Westbrook <pwestbro@google.com> Use ConversationCursor to optimization validation

Since the ConversationCursor knows about the conversations that
have been deleted, we should use that information to prevent walking through
the whole cursor to realize that all items in the batch have been removed

Bug: 7133260
Change-Id: Id9b3f066dda62d66ad93724f8a9c543275a5c3ac
onversationCursor.java
36280f3c2939bb2dacb4077bd528900346ff4bb9 10-Sep-2012 mindyp <mindyp@google.com> Update conversation folders when they change.

fixes b/6305908 After applying label in the message view, the label is not displayed
make priority indicator update as well
Change-Id: I4ea59f1eaa0bf97545d44b1ef897d5f5c98f060a
onversationPagerAdapter.java
onversationViewHeader.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
onversationContainer.java
e36e03aa80881c1dbc595aca36eb1944aa543b16 09-Sep-2012 mindyp <mindyp@google.com> Merge "Fix possible null subject case on s3" into jb-ub-mail
bc9b18ceda6603d9337e2410429ac49cd60c0345 09-Sep-2012 mindyp <mindyp@google.com> Fix possible null subject case on s3

Change-Id: I6f9218b7233b35f1eb30423272f06460429b8b4c
onversationItemView.java
f69a05bc8aabf7d3ae37b1f7ba76ac0a5eeb252d 08-Sep-2012 mindyp <mindyp@google.com> Make it possible to collapse a message by tapping on the snappy header.

Change-Id: Ibe9215afc9485159d4cebc55495d28a53d23b44d
essageHeaderView.java
cc2f9296ad63ed681c200feb118c5caace36e72e 07-Sep-2012 mindyp <mindyp@google.com> Use overridden method for finding item position

SwipeableListview already uses this
Now make sure other children do as well

Fixes b/7129005 Gmail crashed opening a message after deleting few messages

Change-Id: Ia0db43fd3ad1ac0cdf39612e2e91bae9e8a2efc3
onversationItemView.java
a4b9f78c174238045ec51a351553b39d876fb67e 06-Sep-2012 mindyp <mindyp@google.com> Whoops. We only handle if it was ever DOWN in the checkmark.

Fixes b/7118922 JOO68 - Can't open emails in Email app inbox view

Change-Id: Idefba14efa89bb37f1b05ef5aba24df4355fd95b
onversationItemView.java
7d64612104fd861474a09994f13768360f92041d 06-Sep-2012 Andy Huang <ath@google.com> avoid doing fragment work during pager swipe

Pager swipe was triggering immediate fragment transactions via
mark-read, so just don't call onConversationSeen so early.

All that really needs to happen immediately when swiping is:
a) subject-in-actionbar should be updated, and b) conversation
list highlight should change. Do both of those now in
AAC.setCurrentConversation, and do only that.

Bug: 6976876
Change-Id: I1f679627b36d25faabc27eb7dc9dac191aab1d7b
onversationPagerAdapter.java
onversationPagerController.java
79d51d2a70bdbb40b526d640215fbea16834b475 06-Sep-2012 Andy Huang <ath@google.com> Merge "new two-pane layout" into jb-ub-mail
a3ed834c959ece3453c1b34953fabecb3b19c424 01-Sep-2012 Andy Huang <ath@google.com> new two-pane layout

New, simplified 2-pane ViewGroup.
This version shuffles three panes around, like the last one, but
also supports other floating children like any FrameLayout
would. The animation is now done using ViewPropertyAnimator.
The cross-fade of the conversation list is now done with a
separate "copy" view (ConversationListCopy) that's animated in
tandem with the real list view.

Bug: 6963808
Change-Id: Icee580f663a50537874c1f98e9bbac822f58e571
onversationPagerController.java
37b65641d2e9009135a79d993e76e6984dadb422 06-Sep-2012 Paul Westbrook <pwestbro@google.com> Only enter detached mode with valid cursor

Don't enter detached mode, unless we have a valid cursor. This will
happen if the folder changes before the conversation cursor query
finishes.

Bug: 7112967

Change-Id: I5acbc8ee38a198fd50610cfbde2f4e58ecf33001
onversationPagerAdapter.java
5574a693205d0f8be458134e540907b0c05046ae 05-Sep-2012 Paul Westbrook <pwestbro@google.com> Don't show disabled archive item, without archive capability

We should check with the account capabilities before showing the
disabled archive button

Bug: 7107997
Change-Id: I39399bab5783eea0ad7bb67232817e7d62831f58
electedConversationsActionMenu.java
615fb1ca3f2e9f05a388ea509513d3e996343d80 04-Sep-2012 mindyp <mindyp@google.com> Adding inbox when in trash is destructive.

Fixes b/7100602 No way to remove messages from the trash.

Also, make sure we have a first message sender to get info from
its possible this is a draft so prevent a crash
Change-Id: I76f21879382115c0085a3fb37e6ce7f5405db9d9
onversationItemViewModel.java
dc0617f3478b21dd3324ab10b8c433517ae95460 31-Aug-2012 mindyp <mindyp@google.com> Update accessibility text to make more sense per user feedback.

Reset view heights that may have changed during animations
Might fix the issue where items look odd after swipe to archive
Change-Id: I1231fb98ab4ca855e8bce277e715d78472f9baa8
onversationItemView.java
onversationItemViewModel.java
endersView.java
a4319eff975269d01c2aa027be0cd402bdeaf846 31-Aug-2012 Mark Wei <markwei@google.com> Merge "Fix for Preview Images In Compose Mode are Not Visible" into jb-ub-mail
cc754b102ed65df9d637b4e0a03e645214ea3ccc 30-Aug-2012 Vikram Aggarwal <viki@google.com> Add a bulk update operation for read.

Change-Id: I95a0756f3b51d534a013613136ce265097f2b227
onversationCursor.java
d7035855c0717e4fb57c316b3a180b061fbfd76c 31-Aug-2012 Mark Wei <markwei@google.com> Fix for Preview Images In Compose Mode are Not Visible

Bug: 6679652
Change-Id: I1aa634d1e7f7c1f9189f9c1447e8f5c99c6f7585
essageFooterView.java
3825f3d2284b2b57fadcfe6a4ebd9992f3c5c7bb 30-Aug-2012 Andy Huang <ath@google.com> fix spurious stopListening on the pager when loading from widget

When loading from a VIEW intent, the pager was sometimes
disconnected from its data source before the data was loaded,
which caused it to stay in singleton mode forever.

The original code to disconnect the pager was intended to
disable pager updates when jumping back from conversation mode
in 2-pane (via account spinner), so move that call to the
beginning of 2-pane's mode change animation.

Also do a bit of misc API cleanup.

Bug: 7076780
Change-Id: I508b59816f4f537276aa103b9dcae51972389eb0
onversationPagerAdapter.java
onversationPagerController.java
860164409d7f9e4f726ed4edb2ed77afc6873ad5 30-Aug-2012 Andy Huang <ath@google.com> fix an old copy-pasta

Change-Id: I601e5e99e5a7379930e648b3f1d7e9f8143de61c
onversationPagerAdapter.java
389f0b21a9b21bc3607b810c88272d06d48d0fe6 29-Aug-2012 mindyp <mindyp@google.com> Properly batch up conversation folder changes since they may be destructive.

If they are destructive, we want to be able to undo them, so we have
to make them part of the same batch operation.

Change-Id: I5600f8ef65e31256c44bd33440819264e8e8421e
onversationCursor.java
c84759cc974256b6af5545c4bd993b81a0a98f6f 29-Aug-2012 mindyp <mindyp@google.com> Dont remove selection from dragged item; defer destructive folder change

The destructive folder change shouldn't happen until the animations complete
Or it will be automatically committed at the end
But we prevent updates while that is going on
So we won't get a null conversation cursor in the interim

Change-Id: Id4ee6e1da0e8cf50f1d9ed361eb505a670371085
onversationItemView.java
54f120f6ada40c7191811dfff99b151e9e192c78 28-Aug-2012 mindyp <mindyp@google.com> Commit leave behind items when tapping account switcher

There is no onclick listener for it
or onshow for the spinner popup window
this is my best guess as to how to tell when it got tapped
when the popup is shown, the dropdown views will be accessed/ built
Dismiss when cab mode is exited.

part of b/6864248 dismiss leave behind on next action taken

Change-Id: Ib706f61a47356412cef73822a4a40453214d22f2
onversationItemView.java
electedConversationsActionMenu.java
1ee96b2b100546b5b69ad42c5bc3755a4293d1a3 25-Aug-2012 Andy Huang <ath@google.com> handle missing messages every which way

Entire conversations can disappear upon sync (should pop back)
Or just single messages can disappear (should keep conv in view)

Handle these specially in conversation view. Stay on the current
conversation when possible, except if no messages remain, we
should pop back to list view.

When single messages disappear, make sure we don't treat all
the rest as super-collapsed, or else the conv will render empty.

When popping back to list view, we can't call popBackStack()
from onLoadFinished(). Since we only need to do this in 1-pane,
add logic to 1-pane's showConversation() to handle cases where
the caller is in onLoadFinished. In that case, we need to defer
the work slightly, but still be aware of other FragmentManager
constraints when later handling the deferred job.

Bug: 6889742
Bug: 7005366
Change-Id: Id37f878e82523837b7f105d49fb736f774bad224
onversationPagerAdapter.java
d064972c4a032f3c5cfcb236aa470273f7ac2ce0 28-Aug-2012 mindyp <mindyp@google.com> use swipehelper to determine scroll

let swipe helper determine if the user meant to scroll
fixes b/7022556 Increase scroll threshold gets rid of leave behind
If we use the scroll listener, we don't get to use our own threshhold
We want to be careful when the user has started on the leave behind item
and make sure that we dont just detect the user playing around on the item,
maybe just a touch for "what did I do here?" and dismiss it by accident
So the threshhold for dismissing the item when the user starts on the
leavebehinditem is larger than when they start on another item.

Change-Id: I1e55e6c9be07e026b19a4ad55ad531305d3777d2
onversationItemView.java
ef3625472596326b910a4445307d1a8eb8c9cc3f 27-Aug-2012 Paul Westbrook <pwestbro@google.com> Added ability to discard drafts

Now the UI can tell the UI provider to discard the drafts for a conversation
(if the provider supports this capability)

Bug: 6315721
Change-Id: If786d13448fdce9a45a54a8762ee1b15e3f29bcd
onversationCursor.java
electedConversationsActionMenu.java
8fdce82be7c643375470cd6dc48ff531f9175dd0 28-Aug-2012 Andy Huang <ath@google.com> fix scrap view reference loss that caused native crash

When re-rendering an existing conversation view, the part of the
measure process that uses scrap views inadvertently removed them
from the scrap heap without first calling removeDetachedView().
This made the views eligible for GC, and if a GC occurred before
the next draw, ultimately led to a native crash.

Fix this by NOT removing scrap views during the measure phase.

Bug: 6905156
Change-Id: I7ea4b2ec48ce683cbbf0d40247ae5040c777854b
onversationContainer.java
e952353a26db3e2e6e422072daf2213e5f7b9f82 27-Aug-2012 Andy Huang <ath@google.com> fix NPE from a click on unbound header view

Bug: 7060948
Change-Id: I73e9023773193880618390c8ab40414ff79a24b3
essageHeaderView.java
256b35c0a8287f48c28e0d1ba3fae65790063295 23-Aug-2012 Andy Huang <ath@google.com> add margins to conversation view

Also fix some left/right balance problems on wide messages.

Bug: 6336075
Bug: 6375007
Change-Id: I8fd4a3099d0670f68295bf8f28d2ba55e7177bdc
onversationContainer.java
ae70f33c9db0e71e4ea67eaef892afb1546319a6 24-Aug-2012 mindyp <mindyp@google.com> fix message info when there are no senders but there is a draft.

fixes b/7052115 odd senders display where then are no senders
Change-Id: I06c114832e6ff419658a8d376fc042b4f9862c52
endersView.java
7517e3b61b898a57f19be0671f70d58a82224643 20-Aug-2012 Andy Huang <ath@google.com> Turn on Andy's most excellent copious logging of layouts

When the 'MailBlankFragment' logging is enabled, this will disable all
hacky workarounds and log view state. When a blank view happens, look
for logging with this tag to see where the view state might have
messed up.

With the 'MailBlankFragment' tag disabled, this removes all logging
and enables the hacky workaround to patch-up view layout requested
state.

Bug: 6946182
Change-Id: Ia4c2515f969be29678dc0a9bd1c11d487e3d1520
onversationContainer.java
bad1a93d431bc599ed73fa4f42eeef313cd31626 23-Aug-2012 mindyp <mindyp@google.com> When tapping checkbox explicitly, go straight to toggling the checkbox.

Begin drag is only used if the user has performed a long press
Fixes b/7046061 Tap/Select the check box of any message in GmailEmail Inbox does not show the selection for ~ 20-30 secs

Change-Id: Ib8a2d04ff162fe509e8f38d6f61960a8d828efbe
onversationItemView.java
38bfbec47dc343a6b47377c8a88b23b743e9860b 23-Aug-2012 mindyp <mindyp@google.com> Merge "Get the width from the parent rather than a resource." into jb-ub-mail
ffd39aa99f185385941595c1da7e09c2a4a4c146 23-Aug-2012 mindyp <mindyp@google.com> Get the width from the parent rather than a resource.

This means we don't have to override per mode, orientation, etc.
And we don't have to wait for a layout

Change-Id: Icd914791184b03e79a92d3b321e28d973cf86992
onversationItemView.java
c6adce3cf6887c4c6dd5005724565702751843d0 23-Aug-2012 mindyp <mindyp@google.com> Commit destructive actions when changing folder/ account

Fixes b/7031798 Gmail app crashing re-reporting since issue with previous report

Change-Id: Ie3380c6c5f0777e198f73d95ee6de29d4300f1b5
electedConversationsActionMenu.java
5390fcabb7baf683fc14bd68d8612913dac70a81 22-Aug-2012 mindyp <mindyp@google.com> Restore drag/drop logic

fixes b/7034633 Drag functionality is missing on tablets

Change-Id: I8d0c9d4a95cf143a307fb093721f3b5f6eba872c
onversationItemView.java
138335918e1278221d06afb074775ab9d173d6ce 23-Aug-2012 mindyp <mindyp@google.com> Merge "Implement workaround for issues in staticlayout." into jb-ub-mail
850c55ee2cab6b1c224366c66502f5d5f55018eb 22-Aug-2012 mindyp <mindyp@google.com> Implement workaround for issues in staticlayout.

There is some bug that is not keeping text on 1 line
and not ellipsizing (http://b/issue?id=6954231)

Using a textview to explicitly set maxlines == 1
Fixes b/7002058 Conversation list overwriting lines when font size is "Large"
since this bug existed as of late in ICS, and we need to support all the way
back to HC, we need to use a workaround here.

Change-Id: Id3523a115f9e23ec7697fa9cc5f711cb29143942
onversationItemView.java
onversationItemViewModel.java
18a9717e1f93f55d5be8b75baa0e9353ddbb25a4 22-Aug-2012 Marc Blank <mblank@google.com> Infinite recursion: do not want

Bug: 7036080
Change-Id: Iaa426da92c540f7a719f78979a6db392f62e6b96
onversationCursor.java
6992375ad55e6dabcffd37502e98b3d395aeaf9e 22-Aug-2012 Vikram Aggarwal <viki@google.com> Merge "Pager Controller stops listening on account changes" into jb-ub-mail
2e0a2369f74b74e15b5dc35a3bdecba2dbd66436 22-Aug-2012 Vikram Aggarwal <viki@google.com> Pager Controller stops listening on account changes

Fix b/7030408

Change-Id: I3d1a52a5bc8699c74f7031f8dbd593791591b780
onversationPagerController.java
72ad25445f7ac367c515f1b68be80ef9f0f44e0a 22-Aug-2012 Marc Blank <mblank@google.com> Merge "Handle completion of refreshTask on closed cursor" into jb-ub-mail
e602ae10b24ed61b5fdd651f82b330b7e700d746 22-Aug-2012 Marc Blank <mblank@google.com> Handle completion of refreshTask on closed cursor

* Cancel the task (closing the new cursor, etc.)

Change-Id: Ie499a8ab8ff24655bb96f08c263949fa7fe6c71c
onversationCursor.java
bedcad9e6d89ae2f058138e1aa0446fef4d8f8c7 22-Aug-2012 Paul Westbrook <pwestbro@google.com> Attachment dialog cleanup

1) Display file name in download dialog
2) Don't switch from determinate to indeterminate progress mode

Bug: 7019628
Bug: 7020879
Change-Id: I2593d8648d4e12019be3b92ed7591af139fb463f
ttachmentActionHandler.java
7ce62d32cec32b94b3e7fd554ed017dc9bd998e7 22-Aug-2012 Andy Huang <ath@google.com> handle null pager cursor

relax a sanity check. null cursors are okay (actually expected)
now.

Bug: 7028988
Change-Id: I10cf75a652e04dfcc16ff1ecda14fe1ada727b1a
onversationPagerAdapter.java
3dc68949fc08678194cce8aae5d75bff58191eec 22-Aug-2012 mindyp <mindyp@google.com> Merge "Force ellipsizing via the static layout." into jb-ub-mail
28b7aee7fa1f7d096d33fc823a88a64f7a3fa79d 21-Aug-2012 Andy Huang <ath@google.com> update conversation view on reply-all setting change

Use existing adapter's dataset change signal-- dump overlays
and re-render.
Begin to assume that Settings always hangs off Account.

Bug: 6245217
Change-Id: I70f98f641eee6d193f9842a578a889197f650941
onversationContainer.java
onversationViewAdapter.java
onversationViewHeader.java
essageHeaderView.java
ffd21a08c89f78adc2ee7a07b1afe6163c5f1607 21-Aug-2012 mindyp <mindyp@google.com> Force ellipsizing via the static layout.

No, I don't know why, working with fwk team on that
But I do know it fixes all the cases I currently know about

Fixes b/7002058 Conversation list overwriting lines when font size is "Large"

Change-Id: I84e8a9224c3ff61d7613ce080e7b8f9c206ce9ac
onversationItemView.java
423bea25992492efea7d414819729f9eae7ce72e 21-Aug-2012 Andy Huang <ath@google.com> fix conversation read/unread edge cases

A re-render should mark new messages read, if there are any.
* on rotate, all messages will stay read, so nothing will
happen in that case

A re-render should not clear 'unread' state as far as
"mark unread", i.e. "New message from X" -> tap -> re-render
-> mark unread -> should mark ALL unread messages unread, not
just new ones.

Bug: 7026808
Change-Id: I4693481a0a3e6d89380f9d16fd8591ba179896b2
essageCursor.java
4969e0c5f8ab837e1b0d29ea56d220e6404e9250 20-Aug-2012 Paul Westbrook <pwestbro@google.com> Move ConversationListFooterView click handling

Since the click handling for the ConversationListFooterView is
essentially the same as that of the ToastBar, move click handling
into the Activity Controller

Change-Id: I14b8ef6788b929e82d61b8393195b703c210021d
onversationListFooterView.java
17beb0b8aee78a39a2094a48ba7f55a602f701cb 20-Aug-2012 Paul Westbrook <pwestbro@google.com> Add suport for report problem

Bug: 6961632
Bug: 6946973
Change-Id: I88925b43008bff11f62f9c912422daf07ae884a9
onversationListFooterView.java
5254486a8c37cdf2b579aa7a3b9c8eb7324062bc 20-Aug-2012 mindyp <mindyp@google.com> Dismiss leave behinds when scrolling.

Also, provide a way to get to the list, since its possible this item has no
parent (related to other issues discussing with adam, but its at the framework
level so we need a way to get around it)

Part of b/6864248 dismiss leave behind on next action taken

Change-Id: I2cf483f67ede6e80a935ddd3cf203b3a4b07517f
onversationItemView.java
6c01ccb7cf02fdc9954eedf9c3346d2ad8cdd31e 20-Aug-2012 Marc Blank <mblank@google.com> Merge "Try alternate fix to deadlock issue" into jb-ub-mail
e77d5262a98d28de198c06c6ef84b6b70047a60a 20-Aug-2012 Marc Blank <mblank@google.com> Try alternate fix to deadlock issue

* Keep observer activity protected by mCacheMapLock, as before
* Make sure that underlyingChanged() is called on the ui thread
(which was expected by listeners)

Bug: 6957857
Bug: 7013989

Change-Id: I932c488a60e92811aba0f03e6efb02003ff1f2aa
onversationCursor.java
043ba0bc0cc2d2061ca948f290d8d55171125568 20-Aug-2012 mindyp <mindyp@google.com> Merge "Use delete capability to determine whether to show delete for a folder." into jb-ub-mail
eccde435716f4771af124912e83db816a18f3410 20-Aug-2012 mindyp <mindyp@google.com> Use delete capability to determine whether to show delete for a folder.

Fixes b/7006885 add flag for "supports delete" / verify that trash not sending supports archive

Change-Id: Iea2597e120b15c0ab9452461d12af3179e325298
electedConversationsActionMenu.java
28cb53d729459d0835e435efe5dae9cd424b1ad1 20-Aug-2012 Marc Blank <mblank@google.com> Revert "Prevent deadlock"

This reverts commit c33ec4ce932c94c42a2813c666009de2f50d71fb

Change-Id: I219529b396c1a53ee22a1eecc65115e1d07250b9
onversationCursor.java
c33ec4ce932c94c42a2813c666009de2f50d71fb 09-Aug-2012 Paul Westbrook <pwestbro@google.com> Prevent deadlock

A lock is held while observers on a cursor are being called. In the
ConversationCursor, we need to make sure that we don't hold the
mCacheMapLock while modifying the list of observers on the cursor

Bug: 6957857
Change-Id: I1bf29935806053e0436970edec6fdc29f9e758ee
onversationCursor.java
de04c33a1f886be9e50861741488cf42a952b958 18-Aug-2012 Marc Blank <mblank@google.com> Merge "Fix WTF crash related to ConversationCursor" into jb-ub-mail
e5884c70ddc68c55861d0c1b945346316b0ca428 18-Aug-2012 Marc Blank <mblank@google.com> Fix WTF crash related to ConversationCursor

* We weren't setting mPosition properly when moveToNext() failed in
the underlying cursor
* Remove stack trace logging for expected situations
* Optimize long backward cursor moves
* Add some temporary logging for newly added code

Bug: 7012403
Change-Id: I8dcb97539f00dec84bdae74858d7b8efc5e55733
onversationCursor.java
a538984fcc19e7624f2650b119ede39bf1f35846 18-Aug-2012 mindyp <mindyp@google.com> Dismiss just the text from the leave behind instead of the whole item.

Leaves the BG there so the change isn't as "shocking"

Change-Id: I95b6929dadbf9b5e7c80931a3f65111fc4a695ff
onversationItemView.java
b68e4aeb1997541eccbba115a9e848de1d70bf1c 17-Aug-2012 Mindy Pereira <mindyp@google.com> Delete and archive are not supported in the trash folder.

Fixes b/7004458 Undoing a deleted/Trashed mail doesn't bring back the mail to inbox ( Device in Portrait mode)

Verify the behavior on ICS; if trash is supported, then its trash FOREVER and there is def no undo

Change-Id: I1f36bb42b1f27b2d98047ffa0d24cc9cf492c1ed
electedConversationsActionMenu.java
10eccbdc7b27f68e8a7c868c80e2d4f38170b652 16-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "New content description string." into jb-ub-mail
0b96043f9f2f740ce4d81dd5036e076e9704aa3b 16-Aug-2012 Mindy Pereira <mindyp@google.com> New content description string.

fixes b/5196381 read the date and from as part of accessibility
round 1
Change-Id: Ia091a5dc8f9d8f9c5dc33b55e326dddd8a5d4ed2
onversationItemViewModel.java
4f592dd7f3a4ccb03c506cd6e47ed2b47c65ad83 16-Aug-2012 Andy Huang <ath@google.com> Merge "animate snap header away" into jb-ub-mail
84f9b5c60dc023570202859ba1d30cf9cb5e6e7a 16-Aug-2012 Mindy Pereira <mindyp@google.com> Don't show the action as we are swiping, just on the leavebehind.

Fixes part of b/6926116 need visual design for swipe

Change-Id: I2f53e5b652ee687f7046306064917e55b7ea005e
wipeableConversationItemView.java
31c38a8247b4583ac1cc506acf8454d8922ee491 16-Aug-2012 Andy Huang <ath@google.com> animate snap header away

Change-Id: I8978cb80bd7a6c0f637a240c8b4137e5c7e61528
onversationContainer.java
onversationOverlayItem.java
eaderBlock.java
essageHeaderView.java
uperCollapsedBlock.java
59e0b18db1bd06cfb74693d7dbb0cb48112a69b1 14-Aug-2012 Andy Huang <ath@google.com> snap headers

Low-speed obscuring of snap header not yet implemented.

Change-Id: I23bcf61a8de6d9d719d40a6b65009c7711ef0e19
onversationContainer.java
onversationOverlayItem.java
onversationViewAdapter.java
essageHeaderView.java
184693234944ff4726a3acd673db756714d74d32 15-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "When we update the folder the user is viewing, clear the items cache." into jb-ub-mail
12fe37aa24c313fd8192dede0770dadf0ec23359 15-Aug-2012 Mindy Pereira <mindyp@google.com> When we update the folder the user is viewing, clear the items cache.

When we swap folders, a lot of information about an item is going to
change AND we wont be seeing a lot of the same items.
It makes sense to just blow away the cache and redo.
fixes b/6987220 User defined label added to a message is missing in Gmail Inbox after reading the message
Change-Id: I1167af604bab4045946c89bcacf3f87bd2077919
onversationItemViewModel.java
5c16f82f9916b8d21fd36ac7c460811e59ba6614 15-Aug-2012 Mindy Pereira <mindyp@google.com> Only items that are being destroyed should be blue in color.

Create a mechanism to reset items to original state before starting
any animations.

Change-Id: I530ec7c1fd31fcd04ca215dc789fd6c5fca57da4
onversationItemView.java
wipeableConversationItemView.java
583eea0562dff158bdd3db9c2adfaec9b7ebef68 15-Aug-2012 Mindy Pereira <mindyp@google.com> Make sure we take priority into account when deciding whether or not to redraw.

Fixes b/6991264 marking important/ not important not immediately reflected in conversation list items

Change-Id: I546f7018f1f8a1055fe08245063e4e6fb5be0e84
onversationItemView.java
onversationItemViewModel.java
39e4ddf9eec5b7299cc447491736de8338578bc9 15-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "Use multi-model mode" into jb-ub-mail
14f64ec84173e5ee8b7157a74e8d62eff7693c19 15-Aug-2012 Mindy Pereira <mindyp@google.com> Use multi-model mode

Per @adamp

Fixes b/6977371 JOO40C: Exiting multi-select mode without checkboxes leaves one conversation selecte
Also, make sure we registered the listener before unregistering
I ran into an illegal state crash

Change-Id: I9d47bfa93caf26f17f4379c36f31cb9c32788859
electedConversationsActionMenu.java
d1ee8822384cdfa5001572245c72f9996a39a197 14-Aug-2012 Mindy Pereira <mindyp@google.com> Fix background color.

Fixes b/6961067 funkiness when deleting top item in list view
Change-Id: I41df55ddd309131ba80539372162bee824d2204b
onversationItemView.java
7c401b7896910c00e6234e8774aab0be45740d32 14-Aug-2012 Vikram Aggarwal <viki@google.com> Get the Account through a listener

Every object that needs an account gets it from the ActivityController
by registering for future updates. This should reduce some of the
headaches with account objects going out of sync.

Fix b/6969950

Change-Id: I0449b482ecd84bdb947304db5f0504c77dd1dc7a
electedConversationsActionMenu.java
0d8015eff2b1eba829e70750455d965eba4a8896 15-Aug-2012 Vikram Aggarwal <viki@google.com> Remove unused code

Change-Id: I9c087f2a5dc92b12b6d6831cc6634a61fb60adc6
onversationItemView.java
a41a57a186b84f98b497e109cff94aa3c1362697 14-Aug-2012 Mindy Pereira <mindyp@google.com> Fix archive menu item open issue

Per UX: hide archive on tablet, disable it on phone
fixes b/6497472 update menus in mail to match jb specs

Change-Id: I202a6151f673b32206fc89907cbe5febd21d85a0
electedConversationsActionMenu.java
50cfeda191d0744d61d278890763c8d261389e03 14-Aug-2012 Mindy Pereira <mindyp@google.com> Fixup menus for tablet.

Fixes other part of b/6497472 update menus in mail to match jb specs

Change-Id: Ic114397b621d97ceb5299e40431a6b6939c30f9f
electedConversationsActionMenu.java
9ba4251297f1645af2490fcc2dc43f5063e12a29 14-Aug-2012 Mindy Pereira <mindyp@google.com> Make sure phone menus match spec.

Part of b/6497472 update menus in mail to match jb specs
specifically to match phone specs
Change-Id: I0c41f137107f69d2e241787ed500d63aa5da2de2
electedConversationsActionMenu.java
01f30509c4c8ad0d13b7635447b7f023c7a0cab7 14-Aug-2012 Mindy Pereira <mindyp@google.com> Show remove folder option in user created labels.

Fixes b/6977686 User created labels don't have Remove label (archive) icon

Change-Id: Icecada98ac11e66f622fbac80991a481873eed18
electedConversationsActionMenu.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
essageCursor.java
960fea746ff82480cccf6a945bfaeab1689c7138 13-Aug-2012 Mindy Pereira <mindyp@google.com> Fixup touch handling.

This is a MUCH simpler version.

Change-Id: I8bfb264b0669b436394f4455e9c0624a258953f0
onversationItemView.java
61adefa3ce92834f815f1a565ca5496743794297 13-Aug-2012 Paul Westbrook <pwestbro@google.com> Fixed rety buyton in footer view

Bug: 6972932
Change-Id: Iacc2df900d61c25dfe96bd429f056b49f57d333e
onversationListFooterView.java
1e946db1a0e20a92361cf1c86d8b28a1f878fdbc 12-Aug-2012 Mindy Pereira <mindyp@google.com> Improve long press touch feedback

If the user moves their finger, cancel any pending long press checks
This was showing as a bug in which sometimes scrolling would "long press"
and item

Change-Id: I44059cf9d525c61569d2643dc7f24984ccf31797
onversationItemView.java
01bb8d91c8ea039518ee07c8ac83e4e42cd81739 11-Aug-2012 Mindy Pereira <mindyp@google.com> Small tweak. Always set the message info ofset.

Change-Id: Ifee53dfb355dbbb9f3dd251ed84a0739915897b9
onversationItemView.java
8a6eb44e688ce082597978def2042ea8376b34b2 11-Aug-2012 Mindy Pereira <mindyp@google.com> Make senders text turn to activated color when subject/ snippet does

Change-Id: I8d2c98cdd5f63384093cc3deaf540475592d4897
onversationItemView.java
onversationItemViewModel.java
5bcd7e9f994624eea184a60ff50a3d71b5710582 10-Aug-2012 Mindy Pereira <mindyp@google.com> Fix the highlight that was hanging around in the conversation list

Change-Id: I333df599b374ca47e5e876c094983474cc43f8cd
onversationItemView.java
cf652a6f53bbf7508b268381525ab9c96fe832e9 10-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "Explicitly call out the name of the folder/label being removed." into jb-ub-mail
bcd784c09f649785a3dda1d6d9a6d5f58ba41770 10-Aug-2012 Mindy Pereira <mindyp@google.com> Explicitly call out the name of the folder/label being removed.

Fixes b/On swipe change copy for Remove from label to Remove from [labelname]

Also, that's not a not =P if it is animating, skip, otherwise, refresh
Change-Id: I450033cac8adf2b95e9ed101e1a4651f708e5ac0
wipeableConversationItemView.java
fc73c951afeb5f9d38a263d7c6b772dcbdea2ac0 10-Aug-2012 Andy Huang <ath@google.com> Merge "fix conversation view restore" into jb-ub-mail
11972d812670c7490d9cae8f15f733ee42249b57 10-Aug-2012 Andy Huang <ath@google.com> Merge "message "serverId" field is a string, not a long" into jb-ub-mail
87cf662c9c6c87e7f40dab6545c41484a7e7bfd3 10-Aug-2012 Andy Huang <ath@google.com> fix conversation view restore

Singleton mode is not ready yet.
Restoring should not re-enter singleton mode (the fragments
and loader info will all get restored anyway), so this will
have to wait for a restore-specific Pager.show codepath.

Change-Id: Ifd9f4752d9086848f75f5186fb569c892de44cb4
onversationPagerController.java
5a574f54c76ec4b7611730e49d4fe58f75cb1720 10-Aug-2012 Andy Huang <ath@google.com> Merge "handle empty snippets" into jb-ub-mail
e805ab4b4e4dcdfc21dd58d4341ec226bf70b65d 10-Aug-2012 Andy Huang <ath@google.com> handle null message snippets

Bug: 6963189
Change-Id: Ie3dbeda620349346989064965ed4c6114c2736e5
essageHeaderView.java
34775bdefbccd07f194a7e34c2f89e434c1c1ecb 10-Aug-2012 Andy Huang <ath@google.com> handle empty snippets

avoid crashing due to span errors.

Change-Id: Ia27d3727fa4ac7896065ee5dba0acb9c98f51232
onversationItemView.java
d47877e3860ea4249eddb3f6efefbc6cd39f2320 10-Aug-2012 Andy Huang <ath@google.com> message "serverId" field is a string, not a long

Also remove some unused usage of serverId.

Change-Id: Ic421a77bfff6218a07d35f80219a2fae729ceb13
essageCursor.java
68459a7b3265da5002ff331529f12f6b408c9b03 10-Aug-2012 Andy Huang <ath@google.com> Enable "singleton mode" for the pager, fix older/newer

Dataset changes mostly work, so now it's safe to start using
this optimization. Loading the initial conversation in singleton
mode forces the current conversation to load first, and only
loads the left/right neighbors after onPageFinished fires.
This change causes the title to initially be blank; underlying
issue filed as b/6963866.

Swap older/newer strings.
Disable title text in singleton mode (avoid "1 of 1")

Bug: 6962522
Change-Id: Id0b210be9d650e70a90403384ac5be64adc8e251
onversationPagerAdapter.java
onversationPagerController.java
6781c26a5ad56210fde30fab0e4c4081db44385d 10-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "Make sure view mode changes actually get to the conversation list fragment." into jb-ub-mail
b5901be36e247573e8162714e8e006c4dbc35d4a 10-Aug-2012 Mindy Pereira <mindyp@google.com> Make sure view mode changes actually get to the conversation list fragment.

Set the background of the loading item properly depending in mode.

Fixes b/6409001 Shadow on left side of emails is not consistent. You see it only on email items but not on the "loading" message or empty section,

Change-Id: Ie0b15e6853665e4e5ece16a836f9a0fc1e114555
onversationListFooterView.java
a81f699753cb95dadfe275755f5687d5ef03714e 10-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "Apparently there are some cases where this just goes off the edge." into jb-ub-mail
be95d004c24569a3cc8bb314997a94d5f8ab8b4f 10-Aug-2012 Mindy Pereira <mindyp@google.com> Apparently there are some cases where this just goes off the edge.

No idea why
Fixes b/6963607 Gmail crashes when switching from personal to corp inbox

Change-Id: I87b32219b9d8815717725d1bf947a04a87fed116
endersView.java
00179f19e413461498599ab7e6eb6914cc5c3671 10-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Added the visuals for the new error styles.

The visuals are done (minus some string changes).
However, two of the buttons need to be implemented
(the sign in button and the report feedback button).

All of this work occurs in both the ActionableToastBar
and the ConversationListFooterView.

Change-Id: Ifa67a0f72d100191c2cdb47f601e6ff04a765e02
onversationListFooterView.java
yncErrorDialogFragment.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
onversationItemView.java
b807337282fb19d1a38cdbe092a2f472b0e30321 09-Aug-2012 Mindy Pereira <mindyp@google.com> Dont show trash in trash...

Fixes b/6960345 Trash label displays trash icon and swiping deletes

Change-Id: I0d828fc34bbf2cb596689cc3805e9211f3951a39
electedConversationsActionMenu.java
067ef97264240a2c3f9172a9ab88ba43fef7c475 08-Aug-2012 Mindy Pereira <mindyp@google.com> Moved swipe animation into animated adapter; alternate method for finding position

Fixes b/6930375 Crash on Swiping to archive few messages in quick succession
fixes b/6933685 After swipe to archive, tapping on email to open is off by one message
fixes b/6937509 seeing duplicate messages in inbox; when clicked, they open a different message

Some small funkiness in the animations on latest build; the top most item in the list is overlapping the top of the actionbar
I'm not sure this is my fault, but filing b/6961067 funkiness when deleting top item in list view to check into it
Change-Id: Id1e392744c58d806d633ee4d84abfadf9846e4a8
onversationItemView.java
wipeableConversationItemView.java
f64891149de2176cccd3a03e28a62eb210decf8a 08-Aug-2012 Mindy Pereira <mindyp@google.com> Fix animation heights.

This fixes the not growing/ collapsing all the way thing gabe reported.

Change-Id: I93bc9049c69e4ac06a37229935dda04a6e3c6257
onversationItemViewCoordinates.java
onversationItemViewModel.java
bc9e42a9c0c4e85001b42747519346493a3e33ca 08-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "use activated NOT pressed" into jb-ub-mail
e7d783d726236cb090bba1baed1ea44f743ad788 07-Aug-2012 Mindy Pereira <mindyp@google.com> use activated NOT pressed

Fixes b/6881969 Blue highlight appears on search result after opening in 2-pane portrait mode

Fix that states for conversation items were not getting updated.
Also, clear the state of the item
When it two pane, it wsnt getting cleared correctly
This is still highlighting the conversation in list mode, but its taken care of
about 90% of the issues we were seeing (no more duplicate highlights for instance,
correct view mode)

will fix the rest in another CL
Change-Id: I6352c33e58462cf00412cf54086f1ecc08b6a90f
onversationItemView.java
wipeableConversationItemView.java
a3831fb1589226a14adc67657f16204718c8ac74 08-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix NPE

Bug: 6949444
Change-Id: Icdc44ebb7715053eed79e4daac923eb4cc705b62
endersView.java
0d6bc7609e228a48f01d4c57450a879099f532b0 08-Aug-2012 Andy Huang <ath@google.com> Merge ""new message from" in conversation view on update" into jb-ub-mail
feffa26a40e933ad0ff4700e2bf9e0555f0f8470 08-Aug-2012 Mindy Pereira <mindyp@google.com> Since its an arraylist, we need to just replace existing with nulls.

Fixes b/6949402 gmail crashes on launc

Change-Id: I7babea1f55a66940a1a8a3fee53f5a7798f97e9d
onversationItemView.java
endersView.java
48b55b5945a3e9fddfb8c750ded3327ac733b21a 08-Aug-2012 Mindy Pereira <mindyp@google.com> Use objects.hash

The hash code wasn't changing based on the read bit

Change-Id: Ib7de80f37a3555b5aee2d2a64d6dec53f49f8c01
onversationItemViewModel.java
47aa9c991b33c722a6ba1946fc02e0aba17bc1c9 01-Aug-2012 Andy Huang <ath@google.com> "new message from" in conversation view on update

* put the New Message bar in a new floaty layer in
ConversationContainer. snap header can also live here.
* add left/right margin support to ConversationContainer

Send/save of a new message also generates the 'new message'
notification for now.

Bug: 6384217
Change-Id: I10a40bbf87423194214e5ded08539abaaf7fd25c
onversationContainer.java
essageCursor.java
664f8d883953923792cb9ede35146ff55b4c9096 07-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "Fix tap feedback" into jb-ub-mail
464275f83c1fa264e097ad222ab47b469d04464b 07-Aug-2012 Mindy Pereira <mindyp@google.com> Fix tap feedback

Fixes b/6939986 Missing/misbehaving pressed state for items in conversation list

Change-Id: I9e8f1c1221b199778f441ae61673cb6dfe32307c
onversationItemView.java
7018b9b61d8d95a382e9a3759deb08e8240355c7 07-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Deleted setPhotoName call. API is being deleted.

Change-Id: I9a56dfe0c1ad183da48beca25f2d9b3a05517d0d
essageAttachmentTile.java
d6318e56adadeff4106e9696b5330239175487b1 06-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Refactored some of the preview code.

We now have a canPreview method in Attachment
that performs the PreviewIntentUri != null
action. Seeing it in multiple places was bothering me.

Change-Id: I3eedcffb8b5063985cf93ab86876e5170a99fbe0
essageAttachmentBar.java
d49db8e3c4fff459f4ae3869ea80d083461eda2c 04-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix preview for attachments

Bug: 6917483
Change-Id: Ie6f8c5b93c8f2046e71700435e69da6b241185b6
essageAttachmentBar.java
6b8e4198e622d9eedefdf5fb86c919926ce172e6 04-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Fix b/6931474.

Previously, I was setting the overflow to be open
based upon whether we could save or preview. That was not
correct. The overflow should be visible if you can view
and can save or preview. This now works correctly.

Change-Id: I965e5ce48c29d0c889d76bd62128c72df7247f7d
essageAttachmentBar.java
93695575afcc16d6716c1ae71f1e6fdf38ab7092 03-Aug-2012 Mindy Pereira <mindyp@google.com> fix "sending" text formatting

Don't show a comma in from of "sending" unless we are showing a message
or draft descriptive text (including just the word "draft")

Change-Id: I4c451799421e043e5dbff7f5b39f71a2a0897f5a
endersView.java
ff1b30082028b5e6acffd491d3cbb221d2c2e75d 03-Aug-2012 Marc Blank <mblank@google.com> Merge "Catch null return in doQuery()" into jb-ub-mail
77d7f3c3c8c82048b51025428a825f6ac71e8560 03-Aug-2012 Mindy Pereira <mindyp@google.com> Make sure we update style spans for senders when there are config changes.

Need to make sure to clear these static styles out and reset them
based on new font sizes so accessiblity can enlarge the text.
Keeping them static means we can reuse them with just a wrapper, which
is a nice time saver.

Change-Id: Ibb5a4082606c5ea5f511017ef981bf7c2be812c7
onversationItemView.java
onversationItemViewCoordinates.java
endersView.java
44dc44990d6ef7c2f505c7575117becdeb1f1387 03-Aug-2012 Marc Blank <mblank@google.com> Catch null return in doQuery()

* Log the Uri, etc. to help debug
* Relates to 6919664

Change-Id: Ic79611226d1b57ca648a5c5af394a759116b0248
onversationCursor.java
ac9687c359d06ffd26a270906325dacef531ef53 03-Aug-2012 Vikram Aggarwal <viki@google.com> Avoid spurious tap events.

1. Send an item click irrespective of checked state.

2. When a long click event has occurred, we want to disable any short
click for the same motion event. So when a long click occurs,
disable all subsequent short clicks.

Change-Id: Id0374113d6ce3ee42976bc4e10b43242fa1cfdd0
onversationItemView.java
b821e306583115e5fce8a8f0383019ae6268b1cc 03-Aug-2012 Mindy Pereira <mindyp@google.com> Add sending state to the end of conversation list items if its set to sending.

fixes b/6916537 messages that are sending don't show "sending" state
Change-Id: I89ada52f0480275582940266a3ce3182fe634d5b
onversationItemView.java
endersView.java
573b9e698852c6cf2cbf0f93bc01b7abb8b64ce1 02-Aug-2012 Paul Westbrook <pwestbro@google.com> Fixes for live conversation cursors

Use correct status values
Also, make sure to hide the footer if it isn't needed anymore
Change-Id: I2be736c7f9d18a5fc68da21851218a4a3b02226d
onversationListFooterView.java
0c9a09988ec22d5095580b652f8fc1e848444c9d 02-Aug-2012 Vikram Aggarwal <viki@google.com> Merge "Perform a longClick from within ConversationItemView." into jb-ub-mail
e399eb71bf50a54d3495644f9a0cbce2d7fc05a6 02-Aug-2012 Mindy Pereira <mindyp@google.com> Merge "More fixes for: b/6910770 track any incorrect senders formatting bugs" into jb-ub-mail
9730ea0550dacabcd38f0997c02d668058520042 02-Aug-2012 Vikram Aggarwal <viki@google.com> Perform a longClick from within ConversationItemView.

This will set the stage to fix the short-click and long-click behavior
required for b/6392199

Change-Id: I425e12ea205bbc95baf387330cf83d359e6c7be7
onversationItemView.java
05448212df93567d8ba222b792dd90fd2225fd3d 02-Aug-2012 Mindy Pereira <mindyp@google.com> More fixes for: b/6910770 track any incorrect senders formatting bugs

In this case, found 2 conversations with issues
1) where the conv was from "mindy", had 2 messages, second was "unread"
2) dirk, ryosuke, john, dirk; last from DIRK was unread, but nothing
was bolded

Change-Id: I53c80fc56c0026f23fbf02d0dec6cbadd356605a
endersView.java
70a70c92bca006af84177d025c32deee3aa6da3f 02-Aug-2012 Mindy Pereira <mindyp@google.com> use conv cursor extras instead of folder status.:

fixes b/6917492 Use ConversationCursor for conversationlist status
Change-Id: I256e52459e80290e3d6ec6d3f8adf4de8a9a0c3d
onversationCursor.java
onversationListFooterView.java
66bc2aaf76bb0dfa4fc38f8fcbaaf9e413e321dd 02-Aug-2012 Vikram Aggarwal <viki@google.com> Update when a conversation is viewed.

Change-Id: I1c424a89fef2dcbcb882e8741eda0d6470b68b87
electedConversationsActionMenu.java
c445aba31c5cc6add9d51296b2c6f5cf89a1e584 02-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Made progress not show when pre-caching.

It seems to work, but there's a lot of bugginess
in attachment downloads so I can't really tell for certain.

Finishes b/6899989.

Change-Id: I88334e5a39df7f850f9d232d804d53ec49a5a875
essageAttachmentBar.java
04e0dc70c61c1d856877718922f8b1de2f25a2ff 02-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix some problems with conversation cursor

1) If someone called setCursor, the internal state of the
ConversationCursor would prevent new cursors from being observed
2) If onRefreshReady happend while the list is scrolling, that wasn't
handled when the list scrolling stopped
3) If both onRefreshReady and onRefreshRequired happened while
the list is scrolling, when the list stopped scrolling, only
onRefreshRequired would be called, which ends up unregistering the
observer

Change-Id: I1b07b8b41b1025b981f5fdae7d6e2e18568029de
onversationCursor.java
84cef5e3457338d22dc3e96dc6feeaf9e50e4d57 01-Aug-2012 Mindy Pereira <mindyp@google.com> We need the styles applied to the text when its ellipsized, including the ellipsis.

Since the textutils.ellipsize method doesn't want to do this without also
padding out with empty spaces, we need to measure it ourselves.

fixes @ath's case for b/6910770 track any incorrect senders formatting bugs
crash while composing message

Change-Id: I0548a90222d394fad897a27ecd9c4823ab359c9f
onversationItemView.java
f76bf4cf779b6eadb1cc6208a63e4558a3c0abee 01-Aug-2012 Vikram Aggarwal <viki@google.com> Priority arrow setting in conversation view

Change-Id: I33a668509e20dafd9d8de022772e21d4c522d278
onversationViewHeader.java
0c2e567e792d557de1d80ef25f82aaf3c41c22b6 01-Aug-2012 Mindy Pereira <mindyp@google.com> Make sure we use the proper spacing between count, senders.

Also make sure we measure draft text with draft text styles!

Fixes part of b/6910770 track any incorrect senders formatting bugs

Change-Id: I632698a7937a8f1fd15a44e14aca4021938f5ce9
onversationItemView.java
endersView.java
c1e1fbb0be9fc60a141b8a5a067f4eed035989c1 01-Aug-2012 Mindy Pereira <mindyp@google.com> More fixes for old-style senders.

Correctly differentiate between old and new styles
Make sure to clear sender fragments before remaking them
as we are caching models.
Change-Id: Iba3e5c86760744b912c5aa94131b2f5aa3feed04
onversationItemView.java
endersView.java
6870ffca9ac04fee930ad56380eb1d214e5a9481 01-Aug-2012 Mindy Pereira <mindyp@google.com> make sure old style senders have their resources, too.

Change-Id: I9d09340e8780081d99bb8999f823db80d425ac2f
onversationItemView.java
endersView.java
33519c002b7e4504dbf964a808cf2f7aff32d16c 01-Aug-2012 Vikram Aggarwal <viki@google.com> Priority Inbox marker support for Conv list

Change-Id: I4cc99ca5df4cdf50c997951d3d84e69d5c5ab1b0
onversationItemView.java
wipeableConversationItemView.java
fb7bace9a83abf0e8726def19e76cb03afdf5740 01-Aug-2012 Mindy Pereira <mindyp@google.com> This bitmap should be STATIC.

That way, I reuse it AND its size for ALL the views.
Fixes b/6914856 date background does not go all the way to the edge sometimes

Change-Id: I8d54135d3fb4b3ee7e4300f43217daafea157414
onversationItemView.java
172f56a81bba3b2589026c7cded795010e7678ad 01-Aug-2012 Mindy Pereira <mindyp@google.com> Cleaner way to apply styles; make sure we know font sizes when measuring

Use TextAppearance spans to style senders, draft, message info
That way we have the sizes, font style, and colors up front

Should help with b/6910770 track any incorrect senders formatting bug

Change-Id: I4a0157e92a619c9394997fb49d5003dd8f4e1056
onversationItemView.java
endersView.java
ee0c85d6d0ad72cfdf3edce935a598e2655ae65b 01-Aug-2012 Mindy Pereira <mindyp@google.com> Cleanup of fonts, colors. Fixup draft text/count styles.

Part of b/6910771 "draft" is bolded in some messages

Change-Id: Ib0d6439c73086fed745422f8754d1cf2ccc7901c
onversationItemView.java
e2bde3a97c57b18a84047be03a042e928921a7ae 01-Aug-2012 Paul Westbrook <pwestbro@google.com> Fix crash when logging

Bug: 6911309
Change-Id: I9f2186118a6d1cbbf6031a2343067d719cc93867
onversationCursor.java
883622c3c4cfb21692f32daea6bd88f6bed7eb4d 01-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Fix b/6899989." into jb-ub-mail
a95161cf364baeea1a9bb098b4f6db961ec8705b 01-Aug-2012 Andrew Sapperstein <asapperstein@google.com> Fix b/6899989.

Now, we block any updates to MessageAttachmentBar's
buttons when the progress dialog is visible. Additionally,
we also block the first update after closing the progress
dialog to prevent a quick update that is then reverted
once the attachment data has been updated.

Change-Id: I4a5ba0720e257c6d9ef09f93a5ac7e7a6b8c6370
ttachmentActionHandler.java
essageAttachmentBar.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
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
endersView.java
ce7edb425db079f022ce7f99296bad6a03da2953 31-Jul-2012 Mindy Pereira <mindyp@google.com> Merge "Remove merged formatting logic." into jb-ub-mail
b0ba612a5198e074b52b74f75064f724e72633ed 31-Jul-2012 Mindy Pereira <mindyp@google.com> Merge "Make sure we check read state when determining whether to use cached item or redraw." into jb-ub-mail
2598e6d3122da1a4705c2aa53cb27931fff9ee3d 31-Jul-2012 Mindy Pereira <mindyp@google.com> Make sure we check read state when determining whether to use cached item or redraw.

Fixes b/6908420 Read message displays improperly in convo list...

Change-Id: I80dc18a53ba06d288b83f6344332b4bfab330325
onversationItemViewModel.java
7fad2fda87f86692fcba1314f01b56265de67f2e 31-Jul-2012 Mindy Pereira <mindyp@google.com> Remove merged formatting logic.

No longer used.

Change-Id: I0bb6266ca100e4023b4ba4f214cbc0cdb74fc818
endersView.java
1152c02a415f5b93bdecc5733a7372dca7d9ecd3 31-Jul-2012 Mindy Pereira <mindyp@google.com> Make sure we take commas into account when measuring text

Fixes b/6871502 Message count number overlaps with subject

Change-Id: Iac20741db0507c64f8711b89377b74cb120bda61
onversationItemView.java
4e00b8c73026c594ec42b4349218b1a4029c4f17 31-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Applied redlines for some of the attachment views." into jb-ub-mail
dc783fbaf21e7a12d449d42407e07577cb937cba 31-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Applied redlines for some of the attachment views.

Fixes to non-image attachments in compose and
viewing mode.

Change-Id: I0e178b0d7aaadac6952ffb8e10d389d68f4524fe
essageAttachmentBar.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
onversationItemView.java
onversationItemViewModel.java
a2aafcc5c3a328b7f4437fb44e3b917a2aa02b16 31-Jul-2012 Marc Blank <mblank@google.com> Merge "Make sure moveToPosition(0) calls moveToFirst()" into jb-ub-mail
7ffbaaabf43e2d9d2b6c19b1a061d2c6bf907813 31-Jul-2012 Marc Blank <mblank@google.com> Make sure moveToPosition(0) calls moveToFirst()

Bug: 6885458

Change-Id: Ib3fdd203290c28348fc71d76000a4fe8a74f00d5
onversationCursor.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
endersView.java
85c4a77abd849f5f3f0236d51554bb1bb99fe8f6 30-Jul-2012 Mindy Pereira <mindyp@google.com> Cache displayable folders.

Change-Id: Ibb2766e5a197a86adb0a456dc1fb58cdd98fd610
onversationItemView.java
onversationItemViewModel.java
onversationViewHeader.java
280dbf201cbc555ee59edc4dfe459aebe4ffcead 29-Jul-2012 Mindy Pereira <mindyp@google.com> Email doesn't have a folder displayer, because it has no visible folders.

Change-Id: I1475e6b53b540e094545469f3d2e3a053e10198b
onversationItemView.java
0f36e72e3e946c225e457f697d87e233c370e755 29-Jul-2012 Mindy Pereira <mindyp@google.com> Raw folders may be null for email.

Change-Id: Ife2e95e15d13ad6bf30d73fbcef9cee3fb9d5d2e
onversationItemViewModel.java
bf19cb00a3cc0f65b6b6e5ce8553f53c03a3b717 29-Jul-2012 Mindy Pereira <mindyp@google.com> Dont allocate the src/dest rectangles at draw time.

Allocate a scaled bitmap once and reuse it
Also, applies changes recommended by marc's cl review
And makes sure that we show a date background whenever we show any labels
Use rawlabels to determine when a conversation item has changed as well, since
we update labels to render to a conversation as well as unread state all on the ui
side
Fixes b/6172805 Gmail's CanvasConversationHeaderView allocates at draw time

Change-Id: I1711929c262b7c80bf71dbfbf7e85270cc2a9e7c
onversationItemView.java
onversationItemViewModel.java
endersView.java
c3efca18f09904f4ce39395169559c5d82bd3d06 28-Jul-2012 Mindy Pereira <mindyp@google.com> We weren't using the cached header models correctly.

This should speed up scrolling since we allocate fewer objects.
Also, fixes the issue where we were not properly creating a new layout
when the read state of a message changed in the case where a user opened
an unread message and then went back. Now, all the senders are properly
bolded/ unbolded.

Removed the deprecated conversationInfo.sendersInfo, which was only being used
by gmail, and had been replaced by using the proper messageinfos
Also, performed some surgery on the widgetviews so that it acutally
uses the messageInfo from conversation info

Change-Id: I43fde9cd23ebc12f2de68e0d18b941304b4a2be7
onversationItemView.java
onversationItemViewModel.java
endersView.java
d8e5ff44a8a7405bb8891fb46570782138babbd1 27-Jul-2012 Mindy Pereira <mindyp@google.com> De-dupe senders; show the second occurance of a sender.

Change-Id: I78b558c0084e8d5edd6ba4b1bfd4ce6c3fff9a5a
onversationItemView.java
endersView.java
a832d3d68a44579e379d1740913975995d137cba 27-Jul-2012 Mindy Pereira <mindyp@google.com> If there are no foldres on a conversation, it must be a 1 to 1 mapping.

In which case, the selected folder is the folder we are currently viewing.

Change-Id: I89b905d9a17d5eeef9e15502aa0ce5b26caf88df
electedConversationsActionMenu.java
24538e893ef2db41a4c1b341f676b64422920304 27-Jul-2012 Mindy Pereira <mindyp@google.com> Get rid of hard coded comma

Fixes b/5354473 Conversation header sender formatting should use resources

Change-Id: Iefd40ce9c4f3e8ec55bc52c8334942be19696655
onversationItemView.java
endersView.java
53f262e1c93fc20c9c44d46ebb9fc1b5a44cd06b 27-Jul-2012 Mindy Pereira <mindyp@google.com> Use cached rawfolders.

Change-Id: I4b70c2761a699541b98a02a24f8cd017df13433f
onversationItemView.java
onversationItemViewModel.java
onversationViewHeader.java
e91c97af4e9b10dc9282dff75553bb990a9497b6 27-Jul-2012 Vikram Aggarwal <viki@google.com> Merge "Eliminate some poor pager/list/destructive action interplay." into jb-ub-mail
192fac189e6aed434556a4e37bd3c5c29ef02f29 26-Jul-2012 Vikram Aggarwal <viki@google.com> Eliminate some poor pager/list/destructive action interplay.

Change-Id: Ib7f3a7dfd194fe7f5df0f59b5b2989d31b55a631
onversationPagerAdapter.java
onversationPagerController.java
electedConversationsActionMenu.java
1b70898c73c4a87a2d8bcef6191cbd48fe99a35a 26-Jul-2012 Andy Huang <ath@google.com> Merge "hook up webview context menu" into jb-ub-mail
fc88331cb9a167b7bea7760f788ebf7064bc9608 26-Jul-2012 Marc Blank <mblank@google.com> Revert "Turn off verbose ConversationCursor logging"

This reverts commit b735c9056a542eb3f07a28e501a15c9ccdfd5479

Change-Id: Ib6a29b754e5375f3506e2673031949fe0d1c5669
onversationCursor.java
709a174a40ec296c40368d723c2f51e3fc48ed50 26-Jul-2012 Mindy Pereira <mindyp@google.com> Remove the background when we no longer need it.

Keep a smaller hierarchy when possible.

Change-Id: I30af1025016104b82bc84339888cc8f510b42cfe
wipeableConversationItemView.java
bdb43d559dfba09752e95ca88f73ca566dcbb86f 26-Jul-2012 Mindy Pereira <mindyp@google.com> Dont show background for items that are not undoing a swipe gesture.

If undoing and it wasnt from a swipe, then have it grow back in
If it was from a swipe, have it slide back in left to right
Conflicts:

src/com/android/mail/compose/ComposeActivity.java

Change-Id: I6087128620e5db9d5eaa8995300bed8b2ff97911
onversationItemView.java
wipeableConversationItemView.java
0b7ed6fae6e36f2abc4ca916764177d1879731b4 26-Jul-2012 Andy Huang <ath@google.com> hook up webview context menu

I don't think we need the custom title for regular links
anymore. The default title style LGTM on ICS and JB. The
default even goes to a max of 2 lines like we want.

Bug: 6273456
Change-Id: I528bcf08c9c43bee6cadc64da9d93d20bbf8596c
ebViewContextMenu.java
2c4e6dc9eced78a62081d2ec48e5fd618461ea81 26-Jul-2012 Andy Huang <ath@google.com> clean up old cursor notification codepath

Remove logic used before AAC became the arbiter of conversation
cursor state.

Change-Id: Ia2906844b2ac14b978e6c7d2051a2960243fdc5d
onversationCursor.java
5a8fab3f97b20b442490f3195e78ea67b513573e 26-Jul-2012 Mindy Pereira <mindyp@google.com> Merge "Fix the text in the leavebehind; change undo animation." into jb-ub-mail
350acdc75af67425aa3f8b6e4f889d4828ce8705 26-Jul-2012 Mindy Pereira <mindyp@google.com> Fix the text in the leavebehind; change undo animation.

We don't care about the count.
Conversations should slide in from the right as a result of undo.
Change-Id: I10d24f758a7260ff5cbb743c2d9c50445a989e6c
onversationItemView.java
wipeableConversationItemView.java
7f9ef60c5e42470814f6b4bb8ed771c17fdfea22 26-Jul-2012 Andy Huang <ath@google.com> quiet conversation logging

Change-Id: Idcd3f72c096294b5d45eeca0c01930b860d047c8
onversationContainer.java
b735c9056a542eb3f07a28e501a15c9ccdfd5479 26-Jul-2012 Marc Blank <mblank@google.com> Turn off verbose ConversationCursor logging

Change-Id: Id0ca4a6152a83abc6c586c9dd5852369c590da9a
onversationCursor.java
090db1ec6fef366ab9e319040a00eca078ed41c3 25-Jul-2012 Andy Huang <ath@google.com> fix total count in pager title strip

Add an interface for AAC to allow other components (like the
pager adapter) to keep track of the current Folder as it
changes.

Bug: 6877338
Change-Id: I8c0bae0f6ef3bc6fc7b115b013816a458bc95226
onversationPagerAdapter.java
onversationPagerController.java
b4c227e7655b2519d94a6d49f0c60dc76de0d972 25-Jul-2012 Paul Westbrook <pwestbro@google.com> Merge "Prevent NPE with bad data to viewAttachment" into jb-ub-mail
591eb37fb6db41f014626d0df51e7dc055d07af0 25-Jul-2012 Paul Westbrook <pwestbro@google.com> Prevent NPE with bad data to viewAttachment

Bug: 6879711
Change-Id: I8ef54fe90b234a13a0a8d2af3dde7f4032074fbe
essageAttachmentBar.java
62d7962b2b4d73f8414bbab1f42952442ac25be0 25-Jul-2012 Andy Huang <ath@google.com> Animate out existing leave behinds.

When the user swipes away a new item and there is a leave behind showing,
shrink away the existing leave behind so that we maintain some reasonable positioning.

Change-Id: I7318cc6ad1a7c0c8ed3420374680bac549c2e458
wipeableConversationItemView.java
daa06aba887e8e3748453f45ae52c1e571fe9f2e 24-Jul-2012 Andy Huang <ath@google.com> fix restore of conversationInfo upon mark unread

When marking partially (or fully) unread threads unread from
conversation view, the change didn't appear to take effect until
the next refresh because I was using the caching URIs instead of
the underlying ones.

Change-Id: I92cfcba1537c08f0609866619e52da4b7b13d53d
onversationCursor.java
1ef988f0c8be136fda75ed207c222413db1d3f0c 24-Jul-2012 Mindy Pereira <mindyp@google.com> Add a black leave behind peeking out behind a swipeable item.

Change-Id: Ib5e90fee11899710e5ce9ca547003530ee56ca1e
onversationItemView.java
wipeableConversationItemView.java
de3e74a82043733243c7391d7f983a5af8842891 24-Jul-2012 Mindy Pereira <mindyp@google.com> Show animation when destroying items via the swipe action.

When the user checks a bunch of items then presses (archive for gmail)
the button corresponding to the swipe action, animate them out to
the right.

Fixes a few issues introduced since I last touched this code
Starts the animation duration at 500ms for swiping out to the right
Makes sure positions are properly set
Makes sure the destructiveaction doesn't get called until the animations
are complete.
Change-Id: Ia024cceb703fc881d40ddbe393278aa2aec67311
electedConversationsActionMenu.java
e58be741900d7f1fe0e4c7f6c5c8e1e304ba45f0 24-Jul-2012 Mindy Pereira <mindyp@google.com> Unencode html symbols in sender names.

Change-Id: I6fdac49f3117908c6fa1635f81ab5f3d32ea0c01
endersView.java
839ada22ea84251dde3305003d2f8fc5bf14914e 21-Jul-2012 Andy Huang <ath@google.com> save/load conversation state, add granular mark unread

Centralize mark read/unread logic in AAC.
Restore some conversation view state upon rotation.
Clean up code for star/unstar from conversation view. Move most
of that logic to AAC.
Move transient conversation state from Message into
ConversationMessage subclass.
Add new AsyncTask for content provider single or batch requests.
We should move to using this instead of AsyncQueryHandler or a
raw thread.

Bug: 6293711
Change-Id: I907a687ef7ff287fece8c90725dbd204a02485e9
onversationViewAdapter.java
essageCursor.java
essageHeaderView.java
electedConversationsActionMenu.java
8937bf1552a86853efc798a4d8df34c01115cdfd 23-Jul-2012 Mindy Pereira <mindyp@google.com> Commit leave behind items on view mode change, conv selected, cab mode exited, any new action.

Future CL's will handle animating these out nicely, once
the animations are decided upon. Currently, they just
disappear.

Change-Id: I1a1ee0ed3be0a684c2838f25d804e8fb2b1fbfc7
electedConversationsActionMenu.java
54855addd3fae6c497971d77366eac7dc00d7b42 23-Jul-2012 Mindy Pereira <mindyp@google.com> Don't show 1 for 1 message

Only show count if there are > 1 messages for a conv

Change-Id: I12003eaa643342332abaa66ea93cf309e647fba0
onversationItemView.java
endersView.java
1f924a8c4b9ee5c54f1b14db1438c6fcfff2f271 23-Jul-2012 Mindy Pereira <mindyp@google.com> Merge "Gmail won't be providing first/firstunread/last snippet at this time;handle "me"" into jb-ub-mail
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
endersView.java
4cb51dbce9635f4bf68a6de88f759e2f86d20325 21-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Image attachments open photo viewer immediately.

Instead of downloading the first image and waiting for
that operation to complete before entering the photo viewer,
we now kick off the downloads for all photos that are not
currently on device. The photo viewer shows download progress
and also shows the photos once the download has completed.

Change-Id: Ib9561b45020bbab1ffbcec9e88aab9604036fd5a
ttachmentActionHandler.java
ttachmentViewInterface.java
essageAttachmentBar.java
essageAttachmentTile.java
aa1f945612847bc4cf5c8909b8acfab4b5ecf54e 23-Jul-2012 Mindy Pereira <mindyp@google.com> Add snippet logic when marking read/ unread.

Change-Id: I497344c4361616c8ec293ee89ea99ce9c1a5f2fc
onversationItemView.java
onversationItemViewModel.java
6c2663dc9cade8aff34c462d244e3d72c475c664 21-Jul-2012 Mindy Pereira <mindyp@google.com> Update conversation read state on the ui side.

Change-Id: I372464e23c39131b45c20ad8bd72ddd6207a1bb5
onversationCursor.java
onversationItemView.java
electedConversationsActionMenu.java
endersView.java
5d8b1fbb708eaa0e1b38e67e0485d31a40b936cc 21-Jul-2012 Marc Blank <mblank@google.com> Make sure moveToNext/moveToPrevious handle edge cases in CC

Bug: 6856048
Change-Id: Ia1a24aed5b1379a91face52553da0463ba5b6ee8
onversationCursor.java
58ef69ad99623fd8795a95227aa718d3d6177c5a 20-Jul-2012 Mindy Pereira <mindyp@google.com> Render draft text, message count

Change-Id: Ib5acdc80720bc84fa5d9961cc4c4ba2b6ef979ff
onversationItemView.java
endersView.java
b1207e3ec8fe3ce988996722e13b80a4dfdf1c72 20-Jul-2012 Mindy Pereira <mindyp@google.com> Use conversation info/ message info to render senders.

Change-Id: Ie1cad4451f5048846fb0d3e730bb9d2855a0c083
onversationItemView.java
onversationItemViewModel.java
endersView.java
571de2212f311cc4a514ffa74e7585a2df1fb907 20-Jul-2012 Mindy Pereira <mindyp@google.com> Wire up mock provider testing.

UnifiedEmail doesn't have the correct permissions to access Gmail accounts,
so just load the mock accounts when building/ running the unifiedemail app
Also, create mock conversationinfo's to test out ui side changes to sender
formatting in the conversation list
Change-Id: Iddaad001df8dd40a859c44a080cfe76d5077fa3d
endersView.java
67175c86012686edcaa8901c94aab653943e477b 20-Jul-2012 Mindy Pereira <mindyp@google.com> Merge "JSON objects for conversation and messageinfo." into jb-ub-mail
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
onversationItemViewModel.java
endersView.java
fde56a76d6e10958ae8ba19d0a5d8b8df3b601a0 20-Jul-2012 Marc Blank <mblank@google.com> Recalibrate CC if needed before calling notifyDataSetChanged

* After an operation requiring recalibration, we're notifying listeners
before we recalibrate, which means that listeners might end up
manipulating an uncalibrated cursor
* Swap the order of these calls

Bug: 6675825
Change-Id: I91e939f6d5038d2954f15b9b65570d1a210582b9
onversationCursor.java
dd43af4c9b0450350b65bf77fe87f4680b6a786f 18-Jul-2012 Mindy Pereira <mindyp@google.com> Since this gets called as a result of onPageFInished, it might happen
after the fragment/ view is destroyed.
Do a checked before updating the pager.

Change-Id: Ic232980b26f632dfb4c7f58ddeec357dd5f79078
onversationPagerController.java
b8331b4565566ca733997398e8c07a26cd2bee98 17-Jul-2012 Andy Huang <ath@google.com> wire up Quick Contacts

Also generalized telling header items whether or not a bind is
only for the sake of height measurement.

Bug: 6373134
Change-Id: I759e4fd95dca874b29a7e3b392ee83f7e7e6f760
onversationOverlayItem.java
onversationViewAdapter.java
essageFooterView.java
essageHeaderView.java
80ae641cb3ce5199491123dee8f61bf56111d7c2 17-Jul-2012 Andrew Sapperstein <asapperstein@google.com> No longer showing overflow for APKs.

Change-Id: Ib520fc7d87ee666df1877b7a6621c4b4f9626574
essageAttachmentBar.java
b5d3874d41da961fa58adbeb9e6ba171261472ce 17-Jul-2012 Paul Westbrook <pwestbro@google.com> Fix viewing html attachments

Bug: 6804149
Change-Id: I8f10de273db7d795779c7fd0bf21e805948e6e75
essageAttachmentBar.java
2f1f62ace49a6596e9f1eee78acfd607bbb4de87 16-Jul-2012 Vikram Aggarwal <viki@google.com> Ignore views that have not yet been measured.

Fix b/6778351

Change-Id: I4dfbaa78759822cb2574807a0eeef58bf432b862
onversationItemView.java
d5b369b324a22d28b63def902eefaf6591edf004 13-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Added the via domain to the UI.

When the via domain exists and the message is
expanded, the message subtitle shows "via blah.com"
instead of the normal address. Additionally, if
the via domain exists and the message details is
expanded, a from row appears that shows the full
name, address, and via domain. This row only appears
if there is a via domain.

Change-Id: Ic39d7d90d72592e300fc6d6144e62e4b08db3b91
essageHeaderView.java
5d420968c576034215a4a989aeb84dc867ae5d96 13-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Asset updates for attachments and spam warnings.

Change-Id: I71a63532aa86c53d33f674c6f39b110c4e0300e6
pamWarningView.java
ebdfd98264104cb5a6888acd663970b7c0b31382 13-Jul-2012 Mindy Pereira <mindyp@google.com> Add ability to change multiple values at once for a conversation.

Change-Id: I597bd33c5f647170f8cc06aba79091ac2090f696
onversationCursor.java
06642fab1bf4ab95b5dd97a65b262845cf60c865 13-Jul-2012 Mindy Pereira <mindyp@google.com> Make swipe remove label when not in inbox.

Change-Id: I80b22ccd04d3c1b27ebd8af7b84dadea127ed4c4
onversationCursor.java
76b2062b8c6d18a7b3a05292c385b47b0fcbd09f 12-Jul-2012 Paul Westbrook <pwestbro@google.com> Support for report phishing

Bug: 4161858
Change-Id: I8b12cfde7e19e388ece83c4df3069f1f65445945
onversationCursor.java
electedConversationsActionMenu.java
1284fd6e98a1e6757742c1fcc18ab0a1cc7aacdd 13-Jul-2012 Andy Huang <ath@google.com> only mark important conversations important

Bug: 6239637
Change-Id: Ib232282aeee7ea50031ecbefeda60c1c6641bce2
onversationViewHeader.java
3b08c51ec46794b3c22c8649eb86bf77c72e0d9a 12-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Spam warnings now show in the UI.

Based upon the specific attributes of the message,
various different UI options are set for the warning.

Change-Id: Ifc49ab122c453dde0464ae516c3cfa443d92c21d
essageHeaderView.java
pamWarningView.java
92b362b84c16a1978085b9908f2d7b017b8e1cc3 12-Jul-2012 Mindy Pereira <mindyp@google.com> Merge "Update interaction of selected conversations with swipe" into jb-ub-mail
a8ead90ce1e6c66e4ecacdf7cfa25c2cafc9bb3b 12-Jul-2012 Mindy Pereira <mindyp@google.com> Update interaction of selected conversations with swipe

According to new specs:
1) only the item swiped on is archived, not any other selected conversations
2) even where there is a selection set, any swipe on any item will dismiss that item

Change-Id: Id94c69a0e5b0ca03b541458b1200a56d6d16c703
onversationItemView.java
23014705ca9872cd5004a1aa76e83ae260165eca 09-Jul-2012 Andy Huang <ath@google.com> better handling of wide message content

Don't hide horizontal overflow, so content in extra-wide
messages is scrollable. (Downside is that an initial swipe on
such conversations will scroll the content rather than going to
ViewPager.)

Use default WebView text layout algorithm (NARROW_COLUMNS). It
doesn't kick in by default, possibly because of the method we
use to shrink wide messages, but at least double-tap after a
manual zoom-in will trigger line re-wrapping.

NARROW_COLUMNS reflow can change the HTML height, so we need to
remeasure and reposition headers when that happens. Added code
to listen for WebView mContentHeight changes. This is done
circuitously (via invalidate()) because I don't know of a more
natural way to to know when this happens. Although invalidate()
happens all the time, this should be pretty cheap because no
work is done unless the DOM height changes.

Clean up screen-pixel -> HTML-pixel conversion code. This will
be handy when trying to make the page initially wide to further
improve line wrapping behavior and reduce the frequency of
the extra-wide case. Initial-wide-mode presents a host of
side effects to be addressed in a future CL.

Bug: 6389819
Bug: 6318848

Change-Id: I3ad2bd1ca6c1f6c0859af1a10056578ea4faf073
onversationContainer.java
onversationWebView.java
77eee625cd8c317c605acfd06cd3a7e22120a0fd 10-Jul-2012 Paul Westbrook <pwestbro@google.com> Support for "unspam"

Also added start of phishing support
Change-Id: If8eb389c2dcc8c285a582504b8213ef676848a30
onversationCursor.java
electedConversationsActionMenu.java
de9a6e303b74556ecd2e368217ca1ef02e405c20 09-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Improved performance when scrolling conversations.

Previously, every time the MessageHeaderItem was bound
to the MessageFooterView, we removed all of the internal
attachment views and set all views' visibility to GONE.

With this change, we check to see if the attachmentsListUri
has changed. If it has not, we skip the reset step described
above. That way, the only time we remove all of the views is
when the attachmentsListUri changes.

Change-Id: I93d9008f95b28a580b4e628361b0030b81e286a9
essageFooterView.java
c2c9dc14aa184db1f05b8c060b27d97dda5a3ca4 03-Jul-2012 Andrew Sapperstein <asapperstein@google.com> Refactored UndoBarView into ActionableToastBar.

This step was mostly renaming. Deleted some unused
stuff. Made the show() method far more
general. Now showing sync errors as a toast.

Still requires some tweaking for the different error
types.

Change-Id: I476e107ed89ed492b44b081d32e4216504626c13
onversationListFooterView.java
b373e3ec0e488914635345627f5734af0f0ef76b 30-Jun-2012 Andy Huang <ath@google.com> short-circuit 2-pane conversation selection within a folder

Just shift the existing ViewPager around when switching between
conversations in the same folder. Was previously resetting
ViewPager in this case.

Change-Id: Ib6d213ee71f12c34d03deefe576e91ccf520314b
onversationPagerAdapter.java
onversationPagerController.java
0b686764015284889d98b8e9f1abea8b27ce26bd 29-Jun-2012 Mindy Pereira <mindyp@google.com> Fix font colors for activated conversation item view items.

By pre-creating and caching the activated and regular subject layouts,
we dont have to create these object at draw time.
Also fixes that the subject/ snippet didn't change to the activated color (white)
when the user tapped them on tablet, but the senders did
Change-Id: Idcb45b84dec5d375b0f38723251eb4d143911c59
onversationItemView.java
onversationItemViewModel.java
35a5268f121515a6565bf006300d3a97e13f10f9 28-Jun-2012 Mindy Pereira <mindyp@google.com> FIX BUILD. Dont send a negative width to a static layout.

Its possible the coordinates aren't properly setup yet
since its possible we don't have real sizes (laid out) for the view yet

fixes b/6755337 java.lang.IllegalArgumentException: Layout: -45 < 0
also fixes build
Change-Id: I610a06eab8cb261a274d1c05117c74ea136365a1
onversationItemView.java
8775ffa4b8c26965352f6ec284adba3867c651d1 28-Jun-2012 Andy Huang <ath@google.com> guard against certain pager NPEs

Guard against cursor controller or cursor being null.
Touch events can trigger ViewPager to read the conversation
cursor count. This can happen after the pager controller is
torn down, although I'm not really sure when this happens in
reality.

Bug: 6565804
Change-Id: I9062417ab675e13bc8100782cec14a86493d6e71
onversationPagerAdapter.java
7e2a2a1ac78be42e01f780efbba345727668b5db 27-Jun-2012 Paul Westbrook <pwestbro@google.com> Consolidated similar async tasks

Change-Id: I0e6e3682ac4dfd69fb780d6e2c8c877d50239a7e
onversationListFooterView.java
afff6d79b4ea2713ef75bfdad8abd7e21ee20080 26-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Updated the UI for attachments per revised mocks.

Now showing name/subtitle when we don't have a
preview or if we are in the compose view.

Still needs revised assets.

Change-Id: Ie522b5dd28b605c8e16793a65a75696c00169fae
essageAttachmentTile.java
b334c9035e9b7a38766bb66c29da2208525d1e11 25-Jun-2012 Paul Westbrook <pwestbro@google.com> Changes to support different Log tags

Change-Id: I7121fbf7132444fc0f5c0c130373e3f2d1a3cf7a
ttachmentActionHandler.java
onversationPagerAdapter.java
onversationPagerController.java
onversationWebView.java
essageAttachmentBar.java
essageAttachmentTile.java
essageFooterView.java
essageHeaderView.java
electedConversationsActionMenu.java
uperCollapsedBlock.java
5c721d9e6df069b6385929817bb2b61faeba25a3 23-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Removing the photo viewer from unified mail.

Change-Id: Iea42c019fa31a7ead997505da295eb4aae0e2e4e
essageAttachmentTile.java
8f1c01e908d5986e8222dfd45ab82d6895b1ff3b 19-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Added dialog for picking attachment type.

Currently we do not have working capture
audio/video support. Dependent on some backend
support as well as UX deciding it is useful.

Change-Id: I97e4aded6b28a8f9a83db334064d2151ed1a2852
ttachmentActionHandler.java
ttachmentViewInterface.java
e20e1639ff0eca873e9986ec52dbaa497059e01e 16-Jun-2012 Andy Huang <ath@google.com> guard against NPEs

monkeys can trigger events at funny times.

Bug: 6675993
Bug: 6676065
Change-Id: Iaa0a844a87fe42e38d9f4c88968cecdc2a69b713
onversationContainer.java
beaf185977cc7f33bfc59240a1fb63cf72ac14e4 16-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Compose now shows images as tiled attachments." into jb-ub-mail
237129ddf57a1e25469d8990322fb7913e18ae20 15-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Compose now shows images as tiled attachments.

It's still a bit buggy (notably, once the previews
do not show up after the initial attaching). Those bugs
will be fixed in the next commit but this was a good stopping point.

In order to reuse as much code as possible, the AttachmentTileGrid
was moved into com.android.mail.ui. Additionally, MessageAttachmentTile
was split into AttachmentTile and MessageAttachmentTile. AttachmentTile
is a base class that handles all of the tile interaction that is common
between the browse and compose versions. At present, this is mostly
the fetching and displaying of the preview image.

As a result, MessageAttachmentTile now derives from AttachmentTile.
MessageAttachmentTile handles the interaction specific to browsing
messages (such as opening the photo viewer, etc).
There is also new class called ComposeAttachmentTile
which derives from AttachmentTile and handles the interaction
specific to composition of messages.

The AttachmentsView in composition now contains two children in its
view hierarchy, an AttachmentTileGrid and an inner LinearLayout
that now stores the non-tiled attachments.

Change-Id: Iad85529a7b6d573060645499271860cf07877754
ttachmentTileGrid.java
essageAttachmentTile.java
essageFooterView.java
83061b023d2a4ef72249eebf8490bd0868c87b55 15-Jun-2012 Paul Westbrook <pwestbro@google.com> Use wide conversation on portrait 10" tablet

On tablets we show a single pane for search results in portrait mode

On 10" tablets we want to show the wide conversation headers

This cl is using the swXXXdp qualifer because the show_two_pane_search_results
is also using the same qualifier. 5198708 tracks switching from swXXXdp to
wXXXdp qualifers

Change-Id: Ie0a693dead7c4d4f08bd453e9dce30618e6ccd29
onversationItemViewCoordinates.java
c3c1f6b5a03be917ae993b82cc4150e7b48720ca 15-Jun-2012 Paul Westbrook <pwestbro@google.com> Show wide conversation list item on wide tablet

Show the wide conversation list item in conversation list mode when running
on a device where the current width is >=1000dp.

Since on a 10" tablet we are supposed to show different conversation list
item layouts depending on the current width, this resource specified is
using the wXXXdp qualifier. If we were to use the sw720dp-port qualifier,
a tablet that is 720x720dp, would show the wrong layout in one of the
orientations

Bug: 6600648
Change-Id: I0388bce4c0cf8bac5a6a5bb9cbf126aab113ef69
onversationItemViewCoordinates.java
b466bcf49502a1178cf7362a81470f3231d8892b 15-Jun-2012 Mindy Pereira <mindyp@google.com> Fixup behaviors for action bar when in search mode.

Now that the subject is showing in conv mode, can confirm
this all works as expected.

Change-Id: I707f3f46a2a5bdfa49e61bc1eacb217c5a1ba86c
onversationItemView.java
onversationItemViewCoordinates.java
8c96fac9379d127995a13cb41ce89810e536dff8 14-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Enabled actions in the photo viewer." into jb-ub-mail
532f48253d23ffcb974ab61856df131021dde02a 14-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Enabled actions in the photo viewer.

All four actions (save, save all, share, share all)
are working properly. However, other apps do not
implement receiving the ACTION_SEND and ACTION_SEND_MULTIPLE
so the share and share all actions are a bit janky.

Change-Id: Ifcd3ed36c6bfce4a023b54a61f77e8ae4fd8f3b8
ttachmentActionHandler.java
ttachmentViewInterface.java
essageAttachmentBar.java
essageAttachmentTile.java
5895f7b0e5fa921f6d46bbaf6d8c7b1a8ebc7804 02-Jun-2012 Andy Huang <ath@google.com> subject in actionbar

Mostly a port of Gmail1 code. New and noteworthy:
* when switching between ActionBar list nav vs. custom display,
toggle ActionBar.DISPLAY_SHOW_CUSTOM rather than messing with
custom view visibility
* This exposes something of a framework bug where collapsing
an action view will leave views for all inactive navigation
modes GONE, which I work around for now (b/6664203).
* ActionBar views were being inflated with system default Holo
theme due to application vs. ActionBar context (wrong theme on
the application context). Fixed that and un-inverted some
existing styles.
* SnippetTextView: save off the last measurespec rather than
inventing one as before.
* bring back an existing excellent behavior: since
PagerAdapter.setPrimaryItem reacts too slowly to nicely
change the action bar subject when paging, listen for
OnPageChangeListener.onPageSelected in addition.

Bug: 6384157
Change-Id: I45d995a472d4b3c71f1371dc7b993923423b7cf7
onversationPagerController.java
onversationViewHeader.java
nippetTextView.java
4c7d8b5f38bfa80192d457025b834c975d7d38a3 12-Jun-2012 Andrew Sapperstein <asapperstein@google.com> UI improvements to photo viewer.

Photo viewer now shows the display name of the
image. Additionally, it now has a subtitle that
contains the current number of that attachment.

Additionally, the implementation in Unified utilizes
a derived class of PhotoViewActivity that tweaks
the subtitle to display image size and adds action
items. Currently the items are visible but do not do
anything. Next commit will wire these up.

As part of refactoring to make the derived classing work
properly, a bunch of legacy code was deleted including
all of BaseFragmentActivity as its sole reason remaining
was for spoofing the ActionBar.

Finally, a small change to the cancel attachment button
was made so that it was appropriately selectable and
48dip by 48dip.

Change-Id: I5a50bd420fa23a3e7d8734b5a46a6f28198ccef4
essageAttachmentBar.java
essageAttachmentTile.java
essageFooterView.java
4aa1c1340556c646175c3d0b193be05876ad95a0 09-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Non-image attachments now display as a list.

There are now two separate attachment areas in
the MessageFooterView. The AttachmentTileGrid
contains all images in the gridded tile look.
Additionally, there is a LinearLayout that contains
0 or more MessageAttachmentBars. These bars contain
a small icon, info about each attachment, and
an overflow button that contains additional options
other than the default for that attachment type.

In addition, there is now AttachmentActionHandler
that performs a lot of the interaction that both
attachment views share.

Change-Id: I60d297b7514e6ee35d23a9ec250833e886328d4d
ttachmentActionHandler.java
ttachmentViewInterface.java
essageAttachmentBar.java
essageAttachmentTile.java
essageFooterView.java
e4798f5d8bd07eb39bf9dac57fd2a304b53916a0 06-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Reworked attachment grid to use a dp-based layout.

Instead of having a resource selection for the
number of columns (which requires
a different value for portrait and landscape as well
as every screen size), utilize a minimum dip tile size
that figures out, while measuring, the appropriate number
of columns to use and expands the tile size to fit the
entire width with that number of columns.
As a result we have only two different values
for the minimum tile size. 120dip is the default and
180dip for sw600dp. Verified that the appropriate
number of columns occurs on all Google experience
devices.

Additionally, added a header and bar for the attachments
so that the user can clearly see where attachments
begin.

Change-Id: I48b1645e1004596747c1585e44a387b1231bd661
ttachmentTileGrid.java
ttachmentTileRow.java
essageAttachmentTile.java
essageFooterView.java
d7a4ad903cd77a2cd3ad44c7c456b48c7d47e599 02-Jun-2012 Andy Huang <ath@google.com> rudimentary bidi support in assembled senders string

Let the framework draw the entire assembled (possibly
heterogeneous) senders string. No need to do text layout
ourselves.

This is a manual cherry-pick of I9f4e4303.

Bug: 5058894
Change-Id: Ia28740efc8c3db506c80183f52f1c2280f732782
onversationItemView.java
onversationItemViewModel.java
b40bfd3a7a44a6b9d1ce1ed43d98ab228890d199 01-Jun-2012 Andrew Sapperstein <asapperstein@google.com> Refactoring a bunch of code.

Removed some unnecessary files. Drastically shrunk
others. Moved one. The moved file is currently unused
but is something I'd like to add at some point.

Change-Id: I22dc75e841d2e6685081fa1d428152887055fc93
essageAttachmentTile.java
e635fedfffb734552a1f84bfa0dfe3512cc4e738 31-May-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Fixed a bug where thumbnails wouldn't show." into jb-ub-mail
15b43f21f67e425bdfc2c401b3ac4367075c2dd1 31-May-2012 Andrew Sapperstein <asapperstein@google.com> Fixed a bug where thumbnails wouldn't show.

Also improved the scaling of thumbnail images and
added a black background. Need new icon for non-images.

Change-Id: I8f5a5df85dce3a3e331cd343171869fcb99f311f
essageAttachmentTile.java
cf9fd53698e8e3db2695b0f87824f4a0042940b4 31-May-2012 Paul Westbrook <pwestbro@google.com> Cherry-pick https://android-git.corp.google.com/g/186698

Change-Id: I02c4eb2fb24ad105b0ebe0006db43b6a1d35bfbb
onversationItemView.java
949f5ad131fe75554ff068d35bec3944e1d3fa5e 31-May-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Attachments now show in a grid-like view." into jb-ub-mail
f986850eb04ff614feb915e178227c4f53ca695b 31-May-2012 Andrew Sapperstein <asapperstein@google.com> Attachments now show in a grid-like view.

Currently, two per row are displayed in portrait
and three per row in landscape. Need UX decision
on how many to show for larger screen sizes.

Much of this code is taken from Contacts which
used a similar layout for favorite contacts.
That layout was taken and tweaked to suit the
attachment handling purposes.

Still need to add the appropriate interactions
for the various attachment types per UX's guidelines.
Will add that in the next CL.

Change-Id: Iad6ea716a680b1fd48f16d34de2a5bc2e87b7db5
ttachmentTileRow.java
essageAttachmentTile.java
essageFooterView.java
essageHeaderAttachment.java
0e091c52d3a0135afb6904f78e06554567bfe591 31-May-2012 Vikram Aggarwal <viki@google.com> Enable read <-> unread toggling for selected set

Fixes b/6332838

Change-Id: I3c3965d9f30b3b4f1e422be83ec0f4c0615eca3e
electedConversationsActionMenu.java
4f4782bcc53e13b30f1fd417beb1a6c04a54faed 30-May-2012 Vikram Aggarwal <viki@google.com> Rely on ConversationUpdater to perform deletes

Change-Id: Id0db0d9c479ccab477091629464bbb5d302f52fb
electedConversationsActionMenu.java
531488ed848766708252a5fdc01c4ecf0fd167d1 30-May-2012 Vikram Aggarwal <viki@google.com> Remove all bad ideas from SelectedConversations

1. Remove references to AbstractActivityController and
ConversationCursor (yikes!) from the selected conversation set.
2. Create a new interface for delegating all changes to conversation
state.
3. Consolidate FolderChangesCommitListener with interface created above.

Change-Id: Id1d982a19eb2d26c51aec661cee5dc23ef98c110
electedConversationsActionMenu.java
48b2a6c5fe209f0603fdf85d35cf399f7f7d462e 29-May-2012 Vikram Aggarwal <viki@google.com> Minor cleanup

1. Remove uncalled empty methods.
2. Remove methods from interface if nobody else is calling them.
3. Remove unused DragListener interface and all references.

Change-Id: Iac498336209b8e73f9a0e13dd8954652e83fd1fc
onversationItemView.java
d091376416ee45b321ef40f5124cf406a8453f78 26-May-2012 Andrew Sapperstein <asapperstein@google.com> Merge "Showing multiple photos in the photo viewer." into jb-ub-mail
2527695a1a76112be849954a717cc96f19331ffc 26-May-2012 Andrew Sapperstein <asapperstein@google.com> Showing multiple photos in the photo viewer.

Change-Id: I98388040bb7f6d195344e6edcd466ac3e8a0e66a
essageFooterView.java
essageHeaderAttachment.java
4f6197fc10177e3370f6085dba1a575311405f65 26-May-2012 Andrew Sapperstein <asapperstein@google.com> Merge "PhotoViewer handles single URIs more robustly." into jb-ub-mail
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
electedConversationsActionMenu.java
574fda8e41769a98292cc087b80c74b48613c2dd 25-May-2012 Andrew Sapperstein <asapperstein@google.com> PhotoViewer handles single URIs more robustly.

Change-Id: I9395030335bbc8ff9a509154f76be33002510b5b
essageHeaderAttachment.java
c6d93bb147e4747f64227e586bc2083f5d55f27b 25-May-2012 Mindy Pereira <mindyp@google.com> Merge "Make sure we clear the selection set when destructive batch folder ops are complete." into jb-ub-mail
9a42cb1d7b75ab120ea4fe96fbf06da26b8d3a8d 25-May-2012 Andrew Sapperstein <asapperstein@google.com> First version of photo viewer in Gmail.

Shows only one photo at the moment.

Change-Id: I128c40f693fd9cfeddb6bf2df3ac96e5257a7e62
essageHeaderAttachment.java
f3a455644f0899a01fff4782811fcff473f9aff0 25-May-2012 Mindy Pereira <mindyp@google.com> Make sure we clear the selection set when destructive batch folder ops are complete.

Change-Id: Ic9a69a1cbcc00f72dbf8b0dee44f0da6f0be6afb
electedConversationsActionMenu.java
d0991f7f0d0882ac58dfdb1f8eb8e2a0abd573fc 17-May-2012 Andy Huang <ath@google.com> move image decode into background thread

Fixes strict mode violations. Now it also handles arbitrarily
large full-size images, which is all EAS/IMAP may offer.

Use contentUri when thumbnailUri is not populated (as is the
case with EAS/IMAP).

Bug: 6195064
Bug: 6389109
Change-Id: Ifcc2062d35e77c0fca4e6a568488ab556ba0da08
essageFooterView.java
essageHeaderAttachment.java
22ecc77345c86e0515c1f3c3447502c25c8c53d2 17-May-2012 Andy Huang <ath@google.com> implement view pager bottom position bar

Use a PagerTitleStrip.
pro: titles are now animated in the standard fashion as you
swipe, non-primary titles are darker in the standard
fashion
con: had to work around somewhat unsuitable API to support
dynamic newer/older titles

Bug: 6498423
Change-Id: I8102dc328626951b08d3986eace5a1caa7db1acb
onversationPagerAdapter.java
onversationPagerController.java
d503df4f0c31bbf842c6a1d3cba18df8c074bf67 11-May-2012 Vikram Aggarwal <viki@google.com> ActivityController commits folders, nobody else

Change-Id: I3ff870f275821ebc3cd08cfad0875eb229094f2e
electedConversationsActionMenu.java
92939fc7b40a56e17fb0d2fde987133ca1614e29 30-Apr-2012 Marc Blank <mblank@google.com> Support color block for combined views

Change-Id: I3097cb4c37311cbe4b2b8702c26a7edf5eebdd24
onversationItemView.java
onversationItemViewCoordinates.java
7f602f7a64f176894ccb7942a6642f22584c3894 01-May-2012 Vikram Aggarwal <viki@google.com> Synchronize destruction and remove dead/deprecated code

Change-Id: Ia86449494cca7d4ed5e2d9d515d8afa3dd94b68d
onversationCursor.java
electedConversationsActionMenu.java
3c9bcef43b4f103697034abbf2eab99111e8d987 29-Apr-2012 Marc Blank <mblank@google.com> Fix crash when deleting last item via swipe

Bug: 6359069
Change-Id: Ia59c5109d264d98451a33434b5c66f29592077e9
onversationCursor.java
3842af9e8ba90ebf5b75dc5018bbfdfb2e044f99 27-Apr-2012 Marc Blank <mblank@google.com> Support viewing meeting invitations

* Added intent uri for event viewing

Bug: 5011918

Change-Id: Ie77dfce8c22ccef1d21f31461ade8edc3674085c
essageInviteView.java
a71f1f3368f26b6627512298f64484611fd6b0e8 25-Apr-2012 Andy Huang <ath@google.com> calendar invite UI

The actual UI is a bit of a placeholder, as the old UI didn't
match desired specs either.

Bug: 5011918
Change-Id: Idd8a845f6840ba4d96adfc05c8142e6c5c1d04a1
essageHeaderView.java
essageInviteView.java
606a6a16188f75d99f811d366c14bd53d71e23f5 25-Apr-2012 Paul Westbrook <pwestbro@google.com> DO NOT MERGE Fix NPE

cherry-pick of https://android-git.corp.google.com/g/183950
onversationCursor.java
e3df1ad8e630d7d61b4d68f8328f97dd11448b5d 25-Apr-2012 Andy Huang <ath@google.com> Make pager adapter cursor access safer

Monkeys seem to occasionally trigger pager layouts when the
cursor is transitioning. Fix this by patching up one case
where notifications didn't happen (onLoadFinished), and by
removing pager adapter's stored cursor reference in favor of
getting it each time from the controller. Now that different
folders have different cursor instances, the stored reference
is no longer a good idea to keep.

Also remove a redundant refreshAdapter() call in AAC. sync()
always triggers dataChanged, so a manual refresh is unnecessary.

Bug: 6384749
Change-Id: I3d7b0f41e9397c62fd544f5e903bd37cf319ccaf
onversationPagerAdapter.java
41e6e71568a0e7a32ebeaf909a4f6cb3ba4f47cf 24-Apr-2012 Vikram Aggarwal <viki@google.com> Controller owns the FolderSelection Destructive Action

This removes all Destructive Actions from the
SelectedConversationsActionMenu. Now, the controller is the only
object that creates Destructive Actions, and hands them out to others.

Change-Id: Ibb16cd09dda3d5382acfece5e63f341fba26bf85
electedConversationsActionMenu.java
e8a85328eadff76fcd78141f1343bde0a1cd27e7 24-Apr-2012 Vikram Aggarwal <viki@google.com> Register SelectedConversationActions with Controller

The selected conversations action menu gets a destructive action from
the controller. The controller takes care to perform the destructive
action before swapping a conversation cursor.

Change-Id: Ibc98ef92b60d5782103b8a18aa39fe2b82a5814b
electedConversationsActionMenu.java
c7694221dfa5cec3f4ae290f2266b081b2639d80 23-Apr-2012 Vikram Aggarwal <viki@google.com> Destructive Actions. Part 2: More logic consolidated.

Get next and previous conversations through mTracker in preparation
for relying entirely on the AbstractActivityController's logic.

Change-Id: I0d477547356561316c1717d5ddbf4f467b7f3b3b
onversationPagerAdapter.java
3311ff3a6850ed70f152b6bc0a48bfe5ae745a8b 23-Apr-2012 Vikram Aggarwal <viki@google.com> Merge "Destructive Actions. Part 1"
09a4bfe3f81ee216b5c4a4e2d083432a4e387abd 23-Apr-2012 Vikram Aggarwal <viki@google.com> Destructive Actions. Part 1

1. Change ActionCompleteListener to DestructiveAction.
2. Call OnePane and TwoPane objects DestructiveActions instead.

No functionality change.

Change-Id: I492de83bc9e49948a4dabcfc5e8438220339fc46
electedConversationsActionMenu.java
1c3911727b435524e7d4d0cc66ad3522adbd3453 23-Apr-2012 Marc Blank <mblank@google.com> Restore pause/resume to ConversationCursor

Change-Id: I9fa486c107bffaaa3372f6ab6ed7be14f5633710
onversationCursor.java
1313ced37e506522ed4226d8c565bad94704b47c 23-Apr-2012 Andy Huang <ath@google.com> Merge "disable conversation cursor network access during iteration"
ca85441f810fdcdd50d285ac5f0319078050c90d 21-Apr-2012 Andy Huang <ath@google.com> disable conversation cursor network access during iteration

ViewPager needs to iterate through the conversation cursor to
match up fragments and cursor rows. Prevent its iterating from
having side effects like unintended network access by signaling
to the underlying cursor that network access should be
temporarily turned off.

Support on the Gmail provider side will be added in an
accompanying CL.

Change-Id: I05231815de53423ff024fc85a59806ddbaa200a6
onversationCursor.java
onversationPagerAdapter.java
8778a8717b21335ebc3127b7be1a2cddf6b64697 21-Apr-2012 Andy Huang <ath@google.com> re-draw conversation attachment views on changes

Suppressing all overlay child layout requests may have been too
extreme, as it also prevented view state changes on buttons and
other views in attachment rows from reflecting their new sizing
and drawing their updated state.

Bug: 6315886
Bug: 6336986
Bug: 6375652
Change-Id: Ia5f9cda8743515ede35f3dfb154c7052acae5b47
onversationContainer.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
onversationCursor.java
onversationItemView.java
onversationPagerAdapter.java
onversationPagerController.java
essageCursor.java
electedConversationsActionMenu.java
5cfc6a6c77e822e65c0bdc6a875eae1ba1045218 20-Apr-2012 Paul Westbrook <pwestbro@google.com> Remove log wtf

Change-Id: I0a6893d8c61bc87a2552a3a587ee7ed2c8bc32c0
onversationPagerAdapter.java
cf164d64bcb1da92b427bda99b97f7ec310ef704 20-Apr-2012 Marc Blank <mblank@google.com> Revert "Major refactor of ConversationCursor"

This reverts commit 5150f03723af8019169aeed8e406784da9c5f8f1.
onversationCursor.java
onversationItemView.java
essageCursor.java
electedConversationsActionMenu.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
onversationCursor.java
onversationItemView.java
essageCursor.java
electedConversationsActionMenu.java
632721e6b3a9ba8c476456f2e0fb1b564561e0b5 12-Apr-2012 Andy Huang <ath@google.com> conversation paging

This CL takes the approach of using a permanent ViewPager that
pages through conversation fragments. Its adapter is only
set and populated when the conversation view is shown. In all
other cases, it is an inert empty layer.

One risk with this approach is that it breaks with the typical
fragment transitions that all other content panes use.

On the other hand: conversation fragments are full-on fragments
and benefit from loader separation, and the FragmentManager
takes care of save/restore of state.

Change-Id: Ic17d1ae3f35a0cb1119967f2d34433ad27fa307c
onversationContainer.java
onversationOverlayItem.java
onversationPager.java
onversationPagerAdapter.java
onversationPagerController.java
onversationWebView.java
46dfba6160b55a582b344328067e3dafeb881dd9 19-Apr-2012 Andy Huang <ath@google.com> super-collapsed blocks

Expanding a block inserts HTML for all bodies in that block, as
was done in ICS. This could be improved to be more lazy.

The block's layout has a mostly useless wrapper for the 1px
bottom white padding, because ConversationContainer does not yet
support margins on child overlays.

The overlay container now listens to adapter changes, which
was necessary to update on super-collapsed expansion. This
should also fix crashes and strange layouts on draft deletion.

Also fixed monkey NPE on url click while I was in there.

Bug: 6325429
Bug: 6260673
Bug: 6258859

Change-Id: I77347b58bbec49b4b5b58a2b3de7e5e9f291ca9c
onversationContainer.java
onversationOverlayItem.java
onversationViewAdapter.java
uperCollapsedBlock.java
7d81600cbce3cfd366cbff9ecd1b7317ff957221 18-Apr-2012 Vikram Aggarwal <viki@google.com> Update consumers on changes to Settings

Change-Id: I96ed21a16c0dfb290198d2236fee8d21e299ec31
electedConversationsActionMenu.java
c62440c9a3d1a827ac67e9ea772bf2673f7ff560 19-Apr-2012 Mindy Pereira <mindyp@google.com> Merge "Check for list before calling click item on it."
d9ef52d02fa6a7d2bf76163b6f33c2b1d122a9f1 19-Apr-2012 Mindy Pereira <mindyp@google.com> Check for list before calling click item on it.

Fixes b/6297875 Crash in Gmail > open mail

Change-Id: Ia25a450a1174789855c4e841dd098a24ba00d576
onversationItemView.java
bf128ebfb9aa53d28118e7143d5674e506fedfef 19-Apr-2012 Marc Blank <mblank@google.com> Revert "Controller/Adapter/Cursor refactor"

This reverts commit 67cc73a0ff9bd1c77f84c4af94f6d95f5bdcf490.
onversationCursor.java
31e234db245bee3fb2f535d01eb27b3bbd4079a8 19-Apr-2012 Marc Blank <mblank@google.com> Revert "Oops; forgot my latest changes..."

This reverts commit 2b7eaab5ed6661ea3b693434858cd13e38cdd71f.
onversationCursor.java
2b7eaab5ed6661ea3b693434858cd13e38cdd71f 18-Apr-2012 Marc Blank <mblank@google.com> Oops; forgot my latest changes...

Change-Id: I7f55f66ecd3cc15d81d498430c571fb1b761068b
onversationCursor.java
67cc73a0ff9bd1c77f84c4af94f6d95f5bdcf490 18-Apr-2012 Marc Blank <mblank@google.com> Controller/Adapter/Cursor refactor

* Tie AnimatedAdapter and ConversationCursor together, removing
the "weak link" via AbstractActivityController and
ConversationListFragment
* Remove all throttling code for now (will revisit)

Fixes the ListAdapter changed crash, and almost certainly CIOBE
crashes; will find/update bugs in Buganizer

Change-Id: Ieb6ca7d77b5e64c822960eec2cb46d624c4d8e1e
onversationCursor.java
66150d75d09324e867be42ff8c0ea8fae115ef20 18-Apr-2012 Paul Westbrook <pwestbro@google.com> Fix a several problems in conversation list

1) When viewing a non-inbox label, the fragment wasn't being
tagged correctly, so it couldn't be found later
2) Make sure to set sRefreshRequired before calling
notifyRefreshRequired(). Otherwise isRefreshRequired() would return
false.
3) Disable the conversation list throttle. This was causing a delay
of up to 4 seconds when switching labels (especially noticible when
switching to a live label). This is also noticicible when attempting
to load more conversations in a Gmail label
4) Make sure to notify the data set changed listener in sync() so the UI
will know that there is new data.

Bug: 6353342
Bug: 6353444

Change-Id: I54b43a2bf9af3fde308a1f703fb2fc61babc9b6b
onversationCursor.java
304a91eab01d67c8b5ef134b3bfe922fb6ab102f 17-Apr-2012 Marc Blank <mblank@google.com> Allow for null snippet in ConversationListItem

Bug: 6230264
Change-Id: I637432920eee3c34550015942d5d718871d0f338
onversationItemView.java
6c72a787b58a0bc3afcb71093eddf8c29d1cf5ed 07-Apr-2012 Mindy Pereira <mindyp@google.com> Show leavebehind after swiping away an item.

Change-Id: I3bae79ed5bb8919985dbfa6e81416da980281cff
onversationCursor.java
onversationItemView.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
onversationCursor.java
4f4334983e01c5f72ef0b14d72356a5736c82dec 13-Apr-2012 Mindy Pereira <mindyp@google.com> If there is no subject layout don't draw it.

When the layout is not yet valid because we don't have a correct
size yet or a correct mode, we don't create a subject layout.
fixes b/6316701 Gmail crashed on launch - unable to load emails
Change-Id: Ic85daf152a559c1b5914f944a30ce807f29f5b20
onversationItemView.java
06d87ddb8d327b233215b99f0551632fc17a8f6f 12-Apr-2012 Vikram Aggarwal <viki@google.com> Merge "Notify dataset changes on destructive folder actions"
d41f4986728f6cfd8a8c7b7124b1854ab006cba7 12-Apr-2012 Marc Blank <mblank@google.com> Merge "Make sure CC knows where it stands after add/remove items locally"
3c375282f64ef1a1565382f101bb3d96f6a1dec3 12-Apr-2012 Vikram Aggarwal <viki@google.com> Notify dataset changes on destructive folder actions

Change-Id: I50912407b20d31fd4f6c74e35270648016d8ef46
electedConversationsActionMenu.java
93b3a157b0a9e7588474d4d24b1fcbb9762bdd04 12-Apr-2012 Marc Blank <mblank@google.com> Make sure CC knows where it stands after add/remove items locally

* Sigh
* Might be other bugs fixed here as well

Bug: 6249265

Change-Id: I6999113bbed0d853dd428b356ec15a73fe3c9c9c
onversationCursor.java
72ef2e7ce576ad13ce6179a6a8c74f8ecad9ae85 04-Apr-2012 Vikram Aggarwal <viki@google.com> Transition to next conversation correctly

This brings in the ConversationPositionTracker class from Gmail.

Change-Id: I0df56c4c433a18bce5dd93faf7e674b5585bd978
electedConversationsActionMenu.java
b54a46756017c81a9f253df4d4e8f967f137f803 11-Apr-2012 Vikram Aggarwal <viki@google.com> Recycle views in AnimatedAdapter

Change-Id: I47d0ec26d827282ae21529837655d260cc99522b
electedConversationsActionMenu.java
a1512b60eb12f732ac249fe7fcdc4fec756ed147 11-Apr-2012 Mindy Pereira <mindyp@google.com> Escape formatting version for widget senders.

Change-Id: Id03df2f61596cce854318e94d6d645ff241cee8b
endersView.java
0963ef8394e1f0bca3f931f930b127b00790361a 10-Apr-2012 Mindy Pereira <mindyp@google.com> Move undo up to the controller level.

Change-Id: I1fa2d921132c0d66c677b428f570c60672471ad9
electedConversationsActionMenu.java
04dc819886abc2e4f56e644b03449e29cdbae2d0 09-Apr-2012 Vikram Aggarwal <viki@google.com> Do not clear selection for non-destructive actions

Change-Id: Ie38119b1ceede61d810c354deba3348126d406f7
electedConversationsActionMenu.java
b9c036b36542924894f141e3ecd81381a12e94a9 10-Apr-2012 Mindy Pereira <mindyp@google.com> Provide formatting versions for senders.

That way, Gmail can use its formatting, email can use CSV (default)
and we can add another version when necessary.

Change-Id: I088e99376d1fba7cebb2d6a8d260dd8a80c6cbdc
onversationItemView.java
endersView.java
8eb43be8074acb4e09da1385225fbb41c97b1bd5 09-Apr-2012 Mindy Pereira <mindyp@google.com> Make sure that we render conversation sender details.

Change-Id: I5fffcf1b4abf6ee565d0d1db5520fd14dd6490be
onversationItemView.java
onversationItemViewCoordinates.java
endersView.java
65fe28fa88daad08f3be4c084ca5b4eaa366d1a7 07-Apr-2012 Andy Huang <ath@google.com> optimize low-hanging fruit found using traceview

* View.getTag/setTag is a slow way of finding an overlay view;
switch to a SparseArray
* this also obsoletes mChildrenToRemove since we can immediately
remove overlays from the SparseArray
* bring back the Email Address cache to avoid repeated parsing
* avoid repeatedly calling findViewById for each header
* cache expensive timestamps and recipient summary strings

Change-Id: Ic76265848e4956a28a44c4a2e3e726ec9ef6bfaf
onversationContainer.java
onversationViewAdapter.java
essageHeaderView.java
cfda09e91472a08abd1f9242b3730e4ba905b3de 06-Apr-2012 Mindy Pereira <mindyp@google.com> Merge "Drag and drop into folders."
acf6039a23382f18c35f6b487d90d53cb67b5858 06-Apr-2012 Mindy Pereira <mindyp@google.com> Drag and drop into folders.

Change-Id: If80c43fb5643d328bf061c2bed87bd9acb6e4661
onversationItemView.java
9f369596f1dc59184cdabe683c2ebfc19ead4f83 06-Apr-2012 Andy Huang <ath@google.com> fix expanded message details appearing above the message header

Updated to handle inflation in any order, as can happen when you
recycle previously collapsed headers.

Change-Id: I7d58c26513b7634f9e3400b0b0ef63f87be2310d
essageHeaderView.java
9875bb4fc00347fc76f432a6e9ec5e6987679ca9 05-Apr-2012 Andy Huang <ath@google.com> remeasure when overlay views change size

The initial measure() (for sending to WebView) is done too soon,
so after a height change, ensure that the container re-measures.
The container will only measure newly bound views, or views with
newly changed heights, so most scrolling continues to not
trigger measure().

It would be more correct to mark the overlay *view* itself
valid or invalid, not the item, but apps don't have access to
the measurement flags on View.

Also do lots of cleanup in the area of measure/layout of the
Container. Prevent children of the container from requesting
layout because they don't push on each other in the normal way.
(a followup onGeometryChange is needed to re-position properly)
But a layout triggered from elsewhere should re-measure and
re-position the container's overlays.

Bug: 6297423

Change-Id: Id9196322774e732417e926ac87ce2ec524bf425e
onversationContainer.java
onversationViewAdapter.java
onversationViewHeader.java
562416af482c66169b40e3cee22337b596b2594e 06-Apr-2012 Mindy Pereira <mindyp@google.com> Merge "Make batch archive conversations fly out to the right before shrinking."
958bf4d37a70f456dcda1530f9bb357d88c79300 06-Apr-2012 Marc Blank <mblank@google.com> Call onDataSetChanged() after all changes (not each time)

Change-Id: Id768a6e1831e16d2ed9a8668cc0097f39c9755cc
onversationCursor.java
07118a01f7183645957010779222b84930f75b4e 03-Apr-2012 Mindy Pereira <mindyp@google.com> Make batch archive conversations fly out to the right before shrinking.

Change-Id: I0a62d837acf0e41ad6fe012a87dbde29e0cf2f17
electedConversationsActionMenu.java
805ff204cee7f11281e4a60f1040ced42e89a986 05-Apr-2012 Marc Blank <mblank@google.com> Prevent deleted count from being wrongly decremented

* This could happen if a refresh() happens before an undo(); the
result could easily be crashes or other bad behavior, as
sDeletedCount drops below zero
* I suspect this will fix a number of bugs, but let's let it soak
a bit, perhaps, before considering them closed

Bug: 6249265
Change-Id: I37c612ceb4d22fc57f1daa96aab316ff8405bef6
onversationCursor.java
c6041385db9eec53ab1d979bdf1262762fa6d2d4 05-Apr-2012 Marc Blank <mblank@google.com> Merge "Log stack traces if apply() called off of ui thread"
90fc0ffa0ad4fcde94fa9648df7f8041bfb6a943 05-Apr-2012 Mindy Pereira <mindyp@google.com> Default to showing checkboxes as we have issue around settings not being there on orientaiton changes.

This is the safer alternative while we work out those issues.
Fixes b/6297162 Check box is not displayed in the Inbox for multi-select operations

Change-Id: I587d729df987988555078ad954ec669141e4bff3
onversationItemView.java
547daf34cef7d1a9cd5b755e9401120c5c5446b2 05-Apr-2012 Marc Blank <mblank@google.com> Log stack traces if apply() called off of ui thread

Change-Id: Id7858abe0ab0ad56a3a99a6be96f3559763cac40
onversationCursor.java
b18512b6d26536cc7ad4ecbc1e6e3a4e1fb46c16 05-Apr-2012 Andy Huang <ath@google.com> Merge "support message header collapsing"
c7543579c6a97c0ae3341578332f56d4d226f34c 04-Apr-2012 Andy Huang <ath@google.com> support message header collapsing

* toggle header collapse/expand
* initially render read messages collapsed
* collapse removes attachments footer and stops loader
* expand creates/reuses attachments footer, but ONLY if visible
* can (mostly) expand/collapse details
* can expand/collapse quoted text
* add lots of logging (disabled during scrolling!) to catch
strange layouts

Change-Id: I73f533c91d24ef1c05919d0a3b396f276898107a
onversationContainer.java
onversationViewAdapter.java
essageFooterView.java
essageHeaderView.java
ad6a275b1a6fdb714893696cd8899e1de1d7d59c 05-Apr-2012 Paul Westbrook <pwestbro@google.com> Fix logging

Some string need to be passed in as format parameters

Bug: 6292050
Change-Id: I5bcf397a5de4a35d33f2b994294f682ea8942e76
onversationCursor.java
f07269fdfbc0ca2607dad50bfc15c2c041c1fadd 05-Apr-2012 Mindy Pereira <mindyp@google.com> When there is no swipe, use a different touch handler.

Fixes b/ 6291400 Multiple messages are selected by scrolling up and down in Inbox
Fixes b/6291013 java.lang.ClassCastException: com.android.mail.browse.ConversationListFooterView cannot be cast to com.android.mail.browse.ConversationItemView
Change-Id: I44e5a21326a620405cbdf769e736d37bbda5ceac
onversationItemView.java
e128fc21fab03f6d66c656efeee2155fab449a7f 04-Apr-2012 Vikram Aggarwal <viki@google.com> Clear selection set when viewing messages on one-pane

This is missing one crucial functionality:
In conversation view, if we perform destructive actions on the selected conversations, the
selected set is not accurately updated.

For a correct implementation, we need a ConversationPositionTracker class, so that will be solved
in a second pass.

Change-Id: Ie9909ce026c4ec1148b4817d6968699b392e2330
electedConversationsActionMenu.java
b6b174fb3a8f58a2c81e035917ebad8ab45b88ae 04-Apr-2012 Mindy Pereira <mindyp@google.com> Respect hide checkboxes; tap and hold to add to CAB group

Change-Id: Iaddd1dbbfd1a0e3c07ba1ffcd6a4e4368ad0e294
onversationItemView.java
onversationItemViewModel.java
4c232e18b5d667931d8aaeb29f19394016c17d02 03-Apr-2012 Mindy Pereira <mindyp@google.com> Respect default replyall setting.

Change-Id: I3465b6bbbf9edcad15b682265eedf066acb39839
onversationViewAdapter.java
14829456bf42fa75045e7d32effc0561d6219baa 03-Apr-2012 Mindy Pereira <mindyp@google.com> Merge "Use the correct item animating height depending on view, device"
4022889525ce3ef25caabe4a8b50c7140a4bd9ed 03-Apr-2012 Mindy Pereira <mindyp@google.com> Use the correct item animating height depending on view, device

Fixes issues where animating items are sometimes the wrong height.

Change-Id: I407294e8fdae5cc560897368d48140d442ee5cd8
onversationItemView.java
onversationItemViewCoordinates.java
6a62146d0af3bf33ff472e4fbfad64f6c582dd8e 02-Apr-2012 Vikram Aggarwal <viki@google.com> Correct authority for suggestions provider

Change-Id: I363e8f00c7baeed9cae94fe25242594d6e4d4250
onversationCursor.java
f0e95c3e49c8a12009dd138d3985f5e9fb8f2754 03-Apr-2012 Andy Huang <ath@google.com> bottom-aligned attachments

Refactor attachment view logic out of MessageHeaderView into
its own view class, paired with MessageFooterItem.

Change-Id: Ic6539f52d53be0e2d23144abec1baffb9368f8cd
onversationViewAdapter.java
essageFooterView.java
essageHeaderView.java
e3d36791e0e80a0d7065a26e727aedb70863c45a 02-Apr-2012 Marc Blank <mblank@google.com> Handle refresh cancel properly in CC using AsyncTask

* Also add some (temporary) logging in case issues come up again

Bug: 6260664

Change-Id: I18f702deb2c0202ef889cb85d00b1a8a587a9919
onversationCursor.java
7bdc3750454efe59617b7df945eadd7e59bee954 26-Mar-2012 Andy Huang <ath@google.com> building blocks for bottom-aligned attachments

Attachment overlays now warrant their own adapter entries,
because they are no longer attached to each message header.

So since cursor items no longer map 1:1 to adapter items, add a
new specialized adapter to house different kinds of scrolling
overlay views. This support is also needed for super-collapsed
blocks.

The adapter is also an ideal place to store transient render
state like 'expanded' and 'show pics', as each ConversationItem
can manage its own state instead of having the fragment do it.
And view recycling requires that the adapter remember item
state as you scroll around anyway.

Next CL will actually separate attachment views and logic out
of MessageHeaderView.

Change-Id: Ibc589915f01ada0d9a41d8968a0ee63be6030449
onversationContainer.java
onversationViewAdapter.java
essageCursor.java
essageHeaderView.java
866d319dd23ec8b7b7d5476c65f7f83469d55d2d 26-Mar-2012 Mindy Pereira <mindyp@google.com> Re-enable swipe.

Swipes all checked items at once
Tap highlight
Properly colored background
Doesnt swipe non checked items when there are checked items
Change-Id: Id71e331d35f75ee02813dee8376d764386221868
onversationItemView.java
onversationItemViewModel.java
489dd22c64c718b6953b4bd6acef925e82c53c87 29-Mar-2012 Andy Huang <ath@google.com> add more logging to help track down b/6255909

Track when ListView reads from the adapter count and compares it
to the its last known value.
Track sDeletedCount as it is changed.
Ensure cacheValue is called on a UI thread.

Change-Id: I52e0d8502d36aeb0737af95608a857ea177a06ad
onversationCursor.java
9c87fe3200ced388f8d0d7e296d690e2e4fe4b26 29-Mar-2012 Paul Westbrook <pwestbro@google.com> Make sure to notify on any changes to sDeletedCount

This should make sure the ListView is always in sync with the adapter
Bug: 6247961

Change-Id: Idb6163e2bbbc01ff36edac6aa6601bc22b20f032
onversationCursor.java
dc99367caa689a77615b697d81bf3f7cfda398c0 28-Mar-2012 Andy Huang <ath@google.com> Merge "broaden scale rejection to ignore all scales until a touch event"
ad6d6282136b54090f1bf80ff5d37056ff5907c8 28-Mar-2012 Vikram Aggarwal <viki@google.com> Back/Done clears connected state

This fixes two bugs:
1. Going back or tapping on CAB 'Done' will clear the selected state.
2. After destroy(), the selected state is empty, so the deceptive code in onDestroyActionMode
will never be called. That code is removed.

Change-Id: I5365a8e21b4ef81e005587a39eccc7de85cff24f
electedConversationsActionMenu.java
120ea66184c31bdeb729274054ec913afe3872c1 28-Mar-2012 Andy Huang <ath@google.com> broaden scale rejection to ignore all scales until a touch event

Inline image onload events also trigger a scroll change
(because the page becomes larger), so we can't just ignore the
first scale reading. So now ignore all scale readings until the
first thing that can actually *change* the scale-- a touch
event.

Bug: 6218921
Change-Id: I03476ca8c67a0d997ce067e74fc97612ffca4187
onversationContainer.java
07f8732dcc0e411d0b26d9eb88de582f95aaebb6 28-Mar-2012 Andy Huang <ath@google.com> work around webview scale bug

Seems that on Prime and Xoom, the initial return value of
getScale() when measured at the moment the WebView's scroll
position is first determined can be quite wrong. (We heavily
rely on this value to place headers as you zoom.) So ignore
the very first report of this value.

Bug: 6218921
Change-Id: I581773204ce61d2a5601396a23f896e6ec631588
onversationContainer.java
2405528bb15245f594277fe7b6efacd6a18ce69e 28-Mar-2012 Andy Huang <ath@google.com> measure header heights when generating HTML

Size the header spacers properly depending on the message.
Messages with attachments have taller headers.

Bug: 6237871
Change-Id: I502bb870ebfe4d2d776819a5fe83e34f05e3cdf5
essageHeaderView.java
c56206c07a825c786e5729b173d763747328da79 27-Mar-2012 Mindy Pereira <mindyp@google.com> Make senders in unread conversations bold.

Change-Id: Iac46000f08d1f070b20a3ec3e75e4840bf29b1c6
onversationItemView.java
5b84f41e055135a5733c28a5d234ef944d04498d 25-Mar-2012 Mindy Pereira <mindyp@google.com> Setup rules for when to display/ not display folder labels.

Allows us to pre-display label changes on the ui side.
Rules are as follows:
1) if the current folder and the folder added on the conv are the same,
don't show the folder in the converation item
2) if the current folder is a system folder and the folder added on the conv
is also a system folder and they are of the same type, don't display it
(covers priority inbox and inbox)

Change-Id: Icb7b7f0e8b31ac1ddfb858d5e5961132a064186b
electedConversationsActionMenu.java
6778f4663a790d3e9d4c6a2f43292eef43c1e0bd 24-Mar-2012 Mindy Pereira <mindyp@google.com> Conversation unread + folder changes.

Marking a conversation unread should force the user to advance
to the next conversation as set in auto advance settings.
Make folder changes show up immediately in conversation list.

Conflicts:

src/com/android/mail/browse/SelectedConversationsActionMenu.java
src/com/android/mail/ui/FoldersSelectionDialog.java

Change-Id: Ib9c21931a3edd4b624ec5f2b853dc1988ec29d5b
electedConversationsActionMenu.java
dac6580f96f6ef8f6b466e247834a190a56421e7 24-Mar-2012 Paul Westbrook <pwestbro@google.com> Use print args

Change-Id: Idd658574afc747f286cf2f27abd3aebabcb58f96
onversationCursor.java
bec5115726f24733a0a1577caaf05fb6e9ef9c6f 23-Mar-2012 Marc Blank <mblank@google.com> ConversationView -> ConversationList starring

* Star/unstar in the conversation view is now reflected instantly
in the conversation list

Change-Id: I0dade26726bec96610b4c30dded19d36c9dbe439
onversationCursor.java
essageHeaderView.java
08ff2131be903d8f4f2bb51cb6e1dadd19662430 23-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "Fix up conversation menu items."
c9d59184da271d5a6974edb709e3b39a5a970fa7 23-Mar-2012 Mindy Pereira <mindyp@google.com> Fix up conversation menu items.

Make sure the correct conversation items are shown/hidden
Fix mark unread.
Fix mark important.
Change-Id: I7e5fa60d9501bb123cdd2276afd68c26e300dc3d
electedConversationsActionMenu.java
ec7c4da49c023554fb57326f1a8eafa9a53760dc 23-Mar-2012 Marc Blank <mblank@google.com> Try to catch monkey-test crash in ConversationCursor

Change-Id: Ie2df9f93a09c8c749c6513a049c32dea51ee2a7e
onversationCursor.java
2596f0011dcb4e86b01fc8a6362b5ac922239571 22-Mar-2012 Marc Blank <mblank@google.com> Local undo

Change-Id: Ifc8152d0549bc0eb4eb09fe6ef44fd5f07b3279d
onversationCursor.java
5c31e77a48715313c56514c3da54c92dcffef7e4 22-Mar-2012 Marc Blank <mblank@google.com> Don't reset cursor position in CC.create()

* This is problematic if a draw occurs during a call to create()

Change-Id: Ie9550a85ce75467dab1e99c9f41be1b34852b1f9
onversationCursor.java
d8e249ee7abb0e1ad24e17e4e299736d4a150936 22-Mar-2012 Andy Huang <ath@google.com> implement star/unstar on a message

Switch to separate read/starred flags to avoid committing stale
flag values.

Change-Id: Ib9f37ba3821f1e67675a803bce7739c64b8f628b
essageHeaderView.java
8dab59bffdf74353fcd9a25c6cbe380ac6c64562 21-Mar-2012 Andy Huang <ath@google.com> don't forget to measure the conversation header

Change-Id: I4dd57b8551cee4d5ff68c72997bd9888c97770d0
onversationContainer.java
9470e199b39d529ee82a860bd7930bef3b1e5171 21-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "Check for the uri as a string instead of as a uri."
6f9833afc7f9ea1512919948a5aecac954deca72 21-Mar-2012 Mindy Pereira <mindyp@google.com> Check for the uri as a string instead of as a uri.

duh.

Change-Id: I864aa0174c378eebaab004efa2497c86be9be0df
electedConversationsActionMenu.java
a293987a6bc4d0b1089db95555abc9ac32939882 21-Mar-2012 Mindy Pereira <mindyp@google.com> Clearing the shader does not actually seem to work.

There are def some leftover "ill effects" from setting and unsetting
the shader, so just creating it when the item is too long instead.

Change-Id: I9777e7881b5257493aa61945f012c253c3748bdc
onversationItemView.java
435fbb5ea2c68f1a76e191eb0240c433c76e2f99 21-Mar-2012 Marc Blank <mblank@google.com> Comment out getRefreshDeletions() for now

* Gmail is returning odd data, and this is confusing things; for
now, remove this (really, no harm)

Change-Id: I32038b91be0c44b7d15f70d6cbee49e73e998283
onversationCursor.java
ac7a5b7d4eac812f0cd9afe69d2b506484cad04a 21-Mar-2012 Marc Blank <mblank@google.com> Merge "Fix refresh of ConversationCursor"
6ca57e8666f0b5e61c77ff8916b553ebcd07287d 21-Mar-2012 Marc Blank <mblank@google.com> Fix refresh of ConversationCursor

* TODO: Try to avoid comparing uri's by making sure the loader
is changed when the account/folder changes

Change-Id: I65626e1907d58f20b68e467bc845d368c4791a42
onversationCursor.java
3233bff8ae08a56543c9f5abf1bc6ab38f0574ce 21-Mar-2012 Andy Huang <ath@google.com> hook up 'show pictures' button

Add 'show pictures' button for messages where the provider
claims it embeds external resources. In Gmail, this is true when
a message contains external image hotlinks. Inline image
attachments are not yet handled.

'always show' tells the provider to whitelist the message sender
to allow images in the future (works with Gmail provider).

Change-Id: I1b174d8fad9da481ec305caff06d109f9d215093
onversationContainer.java
essageHeaderView.java
0c829ec7c25cd889f51a01d28a598f0148c77899 21-Mar-2012 Marc Blank <mblank@google.com> Merge "Revert "Handle requery better in create()""
25e3fe356c1c8b38030fed0e0258415d0578b03b 21-Mar-2012 Marc Blank <mblank@google.com> Revert "Handle requery better in create()"

This reverts commit f066d747aa29204de67a1d390860bcabcb325fa6.
onversationCursor.java
32c23df3b30815c65c0d1a3683aacf282f5625d3 21-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "Turn off the handling for when a label is too long for now."
3c3dba5fd3888d38f68af531e74f1132a502b5dd 21-Mar-2012 Mindy Pereira <mindyp@google.com> Turn off the handling for when a label is too long for now.

This is what is causing label text to not show somtimes.

Change-Id: Ia87d8f9a604dc21af9efeb4945f76471dcaf3cb1
onversationItemView.java
e4c865713a2e3073f29f93ee4f471b1abd6436ce 21-Mar-2012 Marc Blank <mblank@google.com> Merge "Handle requery better in create()"
f066d747aa29204de67a1d390860bcabcb325fa6 21-Mar-2012 Marc Blank <mblank@google.com> Handle requery better in create()

* We were doing the refresh query in loadInBackground() rather than
simply returning the existing cursor and starting a refresh() in
another thread; this vastly speeds up returning to the app
* Also remove some unneeded logging

Change-Id: I03f912dea8149a02f62f08e3338ac559f89afd3f
onversationCursor.java
bb87b7fa57f25fc9cee1f572dd253f33f58f81da 21-Mar-2012 Paul Westbrook <pwestbro@google.com> Enable editing of existing draft messages
essageHeaderView.java
1c078cff1958b29e280100bfa6221103ec46b555 21-Mar-2012 Paul Westbrook <pwestbro@google.com> Temporarily revert this change while I fix the Email build


Revert "Enable editing of existing draft messages"

This reverts commit aeb7cab52bb34c94c3de4319948a8e337ed77a01
essageHeaderView.java
aeb7cab52bb34c94c3de4319948a8e337ed77a01 20-Mar-2012 Paul Westbrook <pwestbro@google.com> Enable editing of existing draft messages

Change-Id: Ib9154bffe33fda6693ef832610c81a5542eb771c
essageHeaderView.java
51144944c2088299ebc2584cc09c61c23eb18659 20-Mar-2012 Marc Blank <mblank@google.com> Add "limit" to first load of ConversationCursor

* For my large convo list, time for first query is down to about
300ms from average 9000ms
* TODO: Clean all this up...

Change-Id: Iaa17f5b8b5b773cb4c8133b4f22d7096b3a3aa54
onversationCursor.java
09b32383b951afe1dee7845f062fcf8050601f61 20-Mar-2012 Marc Blank <mblank@google.com> Ensure that sync() can't be blocked by create()

* When create() is called with a new Uri, we start a new query, but
we weren't clearing the old one
* This means that sync() could get called and block on the new
query, leading to a potential ANR

Bug: 6198733
Change-Id: I2e8ab0cd9d8e6881eb8c700cbc0259c4dc86eaa9
onversationCursor.java
5ff63747a1b5c6e2197528972cbc3ba808b09d8d 17-Mar-2012 Andy Huang <ath@google.com> show subject and labels in conversation view

Show labels only for accounts that support multi-folder
conversations.
Move some classes into smaller 'browse' package.
Special-case subject/labels overlay for now. Full adapterization
is coming soon when super-collapsed blocks are in.

Change-Id: I458009776eb2e3840dd9e441de9e4ead3cc94d0b
onversationContainer.java
onversationViewHeader.java
onversationWebView.java
essageHeaderView.java
crollNotifier.java
bdcd35cc553bd6bede8277983384f5bcf83b58b2 19-Mar-2012 Mindy Pereira <mindyp@google.com> Revert "In order to use touch interceptors, we need to always return true from ontouch."

This reverts commit 64771c7ff7077efd8ce974d0095d24bd5c8ccb89
onversationItemView.java
64771c7ff7077efd8ce974d0095d24bd5c8ccb89 19-Mar-2012 Mindy Pereira <mindyp@google.com> In order to use touch interceptors, we need to always return true from ontouch.

Otherwise, swipe doesn't get the correct events to swipe an item.
So change onTouchEvent to actually just perform the click when an
item is clicked.

Change-Id: I883f49c124737514f95efdc0fa78cf346ebb80b7
onversationItemView.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
onversationCursor.java
63f31623ce9e2fc135904019cd634224f639ea06 16-Mar-2012 Andy Huang <ath@google.com> Merge "bring in classes to support conversation view's subject/labels"
6fbc87affe46f6d49c584a307ec836e68163c182 15-Mar-2012 Vikram Aggarwal <viki@google.com> Folder selection, muting, and reporting spam

Change-Id: I5266914bc769ff59cfebb9782c2aeac3b9faf859
electedConversationsActionMenu.java
c03208720e5650f0acb748f82ed10ac770d6ceb4 14-Mar-2012 Andy Huang <ath@google.com> bring in classes to support conversation view's subject/labels

No functional change.

Bring in classes and refactor existing folder-display related
classes. Remove FolderValues and use plain Folder. If we need
somewhere to tuck display-only Folder properties or behavior, we
should wrap base Folders instead of duplicating fields.

Folder objects now support equality checking using the
(globally unique) URI.

Change-Id: Ic4cd9b555a6a71ed037a1e730f36f7f64c50ca36
onversationItemView.java
onversationViewHeader.java
olderSpan.java
olderSpanTextView.java
riorityIndicatorSpan.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
onversationCursor.java
907b0740de2b9056f638c7b62e1d589a1bf0c9ca 16-Mar-2012 Marc Blank <mblank@google.com> Don't clear the cache when the cursor is reused in create()

Change-Id: Ia7e43582c8fe364e2f97223970a0e5fa60c5c124
onversationCursor.java
81f1128a98aeff32b2393eb1b97ab4f43971e394 16-Mar-2012 Mindy Pereira <mindyp@google.com> Dont clear selection until animations are completed.

We use the selection to see what we actually want to undo on/ delete.

Change-Id: I840e4ededc3b28a09e2c8f2b49217d0b3a9e993b
electedConversationsActionMenu.java
d5ac9c16e8955abe8366fd1185b86d8bd7c5ac60 15-Mar-2012 Mindy Pereira <mindyp@google.com> Set correct invite asset.

Change-Id: Ib098e8aa2bb05032350ff8692d9330309987f57f
onversationItemView.java
08eff71d2fe8a8d0dbc4bd08ddad298eb6a0adc6 15-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "Remove debug crap"
20403af89cf0f7b2a2291093d96619083fb965b6 15-Mar-2012 Marc Blank <mblank@google.com> Remove debug crap

Change-Id: Ic77739481bf77a9acaaed048cf0274e50d086af1
onversationItemView.java
54452ae7a9cdb607ed1db5e74077b5ebd95c46a2 13-Mar-2012 Vikram Aggarwal <viki@google.com> Conversation menu actions delete/archive and read/unread.

Still to be done:
1. Conversation move to next/previous/list
2. More conversation menu actions: mute/report spam/...

Change-Id: Ifcec13af338b9980bc41ea529ff411f860baa4ed
electedConversationsActionMenu.java
0c3916fd0a780fbb5e692ec83a83c5499f76760c 15-Mar-2012 Andy Huang <ath@google.com> Merge ""fix" starred check on a message"
3ae1e32232d3aafdb3f734d596fe9358b0d0b698 15-Mar-2012 Marc Blank <mblank@google.com> Merge "Allow rawFolders to be null"
7bbd9438ba2e0489e6ff9e5e4f6e76e2eb2a9ee9 15-Mar-2012 Marc Blank <mblank@google.com> Allow rawFolders to be null

Change-Id: Id8d9ab76c0f0abbb1d2aeaf932b2420736d08c6e
onversationItemView.java
f6acdade010b2d0f49fd425b33e7f7b376286490 15-Mar-2012 Mindy Pereira <mindyp@google.com> Fix back stack when coming in from a widget or notification.

Also, got into a weird state and was able to find a few places
where null checks would be useful.
Change-Id: Ida4ac37d618ffb3736f1582351a58e5f86ab6e76
onversationListFooterView.java
08b978b1c5e2c05b1033cecb21cbca6aa8e3de7e 15-Mar-2012 Marc Blank <mblank@google.com> Merge "Check that uri is ConversationProviders before stripping authority"
d9787153f5000b629469951afd95438e2b64b66a 15-Mar-2012 Marc Blank <mblank@google.com> Check that uri is ConversationProviders before stripping authority

Change-Id: I4f298297358174d92ac875c93a05fa54fd1d6aba
onversationCursor.java
3fd1f2c4cba9095ccd024ac26187cba6fdfc367b 15-Mar-2012 Mindy Pereira <mindyp@google.com> Fix alignment/ width of senders and folders in wide mode.

Change-Id: Ib256202d6b9454b698cdd834925f9e4e42b8f242
onversationItemView.java
onversationItemViewCoordinates.java
0a22047bb6c54d8f1ce980762f75908e35b08c3d 15-Mar-2012 Andy Huang <ath@google.com> "fix" starred check on a message

Change-Id: I824428020949333998c30cf6c6d6e2b1b6661255
essageHeaderView.java
8d83c8a0c9c01ce5ed9381f2765b3ba59948710f 15-Mar-2012 Mindy Pereira <mindyp@google.com> Show invite icon in reply state location when applicable.

Change-Id: I851b088c766b72e6e4a9fc1e1ece2bd3b04d71e1
onversationItemView.java
onversationItemViewModel.java
54467a21dce72130bb04eb5aa1c9813d88308a80 14-Mar-2012 Mindy Pereira <mindyp@google.com> Add reply state logic. Only show it if its defined in the layout for the item.

Change-Id: I41a58e41b76a6b3f0c2ca87f1e8336e67e71eb5d
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
7a2036b38155ff0bb2fd047e929ff1526784aec4 14-Mar-2012 Mindy Pereira <mindyp@google.com> Set show priority indicators to true by default.

Change-Id: I93c37bcc8e0efea470d51701ea929354f4e00a5f
onversationItemView.java
5268372780d7cac7fda24c0528229c0ed456df4a 14-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "Dont show personal indicator by default."
3cb938f638cc3cec08c9c42d20192e65b1e7d343 14-Mar-2012 Mindy Pereira <mindyp@google.com> Dont show personal indicator by default.

Only show it if the layout file has it.

Change-Id: I6ac6c8a11fb42f0a23250dbdc613dc6865e96dbd
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
7f375ff8e57165bf7ad7a50131eabeaf602f09bf 14-Mar-2012 Andy Huang <ath@google.com> fix attachment loader+gmail

Use attachment URI as a key for the model cache.

Change-Id: I0849f4aa449acef8c3fc0953c15944b46f2a7cc0
ttachmentLoader.java
4584a0d83e160444f931cb565185a2eea39b1683 13-Mar-2012 Mindy Pereira <mindyp@google.com> Remove the folder we are in on the ui side.

Conversation needs to show it; conv list doesn't.

Change-Id: I0c26852525ca58bb71fc8a27e90ea4868487a5cd
onversationItemView.java
106fe8339c90267bbfe32a2944dced2903a3956f 13-Mar-2012 Andy Huang <ath@google.com> Merge "fix looping with Gmail provider and auto mark-read. cleanup."
6d306df1f39a311a615dc3b468b72159a5c48c96 13-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "ehow folders in conversation list items if they exist in the layout."
b5080d5335d2aa445a660ad426ab008750be24cb 09-Mar-2012 Mindy Pereira <mindyp@google.com> ehow folders in conversation list items if they exist in the layout.

Change-Id: Iec0198f7eab014c71d66e1c026942988d985f1e9
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
51067133f35911bf4b43f97be52b00e5bd9f07ab 13-Mar-2012 Andy Huang <ath@google.com> fix looping with Gmail provider and auto mark-read. cleanup.

* only mark initially unread conversations read
* disable re-render on loader update for now. will re-enable
later for specific cases like new message or updated draft,
or when UI changes no longer trigger provider notifications

* properly invalidate cursor on loader reset
* pick a better loader ID for attachment list query
* disable scroll tracking before geometry is known
* ignore JS callbacks after views are destroyed

Change-Id: I6cec7186dab301d57995a73df0c3506549a7932d
essageHeaderView.java
1eb5f96d4e9c459d463d664563c755ec36f958f7 10-Mar-2012 Andy Huang <ath@google.com> cross-project refactoring

Attachment.mimeType -> contentType
Attachment.contentUri(String) -> contentUri(Uri)

Change-Id: I333453943914c241c63f9ec0a3824150e52706fd
essageHeaderAttachment.java
cf5aeaea234a52ff153729d959b207af1ab62abc 10-Mar-2012 Andy Huang <ath@google.com> clean up attachment loaders

Need to clean up upon either view recycle or full-on view
detach. Also make sure to finish removing scrap views when
the conversation view is torn down, like AbsListView does.

Change-Id: Icee78edecaec757d66e91b9a692548375ad65227
essageHeaderView.java
cbda244e88ee353f6171757542c8218a7c5c3d81 11-Mar-2012 Mindy Pereira <mindyp@google.com> Always show the footer at the end of a sync if there is a load more uri.

Logic will determine if its hidden because we are already at the end.

Change-Id: I4f8194a1a838b00fb28103d20b88c6f1dc6bfce2
onversationListFooterView.java
11dd5effd79b8078b24bcdb4160e8e12a17317a5 11-Mar-2012 Mindy Pereira <mindyp@google.com> Add load more to the conversation status bar.

If a folder has a load more uri and sync is done, show this bar.
When the user clicks it, query on the loadMore uri.

Change-Id: Ie6dc1671be6f04b9af0b37b65ad7f9941a339ac6
onversationListFooterView.java
49077d803caca793984106cb1fc785cb510ec6f5 10-Mar-2012 Mindy Pereira <mindyp@google.com> Merge "Setup the loading footer for search results and other folders."
6681f6b78557850d9ec76a7a8f9ac1ec930d2513 09-Mar-2012 Mindy Pereira <mindyp@google.com> Setup the loading footer for search results and other folders.

shows sync status or errors.
This will eventually be where "load more" lives
Currently only shows for search results
Can easily be updated to show for all conv lists.
Change-Id: I87ea19ebca13617f8a0ba7aed4f63f49b2b69c14
onversationListFooterView.java
8973c6c14d75fa40ef2169dd23d1ebb247a18b8a 10-Mar-2012 Andy Huang <ath@google.com> Use fewer attachment-related loaders

Pare down loader complexity by processing attachment updates in
one batch for each message. Now, the list of attachments doesn't
blow away all children on every list update, and each row's view
refreshes only the properties that changed. So update processing
overhead from batching them up is minimal.

Too many loaders would have led to more headaches as message
views were recycled and all those loaders would need to be
destroyed. We do still need to destroy the one attachment list
loader, though.

Change-Id: I28b24efa61d62ed366300b970bf8f9bed4f88ab5
essageHeaderAttachment.java
essageHeaderView.java
285de61c7405f04a3413c1a0ffa8ee98fa32b8c1 09-Mar-2012 Andy Huang <ath@google.com> Fix progress dialog progress bar

also add better debug logging of attachment loading

Change-Id: Iad3a2cb5a8c7bd73635325740b52bd9ef25b89c3
essageHeaderAttachment.java
276c80bb3ca7cff5f2a0511e8a9d0452ae91d858 09-Mar-2012 Vikram Aggarwal <viki@google.com> Moar cleanup

Change-Id: I2ec187ec05d14000edbfff22acf2b8ff251530fb
onversationItemView.java
88fc42e48ee4e927eb77e5cab23f2f5151cac649 09-Mar-2012 Andy Huang <ath@google.com> attachment UI in conversation view

Load from a message's attachment list URI to render initial
attachment views. Each attachment view then monitors its own
URI for changes when it expects them (this is quite likely
too granular!).

Change-Id: Ie559672e63910034e4dbf7766101a2b5768129aa
ttachmentLoader.java
essageHeaderAttachment.java
essageHeaderView.java
47ccb45dff1329d5ddac33fb71674048f8c7f51a 09-Mar-2012 Mindy Pereira <mindyp@google.com> Update layout so that conv items without labels dont look broken.

Change-Id: I80c387a66ff9c9050bc97bd7d9f33c486aee8424
onversationItemView.java
30fd47bf1947da5ad813cb957b6cbe569dce563a 09-Mar-2012 Mindy Pereira <mindyp@google.com> Remove all label refrences from unified; change to folder

Remove labels text views from unified mail conversation list items.
Gmail will override with a new xml file that will provide a "folders" area
Change-Id: I443b8d73f253f046dfa8a8a68afa19e89bf7a85a
onversationCursor.java
onversationItemView.java
onversationItemViewCoordinates.java
essageHeaderView.java
3232a96e0ea88741dc39acf17d49e9c22b61c707 09-Mar-2012 Marc Blank <mblank@google.com> Again, get sync() off UI thread

Change-Id: I5c72180bebcab1ca66b44e340e768aec3ae6b03a
onversationCursor.java
87cc1237efd0384a33046a7c6fa670df018295a1 08-Mar-2012 Mindy Pereira <mindyp@google.com> Revert "Make sure sync() happens in UI thread"

This reverts commit 2cdaa04b0ef7faf02a47ed25215c5b20fa5b219d

Marc, we need to go over this. Lots of things broke once I synced this change down. I could not get the contents of folders, things were resyncing all over the place. Reverting this for now.
onversationCursor.java
2cdaa04b0ef7faf02a47ed25215c5b20fa5b219d 08-Mar-2012 Marc Blank <mblank@google.com> Make sure sync() happens in UI thread

Bug: 6134215
Change-Id: Ib4678108eeb3e51b59ddfdc30a2b9bdabb7d1723
onversationCursor.java
e0f91318bff7fc7755eb11380b47f825269803de 08-Mar-2012 Marc Blank <mblank@google.com> Change logging for now

Change-Id: I6d2feaeab6f649f0021d72933c0519887306d8c1
onversationCursor.java
8e074ab824cea1fa2b030eacb811220b2c67d6f3 07-Mar-2012 Marc Blank <mblank@google.com> Handle requery cursor null when getRefreshDeletions is called

Change-Id: I4d08aadfacab3c8f9f68bc593c4f3ad4c31613a4
onversationCursor.java
efe3d25aa19da172fd5c3ec39539cdd91f29e927 01-Mar-2012 Mindy Pereira <mindyp@google.com> Destructive action dialogs.

Use delete/ archive settings to determine if we should show a confirmation dialog.
Show confirm discard dialog in Compose and actually discard.

Change-Id: I992bdf598af72a62deadfdfe695a64b89fad5c24
electedConversationsActionMenu.java
3982e236fb2dd36d460df4dbf24e07e8ba55b3bd 01-Mar-2012 Mindy Pereira <mindyp@google.com> Fix up/ back behavior for one pane.

Change-Id: I08ca5364e508eee6910e06fb1b0594a638a6ea0e
onversationCursor.java
7f0a962513503cb01aec093b14c1b48dfae08f12 01-Mar-2012 Mindy Pereira <mindyp@google.com> Hookup ui for marking a conversation important/ not important.

Change-Id: Ic699aa172adccb335d67978abf4c0bd95d958a61
electedConversationsActionMenu.java
03fa19afc40791aec7662b2db525c63e78808053 29-Feb-2012 Marc Blank <mblank@google.com> Replace Log.x with LogUtils.x

Change-Id: Ib8513be51bd3f4d06492c918b96e278414f7d26f
onversationCursor.java
948985b753588aeda2e83aa71eeb738c19963820 29-Feb-2012 Marc Blank <mblank@google.com> Improve threaded behavior in ConversationCursor

* Also, prevent crash when returning to ConversationListFragment
when a refresh has been done

Change-Id: Icb51a28624e98e131654ecb3e0868d3ead95bd55
onversationCursor.java
f362695a339276ea1950c274a5bb8516250552e9 29-Feb-2012 Marc Blank <mblank@google.com> Clean up ConversationCursor listeners

* Remove listener when fragment is going away
* Protect against duplicates

Change-Id: Idfb48848775e8726a59efd5fc251579bff40122d
onversationCursor.java
bb56a1512559a5f024ba213c4bdcfe3d9d9387de 25-Feb-2012 Andy Huang <ath@google.com> Conversation view touch event shenanigans

* Fix scrolling when the touch begins on an overlay view. Drags
do not engage scrolling until the system touch-slop distance
is exceeded. Logic copied from ScrollView.
* Fix pinch zoom when the first touch begins on the WebView by
disabling motion event splitting.
* Fix pinch zoom when one or more touches begin on an overlay
view by intercepting upon ACTION_POINTER_DOWN events.

Change-Id: I6f23eb75f9df32ac9c9b0c1be8a304e2c16c6fe0
essageHeaderView.java
essageWebView.java
5449aeea2634b1c6589862630d7fabf8f5ae179f 25-Feb-2012 Paul Westbrook <pwestbro@google.com> Prevent crash on activity resume

Handle the case where the requery cursor is set to null before
the listeners' onRefreshReady() is called.

Change-Id: Ifd6caee3e0a963f113630b5a63bffcfc0c67d814
onversationCursor.java
c16be931683b00cc625570f0d188e0981141f965 24-Feb-2012 Marc Blank <mblank@google.com> Make ConversationCursor.create smarter

* Use existing CC when possible (either with a sync() or by resetting
* Make sure any existing underlying cursor is closed before creating
a new CC (fix strict mode issue)

Change-Id: I4390850696f3e53aa4769a3ba3011f7a19ce36b6
onversationCursor.java
cb0df0a15ae64fcb67ceaa03c13ad2e93efa282b 24-Feb-2012 Paul Westbrook <pwestbro@google.com> Don't close the ConversationCursor in finalize()

This was causing a problem when the underlying cursor was still
being referenced

Change-Id: I722c048607f689a90413ea7bbb3363f67f729123
onversationCursor.java
f70fc4052b72a850bbb9be585d0f5a4877ee9448 18-Feb-2012 Andy Huang <ath@google.com> conversation view zooming

Zoom is enabled on the entire conversation using the built-in
WebView mechanism.

Wide messages are individually best-effort shrunken to
fit-width.

Start a custom ViewGroup to hold both message headers and the
single WebView. A common view parent makes input handling easy:
the WebView drives scroll position, and position is relayed
to the custom ViewGroup to cheaply shift around headers without
a full relayout. For now, all headers are inflated at once, but
soon they can be recycled depending on the virtual scroll
viewport.

Change-Id: I92555f9b79e10630457b17ca970ab9a2e9028e80
essageHeaderView.java
b33465d663235bc45fef4e97d332e652a0f9d769 24-Feb-2012 Marc Blank <mblank@google.com> Synchronize access to listeners in ConversationCursor

* Apparently, these methods are being used from multiple threads,
which can cause a ConcurrentModificationException

Change-Id: I6f60f48570fd145c883cf9314f2d04293894c2d3
onversationCursor.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
onversationItemViewModel.java
essageHeaderView.java
f83bde45c00c3185af0a1e8084875a7d00fcc17b 24-Feb-2012 Paul Westbrook <pwestbro@google.com> Enable StrictMode in UnifiedEmail

Fix one problem where ConversationCursor was not being closed.

Change-Id: I573c6897bd66453edae369b794970f5d9ef423c7
onversationCursor.java
334e64af904085984cdcbecbcbc18cf488a9ceae 23-Feb-2012 Paul Westbrook <pwestbro@google.com> Add support for archive/spam/mute

Add new operations in the UIProvider for the providers that
support archive/mark spam/mute

Fix animations for userdebug builds

Change-Id: I2e6372095f7ce6d29d37768e1075a098ca3a7646
onversationCursor.java
electedConversationsActionMenu.java
15a71a5d5b1b7d8a82f8d0fc7800f2712d5f7d45 22-Feb-2012 Vikram Aggarwal <viki@google.com> Merge "Start showing label list on tablets"
e9a81035bcef5a372fa13a992f8553eb60e6aaf0 22-Feb-2012 Vikram Aggarwal <viki@google.com> Start showing label list on tablets

Change-Id: Ib5529ce2eca88c71979ed0bc6340cb2a752ffd25
onversationItemView.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
onversationCursor.java
electedConversationsActionMenu.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
onversationCursor.java
electedConversationsActionMenu.java
7ad3b8756b39674b293a8fc821623c9b92990811 22-Feb-2012 Mindy Pereira <mindyp@google.com> Correctly set the text for undo bar actions.

Change-Id: I82c978e62830d34c6e2ee92a418bf97c44293dd4
electedConversationsActionMenu.java
dacfdcc7335a9cc09d628616bb9ddaf7e2beeaa9 18-Feb-2012 Mindy Pereira <mindyp@google.com> Delete unused activities.

Change-Id: I0b7b7235d661a88ee758384dc2074872b742967e
onversationListActivity.java
onversationViewActivity.java
oldersListActivity.java
fb647b83e852cf3c53b079b20bc8da25d773852b 17-Feb-2012 Mindy Pereira <mindyp@google.com> Fix build.

Change-Id: Icf64a6f0a27ed4f727f7641199471aecb356bc96
onversationViewActivity.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
onversationCursor.java
609480e14d4cb999d9b6bb1c224b3584d3f367f0 16-Feb-2012 Mindy Pereira <mindyp@google.com> Get loading folders/conversations off the ui thread.

Use loaders. Pretty.

Change-Id: I0d87ffa8e390f15718c71f05977ff6d331aeb9ca
onversationCursor.java
f9d8719ff6378e44d41b7586756ea9b6efac8fdf 16-Feb-2012 Marc Blank <mblank@google.com> Catch exceptions on unregistering observer

Change-Id: I4beb9f08d98c8314a58cba1f47c98bfbc5725164
onversationCursor.java
b600a83dfe6d0ec0b342de9b11f3b185b048ab93 16-Feb-2012 Marc Blank <mblank@google.com> Allow multiple ConversationListeners

Change-Id: I207e58845b69240f70b9f46673861fe4d450cdd1
onversationCursor.java
onversationListActivity.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
electedConversationsActionMenu.java
f645288ddaf5d24af952dd4ebf6d461eebddcfcf 15-Feb-2012 Mindy Pereira <mindyp@google.com> Show all folders for an account.

This is just the start. Needs a lot more passes, and will
want to make this a fragment instead of an activity.

Change-Id: I107390ee6c2e3af044c977c160b8d9a52477d569
onversationListActivity.java
oldersListActivity.java
febeb5fd53b0041e3d3b74ff6e3ba414475b2b31 15-Feb-2012 Mindy Pereira <mindyp@google.com> Correctly add/ remove stars mark read/unread based on what is selected.

Change-Id: Idf14507cb53fc6fab1d8b4ed356dc1dab3c93404
electedConversationsActionMenu.java
4f166dead6323b6fd21c76cef66174c6cd4bf11c 14-Feb-2012 Mindy Pereira <mindyp@google.com> Dont delete conversations automatically after a label change.

Only change them if their labels/ folders no longer contain
the current label/ folder.

Change-Id: I40b0a8aa5e7206962fef62d23d0cd1cef2b7d341
onversationListActivity.java
electedConversationsActionMenu.java
cd8bf0a4c081f95ac8666025adb85d4908c2018a 14-Feb-2012 Vikram Aggarwal <viki@google.com> Allow RestrictedActivity to return the context of the activity.

Change-Id: I5b1553e7c034523000dddd60fb9a90239c178cb0
onversationListActivity.java
electedConversationsActionMenu.java
67d75721f73844754220e5e81a23c32a62be1723 13-Feb-2012 Mindy Pereira <mindyp@google.com> Make sure we check the correct initial folder(s)

Change-Id: Ie728111edbcfae0ce6bc85dfefe6d2188f730485
onversationListActivity.java
electedConversationsActionMenu.java
d247dc966bca1ed303039c2893c54979d448a336 11-Feb-2012 Vikram Aggarwal <viki@google.com> Allow batch selection of conversations.

Change-Id: Ibaa7e96154b8c433651d9e8ef68f7973b92b7ac9
onversationItemView.java
onversationListActivity.java
electedConversationsActionMenu.java
293ee6858b5b2b049610992114aa82495631a246 13-Feb-2012 Mindy Pereira <mindyp@google.com> Make sure we check the correct initial folder(s)

Change-Id: Ib6881dbf5927d655dc1c7dd1bb2a53d7384303af
electedConversationsActionMenu.java
f31968824f9f19d0fde3bc0598601329605c0077 10-Feb-2012 Paul Westbrook <pwestbro@google.com> Use a cursor loader for account list

This will allow the account spinner to update itself
if the account list changes

Change-Id: I76aed2d6d613de055d23f7b40c9d9df25149060c
onversationListActivity.java
77177b171c483d485bdbff0178564394e8f57d0f 08-Feb-2012 Paul Westbrook <pwestbro@google.com> Start of restructuring to allow overlays include subset of providers

This allows us to build a UnifiedEmail that supports all providers
and use this base to build applications that only supports a subset
of the providers

Made AccountCacheProvider and ConversationProvider abstract. This allows
the extending class to specify the authority that should be used (This allows
both UnifiedEmail and Gmail to be installed at the same time)

Change-Id: I31295f4630906e7182e423fcbb7b47c33ba4cd4f
onversationCursor.java
7ac01cc7654fb282c63b12dddcdebdb5499150c1 08-Feb-2012 Marc Blank <mblank@google.com> Close conversation cursor when changing convo lists

Change-Id: I4e1414762b32ff9363250629982063b9f3a4640a
onversationListActivity.java
b3e828346e07e1823016aaebe79a7f2108279f0c 08-Feb-2012 Marc Blank <mblank@google.com> Merge "Start of unit tests for ConversationCursor/Provider"
248b1b49455785aa2fa426bc28090547abfcb01a 07-Feb-2012 Marc Blank <mblank@google.com> Start of unit tests for ConversationCursor/Provider

* Includes modified TestProvider code originally intended for
the Exchange application (as MockProvider)

Change-Id: I40126892c2177260a8eb1ace6e21e47a9ecf7665
onversationCursor.java
5d36376e157594124125b24acf2fafb6a6f610c5 06-Feb-2012 Mindy Pereira <mindyp@google.com> Merge "Refactor the change folder dialog."
f3dfb15b47aabd56fa7b7c99685ba6fad1d7e931 06-Feb-2012 Mindy Pereira <mindyp@google.com> Refactor the change folder dialog.

This was getting much too large.

Change-Id: Ic1a46d22ebb5d02346b0f32ee5c63f9aa7083bdd
electedConversationsActionMenu.java
995fff5b8367f91da95850b662ddd65a2e08e9ea 06-Feb-2012 Marc Blank <mblank@google.com> Fix typo on update/delete code

Change-Id: I7cdc24ff0dd487e285dd70c34df4320017a1dbb0
onversationCursor.java
3b2d91316fcfc407ba0e40ad35dea659922dccec 05-Feb-2012 Marc Blank <mblank@google.com> New animation for delete and undo of delete

* Conversations shrink during delete with "selection" background (blue)
* Undo expands the previously deleted conversations in the proper place

Change-Id: I86059436f0a2620bfea4493279e1b5360101c019
onversationListActivity.java
f45a635b941849fcf1f39cfac220cd2a156ae44e 04-Feb-2012 Mindy Pereira <mindyp@google.com> If the user presses cancel when moving a conversation, do nothing.

Change-Id: I17d4e1444ad6712656e7259a33fbf4e92e1346c1
electedConversationsActionMenu.java
72d825c727d3b2ccf256bf41203b249c5399c3ff 04-Feb-2012 Marc Blank <mblank@google.com> Check the CAN_ACCEPT_MOVED_MESSAGES flag in move dialog...

Change-Id: I53c8b4e752bb9f72921e4ab2e1ca9658f1a50744
electedConversationsActionMenu.java
3f1eb8517cf7db29ceafa1912ae999af186e2856 04-Feb-2012 Marc Blank <mblank@google.com> Add nicer undo support and some debug logging

Change-Id: I2b2c36e1be6ef7d07890e16b0721cd133421c830
onversationCursor.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
onversationCursor.java
electedConversationsActionMenu.java
d92e9f3d45cfedd3ebfedcf0805283007053e091 03-Feb-2012 Mindy Pereira <mindyp@google.com> Show different dialog based on single or multiple supported folders per conv.

Change-Id: I42db5fad5e1e2d3951f91f843ca46d8d58c80cb2
onversationListActivity.java
electedConversationsActionMenu.java
30d2d329418045d1f6af60877fa14183ec28ead4 03-Feb-2012 Mindy Pereira <mindyp@google.com> Show folder lists.

Single selection for accounts that dont support multiple folders per conv
Multi selection with checkboxes for accounts that do support multiple folders per conv.

Change-Id: I3ff6e9a5be104a10cead271c64e0383c61488539
electedConversationsActionMenu.java
4e25c949d04e42ec6bf84baef52e99c13e83ac9f 03-Feb-2012 Marc Blank <mblank@google.com> Add polling methods on CC; refactor

* Added isRefreshReady and isRefreshRequired methods on
ConversationCursor (for polling)
* Renamed swapCursor to sync

Change-Id: Iec7fd4141780408e0f9fc8f0eb3d68dc2081ade5
onversationCursor.java
onversationListActivity.java
8a77f8b15c32077480a27a00e759b93f05634b79 03-Feb-2012 Mindy Pereira <mindyp@google.com> Notifydatasetchanged AFTER deleting items in the synchronous conversation cursor.

If we do it beforehand, then the items just come back, since they
are no longer marked as animating.

Change-Id: I9a81068dc3ce2d5f0702c59f4d6583693f883c04
onversationCursor.java
electedConversationsActionMenu.java
fa131a2ff399fd1d544f759b063268fb4e8a3e70 02-Feb-2012 Vikram Aggarwal <viki@google.com> Make ViewMode focussed and small.

1. ViewMode is no longer aware of tablet versus phone UI. This is the
responsibility of the ActivityController now.

2. onViewModeChange receives the new mode as an integer rather than
the ViewMode object.

3. Rather than a plethora of isXMode() isYMode() methods, client
classes need to manually check getMode() against ViewMode.X
ViewMode.Y constants.

Change-Id: Ib06196671ad49328c40cc9237667c0a1daf328f7
onversationItemView.java
onversationItemViewCoordinates.java
c43bc0a606e41144a780c4f873b5450e0ede0c91 02-Feb-2012 Marc Blank <mblank@google.com> Use uri rather than messageListUri for Conversation operations

Change-Id: Icc30cdfd3cce1fcb3b0119ef6008e981e1c14ac4
onversationCursor.java
onversationListActivity.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
onversationCursor.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
onversationCursor.java
b31ab5aea601f8aa5136a99edc23fb4d907f792e 01-Feb-2012 Marc Blank <mblank@google.com> Add provider support for undoUri

* Also added "seq" parameter for undo support in ConversationCursor

Change-Id: I482e4db437826276e4c13c60835259be175f7a4f
onversationCursor.java
96b5c357860f46a7bd5f867774a53d5cc5069def 01-Feb-2012 Mindy Pereira <mindyp@google.com> Undo logic.

Change-Id: Iba82ec2c654802f4583346ffc614ba91622fe6a1
onversationListActivity.java
electedConversationsActionMenu.java
fac92d71ad83a34eb200cd9bcb773642e5e58de2 01-Feb-2012 Mindy Pereira <mindyp@google.com> Remove the animated list passthrough for action complete listener.

We don't need it.

Change-Id: I1389f0b78d2fd11ec91ef169b195cee6f5bbd449
onversationListActivity.java
electedConversationsActionMenu.java
4015c182ab04edaa7cd8b75490f4336348ec29da 31-Jan-2012 Marc Blank <mblank@google.com> Get server deletions and allow for animated deletions

* Added another listener API for CC
* Fixed a bug related to > 1 updates from server

Change-Id: I0bc2654bec1e63e49dc0f4ac48325851d3380e67
onversationCursor.java
onversationListActivity.java
03bbaadd114b39cdac91be7384d1b311db67c7c5 31-Jan-2012 Marc Blank <mblank@google.com> Remove code that's no longer needed

* Redraw list (for now) after updateBoolean for setting star
and read on selection sets.

Change-Id: Ia4b482841bbc0f0a9cf516d68aa9d4f63e7510e1
onversationCursor.java
onversationListActivity.java
electedConversationsActionMenu.java
9879d4c74520800eff386ab27eb5e03432c610b5 31-Jan-2012 Mindy Pereira <mindyp@google.com> Do a ui driven version of delete.

this is round 1; will need cleanup.

Change-Id: Ic60b64488f741c085b4079211f9ff1c53c554ee3
onversationListActivity.java
electedConversationsActionMenu.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
onversationCursor.java
onversationItemView.java
onversationListActivity.java
8324c81e7345344aa354a6c5fc8a662a76464bb1 30-Jan-2012 Marc Blank <mblank@google.com> Merge "Handle UI updates during underlying cursor refresh"
373a82a5cbd0b303e51cc0bba550c2609fd74ef8 30-Jan-2012 Vikram Aggarwal <viki@google.com> Remove unused FolderItem class.

Change-Id: I2c35892f08e03ce798e91490ccb65ab4a279becb
olderItem.java
48eba7a1eedf6c06b7783d49f44e61fc117f69bc 28-Jan-2012 Marc Blank <mblank@google.com> Handle UI updates during underlying cursor refresh

* Add new notification for when refresh is finished (i.e. the
conversation cursor is synced with the underlying cursor)
* Still considering notification for changes that happen during
the requery (i.e. calculating sync inserts/deletes, for example)
* Query of underlying cursor is now done asynchronously

Change-Id: Idbe6a4729ad5ea896a9522b11286044f0a552f2e
onversationCursor.java
onversationListActivity.java
077a6dcec3200f9e70f01a627d7e98bc974af2b3 27-Jan-2012 Marc Blank <mblank@google.com> Redraw list on starred change (for now); see comments

* Comments in ConversationListActivity#onChangedItems

Change-Id: I31103d60c070aad03c8acd6d7863944a157c3e85
onversationListActivity.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
onversationCursor.java
onversationItemView.java
onversationItemViewModel.java
onversationListActivity.java
electedConversationsActionMenu.java
d9f8558565000127e7dafe7ba7934ceb09b246bc 25-Jan-2012 Marc Blank <mblank@google.com> Fix fencepost error in delete position determination

Change-Id: Iaa9b405ad437cae06d165ad8d1d74866ce08d7fa
onversationCursor.java
onversationListActivity.java
d3818654c103802704fc788cf9c6775d25b65bff 25-Jan-2012 Mindy Pereira <mindyp@google.com> Clear selection after a destructive action.

Change-Id: I4e6faed97452ccb5ec0ef3d37f2c9a72b1d406fe
onversationCursor.java
onversationItemView.java
electedConversationsActionMenu.java
31e4c22c5241ce42d8059c65574be491e3f0ef3c 24-Jan-2012 Vikram Aggarwal <viki@google.com> Merge "Adding more ActivityController dependencies"
1ddcf0f2bf44d3c9db89112ef52510d9b2433ac4 13-Jan-2012 Vikram Aggarwal <viki@google.com> Adding more ActivityController dependencies

ui.ControllableActivity added from Gmail.
One pane layout files brought in.
Minor changes to make everything work with the test activity.

Change-Id: I8cacd5f36394fe4a786590e2e381369a3afb5494
ctionbarActivity.java
onversationItemView.java
onversationItemViewCoordinates.java
onversationListActivity.java
onversationSelectionSet.java
electedConversationsActionMenu.java
3c439763dc2904602e96db82139f2f310cfea9ee 24-Jan-2012 Marc Blank <mblank@google.com> Make ConversationProvider insert synchronous

Change-Id: I1df2bfc70e7dd11d8cbc23efa8986de1ed0d4b80
onversationCursor.java
97bca7b52aa2840494753d700a641161099cde23 24-Jan-2012 Marc Blank <mblank@google.com> Use ConversationListener to initiate redraws when data changes

* This puts the ListActivity fully in charge of updates; when
onNewSyncData is called on the listener, the activity is
responsible for calling requery when it wants to actually
get the data (i.e. the screen will NOT be redrawn out from
under the UI)

Change-Id: Idd7d9d9098ec9b8f19ea608a72bc6a37d6277e44
onversationCursor.java
onversationListActivity.java
11b0bbdf024ec1413f90b2baac2c18a8f1c01d71 24-Jan-2012 Mindy Pereira <mindyp@google.com> Add selection set delete.

Now, when the user taps the checkbox on a conversation,
they can use the conversation selection menu to delete the item.

Change-Id: I18b58f4e25ac018621c8aa3330c5717da91c8913
onversationItemView.java
onversationListActivity.java
onversationSelectionSet.java
electedConversationsActionMenu.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
onversationCursor.java
onversationItemView.java
onversationItemViewModel.java
onversationListActivity.java
4401c9049f0327019b0bfed554bf8ff5cdaa20e2 18-Jan-2012 Mindy Pereira <mindyp@google.com> Parse addresses for senders display names. Move attachment joined string parsing to provider.

Change-Id: I36a5af1d3d54350ca2d9fa97666f5ceb8268a0b7
onversationItemView.java
3ce64e7ceb6246130342385d91550bcf33b31cc8 13-Jan-2012 Mindy Pereira <mindyp@google.com> Create parcelable message.

Also, gets rid of and renames fields that required them per:
name change to appendRefMessageContent
remove custom_from field
remove quoted text pos

Change-Id: I33a2f83b906d2504a8a6ae58f79f1618bb8a20cd
essageHeaderView.java
8cf8a27e9d46d301bde00c312b6c90b23fef4670 13-Jan-2012 Marc Blank <mblank@google.com> Set requery/observer for convo list (hack to demo push, etc.)

* This will be moot since we're moving to loaders; in the meantime,
it's fun to see new messages appear...

Change-Id: I62eea05e0a091a33d9ca60222c0d0e84c8883e4d
onversationListActivity.java
97c25be161de53aa55662ebf44f2d489ddd86dea 13-Jan-2012 Andy Huang <ath@google.com> UiProvider API cleanup

remove CLIENT_CREATED
change DRAFT_TYPE to an integer enumerable instead of a string
for consistency.

Change-Id: Icd4bfebd7836f06d8c146c6e3366c5dcec517202
essageHeaderView.java
db97747e5adc0a5fdf38f0f7c7f3878156278424 12-Jan-2012 Andy Huang <ath@google.com> changes to support fetching Gmail messages

Remove CLIENT_CREATED field, since it's never read from the
Gmail UI.
Fix MessageFlags.
Add docs to most message columns.

Change-Id: I1c528da9d103a3f27258eba270cf86cc9d4a18d1
onversationViewActivity.java
259e52238941db08b518154215c579fd2f57ea86 12-Jan-2012 Mindy Pereira <mindyp@google.com> Simple sender display.

Change-Id: Ieea07b676d776aa33541e22e7ea3ddd0635e7c21
onversationItemView.java
733fd71b0814097bc249869e19f1286b2df45b5b 12-Jan-2012 Mindy Pereira <mindyp@google.com> Fix build.

Change-Id: Iad0e9766d4b1ff0eadb1efdae0b8a6f3b21501e7
onversationViewActivity.java
a7af5c4a0e6ac3b04e869331c9bebc32a7447a36 12-Jan-2012 Mindy Pereira <mindyp@google.com> Merge "Add an easy webview."
b48e074e8b46e7b8af4afb4f73f2cacf2bdaf526 12-Jan-2012 Mindy Pereira <mindyp@google.com> Add an easy webview.

Just shows html as we get it from messages.

Change-Id: Ia72d8915ff617e4a0c99ca4a835fa2a22ed53134
onversationViewActivity.java
essageWebView.java
4f9a4c5ccb1370f583639e763b1c529fe6762271 12-Jan-2012 Vikram Aggarwal <viki@google.com> Fix copyrights of all files

Change-Id: Ibe235f0b411946690b29efd6b0399a77b02f3a5a
ctionbarActivity.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
onversationItemView.java
onversationItemViewModel.java
onversationListActivity.java
onversationViewActivity.java
essageHeaderView.java
33fe908589dca6a7f58aa9f56d73f74a48ac42f6 10-Jan-2012 Mindy Pereira <mindyp@google.com> Pass the account around instead of just hte account name.

We need the account for capabilities, uris, etc., so just
pass it around when launching new activities/ fragments/ etc.

Change-Id: If05cae10a092679ea0e7807ae36f7965d065a649
onversationListActivity.java
onversationViewActivity.java
essageHeaderView.java
98b4e903b094ebdb6e910e086c4c7aa01b9e8bbd 07-Jan-2012 Andy Huang <ath@google.com> minor drive-by cleanup

Change-Id: I6a936c1d653324503f1bf4778d88dd5822df78b0
onversationListActivity.java
onversationViewActivity.java
30e2c24b056542f3b1b438aeb798305d1226d0c8 07-Jan-2012 Andy Huang <ath@google.com> rename unified email's package name to com.android.mail

New code needs a new package name. Fixes IDE conflicts when
browsing.

Change-Id: I328484c6d6c71df077a05d2f7d6d1e85074107c2
ctionbarActivity.java
onversationItemView.java
onversationItemViewCoordinates.java
onversationItemViewModel.java
onversationListActivity.java
onversationViewActivity.java
olderItem.java
eaderBlock.java
ergedAdapter.java
essageHeaderView.java
ultiAdapterSpinner.java
nippetTextView.java
ebViewContextMenu.java