History log of /packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
bd16ec759acbd1acbff33cc08a9c86cc600f9194 17-Oct-2014 Andy Huang <ath@google.com> Merge "Programmatically set selected state to correspond to peeking conv" into ub-gmail-ur14-dev
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
8c0fdff583d0471bd830bb7e0c33df8beaa25e93 16-Oct-2014 Jin Cao <jinyan@google.com> Don't include the default footer when there is no content

b/18006338

Change-Id: Ie88ff9e161fef6ca1f28879119577517232679ce
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
0a72b736dae35dc6a8a0d38a9a6e8a17607a9d25 14-Oct-2014 Jin Cao <jinyan@google.com> Always have a footer for AnimatedAdapter

If a custom footer is not set, use a default footer which is just
a space with height of 88dp. This will cause the last item in
the listview to not overlap with FAB/snackbar.

b/17622053

Change-Id: Ie165cd7559681c32b6f36d962ec92e50c372614a
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
4d888936856ea0e9bc108aa2642ff8e21afeff44 28-Aug-2014 Jin Cao <jinyan@google.com> AnimatedAdapter shouldn't show header if there is no content

Instead of having a separate getContentCount, simply have the
count return 0 if the content count is 0. If the content count
is nonempty, then add the header count to the result.

This effectively prevents the headers from ever rendering unless
there is some content underneath.

b/17306351

Change-Id: I04a577d4fb3e54ea201214da2ec1aac74d3a27d2
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
ce407cd978b0482b67426706ddc972a89a507999 26-Aug-2014 Jin Cao <jinyan@google.com> Don't include header size when checking for adapter size

We display the empty view when the adapter size is 0. However,
this count shouldn't include header size since we are only
interested in the adapter content. Note that teasers are not
included in the header since they are separately considered
by AnimatedAdapter.

b/17258260

Change-Id: Iebcee7e2b9ded0c43aabac8b3bcd93a423263017
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
0e424db6bc5cfbb7f8d980fb9d184f0835bb1fe3 07-Aug-2014 Jin Cao <jinyan@google.com> Fix position offset for special views

The position for special views should take header
views into account since the special views start
at index 0.

The NPE was caused when we are supposed to return
a special view. However, since the index is off,
the special view is null and the offset position
is -1.

b/16728934

Change-Id: I83bc5059a52b2d824c929acbafc6895094999d28
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
eb145d45c17b08ce09131e84b96350925b3db81a 01-Aug-2014 Jin Cao <jinyan@google.com> Ditch HeaderViewListAdapter and support headers

Support arbitrary number of headers in AnimatedAdapter
instead of relying on ListView#addHeaderView and
HeaderViewListAdapter.

b/16728934

Change-Id: I1e4d02ac8b6557411ab47895002088d798ff2fc2
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
2b806edc62eb8e83c77edc471fda4652281a15c4 11-Jul-2014 James Lemieux <jplemieux@google.com> Replace all references to UnifiedEmail's com.android.oldbitmap with
equivalent usage of framework's com.android.bitmap.

A small refactor of AccountAvatarDrawable.drawBitmap(...) is also included
which produces no functional change.

Change-Id: Ic67690cde56de6ca691ac8647ef02865b766ca62
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
5db676608eb00d3b1830344bf979a1bb5c093b8c 06-May-2014 Andy Huang <ath@google.com> Revert "Commit DestructiveActions immediately. b/9904716."

This reverts commit 1165d291b938f406631768795c0dbee58898315e.

This was causing the thread list to not update after an in-conversation
delete/archive on tablets.

Bug: 14297883
Change-Id: I55e2969e842e108507b7ee128ea53f462316220d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
a71d756a0e80f63b8b4ebd91451c3a79929e1a4e 28-Mar-2014 Scott Kennedy <skennedy@google.com> Rename com.android.bitmap to com.android.oldbitmap

This is causing some conflicts, and we want to replace this with the
new library in the near future.

Change-Id: Ie607e20a96861a6282e27410fea859f0ee1737cd
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
1165d291b938f406631768795c0dbee58898315e 26-Mar-2014 Andrew Sapperstein <asapperstein@google.com> Commit DestructiveActions immediately. b/9904716.

For whatever reason, we have this weird two stage
commit of DestructiveActions. We call
performAndSetNextAction twice every time we wanted
to commit. This results in the next destructive action
trying to perform the action again, but that doesn't
matter because we debounce the actions so they're only
performed once.

Unfortunately, in two pane mode, when we transition back
to the conversation list, we only called performAndSetNextAction
once. As a result, the first call tried to re-apply the old
version. But it was never called a second time so we never
committed the action. Worse, the action would sit there waiting
for another action and then get applied.

Now, if we're in tablet, we set the next action so that
the single call will commit when the animation completes.

A proper fix probably involved rewriting all of this
logic and is not something I want to touch this late
in the release.

Change-Id: Iaa7b4c7d21837b93916ada5b6c9b49b13361be08
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
26a20758413f0f8629ea71a0943304e3ae740165 01-Mar-2014 Tony Mantler <nicoya@google.com> Get rid of Account#name

b/13249115

Change-Id: I5478b139cba9e3e37924c3af1c7a4f818a803fa3
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
f01b02b09acca214892cbf865a89dbdf19f77238 25-Nov-2013 Scott Kennedy <skennedy@google.com> Ensure we perform the action when we can't auto-advance

If auto-advance was set to "newer" or "older", and you archived all
your mail, the final operation would be set as the next operation to
perform in the list, but it would never actually get performed.

If we _always_ perform the action when a delete is performed, we fix
this problem.

Bug: 9904716
Change-Id: If1f0ef38a1468defabf81b385839c89334fedbc1
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
1801b32a2977ca97ca194a3c9e9633b03e5496a4 23-Jan-2014 Andrew Sapperstein <asapperstein@google.com> Unicode wrap subject and snippet in convo list.

