History log of /packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bc47398187c6ffd132435e51d8d61e6ec79a79db 25-Sep-2012 Paul Westbrook <pwestbro@google.com> Merge Email1 into MR1

Change-Id: I45289d46b65faffc7a3a3dd46382899162f3aaab
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
cc0185f07c9198008d8dc685ae9979f3e35e8539 28-Jun-2012 Marc Blank <mblank@google.com> Manual merge of Email from jb-ub-mail

Change-Id: I564ddf433d371f45ba78a10f73bb182d484c56f2
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
fb9c860ae2fafffd95931ded199e8c07ed3831bb 15-Nov-2011 Vikram Aggarwal <viki@google.com> Remove hard-coded references to zoom values and set them as resource arrays instead.

Change-Id: I2af4bad3611a6f5c1580980d6ccee25910085f84
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
6599af135788ba415e84e13c02a9549de2a6d792 15-Nov-2011 Mindy Pereira <mindyp@google.com> Revert "Dont take density into account when setting initial zoom values."

This reverts commit e103e90fa1fe7c440a99d3f5484adc45097f3caa
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
e103e90fa1fe7c440a99d3f5484adc45097f3caa 14-Nov-2011 Mindy Pereira <mindyp@google.com> Dont take density into account when setting initial zoom values.

WebView takes screen density into account when setting the initial
webview zoom value as of cl:
https://android-git.corp.google.com/g/#/c/146916/

Fixes b/5593688 Message text size is set to Large in Email

Change-Id: I442eb91c825a7ad7a42d3d2772b625c662df6ec1
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
9599bca7c9dbac5abfebc98e09f4bd951dee3045 09-Nov-2011 Mindy Pereira <mindyp@google.com> The quick contact should only open when the usr taps the photo.

Fixes b/5520783 turn off quick contact tap handler on message header

Change-Id: If5efe6c69946784fe6cc9e25bfdc6018247c19c1
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
1b6e1ae3066f1a8ac32917e0c05739aa368af145 04-Nov-2011 Mindy Pereira <mindyp@google.com> Fix padding on reply quoted text area and ids.

Part of fixes for b/5517524 compose on tablets needs redlines

Change-Id: I7b526c21f1a11532b8b0d598a309174bb38a9cf6
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
31e5beba35287258e20b0fff5b9138a3b0892221 03-Nov-2011 Mindy Pereira <mindyp@google.com> Create tablet compose view.

part of Fixes for b/5517524 compose on tablets needs redlines

Change-Id: I107b58dfda3f228457a3a3b90c8f41e832007c9d
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
2ca9441e8c362d14ecc684c26d00049e2789f4c4 19-Oct-2011 Ben Komalo <benkomalo@google.com> Update Intent passed to contacts.

Reduce the number of intent keys so that a more compact dialog can be
used.
Bug: 5483848

Change-Id: I4d3da4a2a1480996bb14c5f2698a6530508ba7e7
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
fb83cef9ade8b4295bffff44be5b2e4af5a30eff 29-Sep-2011 Ben Komalo <benkomalo@google.com> Hide attachment progress bar on complete.

Also fix up styles to (mostly) match mocks and be consistent
with Gmail

Bug: 5205957
Change-Id: Iea7e9706464a8050255a7be78fca471cb7f9f6cf
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
5bcb32a0d3bf700fc73749fbb1333ce9abb55eeb 27-Sep-2011 Ben Komalo <benkomalo@google.com> Fix "always show pictures"

- stopped using the confusing checkmark
- consolidated tablet/phone view - removed some needless views

Bug: 5224399
Change-Id: I944459881f04bf1103db98bb15a597bdfcc07cd9
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
b8dd117002a97f37260518d85d73634b71c55bce 25-Aug-2011 Ben Komalo <benkomalo@google.com> Remove needless clearView()

- this is leftover from a time where we re-used a single WebView for
multiple messages. The current architecture does not rely on that, so
the clearView() is actually not useful. Worse - it's causing issues
because the operation in the WebView is asynchronous, so a clearView and
a load of the content in quick succession causes a race condition,
causing items not to load

Bug: 5205296
Change-Id: I5ee6697bdf53a033ba1c7f21170820259bf830d1
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
6f96c779cf572b1680c2cbd68ae9858ca78f101e 11-Aug-2011 Ben Komalo <benkomalo@google.com> Hide presence icon when unknown.

- the "offline" icon isn't much use for a lot of our (non-gmail) users
anyways and it takes precious real estate in the header

Bug: 5147565
Change-Id: Iea3df0c1c3756ff749e50ce46a7437488dc169e7
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
c18843d746a21e2fe81a3499d9b54c12f5982e6b 11-Aug-2011 Ben Komalo <benkomalo@google.com> Prevent EML messages from reloading indefinitely

- openMessageSync for EML files touches the provider since it copies
things into the Message table from temporary attachment data. Therefore,
acting on a reload of an EML message will trigger the observer, and do
the same thing.
- still unsure when or how this regressed, but I can't see the previous
behavior being correct regardless

Bug: 5150886
Change-Id: Icfcea7beb95b0fbb026184d6fdecc93c810569ef
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
330b1273af3e3efdd6a858eb4e936b5862d97956 05-Aug-2011 Ben Komalo <benkomalo@google.com> Fix show pictures to not look broken.

- this still needs an asset for the "checkmark" button when showing
"always show pictures" prompt - using a checkbox on state as a
placeholder but it's probably not the best thing for it

Bug: 5037485
Change-Id: Iaa1d0f865bf0c01fde0b0cb37ea1c395345ed582
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
81a153463bd9d2e4f71a0985a102548b16a88ec0 20-Jul-2011 Ben Komalo <benkomalo@google.com> Remove "Move" action on POP.

Bug: 5010614
Change-Id: If0a94840e9dc104566ba39d2e3240883dab5bba0
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
dfff72f731fe0704cc0b6f17e086edd72219e7ca 20-Jul-2011 Ben Komalo <benkomalo@google.com> Misc attachment code cleanups

Change-Id: I612b3ed1280d4d057834d3d3e67c8ac17c2bafb6
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
6b4a20730f104df284c1b0226b53565a7f3db3da 18-Jul-2011 Ben Komalo <benkomalo@google.com> Show proper quick contact mode.

- doesn't repeat the name
- shows status and right icons instead

