History log of /packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
87a8982af83168453b6dc219fe984bff68047beb 15-Aug-2014 Andy Huang <ath@google.com> Peek mode for 2-pane landscape

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

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

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

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

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

Bug: 17291366
Change-Id: I24f71a2b7985773814d8caad9f3ab3fe5c3609c8
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
18512bd09af3a5e3d6e8ae2789a40968aa5e8f07 04-Oct-2014 Rohan Shah <shahrk@google.com> Fix TL flicker before CV shows upon opening notification

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

Bug: 17808571
Change-Id: Iadabdfa6ec913b1f5f9979dfe50c74eaeb51d326
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
f59080ee7ddbb986a295a14578b55f17a10cff4a 29-Sep-2014 Rohan Shah <shahrk@google.com> Add fade in transition from TL to CV

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

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

Bug: 17304654
Change-Id: I24e977eb6bd335f4f6764fef58b549e7cf0edfe3
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
ccf9a34bcdcfdb884799ea3f3ecbd425970f26fc 05-Sep-2014 James Lemieux <jplemieux@google.com> Add support for disabling email sanitization

b/16896849

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

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

Change-Id: Ia265180893dbdd9ef209d3ee6ea87c7eb468e6b3
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
0b69338a45faa422ccba8faf64c9816c55d33e4a 11-Aug-2014 Jin Cao <jinyan@google.com> [KBNav] two-pane landscape navigation polish

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

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

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

b/16636060

Change-Id: Id1de01439a118702756d52f6a8b3f02395a0f932
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
f58e4c3c942033fce12b5f75f9e4d9e708c9ea6a 10-Jul-2014 Andy Huang <ath@google.com> mini-drawer. new tablet UI.

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

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

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

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

Bug: 16147175
Change-Id: I021aaff15afebb76db6722265e2a592213674405
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
eb58a092961773a8da67c0e0dd5770346381d938 24-Jun-2014 Andrew Sapperstein <asapperstein@google.com> Updated conversation header for quantum CV.

b/15595931

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

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

Change-Id: Ife32339f174bff7beafc979f9cc9761cefffed72
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
59ccec3db4710f2aea6a4a9a30160ad19331367d 19-Jun-2014 Andrew Sapperstein <asapperstein@google.com> Remove borders/cards from conversation view.

b/15595931

Change-Id: I51b5ce1d9387d6354d421b0e399a2003c6e84c54
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
aa27bc0e1c3bb6be4609b00007637a9d3e960f5e 02-Aug-2013 Scott Kennedy <skennedy@google.com> Fix more warnings

Change-Id: I78c6df845aae3475c1e2469b29b52cc995d8d3ae
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
3213ffdac10adb0905cb5440c725345979d4eacf 27-Jul-2013 Andrew Sapperstein <asapperstein@google.com> Eliminate a layer of overdraw in the pager.

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

Change-Id: I4b5c473f3d8419e8e599609e82a5d8d5dcfb97a6
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.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/browse/ConversationPagerController.java
d6ce2fef197dce0f294e5565d9753aac894979db 17-Apr-2013 Andy Huang <ath@google.com> fix ISE upon rotating in detached mode

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

Add some logging (off by default).

Bug: 8494843
Change-Id: I88f3bdd0e4ac4fa3b335e60089282b2aa2113935
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
ad8b99b26bf9eff7730ab733cc8ef8b0710a9e0e 08-Apr-2013 Vikram Aggarwal <viki@google.com> Remove the subject from the actionbar

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

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

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

Bug: 8529168 Remove search_actionbar_view

Change-Id: I8551fdacd7843ca0b2ba0bf1025483eee2587638
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
2b288b35b1823eab3817cac455d6f784e65b5623 20-Mar-2013 Rohan Shah <shahrk@google.com> Fix folder & account name not showing on back

ConversationPagerController was clearing the action
bar's title/subtitle instead of immediately updating
it after the user went back.

Bug: 8428307
Change-Id: I6e6df13d37f7634328b01fd025222aac04e4c3a6
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
243c23618b066bcdcd0ab9e36d8c01f50db2cbd0 02-Mar-2013 Andy Huang <ath@google.com> simple instrumentation for conversation load times

Bug: 8284691
Change-Id: I5273649165709425d6ce1d9e29b56bae037a7604
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
9e4ca7993213d296043d20fe9cf4e166b5d595e8 28-Feb-2013 Andy Huang <ath@google.com> better logging of conversations, folders, fragments

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

Change-Id: I15fbb944128d5fed18086a2eae33f080bff9117e
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
2821aeaa8c06011d67344a0232079a69bd003ef8 27-Feb-2013 Andy Huang <ath@google.com> fix spurious 'mark unread' upon archive/delete on tablet