Fixes b/5987892.

Change-Id: Iaff34c3ca725dd3023a53ba30b916db6fa571232
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
fbf4f4729c9bea907cb57d4f449893eb2fc5dd1d 01-Oct-2013 Scott Kennedy <skennedy@google.com> Allow dismissing teaser leave-behinds on user interaction

Bug: 10649816
Change-Id: Ie6c0fa00de503ed7beaadf584149e3864c4373e4
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
1c2676be24de6e490a149aeea0cf0f4499887751 30-Sep-2013 Scott Kennedy <skennedy@google.com> Clean up some comments that referenced old nested folders

Change-Id: I193f63ad667e3824daf1e110b42f6b18e9513768
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
6af70772b2037d3527337f220fc053af73d4c81d 21-Sep-2013 Scott Kennedy <skennedy@google.com> resolved conflicts for merge of 4df54f8f to jb-ub-mail-ur11

Change-Id: I7d3e7edab211f7b713d75b2b020c746bcdf87d1a
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
0b8c080491f6884c2cfb7fcc473d970a9f4b97b9 16-Sep-2013 Alice Yang <alice@google.com> More svelte changes

- Re-enable sender images, but change the cache size of loaded images
to 0 (instead of default of 300K)
- Disable preloading of conversations in CV (for navigation to previous
and next conversation)

Bug 9325758, 9325806

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

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

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

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

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

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

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

Bug: 10429228
Change-Id: I463b63520d881eefe3974dccf295366831adaf9e
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
f77806ed36ab49861a5ea13a3ab34e5a3a21c022 30-Aug-2013 Scott Kennedy <skennedy@google.com> Remember our scroll position when we return to conv list

Do this manually until we have a real backstack.

Bug: 10533759
Change-Id: Ia97950837aa060d374e0a015eb1ff5db1cc3392d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
32ddb84f2d4f53bfc4b53656461068c0c69d6325 29-Aug-2013 Scott Kennedy <skennedy@google.com> Fix a couple ad bugs

1. Show a new ad when we leave the conversation list and return
2. Do not show a new ad immediately after dismissing an ad
3. Eliminate some GCs and logspam
4. Don't send up a "shown" operation on rotation.

Bug: 10499269
Bug: 10531721
Change-Id: I7e366bd2f1bde5f50764cc3240ac0870a4eda49f
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
d54a43c1d722ad7cb0376ba801c59c69d8a70234 28-Aug-2013 Scott Kennedy <skennedy@google.com> Log.wtf() if we call notifyDatasetChanged() off main thread

Bug: 9527863
Change-Id: I4e65cc576173669f14c24b89d2dbcf265b74519f
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
de875314b539662d7a6f7f747b0f762ab4260f14 27-Aug-2013 Scott Kennedy <skennedy@google.com> Remove an unused field

Change-Id: Iea0eab6ffb4633b7083325185e65c1b9b87d3216
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
d6522ea881e80ab849f2a88565db5a6a73e7623e 27-Aug-2013 Scott Kennedy <skennedy@google.com> Fix long-press

The CAB mode teasers were having their dismiss animations run when
CAB mode was entered, even if they weren't being displayed.

As part of this dismissal, notifyDatasetChanged() was being called,
which caused the conversation being selected to have its view
recycled during the long press, which then triggered a short press.

We were also unnecessarily calling notifyDatasetChanged() when the
account's sync status changed.

Bug: 10442289
Change-Id: Iefb784f60cf99ac10ae1b0785777a0e4711b2368
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
8bccd10f05d3cc13894df8b9a63bf00d991c55c2 24-Aug-2013 Scott Kennedy <skennedy@google.com> Prevent an NPE

By actually setting the adapter on NestedFolderView.

Bug: 10461002
Change-Id: I19bbc7d7cdaec446aaa2ee58b8ab53b2026388e7
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
59bd7d331b38322dbe760be7a96c84ea832406c4 24-Aug-2013 Scott Kennedy <skennedy@google.com> Add a method to determine if we're in CAB mode

Bug: 10412273
Change-Id: I60387f3de0086420480d10902a0e3ee87fa9e79a
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
750a3eae65447fe90560b2698a57004c03aa4754 23-Aug-2013 Andy Huang <ath@google.com> Merge "log notifications" into jb-ub-mail-ur10
f45e0e7f65eb421fc5c2acf7bb76a714e12dc68b 23-Aug-2013 Scott Kennedy <skennedy@google.com> Make the right edge more performant

Bug: 9177552
Change-Id: I4250825bb658209166744ad1cb0455d4ac81da34
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
4fe0af81874976a1995191321e35c844b2229811 21-Aug-2013 Andy Huang <ath@google.com> log notifications