Bug: 5039507
Change-Id: Id86d84a8ed54032f283454c83212ae962e8fc179
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
d6ad9b8c0315e7718d1713cec1a81b5a82d768ac 14-Jul-2011 Ben Komalo <benkomalo@google.com> Fixup recent mailboxes.

The default recent list should be pre-populated and fall off the list as
normal. The previous implementation showed a default list if there were
no touched mailboxes, but then the default list disappeared as soon as
there was one touched.

Bug: 5020673
Change-Id: Ifad607a9d36feff837ab42d039ce9209f223f345
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
698aa92e6fe4d711466d8b242d6ff7dd5df1176c 30-Jun-2011 Ben Komalo <benkomalo@google.com> Fix actionbar for message view

- shows the title of the message in the action bar (visuals not final -
need to extend the width and hide the account name)
- ensures that tapping up/back from a message view from a search result
list doesn't exit search
- ensures that tapping "app up" from a collapsible tablet view doesn't
exist the search unless the left pane is uncollapsed

Change-Id: I2b21a430d12148cf72237060c05312c7a23e2b3b
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
22d1a794cd9636634bb31689f53603c0ae64c522 29-Jun-2011 Makoto Onuki <omakoto@google.com> Newer/older + auto-advance for one-pane

- 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
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
488308b35406888a1c7fb7d4e5fc8a48a5c801be 29-Jun-2011 Makoto Onuki <omakoto@google.com> Merge "Fix the "onPostExecute executed even when cancelled" issue"
5d811ecf18602b7880dbe5fcb652d3c342b7f02b 29-Jun-2011 Ben Komalo <benkomalo@google.com> Merge "Re-enable hw acceleration and fix webview cleanup"
50d934360d51392ac2aa6f11de4d6e1446cf78c9 29-Jun-2011 Makoto Onuki <omakoto@google.com> Fix the "onPostExecute executed even when cancelled" issue

Renamed onPostExecute to onSuccess and made sure it won't called
if a task is cancelled in time.

Also removed isCancelled(). To implement it right we should make sure
that onPostExecute() isn't finished when setting mCancelled, but it's a bit
of a pain to implement right, and we don't really have to use it.

Change-Id: I3a0baf504506ffc4952a5553f7098a8415842fa3
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
a6e15b13eff7fd8ac11092d4dba87943997a0de1 25-Jun-2011 Ben Komalo <benkomalo@google.com> Re-enable hw acceleration and fix webview cleanup

Bug: 4886133
Change-Id: Ib59e560a6e1ef3eecc15ff0073a3c0f34688835a
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
4a893e60b468e0b67db522c047fa7fab057cfd6f 29-Jun-2011 Makoto Onuki <omakoto@google.com> Switch to EmailAsyncTask

Also remove the isCancelled test in onPostExecute, where it should
never return true.

Change-Id: Ica2b07db22d73769c2ead5f232f4890bd3bb87da
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
efbb408dbbd9ce31c68a53e3e5ffa189214b0a38 28-Jun-2011 Ben Komalo <benkomalo@google.com> Prevent monkey crash on attachment load.

Bug: 4969655
Change-Id: Ie1cbeaab4b9335aa4b0c2c972647072df21fccec
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
9e4a4149c89d7f6fd0d7d35f16b3e26b2a092720 27-Jun-2011 Ben Komalo <benkomalo@google.com> Merge "Persist trusted sender set to preferences"
b1f3c2d73fe51b9aebc064a3bd8f55aaa5407bc6 27-Jun-2011 Ben Komalo <benkomalo@google.com> Merge "Improved "show pictures" support."
04795828d97727a4514487adc58f330aa950485e 26-Jun-2011 Ben Komalo <benkomalo@google.com> Persist trusted sender set to preferences

This makes it so that "always show pictures" from a sender works

Change-Id: I6e6c6d8dc78746d0828428b6c6256c4fff3eb111
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
66282fb6ffa2af159d0e2f878439074ac5ee3067 13-Jun-2011 Ben Komalo <benkomalo@google.com> Improved "show pictures" support.

This is the UI part for remembering to show images based on senders.
It does not persist anything yet.

Change-Id: Iec40d9d1ace3661dabca2eed31ea6d0893be71e0
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
5cba9c10ac7428287a26c0f322ae4ee14ac9012c 26-Jun-2011 Ben Komalo <benkomalo@google.com> Replace details dialog with expando subheader

Change-Id: I7b0f63b7b5ce7172ac32b8c00891005b9f2e28ee
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
846763bd68c791ad0266ae8c68c0c1577761b419 22-Jun-2011 Makoto Onuki <omakoto@google.com> Improve 1-pane message visual

Also fixed the text alignment in the tabs on the 2-pane message view.

We don't yet to have the full-spec for this, so it's still temporary.

Now we again wrap the webview in a scroll view, so we'll have the "message
keeps growing" issue again. I'll file a bug for this.

It's still temporary, so I didn't remove the scroll views for the
each section (e.g. the attachment tab). Also I had to make up some
colors/dimensions which were unspecified. Also I didn't always define
styles when I should. Let's clean up these things later when we
get more detailed spec.

Change-Id: Ibdb78543f5ec7300f92091d1f8b800ca5edc74b2
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
ab40c988216b32ed145c0cad45c25e9cf2509c85 06-Jun-2011 Makoto Onuki <omakoto@google.com> More work on fragment install/uninstall.

- Now we "uninstall" a fragment in Fragment.onDestroyView.
i.e. a fragment transaction is actually executed.
- Maintain our own "about to be removed" fragment list to avoid
double removal of a fragment.

Change-Id: I61328e0a09a7af00cbb0e6ba10a2d39c11b5c3dc
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
e3924188409b631c9ed53cf0b8f1fb455c3ef67d 07-Jun-2011 Todd Kennedy <toddke@google.com> Add recent mailboxes to the account spinner

The ability to change mailboxes using the spinner is currently only implemented
for the two-pane UI. one-pane implementation will come in a future CL.

Change-Id: If72e9d9d607508553c918f5523e748e8a481ff84
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
3d9b8e76f0a396370a5c0be99a34bf7c24bd20dd 03-Jun-2011 Makoto Onuki <omakoto@google.com> Implement 1-pane navigation.

- 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
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
3a505d8d9694b56d6c704547c51f32a9756410f8 26-May-2011 Makoto Onuki <omakoto@google.com> MessageViewFragment: Preparing to use back stack.

