History log of /packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/ConversationPositionTracker.java
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/ConversationPositionTracker.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
baeb383d387fac29b340a819c0760b94c67f1a51 20-Sep-2012 Vikram Aggarwal <viki@google.com> ConversationPositionTracker should return correct position

If the (mConversation, cursor) tuple hasn't changed since the previous
call, current position is not marked dirty. In this circumstance, we
should return the current position rather than an invalid
position. This bug broke auto-advance.

Fixes b/7202539 Auto-advance not working in android gmail from bazaar

Change-Id: I5aeed03f877dfe0f50edfce112e1d45ec29a61ea
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
17f373ecf6961112f77a7516ab1bbcb4fcdf2884 18-Sep-2012 Vikram Aggarwal <viki@google.com> Conv. list CHOICE_SINGLE, highlights conversations from widget launch

The problem lay in the complex timing dependency between obtaining a
ConversationListFragment (not available immediately after a Fragment
Transaction), setting conversation.position (the tracker was only
calculating the position on requests to next/previous) and updating
the CLF on cursor change (the call to AAC.getCLF failed on the first
conversation cursor load).

The solution is for the CLF to rely on mConversationListObservable to
obtain cursor changes, for the position tracker to calculate the
position when initialized with a conversation, and for the CLF to set
the list's selected position when the cursor is updated (if it hasn't
been set already).

Also, the CLF uses selection to highlight, and CHOICE_MODE_MULTIPLE is
the incorrect option. Using CHOICE_MODE_SINGLE allows us to avoid
calling clearChoices() in CLF.setSelected(int position).

Partial fix for:
b/7145111 item not highlighted in inbox list when open message from notification

Change-Id: I955d83b44b471ca9d4424e779f854bb664036833
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
44c1571a6a81eda7dd508f74b64adae1e124101b 09-Sep-2012 Paul Westbrook <pwestbro@google.com> reduce network request

Don't allow the ConversationSelectionSet, and
ConversationPositionTracker to trigger a network requeste when they
are trying to revalidate an updated cursor.

Since the cursor is not making network requests, it's state won't
change so the UI will not get an update for that cursor unexpectedly

Bug: 7131799
Change-Id: I67e94e6f3872da695916defd745aa506fef79aeb
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
a13b3742522987f768ef9a1a1cddd32ff8105f0e 08-Sep-2012 Paul Westbrook <pwestbro@google.com> Handle background updates to items in selection set

If an updated conversation Cursor removes some of the conversations
from the selection set, this will update the selection set
appropriately.

Bug: 7117871
Change-Id: Iada76d998f1d04808fa2d828348f58c1ba4d0386
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
937c94f025ed55c19bd46c7c077fa3575ab6be52 16-Aug-2012 Paul Westbrook <pwestbro@google.com> Prevent use of disabled ConversationCursors

1) Change ConversationPositionTracker to get the ref to the
ConversationCursor from the AbstractActivityController
2) Make sure to notify the position tracker about changes to the cursor
in onLoadFinished

Bug: 6994143
Change-Id: I1d1e38852bb6cec1bc254b099c52f04bbe3af99d
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
8f23bba2805f50315181abee153116ad4f78a01b 31-Jul-2012 Vikram Aggarwal <viki@google.com> Pass fewer variables. Reduce visibility.

Change-Id: Ic56f523794ffcd9d8f95ac07c08eee0d63d6afed
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.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/ConversationPositionTracker.java
7dd054e39986de84a213c56a3c11ac94731402e6 21-May-2012 Vikram Aggarwal <viki@google.com> Fix auto-advance on tablet.

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

Fix b/6516141

Change-Id: I7a023ff50415347a9cdaf4bd5a9f24fe89f7530e
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
025eba8bfd4d0b5e248b6de0bda6f1129170fb41 08-May-2012 Vikram Aggarwal <viki@google.com> Always read settings from the account

Since settings are a member of the account, read them from the account
directly rather than keeping a copy. Also, stop passing Settings if we
can pass specific values within them to limit the visibility of the
class.

(Nobody likes settings...)

Change-Id: I0b4ee83f7396c9205169e89838e0121ee17232f5
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
c3dea01d8f375f743f10203197662536d404dbd6 27-Apr-2012 Vikram Aggarwal <viki@google.com> Rely on ConversationPositionTracker to calculate position

Change-Id: Ie7a11c6134d69c5755242f5cb175e8429334e8b1
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.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
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.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/ConversationPositionTracker.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/ConversationPositionTracker.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/ConversationPositionTracker.java
af1ee0c4b6258530d8da30bcdb2a9cb403f70d5e 13-Apr-2012 Vikram Aggarwal <viki@google.com> Conversation Position Tracker used for destructive actions

Change-Id: Id860fa76adbf28f013354506741c61a809a0ade7
/packages/apps/UnifiedEmail/src/com/android/mail/ui/ConversationPositionTracker.java
135fd02e74ea8449b36c3dc44cd796e06a7e714d 11-Apr-2012 Vikram Aggarwal <viki@google.com> Hook the conversation position tracker

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