Also fix a long-standing issue that caused notification intents to never
get updated during development (we weren't setting FLAG_UPDATE_CURRENT).
We can remove the version tag from the intent data URI later.

Log reply/reply-all setting.

Bug: 9861033
Change-Id: I49b2ab529de4167d1c8b42a8b053bcc2b9f65a23
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b45d1418887d8595c230788e20516bbe10c2f3ea 09-Aug-2013 Scott Kennedy <skennedy@google.com> Change special views to update the view inside of getView()

Rather than doing view updates in onUpdate(), add a new method,
onGetView(), that is called before returning the special view from
getView() in AnimatedAdapter().

Change-Id: Ie98fad2d2296842e1edd648db06aa472486de5e4
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
70f0111a4337367b0cd5fcc1302b730fb332aeeb 07-Aug-2013 Mark Wei <markwei@google.com> Fix missing trace ends.

Change-Id: Ib119d8b2353d2c08e5a5841675a15bcb4676ae71
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
aa76bdfae889b995395a7636742128b3585727f9 07-Aug-2013 Mark Wei <markwei@google.com> Add a setting for attachment previews.

Bug: 10131520
Change-Id: I861a3aa7a1131c1a089011aed7492a0e4ff1ebcc
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b41b91112df8b4bf5adee6f0360dc7848f95fe26 03-Aug-2013 Mark Wei <markwei@google.com> Fix nit 4. Prevent multiple progress bars from showing up.

Bug: 10083052
Change-Id: I39f49195cc62a95e375730b51aa23e9f5bcf9685
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
0266692a394e5a6888595d154c5120726edadd6f 02-Aug-2013 Andy Huang <ath@google.com> add GIF fallback support

BitmapRegionDecoder doesn't support GIFs. Upon decode failure, fall back
to BitmapFactory (and disable inBitmap as it's too picky to be useful).
This means GIF decode always allocates a Bitmap!

Even if decode fails, we should offer any inBitmap to the pool for
reuse. This was previously causing excess allocations upon GIF failure.

Because GIF decode doesn't crop to our desired parallaxable rect, amend
the rect calculation to narrow the srcRect when necessary to ensure that
some height is reserved for parallax.

Partition the pooled cache and reserve some space for non-poolable, non-
reusable entries. This is basically reserved for GIFs. Let's assume 10%
for now.

Change-Id: Iac316a2f8c62be74cca487a02d9468ede29ea787
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
18310f861218587fd8c5a5b270a20f29380af462 03-Jul-2013 Vikram Aggarwal <viki@google.com> Fix highlight in Email with nested folders

Calculate the offset correctly without calling getPosition() to ensure
the correct conversation is highlighted.

Bug: 9680612 Nested folders highlight incorrect conversation

Change-Id: I4aea4bbe88c726d4644f202ae3bf57f979aebc74
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
da8b096b6a9128dc7c7e7d4fd46d48f9a594268d 03-Jul-2013 Mark Wei <markwei@google.com> Revert "Highlight the correct conversation in the presence of nested folders"

This reverts commit 11324ad037cb9a2735c23295972934b106da2980.

Change-Id: If05a7f706ebad2fbd8c9b5702f7f066bb1504581
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
11324ad037cb9a2735c23295972934b106da2980 03-Jul-2013 Vikram Aggarwal <viki@google.com> Highlight the correct conversation in the presence of nested folders

Nested folders go right on top, and fleeting views specify position.
This change corrects the cursor position -> list position
calculation and simplifies it.

Bug: 9680612 Nested folders highlight incorrect conversation
Change-Id: I119af8efac16375445d5ba90cd62cedbfbe845c9
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
3b965d78774a42358ce6bbdcc43b4c8df130a60e 25-Jun-2013 Scott Kennedy <skennedy@google.com> Clean up a bunch of warnings

Bug: 9565838
Change-Id: Ie3a380581e81c63aaa0764875c55bfdccd5f2b13
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
a2f1922c41eb5a01f1972c49ab80019a72f1aa0f 11-Jun-2013 Andrew Sapperstein <asapperstein@google.com> Fix build.

Change-Id: I74c63266df893183980661dfd2cd1568b229db60
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
37a20ca39be842b4b4cb54d5b5ed418d49d950cf 06-Jun-2013 Vikram Aggarwal <viki@google.com> Fist cut of nested folders

1. Rename FolderListFragment.FolderListSelectionListener to
FolderSelector.

2. Allow special views to be tapped; all existing special views
disallow taps.

3. Allow nested folders in ConversationListFragment. The adapter is
responsible for populating the nested folders above the
conversations.

4. Add a nested folder special item for the conversation list. This
reuses current resources and is particularly ugly. The ugliness
will be fixed once we have a UX spec and real assets.

5. The child folders are loaded through an ObjectCursorLoader in the
ConversationListFragment.

Change-Id: I5eb566d7a1f87c1a11fc6961378d00650a27007d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
348398d7f3ff058248ef9f7d37443496c0e400a5 28-May-2013 Andy Huang <ath@google.com> fix getItemId crash on empty cursors

getItem() is usually not called from within getItemId(). Turns out this
is not a great combo, because getItemId() must handle any input, but
getItem() doesn't. Switch to using Cursor.moveToPosition() directly so zero-
sized cursors trigger the default CursorAdapter.getItemId() codepath.

Bug: 9167831
Change-Id: Ie46572eea69b8dec7e4aba3d76d3c841c4f98c46
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
fe8e081d6230f343dc74b45d69e5f4634a332b5a 22-Apr-2013 Alice Yang <alice@google.com> Onboarding UI for section inbox

- Expand the existing teaser view to include onboarding message
- Onboarding is shown once section inbox is enabled, and dismissed by one
of following:
- Opening a conversation
- Change categories
- Swipe onboarding

Bug 8585165

Change-Id: I3b15dfe74255d9ecaf1e6bf535e55d0bb554d733
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
6176b722c53d0fa546f679cc453af615045b1e14 08-Apr-2013 Scott Kennedy <skennedy@google.com> Take Special views into account when deleting

Bug: 8498442
Change-Id: I45c4f35d378ee5a22b1a484d70b98558faeafb86
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b90db28aac1311f0ed32a786594e17c007550853 04-Apr-2013 Scott Kennedy <skennedy@google.com> Don't allow special conversation views to be clicked

They handle their own clicks, so we don't need to keep them enabled.

Bug: 8520178
Change-Id: I9515600c3bb7920964be3f86eb8210a6bfc01b27
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
7c8325de829ca029ce4547e4f0fa266124301367 28-Feb-2013 Scott Kennedy <skennedy@google.com> Teaser view for sectioned inbox

Still some changes required as the spec is updated, but it works.

Change-Id: I068488d057e42bc62af36e532d55ce17f695f49d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
720a2c494c066b4657ab852384fd66fbd11cd430 13-Mar-2013 Alice Yang <alice@google.com> Revert "Change "hide checkboxes" to "show checkboxes""

This reverts commit e7b31afacb4779e0af5a23413b96453979a852a4.

Bug 8370186

Change-Id: I52d0d0ee18e2e7bb4a845e86d0b5e3ba055c50ac
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
1bca265b7a8a3f9ea08e0ae51eeb145f0883a266 12-Dec-2012 Andy Huang <ath@google.com> aggressive pre-caching of Conversations

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

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

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

Bug: 7690709
Change-Id: I910f85f9b6830f9b059379da9f16a19dc3e6036a
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
7ed53776a053782ca37303075c144926647ac557 23-Jan-2013 Paul Westbrook <pwestbro@google.com> DO NOT MERGE Revert "Change "hide checkboxes" to "show checkboxes""

This reverts commit e7b31afacb4779e0af5a23413b96453979a852a4.
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
a44babdac4e070034f35d984d06c675af8fee81f 17-Jan-2013 mindyp <mindyp@google.com> Swipe animation polish

The cinch delay should start on the short side, but then we extend it if we notice that you're in multi-swiping mode,
where multi swiping mode is defined as > 2 active shrinking items

Change-Id: I7a6cafa44954ab2904bf14fd8e24a045b80539ff
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
ac2ef8104955233d0f2854fa20bc285ba1ea1043 17-Jan-2013 mindyp <mindyp@google.com> Fading in of text should start immediately after cinching of items has completed.

Also, give the user enough time to start touching another item
275ms is too short
300ms is min time to react
Change-Id: I73765795ad540db8b28b5fcaf3589753980e89b1
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
4d4531a63cff536d2ee1a2929d0820981df8516a 17-Jan-2013 mindyp <mindyp@google.com> Updates to swipe interaction

When swiping away items, wait to fade in action text such as "archive | undo"
until:
1) all items that are being collapsed have collapsed
2) we are no longer waiting for the user to try to start swiping another item