Do all the clean-up stuff in onDestroyView() rather than onDestroy(),
so that no callbacks (such as the controller callbacks and
AsyncTask.onPostExecute()s) will work when it doesn't have views.

Change-Id: Ic4aa771d28209ee7b56ac4d228488768ae998dd8
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
d1b7d43df66b073207e0988b2066aa6183afaffe 26-May-2011 Makoto Onuki <omakoto@google.com> MailboxListFragment: Preparing to use back stack

- Added more lifecycle logs to understand fragment lifecycle better.
- Made sure all code work fine even in the state where a MailboxListFragment
is create but doesn't have views.
- Cleaned up list state resoration code.
Removed the setListAdapter call from onLoadFinished, which lets the
ListView restore the state by itself, in the case where we're re-loading
list for DB changes. We still need to do the restoration manually for
the orientation change case.

Change-Id: I96bff4ace6d48cc02113c2f5bd6a995260122334
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
0b31917c0e1c9ee50f5c56b3a5b4cbfb7fd373f3 24-May-2011 Makoto Onuki <omakoto@google.com> Rename some MessageViewFragmentBase callbacks.

- Renamed some methods in MessageViewFragmentBase.Callback
- Removed unnecessary argument from a callback.
- Removed obsolete comment.

Change-Id: Ia5af222971bfe6b943c98208b539946f14f16aa8
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
01bd33f318f03d5496b4d252e3a536856405f73c 19-May-2011 Makoto Onuki <omakoto@google.com> Change to Mailbox/MessageListFragment

- MailboxListFragment.Callback.onMailboxSelected is now split into
two different callbacks, one for regular selection and the
other for DnD for clarity.
- Added onDragStarted/Ended to MessageListFragment.Callback
- Changed Log to use this

Change-Id: I8861d3b43aa1b5b17c68c53605270e99733599f4
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
954f037d8f1e64ae88e02fe18ecf6b72b00f3daa 12-May-2011 Makoto Onuki <omakoto@google.com> Clean up fragments

Now that we don't reuse fragments and always use newInstance() to pass
arguments, there's a bunch of unnecessary things in them, such as
clearContent().

Also now MessageListFragment takes an account ID as an argument.

Bug 4346486

Change-Id: I7e05628c481ed56512c2281257239105d40ee1bc
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
53ea83ebf91f820692e8fa8e781f5cc982dd94db 14-May-2011 Ben Komalo <benkomalo@google.com> Move Mailbox to top level class.

No other changes made.

Change-Id: I3d8f3c521dc0d902be313b25252b4b6a4a96e7ee
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
bfac9f2e8a13f6c719608a6948203bbef921c99f 13-May-2011 Makoto Onuki <omakoto@google.com> Move some of the log constants from Email to Logging

Change-Id: If9f4e4e3adcdef897a0d6a4e153bb446a8b24fdd
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
a6e6b9969ac247908f4f87be464452fe2aed790b 22-Apr-2011 Ben Komalo <benkomalo@google.com> Don't rely on Activity to set the context for ops

The Fragment can get detached from the activity prior to performing an
operation, so for now, use the context reference that the fragment has
instead.

In the long run, we should avoid referencing the application context,
but a restructuring of ActivityHelper may help instead.

Bug: 4332451
Change-Id: Ieabff8ec0cc363f7d2eebd3ed47c230df9959886
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
e36648697f242991a8df0fdc6b23330f7be5e331 20-Apr-2011 Ben Komalo <benkomalo@google.com> Fix apk attachments so they can be installed

This introduces an in-memory cache of file paths for an attachment so
that we can install from a filepath instead of a content URI.
The cache also allows us to prevent duplicated files made if the user
hits save multiple times (the save button is disabled).

Bug: 3338997
Change-Id: I56651a55eef2f1a3f24b6d936c37736c4fc3d295
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
38a33bd28fae9eb3226c90d3225b812ca23856f0 19-Apr-2011 Makoto Onuki <omakoto@google.com> Merged activity step1: Use FragmentTransaction (tablet)

Change-Id: Ia67e7f3e0658cb962d328c10affe11ccb5a165ea
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
96332096cae2b35a299c2466ddff75465a42b3d8 06-Apr-2011 Makoto Onuki <omakoto@google.com> Fix message view for phone

- All layouts are still temporary, but at least they're usable now.
- Removed reply/forward button from the bottom panel.
There're buttons in the layout.
- Switched to getView().
- removed the unnecessary LinearLayout from the xlarge layout.
- removed some backgrounds that'll probably not be used.

Change-Id: I3aa27c63ab139ae30e5714ac3d9a1eadce74b0e8
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
2fbb3db5d86210d03175ce77ff08c989a96c5864 28-Mar-2011 Makoto Onuki <omakoto@google.com> Don't use findViewById (part 1 -- account setup)

Added two new functions:
- UiUtilities.getView()
is a fail-fast version of findViewById(). Crashes when there's no view
- setVisibilitySafe()
same as View.setVisibility, but doesn't crash even if a view doesn't exist

Let's try to avoid the use of findViewById(), and instead use getView(), *right
after* the layout is inflated, so that we'll always fail-fast if a layout
doesn't have a required view. (Rather than getting a NPE only when the view
is really accessed, which can be in a code path which is rarely executed--e.g.
only when there's a protocol error.)

Let's only use findViewById() only when we're sure no all the variants of a
layout have the view in question and leave a comment to make it clear it's on
purpose.

(UiUtilities has been moved from com.android.email to
com.android.email.activity)

Change-Id: I36e0bab65a989f5d34cf636f13e1eaee084547af
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
1e3a5f3ab1a066d3f600b7d4cad22e9eed47e92b 24-Mar-2011 Todd Kennedy <toddke@google.com> Don't load from the network until specified

We were always loading from the network for HTML messages. Now we don't
load from the network until the user clicks the "display images" button.

Change-Id: I1838b6cb09d49a2b521baa12a80239107391534f
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
d72f7bdf114a21db6aac66a7e83d6b002c8e8ed5 21-Mar-2011 Makoto Onuki <omakoto@google.com> Improve EmailAsyncTask

Added 6 methods:
- execute{Parallel,Serial}
- cancelPreviousAndExecute{Parallel,Serial}
- runAsyncParallel{Parallel,Serial} (replacement for Utility.runAsync)

Bug 4083415