On tablet, when auto-advance is set to list, destructive actions
were having the side effect of marking the following
conversation read because the pager adapter no longer stops
listening during the transition. Let's bring back that behavior,
since it's generally a good thing to avoid changes during the
2-pane mode transition, but tweak it to placate ViewPager's new
dataset change requirement. When we stop listening, rather than
de-facto and unnecessarily switching to singleton mode, keep the
cursor around and use it as normal.

On the off-chance that we actually miss a real dataset change
during the transition, save off and use a frozen version of the
dataset count to placate ViewPager if it happens to ask for the
count during the transition.

Bug: 8272000
Change-Id: I9f52a50903eb5a7eb5c665b2573eb9b2d0d91c67
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
53bd9729c62572c47bc877cb2fc6192060418a92 14-Feb-2013 Vikram Aggarwal <viki@google.com> Preserve adapter on view mode changes

Currently, we stopListening() to conversation cursor changes on the
*start* of a view mode change from conversation mode to conv_list
mode. This has the side effect of changing the CPA.getCount() from
<whatever> to 1, since we don't have a controller, and thus cannot get
the count.

Change stopListening() to do nothing, while preserving all callers.
This should fix the crash with the side effect of jank in rare cases
where a conversation cursor update comes in during the transition, and
knocks off all three conversations that the pager created fragments
for.

A subsequent cleanup cl will remove callers and beautify associated
code.

Bug: 8190963 Tap/Select back key before a message is read in Gmail
conversation view shows IllegalStateException

Also fixes a UR8 bug:

Bug: 7560864 ConversationPagerAdapter: Null cursor and conversation
has non-zero position

Change-Id: I60976f65eaa820515d023526a508b582d59dfaa0
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
d00f346a1b0b1ea3a1029ed95c9beb693b418187 29-Sep-2012 Andy Huang <ath@google.com> add gutter effects to conversation pager

Bug: 7255962
Change-Id: I85e649809e7c0f58f53bd9749844fa5eae841949
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
9d3fd92ed6091dbd0d38799222a1cf841f1c3f29 27-Sep-2012 Andy Huang <ath@google.com> Wait for visible conversation to load before loading others

add conversation load observation APIs to CLC interface
save/restore CVF user-visible flag
move CVF state restore to ACVF's onCreate
start using FragmentRunnable to avoid doing work too early
(before ViewPager settles)
clean up unused onConversationLoadError codepath

fixes undefined conversation load order on rotate
improves conversation load speed a (tiny) bit

Bug: 6268986
Change-Id: I4670d0c04cb1a36d5aa2c5355e2a79de17d042dd
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
77fb5be70d76f22a64850aa7a40f6a9553960e4e 27-Sep-2012 mindyp <mindyp@google.com> If the conversation is detached, dont optimize moving to another conversation.

Jumps back to conversation list or first conversation in list, but tapping
next conversation works as expected.

Fixes b/7113908 pager's detached mode doesn't let you select a new conversation in 2-pane landscape mode

Change-Id: Ic3bad6739df04aa9b7b9fb2db3fb683355071691
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
7d64612104fd861474a09994f13768360f92041d 06-Sep-2012 Andy Huang <ath@google.com> avoid doing fragment work during pager swipe

Pager swipe was triggering immediate fragment transactions via
mark-read, so just don't call onConversationSeen so early.

All that really needs to happen immediately when swiping is:
a) subject-in-actionbar should be updated, and b) conversation
list highlight should change. Do both of those now in
AAC.setCurrentConversation, and do only that.

Bug: 6976876
Change-Id: I1f679627b36d25faabc27eb7dc9dac191aab1d7b
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
a3ed834c959ece3453c1b34953fabecb3b19c424 01-Sep-2012 Andy Huang <ath@google.com> new two-pane layout

New, simplified 2-pane ViewGroup.
This version shuffles three panes around, like the last one, but
also supports other floating children like any FrameLayout
would. The animation is now done using ViewPropertyAnimator.
The cross-fade of the conversation list is now done with a
separate "copy" view (ConversationListCopy) that's animated in
tandem with the real list view.

Bug: 6963808
Change-Id: Icee580f663a50537874c1f98e9bbac822f58e571
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
3825f3d2284b2b57fadcfe6a4ebd9992f3c5c7bb 30-Aug-2012 Andy Huang <ath@google.com> fix spurious stopListening on the pager when loading from widget

When loading from a VIEW intent, the pager was sometimes
disconnected from its data source before the data was loaded,
which caused it to stay in singleton mode forever.

The original code to disconnect the pager was intended to
disable pager updates when jumping back from conversation mode
in 2-pane (via account spinner), so move that call to the
beginning of 2-pane's mode change animation.

Also do a bit of misc API cleanup.

Bug: 7076780
Change-Id: I508b59816f4f537276aa103b9dcae51972389eb0
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
2e0a2369f74b74e15b5dc35a3bdecba2dbd66436 22-Aug-2012 Vikram Aggarwal <viki@google.com> Pager Controller stops listening on account changes