Change-Id: Iaec75fb6a3a144e8b4c469f6e48f4354ec4aff8d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
7af43c93d4ca90bb0a43ec790a434c95128cc99f 19-Dec-2012 mindyp <mindyp@google.com> Fade out other leave behind when user starts new swipe

Change-Id: Icdd1b7d65715852d5fd976e7fccaf5790f940892

Conflicts:

src/com/android/mail/ui/SwipeHelper.java
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e7b31afacb4779e0af5a23413b96453979a852a4 21-Dec-2012 Scott Kennedy <skennedy@google.com> Change "hide checkboxes" to "show checkboxes"

Change-Id: I709484f7ea3c563942880a0af9cd0d08daf2496a
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
3b5e82b06a0af3f5ddf3667de9a2aa26eeb5f24b 18-Dec-2012 mindyp <mindyp@google.com> swipe tweaks

Change-Id: I5011f11989056376be748161fdb3f0e699366454
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
983742d4805dd7e24f2464159be83b40b7953c27 15-Dec-2012 mindyp <mindyp@google.com> Temporarily remove change for delaying dismissing existing archive leave behind views.

This is still being worked on

Change-Id: I11cccb509c563e5f6a71a34af307920b17767587
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
dcb26aea2b27b585c35c422c870e849b8c4e41d6 26-Nov-2012 mindyp <mindyp@google.com> Fix concurrent modification exception

Dismiss causes the list to be modified, but we modify
the leavebehinditems in the commitleavebehinditems method
so this is unnecessary

Change-Id: Iaef1260d596958ac5d8442a0c6d80b4fbbd750b9
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
6a6deb20dbbea543ccf093487d26dea4ac4f9cd4 26-Nov-2012 mindyp <mindyp@google.com> Don't dismiss other existing leave behind items right away.

Pause so that if the user is doing a lot of swipes in a row, the spacing
remains the same

Fixes b/7171804 Polish: after archiving a conversation from the list, scrolling feels a little out of control

Change-Id: I16fa29d6507c158c9c9abe1c5ec99c7577a57d92
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e358ed5c4ed1b172f5eae98f97919a8e471c98dc 26-Nov-2012 mindyp <mindyp@google.com> Correct issues with fading in text when there are other leave behind items.

1) delays the start of the fade in animation for the text of the new
item until the previous leave behind item has shrunk away
2) corrects bug where the opacity of the text of the leave behind item
was not being reset
3) corrects bug where the variable tracking if an item had completed fading
in text was not being correctly reset

Fixes b/7172273 [polish] "Archived... Undo" UI jumps around when archiving multiple messages in sequence

Change-Id: Id911fdacd41892d9c0a8377c775ef7ba5d79703e
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
ff4724c572908c00348252c3b75e161313c08a0f 13-Nov-2012 Vikram Aggarwal <viki@google.com> Remove leave behind after committing

If we do not null out the leave behind, successive calls to
commitLeaveBehind will try to commit it. For cases where this is an
archive operation, the leave behind item will not have mMostlyDead set
to true, and it will cause the conversation to be deleted entirely.
This is bad.

[It is a separate bug that commitLeaveBehind is called repeatedly,
sometimes 10+ times, while building the MailSpinner. That's a
separate fix.]

When we commit a leave behind, we should null it out.

Bug: 7525692 ListPopupWindow is committing the LeaveBehindItem in an
inconsistent way

Change-Id: Ie04563a257da44e770a41006388b080de99f150a
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e949616a8516115a544e1a8fca42d8d9e2817419 31-Oct-2012 mindyp <mindyp@google.com> Make CREATOR static for LeaveBehindItemData

Fixes b/7438519 gmail crashed on launch: expected receiver of type com.android.mail.ui.LeaveBehindItem$LeaveBehindData, but got null

Change-Id: I2a2622c2b96966f3a21d0f2a731e87a22caaebbc
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e4abda754bad698f81f55c139a530478dae5476d 16-Oct-2012 Paul Westbrook <pwestbro@google.com> Fix problem when undo don't immediately undo