Change-Id: I5ca33000e52fc5265ccc84a6e5acb0d3359d0eb4
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
074cc5869def8b91f1799af862b075579593cb60 10-Mar-2011 Todd Kennedy <toddke@google.com> Update attachment buttons after loading attachment

We would update the attachment buttons if the UI was becoming visible (i.e.
coming back from a settings page), but, we weren't updating them after the
attachment finished loading.

bug 4074694

Change-Id: I9d235620b5a92c2bbb871f70c9d97350cc151ce8
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
d43438ee5bce0920d3f032b7a71925b0cb1569f8 07-Mar-2011 Vasu Nori <vnori@google.com> bug:3513950 a trivial change due to renaming of api in downloadmanager

Change-Id: I5f8cd86fc97afa32e4a07ee2b6ab77d3270856be
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
ef2bc0b3e9f1fde01fe625906d0fa9b803a30471 03-Mar-2011 Makoto Onuki <omakoto@google.com> DO NOT MERGE: Fix ANR: Run getPreviewIcon on bg thread

The new class EmailAsyncTask might look overkill, but
this is what I've been wanting for long time.
In many activities we store all AsyncTasks we start to member fields
so that we can cancel them in onDestroy(). (e.g.
MessageViewFragmentBase.mLoadMessageTask and mReloadMessageTask)
With EmailAsyncTask these fields will no longer be necessary.
We'll be able to just fire up as many AsyncTasks as we want, and clean them
up in onDestroy() with just cancellAllInterrupt().

Bug 3480136

Backport of Id8aa1ba1500eee58cfab8b562b95e9ed852b3e29

Change-Id: I2d2966ff878862a5246c031d1d4e221da5a7e81a
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
da8326dfe7740c8daa6fd2ccfae165cb11e8a186 28-Feb-2011 Todd Kennedy <toddke@google.com> Disable zoom icons if device supports multitouch

On multitouch devices, the zoom icons are not needed (the user can pinch to
zoom in/out). So, we should disable the display of these icons on multitouch
devices.

bug 3405875

Change-Id: I45484cfc622f11c25d3ea7f4c378c3133d7f7de0
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
a553559f3789c9938944ea9fafdfa808d2d76440 24-Feb-2011 Makoto Onuki <omakoto@google.com> Message view: Restore tab after screen rotation.

Restore current tab and "show pictures" state.

Bug 3384629

Change-Id: Ia7dca5f53b313f3f54781f6a061767d982773a9b
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
88c8044586e04a13d2961ffdcd954fbe24468209 23-Feb-2011 Makoto Onuki <omakoto@google.com> Fix the attachement view layout.

The progress bar is not meant to be GONE. Encapsulated the progress view
in MessageViewAttachmentInfo to make sure that won't happen.

Bug 3417034

Change-Id: I1efee089cc7921f4428a38fcbcdc2e8aa3cec9fd
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
3f60e9312b1bf1324dd0e343b07cb69c9f8d31fd 19-Feb-2011 Todd Kennedy <toddke@google.com> Add "info" button to the attachment view

Whenever we remove the "load" and "view" buttons, we should add an "info"
button; where we will inform the user as to why we are preventing her from
seeing the attachment.

bug 3338997

Change-Id: Ic243f1542dec55f5b256eeb67ade50aa90e42009
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
3a4a1ac8340c4da73fa091830c154731b7eb2d5a 18-Feb-2011 Todd Kennedy <toddke@google.com> Send attachments through the download manager

bug 3339015

Change-Id: Ic16033a73d0e32608a14a2737f6ff28556dbe782
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
31d9acbf0623872f9d4a2b3210b5970854b654c7 12-Feb-2011 Marc Blank <mblank@google.com> Email split, part huit: Refactor constants, clean emailcommon

* There are three pieces to this CL (sorry):
1) Move and/or rename some constants into emailcommon
2) Move Utility to emailcommon, moving the few UI
related utilities back into Email (FolderProperties
and UiUtilities)
3) Remove all references to resources from emailcommon
* The three pieces relate in that, between them, they allow
the emailcommon static library to compile cleanly

Bug: 3442973

Change-Id: Ic5e3abaa2a1b36999e0b6653c6c2134ea1bd544f
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
a7bc0319a75184ad706bb35c049af107ac3688e6 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part six: EmailContent

* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
2193962ca2b3157e79f731736afa2a0c972e778a 10-Feb-2011 Marc Blank <mblank@google.com> Email split, part quatre: Move along, nothing to see here

* No code was harmed, er, changed in the making of this CL
* All that's happened is that code that is needed by both Email and
Exchange have been moved into emailcommon
* This required import changes to many files, which explains the
length of the CL

Change-Id: I4e12455ba057a4a8054fdbd0b578c73afa411c8a
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
8a574694606f0e5d781334d0d426fc379c51f3ed 09-Feb-2011 Marc Blank <mblank@google.com> Email split, part trois: AccountService

* Create AccountService.aidl and AccountServiceProxy in emailcommon
* Implement AccountService in email
* Use AccountServiceProxy in Exchange for account reconciliation,
notifications, etc.
* Move sync window constants into emailcommon
* Split attachment provider utilities and constants into emailcommon

Bug: 3442973
Change-Id: I89dce28b799b193243c07774dab65d830ae62775
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
f33420e68f75c93ac8aa3c645c771c877c0b0b7c 31-Jan-2011 Makoto Onuki <omakoto@google.com> Message details: Show only one address per line

Also removed unused field from MessageViewMessageDetailsDialog

Bug 3372971

Change-Id: I8a6d87d006793c0099b380634217624bf9002ead
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
3a761c8038173efe42e67cd9d48a95b059427f0f 18-Jan-2011 Marc Blank <mblank@google.com> Split out AttachmentInfo into its own top-level class

* Determine load state and allowability of view/save in constructor
* Extend AttachmentInfo in MessageViewFragmentBase to include views,
buttons, etc. and to add extra requirements for view/save as
needed (e.g. availabilty of external storage)

Change-Id: I2ce2b4e71fd784ef0329e391cc0e2d1639f8273c
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
2b6d0072df67a1d85ed9da29d1a4ed26fcd86ecd 17-Jan-2011 Todd Kennedy <toddke@google.com> Do not automatically open attached files after saving

After saving an attachment, we no longer automatically start the activity
associated with the attachment mime type. However, we still run the media
scanner to add supported media (e.g. music, pictures, etc...) to the media
content provider.

bug 3266378

