- Moved MessageOrderManager code from 2-pabe to the base class.
- Most of the code is shared between 1-pane and 2-pane.
- Also fixed the bug where we re-created MessageOrderManager every time
the user taps newer/older, which was the reson the newer/older button
temporarily got disabled when you tapped them.
Before this CL we stopped MOM in uninstallMessageViewFragment, but now that
we don't reuse fragments this means we stops MOM when we remove the current
message view, and re-created a new one when a new message view is created.
Now we stop MOM when the right pane gets hidden (2pane) or when showing
the mailbox/message list (1pane).
- Also removed a now unused callback onMessageShown() from MessageViewFragment.
We used to update MOM on this event, but now we do this in
installMessageViweFramgment().
Bug 4575586
Change-Id: Idc4aba184f318e0c086afc29dcbe42364e2b51b3
- Now that fragment useage is simplified (e.g. no new fragment
creation for nested mailbox navigation), most of the fragment
operation code for 2-pane is reuseable for 1-pane as well,
so moeved it to the base class.
- Temporarily added "Show all folders" as a menu option on 1-pane.
- Added "opener account id/mailbox id" to the message view fragment.
They are not used by the fragment itself, but they're used
by the UI controller for the back navigation. (And now the UI
controller doesn't maintain the current IDs by itself; rather
it gets them from the currently-active fragment.)
- Use async fragment transaction on 1-pane too, now that it always
gets the current state from the active fragment.
- Changed the timing when we install fragments from onAttachFragment
to fragments' onActivityCreated. So now all installed fragments are
created.
TODO Now that all installed fragments are guaranteed to be created,
remove all special trealment for the fragment argument accessor.
(They were meant be safe to call before onCreate, but it's not
necessary any more.)
Change-Id: I0ed100c3f0b460835b164c0dc908ea483a4e46ee
Added the base class for the UI controllers and the 1-pane implementaion,
which is almost empty at this point.
The old phone activities still exist and will be used on the phone by default.
To use the new activity (1-pane EmailActivity) on the phone, use the following
comamnd.
adb shell am start -a android.intent.action.MAIN \
-d '"content://ui.email.android.com/view/mailbox"' \
-e DEBUG_PANE_MODE 1
Change-Id: Id1fe85d4517778afc967d7d5e17e1299dd1bfefd