For Gmail, since undoing can require a sync to happen before
the items get returned to the list, the Animated Adapter could
get in a state where no other animations would be performed.

Since we don't actually perform the actions until the end of the
animation, this was causing only some of the items to be archived

Since we only support one level of undo, there is no reason to keep
around the items to be "undone", after the user has requested a
subsequent delete

Bug: 7335276
Change-Id: I3db00028e5b29b622fc1c6b401967ccd5fe31865
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
d0f9578e0c0e01e981937310613ed0bb2550ba42 09-Oct-2012 mindyp <mindyp@google.com> Dont allow the recycler to return/store ANY of my animating views.

These are NOT safe for being recycled and returned.

Fixes b/7298938 Mail list item scrolls out of sync with the rest of the list after archiving

may also fix:
7293037 Archive animation incorrect when many non consecutive slots are archived together

but since I can't repro that, I can't be sure

Change-Id: Ifd004c4fae33de6d69a756d5d99cb86c5b98902e
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
eb88ececd0a53c4e956240b7b619da6410e2d356 09-Oct-2012 mindyp <mindyp@google.com> Don't reuse the leavebehinditem.

This item should be recreated if its of the wrong type rather than
getting nulled out and reused. It would appear that the recycler
was returning views that were still in use.

Need to determine root cause but this certainly masks the issue.

Fixes b/7305963 Undo archiving is very slow in Gmail

Change-Id: I4481a27bbc02dd9419d21a77268a8c08d0059b3c
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
87557c1068ced3c6a381af56f90267a7533c8c04 23-Sep-2012 Marc Blank <mblank@google.com> Remove logging

Change-Id: I64e336afbe604795ba18585ec24d86bd8b20d357
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b02ec699cf2e4006ba899d3a1e053ab20c13e048 12-Sep-2012 mindyp <mindyp@google.com> Use wide dimensions where applicable.

Fixes b/7149207 Undo leave-behing has larger height in label list/conv list

Change-Id: Ideaa74b1ef5d1db1b54192cd13286ac2089d3c0d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
4999b4ea86d540d6f80d7434ddaabda84918ae00 05-Sep-2012 mindyp <mindyp@google.com> Add logging to try to catch if the footer view presence is being misrepresented.

Change-Id: I79a72729b7c86cb96c0c919c186a546057c89012
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
5ceab3bd6892b85b0252b987b67b70ec5055587f 31-Aug-2012 mindyp <mindyp@google.com> We need to override the adapter methods to be able to create a basic view.

Fixes b/7088208 Undo archiving in Gmail2 throws Resources$NotFoundException

Change-Id: Iadb7a58b036a823e46b8844f6de9b21e72ad0125
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
0abee55d48f4b7c9f2fefa59d88726ee06c2a4b9 30-Aug-2012 mindyp <mindyp@google.com> Cut the number of calls to Conversation<init> in half

We were doing this at the beginning of getView AND during
conversationitemview.bind
Cut the time for getView from 33ms/call to 18ms/call

part of b/7081730 Fling in Gmail inbox view is janky and frame rate dropped

Change-Id: I36bb19e479b8fb5dad449c88e6df33a310965350
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
4f0814f1957b2607a6243db587aa8d6e7f1fd982 30-Aug-2012 mindyp <mindyp@google.com> We really don't care about getting item view type

We manage our own views in hash maps based on id

Part of b/7081730 Fling in Gmail inbox view is janky and frame rate dropped

Change-Id: I207bf6650e4130c1f8e5c123f5735d2e64235e0e
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
215d2a465dd17139d4c8cce426ae8c8ff556746e 28-Aug-2012 mindyp <mindyp@google.com> Get conversationcursor from adapter

get the convcursor from the adapter
fixes b/7065755 Crash in Gmail2

Change-Id: I8156adbe2cfdd05563bd25be366c7bdc2df39580
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
aa55bc9cb210a46a950874f368baa07f041a4302 24-Aug-2012 mindyp <mindyp@google.com> Make sure we commit without animating when show a new conversation.

Fixes part of b/7045548 swipe bug
Otherwise, the animation doesn't run and we lose this
Part 2 is going to be to add an ondestroy to the converationlist fragment
to make sure that we always commit if the fragment gets destroyed!

Change-Id: I6bb8f04df75eb38dfe38ee4c9e0930d51035ada6
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b66c010296d35e111f4c5952ff826ddcf1cbe444 24-Aug-2012 mindyp <mindyp@google.com> Make animations smoother.

when we are shrinking existing leave behind items, don't also
try to fade in the text for the new leave behind item
too much at once
Makes it smoother

Change-Id: Iabd026b8389c67ec8b7a840d7c2c00af0a6eed34
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e85b8cdf23ba579246a1c8c3774687ca614eb39b 23-Aug-2012 mindyp <mindyp@google.com> Use id not position

conversation positions may change
but id's are forever

Change-Id: Ie22b9c9642ae014d16caf6baa847f84c55845705
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
bf3670215508a54c767c9e038d66f4bdff56435e 21-Aug-2012 mindyp <mindyp@google.com> Make animations work for fade leave behinds again.

Change-Id: If3f4db4d32dd8ea5c381ecf4e3363af74bdc5ee4
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
480ee843f00d90048a577862ce41dc56d5dcd660 20-Aug-2012 mindyp <mindyp@google.com> Actually commit the items that are out of the visible window

Yeah...instead of just nulling out their spot, get rid of them
permanently

Fixes b/7019133 Archived messages reappear in message list

Change-Id: I28088cfce14028f33c24b109f184c154c5afe92c
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
2191b188f1b7840f7adc3c12eef6115eeee6435c 12-Aug-2012 Mindy Pereira <mindyp@google.com> Animate out the existing leave behind when we commit it by touching another item.

Change-Id: I065727197d42a73ca63d387224b1c876318104b0
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
8f39702ca9f9bea23d27a46a288cd6f6660de447 12-Aug-2012 Mindy Pereira <mindyp@google.com> Make sure we can have > 1 fading out leave behind items