Change-Id: I96985438316a33322437ff009fe7e9c597b1c70a
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
f944b6f0aa070408256f85ba8cef7e09fedb5d84 17-Jan-2011 Makoto Onuki <omakoto@google.com> Merge "Hide the entire tab section if no tabs are visible." into honeycomb
91a1cf1db0b2a6ee72e467c37e7845584354eaf2 15-Jan-2011 Todd Kennedy <toddke@google.com> Remove "view" button for .apk attachments

We don't need to allow users to install applications directly from the email
client. Instead, application installation is a two step process; the user
must first save the APK and then find it on the filesystem.

If the user does not want to allow installation of applications from unknown
sources, we don't provide the ability to save.

NOTE: After saving, we still try to open the APK which generates an error
toast. We will be removing the auto-open-after-save feature in a separate CL.

bug 3351137

Change-Id: I0eb1bc8224a154792fe852757e4b23a3059f4392
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
9d91b7ca04fbff8c6835509c6376dfdc83e47f42 14-Jan-2011 Makoto Onuki <omakoto@google.com> Hide the entire tab section if no tabs are visible.

Bug 3342441

Change-Id: I116baffdaa6bc18f00311aef2a0ee726288b19f0
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
9799b8fe4b35013b338da013cb5ee6d624500ffc 13-Jan-2011 Makoto Onuki <omakoto@google.com> Fix NPE in MessageViewFragmentBase

Add null check for all mMessageContentView accesses.

Also, addressed Andy's comment on I1374b81f; moved the zoom scale array out
of Preferences.

Bug 3350164

Change-Id: I689bd4146ecfffdbb98dccd433ba0c396996df4c
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
24c068b912efd0b027f7842c4b98fa1482dba33c 12-Jan-2011 Marc Blank <mblank@google.com> Make message view text sizes consistent w/ Gmail

It's exactly the same as Marc's I1240f263, except how it sets the zoom scale.
Seems like WebView.setInitialScale() works...

Bug: 3215606
Change-Id: I1374b81fd7799faa261ba6a06df18f6a8ef9d122
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
4c06c82b379d7b14263a456701fb9c45751cd5b2 12-Jan-2011 Todd Kennedy <toddke@google.com> Hide view/save buttons if attachment is unviewable

If none of the installed activities can handle the attachment type, don't let
the user view or save the attachment to the device.

bug 3338984

Change-Id: I6c158b7dd11ec48eec81f9a96289dd2c914f6a2c
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
82dd234f133387c40f30a9b7bcbaf5beb18ab411 12-Jan-2011 Makoto Onuki <omakoto@google.com> Improve "message details"

- Show subject/sender info
- Now all text fields are copyable

Bug 3342310

Change-Id: Ib9c4486aec36f192625c21602ea7406508ca0a49
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
86753bc41c3957b3bba49846f6603ed29f13c84e 11-Jan-2011 Andy Stadler <stadler@google.com> Update file type acceptance rules

* Open up all types for view/save rules
* Add anti-malware block list (based on extensions)
* Clean up code that shows/hides view & save buttons
* Redo handling of load/cancel 1sec timer
* Unit test for new little utility
* Allow larger items when on wifi

Bug: 3338984
Bug: 3334950
Bug: 3338988
Bug: 3340835

Change-Id: I991135636d507f2660e2860720dbed21bd1a955b
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
0faa37d7718dc0ff1af00cf37e2091a5001596e9 11-Jan-2011 Andy Stadler <stadler@google.com> Save attachments to /sdcard/Download

Bug: 3339015
Change-Id: Iee08f0c358e6680175c732ef0d5e416a86da5a5d
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
5fed5c8a59a5042817e4abbb1fb1855e809ab958 11-Jan-2011 Makoto Onuki <omakoto@google.com> Don't show "Stop" for loaded attachments

There's a case where we show both the "stop" and "view" buttons at the same
time.

Bug 3138021

Change-Id: Ib12f5dc1e522a04b1cc175626d084ed8bc5c8065
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
a826d3fb03f29a07ea12e44237b2c02ea1926c74 10-Jan-2011 Makoto Onuki <omakoto@google.com> Pixel perfect: Message view

Still waiting for a few missing assets, but it's done other than that.

The divider change is already merged; new layouts all use the framework style.