Fix b/7030408

Change-Id: I3d1a52a5bc8699c74f7031f8dbd593791591b780
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
87cf662c9c6c87e7f40dab6545c41484a7e7bfd3 10-Aug-2012 Andy Huang <ath@google.com> fix conversation view restore

Singleton mode is not ready yet.
Restoring should not re-enter singleton mode (the fragments
and loader info will all get restored anyway), so this will
have to wait for a restore-specific Pager.show codepath.

Change-Id: Ifd9f4752d9086848f75f5186fb569c892de44cb4
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
68459a7b3265da5002ff331529f12f6b408c9b03 10-Aug-2012 Andy Huang <ath@google.com> Enable "singleton mode" for the pager, fix older/newer

Dataset changes mostly work, so now it's safe to start using
this optimization. Loading the initial conversation in singleton
mode forces the current conversation to load first, and only
loads the left/right neighbors after onPageFinished fires.
This change causes the title to initially be blank; underlying
issue filed as b/6963866.

Swap older/newer strings.
Disable title text in singleton mode (avoid "1 of 1")

Bug: 6962522
Change-Id: Id0b210be9d650e70a90403384ac5be64adc8e251
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.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/browse/ConversationPagerController.java
090db1ec6fef366ab9e319040a00eca078ed41c3 25-Jul-2012 Andy Huang <ath@google.com> fix total count in pager title strip

Add an interface for AAC to allow other components (like the
pager adapter) to keep track of the current Folder as it
changes.

Bug: 6877338
Change-Id: I8c0bae0f6ef3bc6fc7b115b013816a458bc95226
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
dd43af4c9b0450350b65bf77fe87f4680b6a786f 18-Jul-2012 Mindy Pereira <mindyp@google.com> Since this gets called as a result of onPageFInished, it might happen
after the fragment/ view is destroyed.
Do a checked before updating the pager.

Change-Id: Ic232980b26f632dfb4c7f58ddeec357dd5f79078
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
b373e3ec0e488914635345627f5734af0f0ef76b 30-Jun-2012 Andy Huang <ath@google.com> short-circuit 2-pane conversation selection within a folder

Just shift the existing ViewPager around when switching between
conversations in the same folder. Was previously resetting
ViewPager in this case.

Change-Id: Ib6d213ee71f12c34d03deefe576e91ccf520314b
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.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/browse/ConversationPagerController.java
5895f7b0e5fa921f6d46bbaf6d8c7b1a8ebc7804 02-Jun-2012 Andy Huang <ath@google.com> subject in actionbar

Mostly a port of Gmail1 code. New and noteworthy:
* when switching between ActionBar list nav vs. custom display,
toggle ActionBar.DISPLAY_SHOW_CUSTOM rather than messing with
custom view visibility
* This exposes something of a framework bug where collapsing
an action view will leave views for all inactive navigation
modes GONE, which I work around for now (b/6664203).
* ActionBar views were being inflated with system default Holo
theme due to application vs. ActionBar context (wrong theme on
the application context). Fixed that and un-inverted some
existing styles.
* SnippetTextView: save off the last measurespec rather than
inventing one as before.
* bring back an existing excellent behavior: since
PagerAdapter.setPrimaryItem reacts too slowly to nicely
change the action bar subject when paging, listen for
OnPageChangeListener.onPageSelected in addition.

Bug: 6384157
Change-Id: I45d995a472d4b3c71f1371dc7b993923423b7cf7
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java
22ecc77345c86e0515c1f3c3447502c25c8c53d2 17-May-2012 Andy Huang <ath@google.com> implement view pager bottom position bar

Use a PagerTitleStrip.
pro: titles are now animated in the standard fashion as you
swipe, non-primary titles are darker in the standard
fashion
con: had to work around somewhat unsuitable API to support
dynamic newer/older titles

Bug: 6498423
Change-Id: I8102dc328626951b08d3986eace5a1caa7db1acb
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.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/browse/ConversationPagerController.java
632721e6b3a9ba8c476456f2e0fb1b564561e0b5 12-Apr-2012 Andy Huang <ath@google.com> conversation paging

This CL takes the approach of using a permanent ViewPager that
pages through conversation fragments. Its adapter is only
set and populated when the conversation view is shown. In all
other cases, it is an inert empty layer.

One risk with this approach is that it breaks with the typical
fragment transitions that all other content panes use.

On the other hand: conversation fragments are full-on fragments
and benefit from loader separation, and the FragmentManager
takes care of save/restore of state.

Change-Id: Ic17d1ae3f35a0cb1119967f2d34433ad27fa307c
/packages/apps/UnifiedEmail/src/com/android/mail/browse/ConversationPagerController.java