A user could swipe a conversation away, and then just keep swiping
We need to make sure that as they do that, we have the old
fading leave behind items keep fading out and just add new ones to the list.

Removes a few unnecessary styles.

Makes sure we don't restart animations on fading leave behinds.
Change-Id: I8927339a9c4d78304b98f2322fdd7c5dab484cdb
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
cff1aeaff92efb9f7a03203d9f757a2820b87686 10-Aug-2012 Paul Westbrook <pwestbro@google.com> Refresh cursor even when scrolling

This allows the "Loading..." item to appear before the
user stops scrolling the list. If the the live data is
populated before the user hits the end of the list the user will
not see the "Loading..." item

Bug: 6966755

Change-Id: I902eb442e47a6efb99b850a559106c81acac19c0
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
69e88dd6779a8f88212a049d49d69503cd746ef7 10-Aug-2012 Mindy Pereira <mindyp@google.com> Dont refresh while we are doing animations.

Change-Id: I8b470a4227b7e8d97bfcef84b32489308426be49
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
9a604d0a4bbf41e9c287c5138b3f10db4b60f6c2 09-Aug-2012 Mindy Pereira <mindyp@google.com> Animate away the space when dismissing a leave behind.

Will likely use thsi method when dismissing by tapping another item
when still in conversation list.
Fixes b/6948666 animation for dismissal of archived "stub"

Change-Id: Idcb13d8e3fbebccd4a01b54513e251d00fd1076c
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
c79aec78d06928b3fa1464d6aed60019f9b4843b 08-Aug-2012 Mindy Pereira <mindyp@google.com> Ah hah!

So the issue seems to be related to a few different things:
1) we are trying to use views that come in from the selectedconversationlist
which may not be attached to the list view yet (or at least not this list view!)
when we go to try to use them
2) that means, they can't get us the corrected position

There is also an issue with swipe -> delete out
Need to move the swipe animation (to the left) into the AnimatedAdapter's control
and have the AniamtedAdapted manage which positions are swiping
There seems to be at least one case where we are getting an unexpected type
in the animatedadapter, so check for that!

What was happening was that the view we were getting back from ConvertView
was NEVER getting onDraw called
If the usre tapped it, they would see the right item really WAS there

turned off the slide animation when doing archives while I move it
into the animated adapter == no more dupes
Change-Id: I01c7939292ebede78c9bf83f00eaa440f65f4e01
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
42f50721b10913c00f16066f6000094a79bdffc8 07-Aug-2012 Mindy Pereira <mindyp@google.com> Check for class cast, add more logging to try to catch NPE.

Part of b/6930375 Crash on Swiping to archive few messages in quick succession

The only way we are going to get a null view when iterating via listitems
is if we return null from getView() in the adapter
Figure out when/ how we do that

Change-Id: I30442219d0139f342780f52932999ed3a6c543c9
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
33519c002b7e4504dbf964a808cf2f7aff32d16c 01-Aug-2012 Vikram Aggarwal <viki@google.com> Priority Inbox marker support for Conv list

Change-Id: I4cc99ca5df4cdf50c997951d3d84e69d5c5ab1b0
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
847b0a7389ff404dc77cf8ca0cb8e26768db58e3 31-Jul-2012 Vikram Aggarwal <viki@google.com> Settings changes require redrawing

Fix b/6374925

Change-Id: I197006fe4946c569d19e0019b188bc338a5ff0b3
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
192fac189e6aed434556a4e37bd3c5c29ef02f29 26-Jul-2012 Vikram Aggarwal <viki@google.com> Eliminate some poor pager/list/destructive action interplay.

Change-Id: Ib7f3a7dfd194fe7f5df0f59b5b2989d31b55a631
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
79e6a0830cc23deb9ba7be07d4ec5b5235a3398b 25-Jul-2012 Mindy Pereira <mindyp@google.com> Restore leave behind items on orientation change; only 1 leave behind.

Since there is only 1 leave behind at a time (2 leavebehind types,
1 that is fading away, one that is not), get rid of the complex
hash maps and just use single variables.
Change-Id: I67611dadd709a484239a2041c2df3f8797dc9170
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
90632fd0e48a4e9f077b5fc58ef9a11bfe09c67f 25-Jul-2012 Mindy Pereira <mindyp@google.com> cleaner

Change-Id: I2f0b601cf8450175f42f228a341e761c8c03c0f0
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
06b623852cdacc749d67d9c1b7c478dd52780297 24-Jul-2012 Mindy Pereira <mindyp@google.com> Make sure to clear old cached undoing items when committing leave behinds.

There is no reason to keep them around if the user can't undo!

Change-Id: I337deaa852ab3700578b55ab56443997520a0daa
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
1ef988f0c8be136fda75ed207c222413db1d3f0c 24-Jul-2012 Mindy Pereira <mindyp@google.com> Add a black leave behind peeking out behind a swipeable item.

Change-Id: Ib5e90fee11899710e5ce9ca547003530ee56ca1e
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b8ef4ac43f3570245ec476e2ee9f8a9d1d3ff36c 17-Jul-2012 Paul Westbrook <pwestbro@google.com> Prevent NPE when rotating conversation view on Prime

Change-Id: I266bd1524b061cdc3286a87d0921db7e9ff5ae1b
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
d3367499e56116854ed637b1036fd71057ac0f49 26-Jun-2012 Mindy Pereira <mindyp@google.com> Make it possible to restore undo operations.

Conflicts:

src/com/android/mail/ui/AbstractActivityController.java
src/com/android/mail/ui/SwipeableListView.java
src/com/android/mail/ui/UndoBarView.java