It's basically all layout changes, except for:
- Now the recepient address line has "Show details", which shows a dialog with
all to/cc/bcc addresses with the timestamp.
- Now invite response buttons are checkboxes.
(But the basic behavior doesn't change -- once you check a response,
the message will be gone, so you can't change the response later.)

Copied message_header_bg from gmail manuall. It'll look silly without it.

Bug 3138021
Bug 3307021

Change-Id: I6f7eb91d6104c3143a5c58b0c4c6c19929cea477
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
21a0c1798681037ca2b7376e99bbb24ea410a112 07-Jan-2011 Makoto Onuki <omakoto@google.com> PPing message view: use proper text size.

Also use the same date/time format as gmail to show the date part properly.

Bug 3138021

Change-Id: I24e45895de5330cd670a674f56eca5ccadcee9b5
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
1144e6c93f112be5008d0bb79d774c0de2134a87 04-Jan-2011 Makoto Onuki <omakoto@google.com> Fix NPE in loadAttachmentCallback

bug 3317175

Change-Id: Ib892af0b1bf00cd99c370e114dd8d98b6887933c
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
22b33a5a4a8c8315ebcd4111ac5c2d0bc78488c1 22-Dec-2010 Makoto Onuki <omakoto@google.com> Show stacktrace when failing to load message body

Change-Id: Ie6b2dda6fa32982e48e052f5f8fe2c699ebc8a01
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
ab1674a2d6deca2ef076d4d7e3458fc03860af2e 22-Dec-2010 Makoto Onuki <omakoto@google.com> Cosmetic changes to MessageView

- Don't show the progress icon unless loading from network
- Don't show the content until LoadAttachmentsTask finishes
- Disable the fade-in animation. It causes some weird positioning issue
with the GL accelerated webview.
- Use WebView.clearView() to clear its content.
- Use the "normal" layout mode, otherwise WebView won't use its entire
width
- Don't hide the vertical scrollbar

Bug 3287729
Bug 3225068
Bug 3295761
Bug 3304396

Change-Id: Ic4b8baac99b71dc0da58021849ff7c1dbd6dbe55
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
9c4458dcd71e62bbf51a7be934f12728f85afdd0 21-Dec-2010 Marc Blank <mblank@google.com> Don't try to show thumbnail for unloaded attachments

Bug: 3292689
Change-Id: I7575cb891f0b46c4a8564b5d2c4907025d91c639
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
28d6e09575cc5b9091c5d29990792db3465cccf0 17-Dec-2010 Makoto Onuki <omakoto@google.com> Follow-up to the loader API change

This should fix the "attempt to re-open an already-closed object" exception
from SQLite.

(destroy()s don't have @Override becuase the base method is now depricated
and will be removed someday.)

Bug 3288666

Change-Id: I4780f6c8d89c7204b266608462c0833ad5af4e5f
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
80769cefb3f34dfeccb38fb5b67b3ced172b830e 16-Dec-2010 Dianne Hackborn <hackbod@google.com> Prepare for some changes to LoaderManager/Loader.

Sorry it is a bit ugly, it is to allow this change to be
checked in prior to the first stage of the framework change
without breaking the build.

Change-Id: I1828579019ac0325d19c070a4c62cd79549e7d51
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
c1c3b6f21ecddbb237195caedc36af442ebf00e8 16-Dec-2010 Andy Stadler <stadler@google.com> Use generic contact icon for notifications & messages

* Copies the icon from contacts
* Used whenever the sender doesn't have a local photo
* Used in notifications and in messageview

Bug: 3282187 (notification)
Bug: 3285156 (memory leak from the placeholder graphic)
Change-Id: I528cae20355aa8cce7be37b26f32aa90e092708b
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
05340736daee23c1bbf3bfbe410e62ae5fe19192 15-Dec-2010 Andy Stadler <stadler@google.com> Only show attachments UI for downloadable attachments

Bug: 3286678
Change-Id: Ied64674cbfaef95228d5d3d8c99e5f5989b8a3c0
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
aef9515ee70f1f0b6cc4fa601078597b55831331 10-Dec-2010 Makoto Onuki <omakoto@google.com> Controller.Result callbacks should all have accountId

- Added accountId to loadAttachmentCallback/loadMessageForViewCallback

- Cleaned up LegacyListener/MessagingListener.
Removed the constructors which take messageId and attachmentId, which
are used to bridge loadAttachmentProgress, which the callsite doesn't know
these IDs. The inconsistency (only loadAttachmentProgress() uses the member
messageId) doesn't look too good, so extracted this into a separate class,
MessageRetrievalListenerBridge.

Change-Id: I46303e50df2b0e1fe8616e7c9cef632ac14f23aa
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
4d02297f4a32409cc3861ed9d3e95c3f31602faf 07-Dec-2010 Makoto Onuki <omakoto@google.com> MessageView: Show progress icon while loading

To avoid flicker.

Bug 3225088

Change-Id: Ic5faea4e6fc810aa751b9f0b9d04537e5dc29970
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
2ac95b550df19617eace2e7436049926da5c606b 07-Dec-2010 Makoto Onuki <omakoto@google.com> Message view: Use system tab style

Bug 3138021

Change-Id: I18ec66966e984a4f2b9e330d0ef14dbca5cce5e3
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
2201b38fe35606095428f06163cd5b66ec6147fb 29-Nov-2010 Makoto Onuki <omakoto@google.com> Add error message UI

Show an error message in a yellow bar at the top of the activity.

Bug 3230116

Change-Id: I45dad233c1ab52de365c8caedb4eeff29aefac65
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
b715ea1d768de273cc4bf0d6b052c61ee1245cba 23-Nov-2010 Makoto Onuki <omakoto@google.com> Fix & cleanup on EML viewer (MessageFileView)

- Fix the XL layout: Don't refer to "GONE" views in RelativeLayout.
- Don't always (re-)load message on onResume().
This will make it lose all state (e.g. webview's zoom level) when coming
back from other activities.
- Change the default visibility of some views so that it'll look okay
while loading the message.
- Remove the use of obsolete fragment APIs.
- And some other minor cleanups...

Bug 3221066

Change-Id: I475bc229f4ea9e0e480f528389f5180e1d63fcd6
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
deda053f7c78755f7ce9a87ae5d7df3355e95cd7 22-Nov-2010 Makoto Onuki <omakoto@google.com> Fix NPE in MessageViewFragment

Call clearContent() in onDestroy(), instead of cancelAllTasks().
(This is what I thought I was doing.)

Calling clearContent() tells the BG thread that the activity has already
been destroyed, and prevents them from loading a message.

Also as a precaution, don't load a message if getActivity() returns null,
which means the activity has already been destroyed.

Bug 3134403

Change-Id: I0d591e0dd147f73e70b0c027dc8037482197f7b4
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
4c9e1a3fdef233112f810c03daf1da229144da89 20-Nov-2010 Makoto Onuki <omakoto@google.com> Don't reset message view when becoming active again.

- We used to (re-)load the content on every onStart(),
which is called too when coming back from other actibities.
So if you go home and come back with the task switcher,
all state get reset, including webview zoom/pan and the current tab.

- Introduce a new flag, mLoadWhenResumed, to tell if we really need to
load a message.

Also:
- Start loading a message in onResume() rather than onStart()
to keep it consistent with other fragments.

Bug 3215269

Change-Id: I1cc6e12c3cc3c08065da3696603a3247f341469a
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
8e8e37126094735ead1187dfeb012e9ce4169d35 17-Nov-2010 Makoto Onuki <omakoto@google.com> Add XL layout for message view

- Added the xl layout
- Cleaned up the existing one

Bug 3138021

Change-Id: Ic6ab5e38c10ac12ffeeb6b12319d1e192ac2a40c
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
65b1eef31b2dedc92841d01163361b35776e5aa2 12-Nov-2010 Makoto Onuki <omakoto@google.com> Message view code change

- Show sender email address
- Show BCC for sent messages
- Don't show the default quick contact badge frame.
(change QuickContact to ImageView)

Bug 1501239
Bug 3138021

Change-Id: I0e8d91ad3a6a3a021c8aff0945a1ce11d13b2728
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
997a022c9b1ee84c0a5e67bcab5b0e465075234c 03-Nov-2010 Andrew Stadler <stadler@android.com> Enable zooming in MessageView

Bug: 2282390
Change-Id: Ie5be3c4adb8cc3bef5ccf4fccbfefe8a40872b17
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
ba0b1bbc8d7cd546d548cea1e4f097462e1fb324 02-Nov-2010 Andrew Stadler <stadler@android.com> Implement text zoom for Message View

* Add preference for default text size
* Move saveSettings logic into onPreferenceChange handler
* Per user tests, default setting is large (not "normal") for XL devices.
* Use setting in MessageView's WebView

TODO: Investigate zooming header (to/from/subject/etc) as well.

Bug: 2282390
Change-Id: If32ed3626244b046941a461f974b3dbdb535f592
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
fdc41d4ffc29d29c9c6d8e0b81db98aaf7afa92e 23-Oct-2010 Marc Blank <mblank@google.com> Delay appearance of "stop" button when loading attachments

Bug: 3082804
Change-Id: Ib8b0fcec36a7303b2094bd0e49645d11aa2ff2db
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
09eb977c062787a18a0c1ec96d929bb2279d14ad 12-Oct-2010 Makoto Onuki <omakoto@google.com> Fix potential crash in MessageViewFragment.openMessageSync

The problem is that ths method is called in a worker thread, so
there's nothing to prevent it from running just after/at the same
time as clearContent() (which sets -1 to mMessageIdToOpen).
If it does, it passes -1 to restoreMessageWithId() and crashes.

Also removed a half-obsolete comment which is a bit too obvious for its length.

Bug 3077387

Change-Id: I736d696046e6d8964a16c80515544c582aca3943
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
de936b83ac76a390ae04827d7eba1f3b8f238a0c 07-Oct-2010 Makoto Onuki <omakoto@google.com> Fix race condition regarding message reload.

The method to start ReloadMessageTask() when detecting content
changed events is delay-called, so need to make sure the fragment
is still in the valid state.

Bug 3069896

Change-Id: I1991d902e8044b4f8ca3ffd7d3e2e66005f1e960
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
f54e08eaee0717cd60766797dd878d2588ff981a 05-Oct-2010 Makoto Onuki <omakoto@google.com> Introduce tabs to view message, attachment and invite separately

Added "tabs" to the message view according to the latset mock.
This removes the necessity of putting a WebView inside a ScrollView,
which caused the infinitely-growing email bug (issue 6882).

Right now the tabs are actually just Buttons. Complete visual refresh
should follow it.

http://code.google.com/p/android/issues/detail?id=6882
Bug 2349275

Change-Id: I897a3a32e0dd7a90d637ac5ea1d47e5e65a1eabe
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
d058f8abcd27f454f065f4a802a8bb42e413451b 02-Oct-2010 Makoto Onuki <omakoto@google.com> Auto-refresh message view

Now MessageViewFragment detects changes made to the current message,
and update the UI.
(Although it doesn't really know if the message is really changed, or just
something else was changed in the DB. It updates the header regardless.)

Change-Id: I35627c7aff129723b83605fc84521da907078571
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
61eec98d398358f61cf601e805e8bfd01e4b3418 30-Sep-2010 Makoto Onuki <omakoto@google.com> Switch to static fragments

- Now we declare all fragments in the layouts.
- Added clearContent() to MessageList/MessageView to keep them calm when not
used. (e.g. MessageView.clearContent() will be called when closing message
view and going back to the mailbox list+message list screen.)

- Some of the processes have moved from onStop to onPause.
- Now that we don't use the fragment transaction, the "restored fragments"
has been removed, and the separation between selectXxx() methods and
updateXxx() methods are gone.

Bug 3045555
Bug 3041502

Change-Id: I958897a8a38bccea1dfed7cfcd900e6dd52d2eed
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
ddfae933da3134a5d8a5d487045cdb99c67013fa 29-Sep-2010 Makoto Onuki <omakoto@google.com> Don't use QuickContactBadge.assignContactFromEmail

* assignContactFromEmail("") was causing the following exception on logcat.
"java.lang.IllegalArgumentException: URI: content://com.android.contacts/data/emails/lookup/,"

* This method is to set the contact to open when the badge is tapped,
but we trigger quick contact by ourselves, so don't have to do call this.

Bug 3013527

Change-Id: I16e1573bd82ffe5c39d30b69361354010f508f91
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
250ca15b882c7df996f590a134ec92ffca26a9ff 22-Sep-2010 Makoto Onuki <omakoto@google.com> Show MessageList with MessageView, rather than MailboxList

In message view mode, show MessageListFragment on the left pane.

TODO: Highlight opened message on message list
TODO: If the opened message is moved/deleted/starred/etc, update
message view
TODO: Collapsible left pane on portrait

Change-Id: I9b26f7291648da0e08bc526b79305ab65ce4d926
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
353b75b04be276895b6d109ca5c1a5be8b68ab4b 22-Sep-2010 Makoto Onuki <omakoto@google.com> Fix NPE -- check isCancelled in onPostExecute

Bug 3024665

Change-Id: I97c122a6c66a7d4245187961cb90ea874d0e305d
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
625451ed25747d2637bd45274b0ec1f7d1bbb93c 22-Sep-2010 Andrew Stadler <stadler@android.com> Harden thumbnail creation

* Catch some errors earlier; Log all errors.

Bug: 2905324
Change-Id: Icdf4ec881f404787a0621e606d7e611d5e50aab1
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
263ef7ddd4fb44eb4a53d6f1bd599d0d5bbb584d 17-Sep-2010 Makoto Onuki <omakoto@google.com> Small change to MessageViewFragment

resetView() shouldn't kick LoadMessageTask(). (it's not what its name implies)
Added a TODO.

Change-Id: I0523696f3883a905d9732626824efda598bf10ed
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
0435a0775e3d6637304a5a4e93675e7462397eb1 16-Sep-2010 Makoto Onuki <omakoto@google.com> Let MessageViewFragment own bottom buttons.

Create a custom view containing the bottons below MVF
(delete, move, reply, etc) and let MVF own this.

These buttons used to be owned by the XL activity itself, because
the UI for these commands will most likely be totally different
from the tablet UI, so the fragment having them looked wrong.

However, this made it harder to make changes suggested by the latest
mock, such as "put reply/forward in the message header".
I think the buttons are semantically part of the message view anyway,
so the fragment owning UI for these commands is probably the way to go.
(And let's worry about the phone UI later.)

Reason for the use of a custom view is that it will make it easier
to make non-trivial UI changes, e.g. "combine reply, reply-all and
forward and make it dropdown."

Also removed obsolete TODOs from MessageListXL.

Change-Id: Ibf93f4c70fe07bdbbe33d2adb6bbd2b96812830d
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
11d37a7fa971d0a39ad42517db8a49f1fdd56a1c 12-Sep-2010 Marc Blank <mblank@google.com> Check file name before allowing attachment save

Bug: 2992710
Change-Id: I56893366226168669788b78b53bfd3f996dd96cd
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
b1ea9c3c12d8d9da5c1e49a8752076ce60861e9f 07-Sep-2010 Makoto Onuki <omakoto@google.com> Add quick contact badge to MessageView.

- Added "quick contact badge" to MessageView
- Removed PresenceUpdater, and added new implementation based
on Loader, which is much simpler.
- Changed some text color, so they're visible now.

Bug 2988625

Change-Id: I688a3217178ee8fd0b7245c0ab36a633687ea525
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
27c6547968f9c2824d5e1b662bd17137abbfbe09 08-Sep-2010 Makoto Onuki <omakoto@google.com> Remove obsolete TODOs

They're all obsolete.
(Fix is already in, change in a different place made it obsolete, etc.)

Change-Id: I04452a973c86d39aca8e89f8883dcf1d7e480dee
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
646b5e062ebaad622a4eed5f3103630634b99b64 02-Sep-2010 Makoto Onuki <omakoto@google.com> Disable forward/reply for trashed messages.

* Now the message shown/gone callbacks are called directly by
MessageViewFragment, rather than MessageListXLFragmentManager.

* The buttons are enabled/disabled per messages, so it even works
properly when you move around in All Starred. (if you ever star
trashed messages.)

* Fixed one-pane as well.

Bug 2968810

Change-Id: Ie6de1dc7ea0bd18c40c091a6685629c26ffb7110
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
b8efc2d048175f4d12630a036f9aed4e9be0f982 02-Sep-2010 Makoto Onuki <omakoto@google.com> Make sure MessageView series don't use mMailboxKey

Because "move" and "delete" are asynchronous operations, Message.mMailboxKey
can change any time. We can't use stored values.

(Fortunately it was used at only one place, and this was actually unused.)

Change-Id: Idc1300a00122fe0e6372b0374cddc98aa54a47fc
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
4dcb1c5fdaacc40309b77af2a32532bc60218523 25-Aug-2010 Marc Blank <mblank@google.com> Fix attachmentExists (recognize mContentBytes)

* Add unit test for attachmentExists

Bug: 2937856
Change-Id: I020f58740618c084676bbf1cdfad3795edb07688
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
c184f36c2df16431693d7709e28ded593efc3da7 24-Aug-2010 Marc Blank <mblank@google.com> Revert "Convert Controller to a full service"

This reverts commit 0e6d972641c19467d6b26351ce14a3f44c9fd6f4.

Change-Id: I005fc34152396806468edef919a3620961ddb4fe
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
0e6d972641c19467d6b26351ce14a3f44c9fd6f4 20-Aug-2010 Marc Blank <mblank@google.com> Convert Controller to a full service

Change-Id: I2078fd047ff46f85936c8bf798a5edd3678bb5b4
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
09fd4d0a181db511a07950f52ad56cc6e686356b 10-Aug-2010 Marc Blank <mblank@google.com> New asynchronous attachment loading code

* Create AttachmentDownloadService to manage all attachment downloads
1) User requested
2) Required for email forwarding
3) Opportunistic downloads to enhance offline use
* New attachment related UI (pending UX approval, of course)
1) MessageView (attachment actions, progress bar, etc.)
2) MessageCompose (attachments for forwarded messages)
3) Associated toasts, notifications, etc.