Change-Id: I42441c60e9ab7aff8f4c07dd21d03d2e419b2d0b
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b334c9035e9b7a38766bb66c29da2208525d1e11 25-Jun-2012 Paul Westbrook <pwestbro@google.com> Changes to support different Log tags

Change-Id: I7121fbf7132444fc0f5c0c130373e3f2d1a3cf7a
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
c30fe4172676a5ea3fdc0da8a0fbb917d9cf878e 18-May-2012 Vikram Aggarwal <viki@google.com> Call it archive rather than y_button.

Fix b/6482584

Change-Id: I7cfc511eb582a0379e92a15d4e2740777b932d4f
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
81e157a8686e7d1831ccd653327a49eaccda1e0e 25-Apr-2012 Mindy Pereira <mindyp@google.com> Turn on swipe in animated adapter.

Force all apps that support undo to use the new touch handlers.

Change-Id: I6055aab1fc8a91782a1cee296ed3e056e81efdb4
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
bf232c3735f65b1a4746943e4a134e59e36f0bde 18-Apr-2012 Paul Westbrook <pwestbro@google.com> Major refactor of ConversationCursor

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

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

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

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

Change-Id: I0eb554615b4bf93b3547ff28e2bd5913e8703a97
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
7d81600cbce3cfd366cbff9ecd1b7317ff957221 18-Apr-2012 Vikram Aggarwal <viki@google.com> Update consumers on changes to Settings

Change-Id: I96ed21a16c0dfb290198d2236fee8d21e299ec31
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
bf128ebfb9aa53d28118e7143d5674e506fedfef 19-Apr-2012 Marc Blank <mblank@google.com> Revert "Controller/Adapter/Cursor refactor"

This reverts commit 67cc73a0ff9bd1c77f84c4af94f6d95f5bdcf490.
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
cc56aedf66dc691a9fe718c6ca4e61e2b7349eec 18-Apr-2012 Mindy Pereira <mindyp@google.com> Fix class cast exception when footer view may be showing.

Change-Id: I51ed34293ba3e53e9b11ed440ce434653213e74d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
1e2573bbba613fb700e8fa01c58c9382c0027b5e 17-Apr-2012 Mindy Pereira <mindyp@google.com> Commit leave behind properly on pause.

Change-Id: Ia12e60c2d7f5cc6587373f25b80ac2342533b0e4
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
dea5d77be4c6601b461b45fd06a92bb3e44b8810 17-Apr-2012 Mindy Pereira <mindyp@google.com> Commit previous leave behind when creating a new leave behind.

There are other cases for clearing a leave behind, so I created
the clearLeaveBehinds method on the adapter.

Change-Id: I476114f4c4dd03aab5fddf1a574987da92a00db7
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
6c72a787b58a0bc3afcb71093eddf8c29d1cf5ed 07-Apr-2012 Mindy Pereira <mindyp@google.com> Show leavebehind after swiping away an item.

Change-Id: I3bae79ed5bb8919985dbfa6e81416da980281cff
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
464939499eec4c4d6fd728e75598232b5948a184 13-Apr-2012 Mindy Pereira <mindyp@google.com> There are 4 types of views in animated adapter.

Change-Id: I355322ee0cf189d6af7f10c7f8fe8e1b18ee35c8
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
a41baad67f0e49a53e67ae560d130dc463bba4f8 13-Apr-2012 Mindy Pereira <mindyp@google.com> Create another tracker for undoing animating items

There are 4 kinds of items:
1) regular conversation item
2) footer
3) deleting item (class is animating item view)
4) undoing item (class is conversation item view)

Change-Id: Ie9c14dde124bd0d9e0463429d3f750f8eeb16ef2
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b54a46756017c81a9f253df4d4e8f967f137f803 11-Apr-2012 Vikram Aggarwal <viki@google.com> Recycle views in AnimatedAdapter

Change-Id: I47d0ec26d827282ae21529837655d260cc99522b
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
04dc819886abc2e4f56e644b03449e29cdbae2d0 09-Apr-2012 Vikram Aggarwal <viki@google.com> Do not clear selection for non-destructive actions

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

Change-Id: If80c43fb5643d328bf061c2bed87bd9acb6e4661
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
07118a01f7183645957010779222b84930f75b4e 03-Apr-2012 Mindy Pereira <mindyp@google.com> Make batch archive conversations fly out to the right before shrinking.

Change-Id: I0a62d837acf0e41ad6fe012a87dbde29e0cf2f17
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
cff4a2b2e92258c6c85ed4af15bc13101aa71170 05-Apr-2012 Mindy Pereira <mindyp@google.com> Improve swipe mechanics.

Make it harder to trigger a swipe by adding a min distance.
Change-Id: Id4dcd0dca0201e47ba95f319c494b134f87befeb
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
d3651a6ad41c1451e90f538b9f66afb008a44216 04-Apr-2012 Mindy Pereira <mindyp@google.com> Override getItemId/getItem in AnimatedAdapter to account for the footer.

Change-Id: If5a53fc9dd86ce91f97ad4f5030b96180db07429
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b6b174fb3a8f58a2c81e035917ebad8ab45b88ae 04-Apr-2012 Mindy Pereira <mindyp@google.com> Respect hide checkboxes; tap and hold to add to CAB group

Change-Id: Iaddd1dbbfd1a0e3c07ba1ffcd6a4e4368ad0e294
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
441ae2aa5ab451d68299a39e4ef6206567db863b 03-Apr-2012 Mindy Pereira <mindyp@google.com> Turn off recycler for list items.

Change-Id: I2aae67e7014cb62a923751124f20770beb009003
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
66bee6e884dc7f6c6f880fc0213bbd5e4c23e476 02-Apr-2012 Marc Blank <mblank@google.com> Only animate deletions if at least one item on screen is deleted

* This definitely addresses the first bug here (delay when deleting
multiple items; the bug occurs if all deleted list items are off-
screen)
* This probably addresses the second bug (downsync is delayed); this
would happen if the UI were waiting for deletion animations to
complete

Bug: 6268890
Bug: 6263660
Bug: 6212034
Change-Id: Ia683e35a050da8045401f7410233227afb1948ce
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
2ae81266ced36f2733ceab5a09c17ec939b9a62a 28-Mar-2012 Vikram Aggarwal <viki@google.com> Gracefully degrade on incorrect view in ConversationList

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

Change-Id: Ifc8152d0549bc0eb4eb09fe6ef44fd5f07b3279d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
0fc15747458eafd0e2f7bd3274f19eb40c52308e 19-Mar-2012 Mindy Pereira <mindyp@google.com> If we arent showing the conversation list fragment, dont bother to animate

Just call the action complete listener directly.
For now, just pop the back stack on destructive actions.

Change-Id: If269f4594080f28070f7ca6b580422af73dbad42
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
afd6f9246ddf645a45c8e91df5c5c2587cbf6a0d 16-Mar-2012 Mindy Pereira <mindyp@google.com> Correct the state of recycled views before reusing them

Swiped conversations have been translated and faded.
Change-Id: I5526e2568172b3f20a444ee06a71f966e0789d8d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
6529023dc8c204bfd83a3805158342d1a5e21f43 16-Mar-2012 Mindy Pereira <mindyp@google.com> Turn off the recycler for now.

Need to put in Adam's transitional object tags.

Change-Id: I8dffffc86768d7e0ab8017fd7ec72c8d920ee4df
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
397621b93f83f8933f7a29a9b6d7fe2b88ec4008 15-Mar-2012 Andy Huang <ath@google.com> Get 'mark read' from conversation view->list working (barely)

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

Change-Id: Ia465b90733f1cd19dc890a82ca4506178d840f04
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
b5080d5335d2aa445a660ad426ab008750be24cb 09-Mar-2012 Mindy Pereira <mindyp@google.com> ehow folders in conversation list items if they exist in the layout.

Change-Id: Iec0198f7eab014c71d66e1c026942988d985f1e9
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
276c80bb3ca7cff5f2a0511e8a9d0452ae91d858 09-Mar-2012 Vikram Aggarwal <viki@google.com> Moar cleanup

Change-Id: I2ec187ec05d14000edbfff22acf2b8ff251530fb
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
f96ec32ba61bac2a7635f6ef6e04a78cc63cfff8 02-Mar-2012 Mindy Pereira <mindyp@google.com> Fix spacing, styles for conversation list items on tablet.

Also, make sure we have the correct view mode. It was not
being passed to the adapter, so the conv items never knew
if they were in conv list, conv, etc.
Change-Id: Ib55231e9b04dcd507b134a0947c14352ba71cf51
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
415d31b64022be2bb45f6353d8251fd2e2b87d41 02-Mar-2012 Marc Blank <mblank@google.com> Make sure we sync() after finishing server-commanded deletion

* If we don't (as now), updates don't appear in the UI.

Change-Id: Ie8f2fdddd70cb340d603bd4811ac77ec26a2b5b5
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
a831b2f1ba6d3c18d5e54563df8bae1f589c4257 24-Feb-2012 Mindy Pereira <mindyp@google.com> Use a constructor to create a provider object.

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

Change-Id: I49655b4ed013fb4dd47cdefea0bfd850a3fa4517
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
674afa42682908640167fc6109b76f6f843e6fbe 17-Feb-2012 Mindy Pereira <mindyp@google.com> clear undo when tap outside of it in any screen.

Some funny business with relative layouts and z-order
and the undo bar. will fix that in a second cl so i can
animate in/out undo bar.
Change-Id: Ia4d3684ff26563e56b09cafb9ee25980162d1168
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
fe06bea4de68a072b0e5a0fc7cefcdfa96143a8f 16-Feb-2012 Mindy Pereira <mindyp@google.com> Make conversationlistfragment a listener on the conversationcursor.

Change-Id: Id8c349d7921ac3f54974f2b402de90b90704fc94
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
c7d201d79974fd0f1e935880d51fe516f78207a2 15-Feb-2012 Vikram Aggarwal <viki@google.com> Remove unused hashmap and recycle animating views.

Change-Id: I791b03b2fcc25e3cde4373e2c2a529be195c8527
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e14ca5ed9a0ac5749800f2e35e5f7a55c62b221b 14-Feb-2012 Andy Huang <ath@google.com> use a SparseArray instead of integer hashmap

Change-Id: I378fb9b1fb0aa91328c70e9d0b444708ac29c6c4
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
d247dc966bca1ed303039c2893c54979d448a336 11-Feb-2012 Vikram Aggarwal <viki@google.com> Allow batch selection of conversations.

Change-Id: Ibaa7e96154b8c433651d9e8ef68f7973b92b7ac9
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
13e53db5b18d427e3e1d7718baa81bf3d7b02558 03-Feb-2012 Marc Blank <mblank@google.com> Remove erroneous throw

Change-Id: I21eb445f82a467c6feba3b1ae6862ea60566c0ef
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
dd10bc8736282262da0cd9a5f9a0236c10b47028 02-Feb-2012 Marc Blank <mblank@google.com> Don't recycle animating views, etc.

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

Change-Id: I79867e1ce562246eabecfd1c4eff686647578503
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
92cabad0c4563e053540e28a9eed4a77ddc850f0 31-Jan-2012 Mindy Pereira <mindyp@google.com> Make sure after animating items finish animating we update the list.

This clears out all the animating view items that may be hanging around.

Change-Id: I90f8f5bec67402fed6a8e454fac0cde909250923
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java
e508a7b19fd993ec3e1c37ef79f4a013114e12c8 31-Jan-2012 Mindy Pereira <mindyp@google.com> Make sure the background is shown when deleting.

Change-Id: I7d52b79920ca1a93bd284103dc612e38fbc8d806
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/AnimatedAdapter.java