TODO:
* Unit tests
* Cache Management (separate CL)

Change-Id: I7864a5fb1c3f4f2be68d98341a971edc6cbacfe1
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
21efedb67fdfff208cef3a18804771fd1d1fff30 16-Aug-2010 Makoto Onuki <omakoto@google.com> Rework/cleanup of "refresh".

Added RefreshManager, which is responsible for getting refresh requests
from UI and keeping track of what is being refreshed.

Conceptually it's a part of Controller, but extracted for easier testing.

- Now sendPendingMessagesForAllAccounts() is owned by RefreshManager
rather than Controller.
- Also updateMailboxRefreshTime/mailboxRequiresRefresh have been moved
in from the Email class.
- Now MessagingException implements a method to return an error message
for the UI.

The refresh button on 2-pane doesn't work as intended yet, because the
spec is a bit too complicated (as described in the TODO in
MessageListXLFragmentManager.onRefhres()).

This change touches many file mostly because it cleans up a lot
of code duplication.

Change-Id: I058ab745ccff10f6e574f6ec4569c84ac4a3e10e
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
8479032c126765a39ff07f3d9254a928bc9c6373 14-Aug-2010 Makoto Onuki <omakoto@google.com> Fix the bug in LoadBodyTask.

doInBackground() returned a string[] when error, but onPostExecute() expects
null.

Also added isCancelled() check, just in case.

Bug 2918930

Change-Id: Ie87ff2e2e5b7c3fd77a062944759d03f8f09d3d9
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
b6c1ad0f013319101b32c9c3831920ec39554169 31-Jul-2010 Makoto Onuki <omakoto@google.com> Rename MessageViewFragment2

Change-Id: I28e23c0ff18211db999396c5ba1ad9ef898d4515
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java
206d4e842d287a7a4e6bedf4963fb7f0f58e113f 30-Jul-2010 Makoto Onuki <omakoto@google.com> Split up MessageViewFragment like we did to MessageView.

Break MessageViewFragment up into two fragments, MessageViewFragment, which
is used to show regular messages, and MessageFileViewFragment, which shows
EML messages. (And their base class, MessageViewFragmentBase.)

MessageViewFragmentBase's javadoc has a class diagram.

MessageViewFragment is actually named MessageViewFragment2 at this point
so that GIT correctly finds out the rename from MessageViewFragment to
MessageViewFragmentBase. I'll rename it back in a following CL.

Also added very basic unit tests for MessageView and MessageFileView.
At this point, they just make sure the activities really open and show
messages without exceptions.

I feel like the current naming schema for the activities/fragments is
kinda confusing. Let me know if you come up with better names.

Change-Id: Iff948f4b68cfdb7c1e68f225927b0ce58d34766b
/packages/apps/Email/src/com/android/email/activity/MessageViewFragmentBase.java