History log of /packages/apps/Email/src/com/android/email/activity/MessageList.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/MessageList.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/MessageList.java
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/MessageList.java
f5418f1f93b02e7fab9f15eb201800b65510998e 14-Jun-2011 Marc Blank <mblank@google.com> Move Account into its own top-level class

Change-Id: Ide7c991b7d4d418dbe17164421425bf898ba64ee
/packages/apps/Email/src/com/android/email/activity/MessageList.java
5675ea88d3cc4ba9934d2a54fee008fd324d711f 24-May-2011 Todd Kennedy <toddke@google.com> Add a second fragment to select the mailbox

After choosing the account, we need to select a mailbox for the shortcut.
In order to replace the fragment, we cannot hardcode it in the XML. Instead,
we need to dynamically create it.

Also, restructure the fragment class and rely on the class to "do the right
thing"

Change-Id: I752ad5bbdf2484332ec2b73852cae74a5d2092fa
/packages/apps/Email/src/com/android/email/activity/MessageList.java
2ed7a86949b2b2a95017525145ad421b9e5d0e38 17-May-2011 Makoto Onuki <omakoto@google.com> Support pre-HC style account shortcuts

Account shortcuts used to point at MessageList directly with a
content://com.android.email.provider/account/ACCOUNT-UUID URI.

Hook these intents and open Welcome instead.

On Eclair and before, we stored an account-ID directly as an extra,
but this style is no longer supported.

Bug 4208879

Change-Id: I9fecb0723743377a6d7c7e84626e8613f2356492
/packages/apps/Email/src/com/android/email/activity/MessageList.java
94331c96d9397ec451ae3a0a9f825cc4aca2b9d1 11-May-2011 Makoto Onuki <omakoto@google.com> Remove phone activities and implement one-pane

The primary purpose of this CL is to remove phone activities, so the
one pane implementation is very much temporary and primitive, but it
should offer minimal operations.

Change-Id: If57f81db7c605c95664d49044a5cc082beda59c0
/packages/apps/Email/src/com/android/email/activity/MessageList.java
52618afa81eb47b9efd4b199b4ae2abbbab3402b 13-Apr-2011 Ben Komalo <benkomalo@google.com> Apply auto-advance policy when doing a batch op.

Batch operations that occur when the current message selection is
contained within the affected messages will now force the selection to
advance according to the auto advance policy to the next unselected
conversation.

Bug: 3409809
Bug: 3405864
Change-Id: Ibe75f32b9263ef6f3fb2314a07e63980f437f988
/packages/apps/Email/src/com/android/email/activity/MessageList.java
2577842269f035856b877eb990567c7a32e81252 08-Apr-2011 Ben Komalo <benkomalo@google.com> Misc fixes and dead code removal.

Change-Id: I48b2fa5f7bf619197d882c71e8b174d31d130e26
/packages/apps/Email/src/com/android/email/activity/MessageList.java
26cfb38042e5686bd19ba4b1a0188bbc352c36d3 31-Mar-2011 Makoto Onuki <omakoto@google.com> MessageList rework for phone.

Change-Id: I1cc86c0282f0f3cbe9b78ed97ab3fb8f8d1e7c0f
/packages/apps/Email/src/com/android/email/activity/MessageList.java
9e53322ee7b2a46cb762898845303cccec88fb50 29-Mar-2011 Makoto Onuki <omakoto@google.com> First path of MessageList cleaning up

- Menu now works
- Removed a lot of unnecessary/soon-to-be-unnecessary code.
Especially,
- multi-selection panel is now replaced with CAB
- SetTitleTask will be replaced with a loader
- Removed the option menu xml for magic mailboxes
(The regular one should work for them as well)

Bug 4184142

Change-Id: I52adff6d711232d536b6f00367a240e1faeea14b
/packages/apps/Email/src/com/android/email/activity/MessageList.java
f4894131427ec7562fcb05388b9f3aa094e388bc 19-Feb-2011 Andy Stadler <stadler@google.com> Add contextual dialogs after notifications

* When security settings notification is clicked, inform user that
they need to change settings (before dumping them in security
settings.)
* On an authentication failure, present a dialog to the user explaining
that the username or password may be incorrect.
* When the device pin/password is expiring or expired, present a dialog
to the user explaining that it needs to be updated.

Bug: 3238657
Change-Id: I8fca446fa3c1bf87a95938553dbdc362c3df220e
/packages/apps/Email/src/com/android/email/activity/MessageList.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/MessageList.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/MessageList.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/MessageList.java
6c7075fb8644b390058f85efd09744e8964a242a 08-Jan-2011 Dianne Hackborn <hackbod@google.com> Remove use of old methods.

Change-Id: Ibc686a39cb2c481e6cd57b1d6029979cfd9f5b71
/packages/apps/Email/src/com/android/email/activity/MessageList.java
cbdd9f78b2605e87e45e4f6761b0a8c444a8cd4c 21-Dec-2010 Marc Blank <mblank@google.com> Distinguish mailbox requests that are user requested

Bug: 3251757
Change-Id: Ie417ebf44c8b740db88e5854077782930359a958
/packages/apps/Email/src/com/android/email/activity/MessageList.java
05565d4e832a09df7732bf195fb1730692aee5ac 12-Nov-2010 Makoto Onuki <omakoto@google.com> Fix NPE on the phone UI

It still has a problem that no menu options show up on the activity,
but it's at least useable.

Bug 3192277

Change-Id: Ia891557020c863bfa53d45b7465d012aa411d67f
/packages/apps/Email/src/com/android/email/activity/MessageList.java
cd09545b87979fa6b4337f17b5a001f0ef7b5269 02-Nov-2010 Andrew Stadler <stadler@android.com> Provide runtime switch for GL acceleration

* new checkbox in debug fragment
* saved value in prefs so it's sticky
* each Activity calls a helper to enable/disable per that flag

Change-Id: I1af1ae9f401bc746cc97da00dfb0e06407b79d46
/packages/apps/Email/src/com/android/email/activity/MessageList.java
241f18f237171a804f849262533d3cddb08e45c7 08-Oct-2010 Makoto Onuki <omakoto@google.com> Fix when to clear notification

I was assuming MailService.resetNewMessageCount cleared notification,
but it didn't.

Doing it in Activity.onResume is clearly wrong because we don't always
have an account ID there. If we don't, we're passing -1, which clears
all notifications for all accounts.

We're now calling resetNewMessageCount() in MessageListFragment,
when we refresh the list, so we can remove it from onResume() for the Phone
UI as well.

Bug 3074056

Change-Id: Ib0bb2fbb0309a0784fb3a525927102f423e930df
/packages/apps/Email/src/com/android/email/activity/MessageList.java
899c5b866192a4c4a12413446d10e5d98dbf94fa 27-Sep-2010 Makoto Onuki <omakoto@google.com> Switch to tablet style notification

- Now we show separate notification for each account
- New notification has sender photo, sender name, and subject
of the latest email
- Added the NotificationController class, which is intended to manage
all notifications besides "new message" eventually.

The framework doesn't seem to be 100% ready, and it's not clear how to
add the 3rd line in the expanded notification at this point. Need to
revisit it later to verify UI details.

Change-Id: I40193ee372cb6b2b7245c1588890f238b2469699
/packages/apps/Email/src/com/android/email/activity/MessageList.java
2dbb510657f42768dd215ac98ecfc17b7b0d39aa 23-Sep-2010 Makoto Onuki <omakoto@google.com> Hide bottom buttons when message list enters selection mode

Hide the command buttons at the bottom of the message view when the message
list enters the selection mode.

Change-Id: Id825bb5183673e9def055b6480fa180beab51178
/packages/apps/Email/src/com/android/email/activity/MessageList.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/MessageList.java
086aac2386a575a0e2c78b1fa8dd8ea13825ae2b 27-Aug-2010 Makoto Onuki <omakoto@google.com> MailboxFinder should ignore callback for non-target account

There were two cases where MailboxFinder responded to updateMailboxListCallback
when it shoulnd't.
- Callbacks for non-target accounts
- Callbacks arrived after the operation is finished

Make sure these callbacks are properly ignored.
Also, make sure startLookup() can't be called more than once.

Change-Id: I823c11ab5f96df4eb84594c08d3325d12319f708
/packages/apps/Email/src/com/android/email/activity/MessageList.java
0be2d85bb8e4ca177a52aebeb0dc5e869f1c96b4 25-Aug-2010 Makoto Onuki <omakoto@google.com> Make notification open XL activity on tablet

* Now notification kicks Welcome, which knows which
activity to use.
* Extracted cancelNewMessageNotification
* Also fixed 2909215. There'll be only one XL activity on the app stack.

Bug 2945369
Bug 2909215

Change-Id: I2a7fec0d48a7618375cae55138ca51fefc70ff6e
/packages/apps/Email/src/com/android/email/activity/MessageList.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/MessageList.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/MessageList.java
51224176259b1b3126087c69814ccf652cb398b9 19-Aug-2010 Andrew Stadler <stadler@android.com> Make AccountSettingsXL the main settings UI

* Connect to it from all call sites
* Remove 1-pane and 2-pane icons
* Leave a few more breadcrumbs for launching into specific account
* Update the long TODO list in AccountSettingsXL

Change-Id: I502eda9a622518e8d4a23d46989340ad400cdd34
/packages/apps/Email/src/com/android/email/activity/MessageList.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/MessageList.java
2127964d0f73df889460b23c81d463bbc871efed 17-Aug-2010 Makoto Onuki <omakoto@google.com> Implement "contextual" (selection) mode.

Now MessageListFragment itself takes care of the selection mode,
without help from activities.

Change-Id: Ia1a9942d0d3ca87b4f0938a3bf8172466f53b5d6
/packages/apps/Email/src/com/android/email/activity/MessageList.java
187d0334849cfd922f0df05e57d77224f2f70378 12-Aug-2010 Makoto Onuki <omakoto@google.com> Reworking MessageListFragment.

- Now MessageListFragment uses loaders to load data.

- Now that we use Loader's auto-requery with throttling,
removed the throttling timer from MessagesAdapter.

- Simplified footer mode. (now only "no footer" or "load more")

- Removed saving/restoring list state code.
These method don't really look like working, or at least
not always working. Now that UI's lifecycle is changing,
we'd better redo it from scratch.

- Removed MessageListUnitTests.
It only has tests for onSaveInstanceState/restore of the fragment,
which I virtually disabled.

And minor clean-ups
- Moved the code to save/restore selected state from the fragment
to Adapter.

Bug 2911766
Bug 2897500

Change-Id: I16c7aefecc5409c57fc5fc8c59b5c80d9b7fc164
/packages/apps/Email/src/com/android/email/activity/MessageList.java
d632426c0a05ac7f1e8db08cc0b2e21a261771f4 10-Aug-2010 Makoto Onuki <omakoto@google.com> Support opening a draft on XL.

- When a draft is selected, use MessageCompose rather than MessageView.

Change-Id: I5e005a7916d7089cfbe9ed15cf51c901c26dd595
/packages/apps/Email/src/com/android/email/activity/MessageList.java
ec15f2356e47d621584cc3fc84c9c02557e0a0df 28-Jul-2010 Makoto Onuki <omakoto@google.com> Extract the mailbox lookup logic into an independent class

This new class MailboxFinder is responsible for looking for a mailbox
by an account id and a mailbox type.

If a mailbox is not found on the first try, it'll tell Controller
to refresh the mailbox list, and try again later.

This will be used by MessageListXL.

Change-Id: I4adc3db025fb271c254aa2b58b3b753281dc7398
/packages/apps/Email/src/com/android/email/activity/MessageList.java
bcf32320e2600e96c8a9e997a8903bfc3893b35e 27-Jul-2010 Makoto Onuki <omakoto@google.com> Move isSecurityHold/clearAccountHoldFlags to Account

- Added unit tests
- I see the "open a cursor, move to the first row, read a column" pattern over
and over. Added a utility method for this. (Let's try not to bloat the
binary by copying code around!)
- Added helper classes for database related tests
- Removed code dup

Change-Id: I380959215cc1661b252158f0f6e35369b499cdf8
/packages/apps/Email/src/com/android/email/activity/MessageList.java
7daacf83a4e789aaab11ef715f42470bcee51bfc 08-Jul-2010 Makoto Onuki <omakoto@google.com> Switch to ListFragment, and use its default layout.

Change-Id: If8dead170a3662cbde87e6ead244363b11db01f6
/packages/apps/Email/src/com/android/email/activity/MessageList.java
91093ee6e8beb200c90e401c96a9c2a1d820bebc 23-Jun-2010 Makoto Onuki <omakoto@google.com> MessageList: Introducing "selection mode".

- Long-press an item to go into the selection mode.
- In the selection mode, tap items to toggle selected/non-selected.

This also means:
- No checkboxes any more.
- No context menu any more.

Color scheme hasn't been updated yet, so it looks a bit ugly for now.

Change-Id: I3cb6c45c1dc5461a234c9e9ab9e038c90a9fe8b2
/packages/apps/Email/src/com/android/email/activity/MessageList.java
8ade2fe010797be45d5c0f9023e5d76bcc3b50a8 18-Jun-2010 Makoto Onuki <omakoto@google.com> MessageList: Moved screen transition logic to activity.

- Now open, reply, reply-to, forward are handled by activity.
- Renamed onDelete. (I was thinking about renaming more methods, but I ditched
the idea because the current ones aren't that bad.)

Change-Id: Ie88e8cc3c6bd598199cfd9f4cd61d51e8b7023b7
/packages/apps/Email/src/com/android/email/activity/MessageList.java
91d47ccb47e4d4e340854a091d39886fbbadbf15 17-Jun-2010 Makoto Onuki <omakoto@google.com> Cleaning up MessageListFragment.

- Introduced EmptyCallback to avoid the flood of null checks.

- Fixed some TODOs in MessageListFragment.
- Notably, sendPendingMessages() is now handled by the fragment itself,
rather than by the activity.
- Moved two DB accesss from the UI thread to a worker thread.

- Replaced the 'mailboxid < 0' check with isMagicMailbox(), which is more
explicit and easier to understand.

- Renamed some methods in preparation of moving to the activity.

Change-Id: Ie730c2c561050bbfa83a38252fcf09d59238f7ea
/packages/apps/Email/src/com/android/email/activity/MessageList.java
2aa8ea4399dd70c26d6c0679ff002fb16fdc5bff 14-Jun-2010 Makoto Onuki <omakoto@google.com> Use Fragment's context menu API.

Change-Id: I1be6b17ff5bc7fd5258366bc064251c6f79c0cc8
/packages/apps/Email/src/com/android/email/activity/MessageList.java
601187db42a34b638cc911758b3735bba5d51ada 11-Jun-2010 Makoto Onuki <omakoto@google.com> Introducing MessageListFragment.

- Extracted MessageListFragment out of the MessageList activity.
- This is basically pure extraction, with the following conceptual change.
- Now the MessageList activity doesn't know the mailbox id or
the account id. If it needs these ids, it needs to ask the fragment.
- MessageListFragment.LoadMessagesTask tries to determine the account ID
if it's unknown.

Most code in MessageListFragment is directly copied from MessageList
with minimal changes (e.g. pass mActivity instead of 'this' as a Context).
There's a few cleaning up oppotunities. I'll work on them later in a separate
CL.

Change-Id: Ie004cc49b429f2cd8f9de73df5abb94f3054ea0a
/packages/apps/Email/src/com/android/email/activity/MessageList.java
851f3219e2bbcfb9c02c439d84d0885d890ded8d 09-Jun-2010 Makoto Onuki <omakoto@google.com> Renaming MessageListAdapter to MessagesAdapter

in line with MailboxesAdapter.

Change-Id: I4ed387db2f5ce1f9bad282521c62eeec0c697db4
/packages/apps/Email/src/com/android/email/activity/MessageList.java
3f545a4060982b8a5d715905c7818d59056c1ee0 07-Jun-2010 Makoto Onuki <omakoto@google.com> Controller rework.

- Controller.Result is now a class rather than an interface,
so subclasses don't have to implement empty methods.

- Replaced Threads with AsyncTasks, which is more light weighted
because it uses pooled threads.

- Removed the Result argument from Controller's methods.
These argumetns weren't used, except in serviceCheckMail.

Regarding serviceCheckMail, the new code behave differenly from the old code.
If there's already listeners registered when it's colled, they wouldn't get
called in the old code, but they will in the new code.
But I think this difference is okay because that's how it works for
POP/IMAP accounts.

Change-Id: I37a857ce7c089c1a411cb7f1fcfcb72c9f5fd2a6
/packages/apps/Email/src/com/android/email/activity/MessageList.java
b87e999fbceb8a95e22f0f3209e0698e3f1effbb 03-Jun-2010 Makoto Onuki <omakoto@google.com> Cleaning up MessageList

- Removed Handler.
- Refactored FindMailboxTask so it only does DB access on a worker thread.
(Moved the actual task out of doInBackground)
- Removed unused imports, which I forgot when I extracted the adapter.

Change-Id: Ib76ce2ab7901dd39d2ed51d8a61d7be9df55b337
/packages/apps/Email/src/com/android/email/activity/MessageList.java
0a892ae04f0557367a751e1b130e260feccc3c52 02-Jun-2010 Makoto Onuki <omakoto@google.com> Extract MessageListAdapter.

Change-Id: I0e441b7fff925c7703ab88ab54240c5b42d045c4
/packages/apps/Email/src/com/android/email/activity/MessageList.java
e333b68c9efa30c58b8ae9c2a2625de1366b2314 28-Apr-2010 Makoto Onuki <omakoto@google.com> Skip security check when account id is unknown.

Doing the check caused:
IllegalArgumentException: Unknown URI content://com.android.email.provider/account/-1
at com.android.email.provider.EmailProvider.query(EmailProvider.java:1092)
at android.content.ContentProvider$Transport.query(ContentProvider.java:163)
at android.content.ContentResolver.query(ContentResolver.java:245)
at com.android.email.activity.MessageList.isSecurityHold(MessageList.java:1146)

Bug 2635060

Change-Id: I80e7c00ef2dd74ceae24a88daf43a0681124a9d4
/packages/apps/Email/src/com/android/email/activity/MessageList.java
88fb7f7cd032ec0d838bdddf40a6f5a73442f422 23-Apr-2010 Andrew Stadler <stadler@android.com> Fix uncommanded exit from MessageList with 2+ accounts

* When you have 2 or more accounts configured, MessageList gets confused.
* If you are viewing a mailbox from account A, and account B does a
background sync, MessageList gets confused by the reports coming back
from the Controller. It gives up and returns to the Accounts list.
* This change adds a check for the current account and ignores the
MessageList updates if we weren't actually waiting for them.
* To test the positive case for this code (make sure we didn't break it),
verify that the inbox on an IMAP account is displayed properly
immediately after you add it.

Bug: 2619513
Change-Id: Ib31254b4099ba6b7922b06d42e2b7928551e4fb2
/packages/apps/Email/src/com/android/email/activity/MessageList.java
54607e872db12c0132446f21a4b8a5c724d185ee 15-Apr-2010 Andrew Stadler <stadler@android.com> Remove incorrect error reporting in MessageList

* Previously I added a call to updateBanner() during the sequence where
we update the mailboxlist (searching for the requested mailbox to
display.) This was an attempt to provide some error information
for certain corner case security configuration problems.
* This was misfiring during legitimate connections (specifically, initial
sync of valid EAS accounts) and causing a Connection Error message
when none was intended.
* Rather than continue hacking, I'm simply removing the error banner
from updateMailboxList.
* This is essentially a direct rollback of change
c98b64c801cea3c82a7b932ebaf9a4bbdcee195c, although I've added
a bit more commentary than there was originally.
* The long-term solution, rather than continue band-aiding this, is to
move most of this logic into a service independent of the UI, and
provide more organized error reporting.

Bug: 2585159
Bug: 2599377
Change-Id: I99b7b1c8a7cfaa3fd3ff9b578d5721f05133d88a
/packages/apps/Email/src/com/android/email/activity/MessageList.java
5e354cd1db1baabad061032af5a0632cd0f58d1a 14-Apr-2010 Andrew Stadler <stadler@android.com> Exit most activities when accounts are deleted

This resolves cases like this: You are in the inbox of an Exchange
account. You click home, settings, accounts & sync, and you delete
the account. Now re-enter the Email app. You'll be left in a strangely
empty inbox, for an account that no longer exists.

* Set a flag any time the reconciler deletes an account
* Check that flag in onResume of any activity that depends on the account
list and could be left in an "empty" state if account(s) are deleted.
* The Activities in which we check it are:
* AccountFolderList
* AccountSettings
* MailboxList
* MessageCompose
* MessageList
* MessageView
* Clear the flag any time we come in through Welcome, which will dispatch
to other activities properly based on the number of accounts found.

Bug: 2563998
Change-Id: I00fc542581c2bed92d744a4c2e48a88f83737f11
/packages/apps/Email/src/com/android/email/activity/MessageList.java
c98b64c801cea3c82a7b932ebaf9a4bbdcee195c 14-Apr-2010 Andrew Stadler <stadler@android.com> Final cleanup for account provisioning failures

* Now that we get proper callbacks on updateMailboxListCallback(),
show the error banner if there's a problem
* Follow-on to 63186a5442f8310b25602235622c3669a4e5b1ec

Bug: 2585159
Change-Id: I2b4f365d02b639bc3ceff9f8938333185d5ba693
/packages/apps/Email/src/com/android/email/activity/MessageList.java
a87f8d8bbc0b704974c4230f518cf23b7215fc55 13-Apr-2010 Andrew Stadler <stadler@android.com> Changes to improve security policy setup

* SecurityPolicy: Fix bug that prevents any notifications after the
user hits "cancel all" from the notification pane.
* AccountSecurity: If the user cancels the device admin acceptance
activity, repost the notification.
* MesageList: Catch security hold condition when entering a mailbox, and
launch security setup activity.

Bug: 2585159
Change-Id: I60d5d8c693cc5f00fe98a9cc69265802f5bee813
/packages/apps/Email/src/com/android/email/activity/MessageList.java
78e06eb8947ff8b2f83163f08e7726fb73ebf733 08-Apr-2010 Makoto Onuki <omakoto@google.com> Fix NPE caused by I34451000

It's unfortunate but some of the fields we cleared in I34451000 are accessed
in BG threads or after the activity is destroyed. We could add != null checks
everywhere, but it'll be a mess. I also think it's safer to simply remove
the "= null" lines.

On the other hand, clearing AsyncTasks are relatively safer because they are
kept only so that we can cancel them afterwards, so I kept them. But let me
know if you want to revert the original CL.

Bug 2570603

Change-Id: I04a10dd7382bfcceb686c3e9af92f8949caf619e
/packages/apps/Email/src/com/android/email/activity/MessageList.java
59cf1d05c111e3b5fb18417db41ce47b623b5b1e 06-Apr-2010 Makoto Onuki <omakoto@google.com> Clear references to inner classes in onDestroy().

Also
- Made inner classes private if possible.
- Made some members final.

Bug 2570603

Change-Id: I34451000f2540c67e1039ea9dc4839dbec5ffab7
/packages/apps/Email/src/com/android/email/activity/MessageList.java
605371e793c7038cf24c15ca5090f27ab431ce79 04-Apr-2010 Andrew Stadler <stadler@android.com> Show a less-generic error message for security errors

* In Controller, map EmailServiceStatus.SECURITY_FAILURE
to MessagingException.SECURITY_POLICIES_REQUIRED
* In MessageList, map MessagingException.SECURITY_POLICIES_REQUIRED
to string account_setup_failed_security

Bug report will be forwarded to next release to get a more specific
string with proper translation.

Bug: 2563988
Change-Id: Ia1e6e947e3c0c7e6bd37301de2ea8ef4d641ef14
/packages/apps/Email/src/com/android/email/activity/MessageList.java
abed4c04c9f61062b2d9b3425a8b76b5b6165371 02-Apr-2010 satok <satok@google.com> Close Cursor onDestroy

Bug:2557401
- set Cursor of ListAdapter null

Change-Id: I7d762c4ccdf6165d748136f5cf0e15b4a36b24a7
/packages/apps/Email/src/com/android/email/activity/MessageList.java
a942858f0dc26158430a93f5dfd2d91f07471d11 26-Mar-2010 Makoto Onuki <omakoto@google.com> Properly handle old style (<= 1.6) account shortcuts.

A desktop shortcut to an account created on donut or before points at
com.android.email/.activity.FolderMessageList, which we've already removed.

- Added a dummy FolderMessageList to receive it and redirect to MessageList.
- Removed FolderMessageListUnitTests, which was left unremoved.

Bug 2535335

Change-Id: Ie5ffa158882633a4929c4c47a3d9625fd1626863
/packages/apps/Email/src/com/android/email/activity/MessageList.java
20c067c67c23e81a282cf89440055d4506e37476 20-Mar-2010 Makoto Onuki <omakoto@google.com> Show a calendar invitation icon on message list.

Bug 2522928

Change-Id: Ib29c7ee187cb0d864849b83693906b0a3b490734
/packages/apps/Email/src/com/android/email/activity/MessageList.java
22d29c67dacf4e8155a588d59815f1f97ecf0588 19-Mar-2010 Makoto Onuki <omakoto@google.com> Fix potential NPE with restoreMailboxWithId().

There are a few places where we don't do the check in restoreMailboxWithId,
but they don't look trivial enough for me to fix.

Bug 2530534

Change-Id: I77b37a87ef108048077f14c1e8a3457ee494100a
/packages/apps/Email/src/com/android/email/activity/MessageList.java
652be6fb3d04a4ceba6b765cd3160cdaef9e6107 03-Mar-2010 Makoto Onuki <omakoto@google.com> MessageList: Go to Welcome if account not found.

If the account specified with an Intent doesn't exist, show the Welcome
activity instead, which will navigate the user to the appropriate activity.
(e.g. account list if there're more than one account)

Bug 2479609
/packages/apps/Email/src/com/android/email/activity/MessageList.java
e37881aac562c066e6e666349749e40b7c116a21 02-Mar-2010 Makoto Onuki <omakoto@google.com> Store UUID instead of _id in desktop shortcuts.

- Because AccountBackupRestore won't preserve _id.
- Now MessageList accepts both Donut(1.6)-style URIs and Eclair(2.0-2.1)-style
URIs.

Bug 2479609
/packages/apps/Email/src/com/android/email/activity/MessageList.java
263f9bfcfb7accc6aafe29189e670ac8e4a2503e 18-Feb-2010 satok <satok@google.com> Tiny fix of updateListPosition in MessageList
/packages/apps/Email/src/com/android/email/activity/MessageList.java
820d4830cc594a68c4e324b36e7338f5ba41fc52 17-Feb-2010 satok <satok@google.com> Show hidden message when the pop-up menu is shown.

Bug: 2239403

- added animation listener
- change the position of a message when the message is hidden by the pop-up menu.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
dffe2f486d9c6e12255830372597b5d9ff7bfc49 15-Feb-2010 satok <satok@google.com> Make "Message deleted" be plural

Bug: 2264751
/packages/apps/Email/src/com/android/email/activity/MessageList.java
b052885ea3625469970c4b4ea724ebd10ebed2c0 10-Feb-2010 Mihai Preda <preda@google.com> Email: husky title for MessageList & MailboxList.

Bug: 2419716
/packages/apps/Email/src/com/android/email/activity/MessageList.java
37658316f96a7f62a334d1b844f5080cccdd9dbb 04-Feb-2010 Marc Blank <mblank@google.com> Use a single account color resource table; add convenience methods

* The color chip resource table was duplicated in three files
* Move these into a common location in Email.java and add
convenience method for retrieving color chip resource id based
on accountId
* Simplifies future changes to account color selection
* Add RGB color information on these resources (provided by
rfulcher) and add a convenience method for retrieving these

Change-Id: If1c2d22fba91cfce46a2618cd2b73cf7a534ce51
/packages/apps/Email/src/com/android/email/activity/MessageList.java
3d2b3b3b3554be2ac23d9a49fee00faa9693e857 05-Feb-2010 Andrew Stadler <stadler@android.com> Logic to move phone into security-admin mode

* Create notification to display when syncs fail due to security
* Create psuedo-activity (no UI) to manage device admin state transitions
* Clean up and flesh out SecurityPolicy APIs'
* Add placeholders in EasSyncService showing how to react when policies
are not met and sync cannot continue.

Note: There are some STOPSHIP todo's at the top of SecurityPolicy.java.
These should explain any code that you might think is "missing".
/packages/apps/Email/src/com/android/email/activity/MessageList.java
0f4efcd4833e973f5408d263febeeb7378b08d67 15-Jan-2010 satok <satok@google.com> Fix bugs rerated to updateMailboxRefreshTime

BUG: 2131243

- change the parameter updateMailboxRefreshTime in MailboxList
- add updateMailboxRefreshTime to MailboxList
/packages/apps/Email/src/com/android/email/activity/MessageList.java
ec82f9d7c0b9a6db7c656cb0ac70085082ee575f 22-Dec-2009 Makoto Onuki <omakoto@google.com> email unbundling: get rid of the write access to the CursorAdapter.mDataValid.

MessageListAdapter.doRequery() is supporsed to do the same thing as CursorAdapter.onContentChanged() does. So the entire method body can be replaced with super.onContentChanged().
/packages/apps/Email/src/com/android/email/activity/MessageList.java
425fd30a9cfd90a49bab000f49d307017cd3ba1d 18-Dec-2009 Makoto Onuki <omakoto@google.com> Email unbundling: Use accessor for CursorAdapter.mCursor and ListActivity.getListView().

Also added a todo for ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
9151d86e680f8b80ccc2e0bce32a2752c131c317 07-Dec-2009 satok <satok@google.com> Check null pointer in MessageList

BUG: 2299971
/packages/apps/Email/src/com/android/email/activity/MessageList.java
3d00377b356631f555e3938bf63d7c5c292e505a 07-Dec-2009 satok <satok@google.com> Fix MessageListUnitTests

This is supperement of change,33265

* Move custom cursor to inner static class
* Change public to /* package */
* Move PROJECTION to a package
/packages/apps/Email/src/com/android/email/activity/MessageList.java
4cb25d93a23d086b954c03cb72afb2cf0248f1c4 16-Nov-2009 satok <satok@google.com> Save the state of checkboxes when orientation is changed

BUG: 2239516

* Add tests for save/restore Instance State
/packages/apps/Email/src/com/android/email/activity/MessageList.java
6ba40085d7519681c140cbcacdecd4636bfc4ce3 20-Nov-2009 Marc Blank <mblank@google.com> am 863e6c40: Handle "send outgoing messages" properly for combined Outbox

Merge commit '863e6c40202fe804d92a263809da74ec1e904e66' into eclair-mr2

* commit '863e6c40202fe804d92a263809da74ec1e904e66':
Handle "send outgoing messages" properly for combined Outbox
863e6c40202fe804d92a263809da74ec1e904e66 20-Nov-2009 Marc Blank <mblank@google.com> Handle "send outgoing messages" properly for combined Outbox

* The "send outgoing messages" button doesn't work in the combined
inbox (the case wasn't handled)
* Add code to loop through accounts, calling the Controller for each
in this case
* Fixes (partially or completely) #2274389

Change-Id: I94e984247d43f93a4d6546b8c10f6ce149b091be
/packages/apps/Email/src/com/android/email/activity/MessageList.java
6bb7c7248af1057eaf6f672be03bc46c8d03472d 19-Oct-2009 Mihai Preda <preda@google.com> MessageView: disable reply&forward for Trash messages.

Bug 2170118
/packages/apps/Email/src/com/android/email/activity/MessageList.java
754240bcf3ccc8492a50ba9ee8056b34f6e4e8d0 13-Oct-2009 Andrew Stadler <stadler@android.com> Fix race condition in testMultiple()

* If we close the activity while a requeryList() is pending in the
handler queue, we'll eventually try to operate on a closed cursor
when we get to testMultiple().
* The fix: Return immediately if the cursor is not available.

Fixes bug http://b/2180416
Followup for bug http://b/2149083
/packages/apps/Email/src/com/android/email/activity/MessageList.java
479b22a2f8966b63789c89e878b615ebd53708c0 09-Oct-2009 Mike Cleron <mcleron@google.com> Make multiselect buttons update when the list state changes
/packages/apps/Email/src/com/android/email/activity/MessageList.java
73032f4657a77f733a348fe3c2c1fa783d335ff0 06-Oct-2009 Mihai Preda <preda@google.com> Email: exit AsyncTask.onPostExecute() if the result is null or isCancelled().

Bug: 2167479
/packages/apps/Email/src/com/android/email/activity/MessageList.java
e90b74aa0410ea93f6b40617bf721770e50585e2 05-Oct-2009 satok <satok@google.com> Avoid NPE at onRefresh in MessageList

BUG: 2161449
/packages/apps/Email/src/com/android/email/activity/MessageList.java
7aca36b240db9913b4482ee08f448d5588e5f970 01-Oct-2009 Andrew Stadler <stadler@android.com> Call deferred requery from handler instead of Runnable

* code cleanup for Change I9cab6558
* Bug # 2126515

Change-Id: Ic87cf98485271e3fbf162c8b696114035337bd78
/packages/apps/Email/src/com/android/email/activity/MessageList.java
385014923990fab3ea8c7139fb2235efaae8f981 01-Oct-2009 Marc Blank <mblank@google.com> Throttle the refresh of the message list as it changes (fixes #2126515)

* Catch onContentChanged and throttle calls to cursor.requery()
* Use 2.5s for now. This seems to provide excellent responsiveness
with little apparent latency.
* Also fixes #2135882

Change-Id: I9cab6558c9cfeb1dbdb5fb250f4f04059db324f7
/packages/apps/Email/src/com/android/email/activity/MessageList.java
f9597e71d5a397dcede9728b3b3696d5260d5e75 01-Oct-2009 Andrew Stadler <stadler@android.com> Fix assets & colors for MessageList & MessageView

* change read/unread list bkgnds
* change read/unread list text params
* new checkbox
* new stars

Bugs:http://b/issue?id=2156331 & http://b/issue?id=2156332
/packages/apps/Email/src/com/android/email/activity/MessageList.java
54e0a5f65c777147a1d90cd73d2ebeab2a67e417 30-Sep-2009 Andrew Stadler <stadler@android.com> Only auto-refresh when user opens mailbox

This prevents auto-refresh from triggering on non-explicit entry
to the mailbox (e.g. by resuming from another activity).

BUG: 2155843
/packages/apps/Email/src/com/android/email/activity/MessageList.java
b8ee27f013766d6c89befa36bd265c6104ffb036 30-Sep-2009 Andrew Stadler <stadler@android.com> Add "deselect all"

* New menu items in MessageList
* Show/hide menu item if anything is checked
* Clear the selected items map, redraw listview, hide button panel

Bug # 2116257
/packages/apps/Email/src/com/android/email/activity/MessageList.java
62b5a51b8fc7d85f8b71d5d6db04986a6080eff7 30-Sep-2009 Andrew Stadler <stadler@android.com> Use FLAG_ACTIVITY_CLEAR_TOP for list activities

This prevents these activities from ever repeating on the task stack.

Helps http://b/issue?id=2149204 (and may even fix it)

Change-Id: Idf8255b703094a78a2df3e9f535b67fd65faef32
/packages/apps/Email/src/com/android/email/activity/MessageList.java
3786cab2aa1776e92fc67af3931a76cd8b848b48 29-Sep-2009 satok <satok@google.com> More refresh account and folder list

BUG: 2149171

* Change the string of combined inbox
* Change the string of combined starred folder
* Change the icon for combined inbox
* Change the icon for combined starred folder
/packages/apps/Email/src/com/android/email/activity/MessageList.java
c6a392937e755aba1593d45cea285f43c8edba3c 26-Sep-2009 Marc Blank <mblank@google.com> Fix NPE issue in empty MessageList (fixes #2147432)

Change-Id: Idea4e4193e95686411f8e8257d729fcfc14d50b5
/packages/apps/Email/src/com/android/email/activity/MessageList.java
c41c47fa07a22f8a7612fb0191f152a36d95b7a5 25-Sep-2009 Andrew Stadler <stadler@android.com> Enable message upload

* Create logic to detect upsyncable messages in Sent
* Note: Drafts is now local only for IMAP - no sync, either way
* Rewrite MessageController.processPendingAppend for Provider world
* Write provider message -> legacy message converter
* Fixed bug in IMAP APPEND (it was not picking the right UID for the
uploaded message.)
* Better handling of server internaldate
* Add constants for new X-Android-Body-Quoted-Part header
* Add EmailContent routines to get each of the 5 parts of the body
* Remove "Load more" from unsynced message lists
* Add toString to MimeHeader for debug support

Bug # 2097471

TODO (next CL): Upload attachments records too

Change-Id: I209182f5adc6b6696919f559e3cbbdd58b3eed3a
/packages/apps/Email/src/com/android/email/activity/MessageList.java
1086473056eaaa8f473af632fb6d701c8376e132 25-Sep-2009 Mihai Preda <preda@google.com> MessageView: fix prev/next navigation in compound mailboxes.

Bug 2132262.

Change-Id: Ic3b8d9ccedc6101abb90dcac3545f87cbf233659
/packages/apps/Email/src/com/android/email/activity/MessageList.java
10a4908369c5dfd8db22e969fc00ce0ec695a065 25-Sep-2009 Marc Blank <mblank@google.com> Remove "Refresh" from bottom of EAS message lists

* It's confusing and inappropriate

Change-Id: I4633d34ad022ab7970384f14182dbf3c9aa4207f
/packages/apps/Email/src/com/android/email/activity/MessageList.java
58a28fdceb67a146a57de993ab81424d8536a61e 24-Sep-2009 satok <satok@google.com> Remember the list positions in MessageListView for onResume

BUG: 2131474
/packages/apps/Email/src/com/android/email/activity/MessageList.java
a4482e865dd3b219be672898df13dbbf1f4ae48d 19-Sep-2009 Marc Blank <mblank@google.com> Fix service behavior w/r/t onStartCommand, onCreate, onDestroy

* Make sure to null out vars in onDestroy
* Use START_STICKY as return value for onStartCommand
* Start SyncManager from EasAuthenticator callback, rather from the
authenticator itself (otherwise, the Account might not have been
created when we start SyncManager)

Change-Id: I54ff8d5586e96f016b365587717710dee3202da8
/packages/apps/Email/src/com/android/email/activity/MessageList.java
9312faea437854f075df57b9ec23a5d57cb8db0c 19-Sep-2009 Andrew Stadler <stadler@android.com> Restore lost connection error UI

We lost the reporting of connection errors in the UI. These were
originally displayed in FolderMessageList, under the name of each folder.

In the new implementation, we borrow the "undo" banner from Gmail and
display it whenever there is a connection error in a mailbox.

* Add banner, and code to animate it on/off the top of the list.
* Toggle banner whenever a connection state change occurs in MessageList
* Toggle banner whenever a connection state change occurs in MailboxList
* Slight change to callback semantics for sendMailCallback
/packages/apps/Email/src/com/android/email/activity/MessageList.java
0c4dc85190028f389f0dcbc3dbed0b344d20a313 16-Sep-2009 Andrew Stadler <stadler@android.com> Harden against crashes caused by account deletes

The basic failure mode is to delete an account while it is being
synced or some other background activity. The fixes in this CL will
harden against this, but it will not be a perfect solution; That
will require shutting down all sync, which is difficult in the current
too-many-threads implementation.

Primary bug# 2112564
/packages/apps/Email/src/com/android/email/activity/MessageList.java
5569ec9c9d0cb8b7f57bfcad42ca4466a69c6d8d 15-Sep-2009 satok <satok@google.com> show message list selection

BUG: 2117057

* add styles for items in MessageListView
* reduce color diff of Read/Unread
/packages/apps/Email/src/com/android/email/activity/MessageList.java
d2174733b146eeccd5f3b3b95f98e1e1aaafb257 08-Sep-2009 satok <satok@google.com> Auto-sync of stale mailboxes

BUG: 2050116
- auto sync onResume
- add mNonPushMode
-- mNonPushMode is updated in SetFooterTask
/packages/apps/Email/src/com/android/email/activity/MessageList.java
be60dfdee7c2c0f73d54e1b04a36967508d428ae 11-Sep-2009 Andrew Stadler <stadler@android.com> Update MessageListView to fit punchcut's design

BUG:1904421

* update READ/UNREAD indications
** don't change color chip
** change background color
* Change Date
* Change the position of attachement icon
* Change menu icon for folder
/packages/apps/Email/src/com/android/email/activity/MessageList.java
6c21942ec45f561d711b3d74ecca8e62afb735c4 10-Sep-2009 Andrew Stadler <stadler@android.com> Implement move-to-trash for IMAP and POP3.

* Define new message-loaded state "FLAG_LOADED_DELETED" (used only for
POP3, which needs to write sentinel messages that are not displayed.)
* Also renamed the other flags to make the naming more consistent.
* Tweak MessageList query generation to inhibit display of deleted
message sentinels, and MessagingController won't try to resync them.
* Clean up implementation of Controller.deleteMessage()
* Add support for move to trash to MessagingController. This operates
in three primary modes:
* POP3 local delete (no server-side interaction)
* POP3 server delete
* IMAP server delete (and copy to IMAP trash mailbox)
* Add missing implementation in provider to delete all of the attachments
for a given message
* Fix progress reporting in activities (the test for error vs. progress
was inverted, which caused progress indicators to keep spinning
after errors.)
* Fix broken account settings UI (POP3 delete policy was not persisting)

Addresses bug 2097409

TODO delete from trash / empty trash

Change-Id: I00188e6dc2093823106e009f35b68c760227c9e6
/packages/apps/Email/src/com/android/email/activity/MessageList.java
8af852315494e13591fb8a01a4e29e522845b3be 04-Sep-2009 Marc Blank <mblank@google.com> Fix crash related to long press of footer view in MessageList (2099784)

Change-Id: I4be240096022ee69244532bbf876a47a520188bc
/packages/apps/Email/src/com/android/email/activity/MessageList.java
58bd29e740a137cf705cbfa7ad512135d6b57fdc 02-Sep-2009 satok <satok@google.com> Fixed Labels for buld email

BUG:2084730
/packages/apps/Email/src/com/android/email/activity/MessageList.java
285efb4aff0c3a0ef15d249223d9e8c6c3d0ce77 28-Aug-2009 Mihai Preda <preda@google.com> Email: check for closed cursor in onPostExecute for AsyncTasks.

BUG 2081965
/packages/apps/Email/src/com/android/email/activity/MessageList.java
b01bce9b50bf2f8088e04a7e1ea2a037e52fc41f 27-Aug-2009 Marc Blank <mblank@google.com> Fix #2081145 (Empty subject line imitates magic eight ball)
/packages/apps/Email/src/com/android/email/activity/MessageList.java
c1edb4a80185311072622a93b8a7458bc549de99 25-Aug-2009 satok <satok@google.com> Show/Hide/Change appropriate buttons in footer of MessageList.

BUG: 1904403

* Change the text of READ/UNREAD button dynamically according to the state of selection
* Change the text of favorite button dynamically according to the state of selection
/packages/apps/Email/src/com/android/email/activity/MessageList.java
98c10db5103aca003446b446efa7492b7cd36f34 25-Aug-2009 Andrew Stadler <stadler@android.com> Clean up menus in MessageList

* Final list of options while normal mailbox is shown
* New list of options while smart folder is shown
* Correct lists of context options for drafts, outbox, trash, and
everywhere else (full list)
* Enable reply, reply all, and forward

TODO: needs a better icon for menu->folders

Resolves bug 1904421 items 4a, 4b, 5a
Resolves bug 2078092
/packages/apps/Email/src/com/android/email/activity/MessageList.java
df86adf87328a439347260331592509787020420 25-Aug-2009 Andrew Stadler <stadler@android.com> Finish the code to demand-load partially loaded messages.

This happens in two primary cases:
1. When a very large POP message was skipped during initial sync
2. When any message was interrupted during initial sync, e.g. by
a dropped connection.

Changes:
* Added loadMessageForView and callbacks to Controller (and touched all
files with Controller listeners)
* Rewrote loadMessageForView in legacy MessagingController to work with
provider.
* Update flow in MessageView to use loadMessageForView when needed.
* Restored the use of "loading.html" and "empty.html" assets (although
I think we should replace them with simple layouts & views.)
* Some random cleanup in MessageView

Satisfies bug # 2065563
/packages/apps/Email/src/com/android/email/activity/MessageList.java
60a04912e0973183c40ac34fb121ab77e471ec39 24-Aug-2009 satok <satok@google.com> Change all context menus

BUG: 2051086

* Add titles to all context menus
* Fix bug that prevented display of context menus in MessageList

TODO: localize special folder names
/packages/apps/Email/src/com/android/email/activity/MessageList.java
dadba9949895696108b31124fc0c6aa1a297ab1c 21-Aug-2009 satok <satok@google.com> Localize special folder names

* make utility for looking up icon id for mailbox
* make utility for looking up localized name for mailbox

BUG: 2065586
/packages/apps/Email/src/com/android/email/activity/MessageList.java
e1f0b0a9bcc78ade7f3b2ac540705701f19cd6cd 25-Aug-2009 Andrew Stadler <stadler@android.com> MessageView: next/prev navigation.

in addition:
- fix AND-OR precedence in cursor query in MessageList.
- move special mailbox ids from MessageList to Mailbox
- move shared code from MessageList to com.android.email.Utility
- add invisible prev/next to landscape in order to avoid special-case in code
- select mailbox list using IN() instead of list of OR

Note: Checked in by Andy to facilitate further work on MessageView.

Change-Id: I8049be2b45fed1e4e697a0ed895492c4d0e59e0a
/packages/apps/Email/src/com/android/email/activity/MessageList.java
77398c42899a383680005b92955a29ab3d872c5c 24-Aug-2009 Andrew Stadler <stadler@android.com> Reenable Load More Messages for IMAP/POP

* Properly reset all mailbox limit values
* When load more messages is clicked, increment limit and resync
* Also fixed a race condition in provider

Resolves bug 2065626

Change-Id: If50f25a5cb3b549b3acc48406c78533ad86ed4d5
/packages/apps/Email/src/com/android/email/activity/MessageList.java
95993a4b8466c2a47f4eba7a65b4ba194986cff5 18-Aug-2009 satok <satok@google.com> Update Title bar to use custom titles

BUG: 2050630

* remove fat title bar
* show new titles by using custom title bar
/packages/apps/Email/src/com/android/email/activity/MessageList.java
4b41bae270ea4c49ec8403084db43ee9b37cdda4 20-Aug-2009 Andrew Stadler <stadler@android.com> Enable IMAP/POP sending and EAS resend

* Finish IMAP/POP sections of Controller.sendMessage
* Rewrite MessagingController.sendPendingMessagesSynchronous
* Add deleteAllAttachmentFiles to AttachmentProvider, and unit test
* Rework sendMessage callbacks and integrate into MessageList UI
* Send pending from UI

TODO:
* Find other places from which to call deleteAllAttachmentFiles
/packages/apps/Email/src/com/android/email/activity/MessageList.java
e346193f06c6c3ffd8412ce151109df8b7f45999 20-Aug-2009 Andrew Stadler <stadler@android.com> Add status item to bottom of message list.

* Add code to (optionally) add footer, update text & progress dynamically
* Add hook to dispatch various actions (refresh, load more, etc.)
* Some cleanup of the launch helpers for MessageList

TODO:
* controller handler for the "send messages" case (subsequent CL)
* controller handler for the "more messages" case (subsequent CL)
* reporting of send results etc. into the status line
/packages/apps/Email/src/com/android/email/activity/MessageList.java
cbe513d4305893edde60aca645b290f31f7643da 19-Aug-2009 Andrew Stadler <stadler@android.com> Integrate EAS push notifications with the main notifications.

* Use the new account-based field for number of new messages
* Add support for async notifications in MailService
* Change EAS to call MailService to notify user
/packages/apps/Email/src/com/android/email/activity/MessageList.java
46d7d7f1b6387d144c3f9e7c987418dc8f55fad4 18-Aug-2009 Andrew Stadler <stadler@android.com> Rework service to use provider accounts and controller.

* Rewrite service logic to select and update one account at a time
* Add checkmail API to Controller, and much rework/cleanup of existing
callback API's
* Rewrite notification posting code
* Rewire connection to MessageList to be opened by notifications, to
cancel notifications, and to reset the "new message" count whenever
an account is viewed.
* Boilerplate cleanup to a lot of activities because they share the
callbacks that have had minor changes.
* Remove old push controls from Store API

In progress:
* To provide notification mechanism for EAS pushed mail
/packages/apps/Email/src/com/android/email/activity/MessageList.java
5669d4542d1214ab440dbd34b8cf7d72d1eddc86 29-Jul-2009 satok <satok@google.com> Show the title of MessageList See bug 2029282
/packages/apps/Email/src/com/android/email/activity/MessageList.java
a5af05f1a94ba9d0a91bd6507492cf6946f88a4d 04-Aug-2009 Mihai Preda <preda@google.com> MessageCompose: load body.
- load body for edit-draft, replay, forward.
- fix debug secret code for no-keyboard devices.
- fix CR-LF BUG 1911254.
- fix menu invoke compose from folder with mailboxId < 0.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
375f968aa5ff60949fc3d637393cc8bc65d92fb1 05-Aug-2009 satok <satok@google.com> Change context menu by mailbox type See bug 1399964 for details.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
8f7f93a7b36d873d5adba65f4da54819880c0285 31-Jul-2009 Andrew Stadler <stadler@android.com> Enable account & mailbox sync for exchange

* Now attempts folder list sync for exchange
(goto folder list and click sync)
* Folder sync never seems to call our callback - bug in EAS side?

* Now attempts mailbox sync
(go to an EAS mailbox and click sync)

Also:
* Cleanup start/stop/error path for IMAP/POP as well
* Small bugfix in SyncManager.java (was calling wrong callback)
* No longer trying to set mailbox read/unread count in IMAP/POP
/packages/apps/Email/src/com/android/email/activity/MessageList.java
ea69fc40d75f5fcf38872f836cdea9fb3aa9c991 30-Jul-2009 Andrew Stadler <stadler@android.com> Rework Controller to use new single callback from EAS.

* Use unified callback instead of per-call callbacks
* Remove per-call tag
* Rework MessageView to operate without tag
* Minor cleanups in service side
/packages/apps/Email/src/com/android/email/activity/MessageList.java
21ace307e07cb4c363c4183f4d62f4049f5d92fd 17-Jul-2009 Mihai Preda <preda@google.com> Clean-up in MessageCompose, using EmailContent.Message.

Difficulties:
re-enable EmailHtmlUtil.resolveInlineImage() and
MessageCompose.loadAttachments() that operate on MIME parts.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
6ae38e4a3937898c5d3fec11a9dc2fb4bab8eab6 23-Jul-2009 Andrew Stadler <stadler@android.com> Moving message operations into Controller, and load attachments.

* Moved logic into Controller:
* toggling read/unread
* toggling favorite status
* some new unit tests
* load attachment
* Completed logic for EAS to save attachments and MessageView to
begin and complete that process.

NOTE: Until EAS has a mode for saving the attachment locally (and I
rewrite the attachmentprovider to handle the new database) I am
implementing "view" attachment to just call "save". This means that
attachments "viewed" will be dropped onto the SD card, instead of
cached and flushed.

TODO: Controller is not properly working in its own thread, yet, so
we are not properly preventing ANR's yet.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
4e4abc645ce05d6ea009bb19df834911c821fafb 21-Jul-2009 Andrew Stadler <stadler@android.com> Clean up launch-time & account setup behaviors.

* Moved welcome message into account setup basics (name/pass)
* Reworked Welcome to go to AccountSetupBasics on count=0
* In AccountFolderList, removed old welcome message code, and add
code to launch AccountSetupBasics when last account is deleted
* Fixed shortcut picker so launcher shortcuts work again
* Reimplemented shortcut receiver (in MessageList now)
* Default EAS accounts to SSL

Addresses bug 1916583 & 1987440
/packages/apps/Email/src/com/android/email/activity/MessageList.java
f2fdd899ef28b0cf95256a7274d19719e0e27488 15-Jul-2009 Andrew Stadler <stadler@android.com> Clean up new account creation & initial sync.

* Give MessageList the ability to do a folder scan (from server)
in order to "find" the inbox after account creation.
* Don't show messages that haven't even been partially downloaded yet
(reduces flicker during POP initial sync)
* Move some folder lookup code (in MessageList) out of UI thread
* Restore simple color chip code so multiple accounts look good
in MessageList
/packages/apps/Email/src/com/android/email/activity/MessageList.java
2999db7866a33b39ddafb69f20c869ff5638734c 14-Jul-2009 Andrew Stadler <stadler@android.com> Add Summary Section to AccountFolderList ("at a glance")

* Wrap group cursor in a MergeCursor to insert 1st row
* Clean up a few loose ends (e.g. no longpress on summary row)
* Implement the summaries child cursor
* Add special queries to MessageList for Inbox, Unread, Favorites

There are *a lot* of TODO's in this checkin; I just wanted to get some
basic UI up and running so we could start to explore issues created by
the new configuration. A lightweight sampling:
* Aggregrate filters (e.g. all inboxes) need to be handled in the
provider, instead of with the current two-query hack.
* We'll need a lot of UI cleanup, e.g. different contextual menus
* We'll need to generalize some of the code in order to more easily
support repeating the same compound queries - e.g. MessageView actually
needs the same query in order to enable the next/prev buttons.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
ded3c915d88a5ee2d143b75cbf5718dae92a2f1c 11-Jul-2009 Andrew Stadler <stadler@android.com> Add folders to AccountFolderList

* Scan folders and write into child cursors
* Clicking a folder takes you to MessageList
* Remove most links to FolderMessageList (nearly dead!)
* Repair 1-account startup behavior (takes you directly to inbox)
* Cleanup a few basic things like context menus & refresh

TODO: Magic mailbox section at the top
TODO: As always, better linkage to sync engine(s)
TODO: Menus, context menus, etc.
TODO: Proper handling of expandable list - accounts should stay open?
/packages/apps/Email/src/com/android/email/activity/MessageList.java
72dce733900a812cf11a5ac08756362030556849 09-Jul-2009 Andrew Stadler <stadler@android.com> Convert Accounts to AccountFolderList

* Move relevant sources & resources to new name
* Convert from ListView to ExpandableListView
* No children yet - selecting account simply jumps to FML (temp)
* No other change to functionality (e.g. no menu changes yet)
/packages/apps/Email/src/com/android/email/activity/MessageList.java
b55bfc96f402ce31bcc3c9102c10f7cafc1cf125 09-Jul-2009 Andrew Stadler <stadler@android.com> Enable multi-selection actions

* Toggle small pane with multi-select action buttons
* Implement multi-read/unread
* Implement multi-favorites (stars)
* Implement multi-delete

TODO: menu items when there are selected items
/packages/apps/Email/src/com/android/email/activity/MessageList.java
432d1ec3ed54cd2f627fd79b5fe7b64341fa273a 07-Jul-2009 Andrew Stadler <stadler@android.com> Add custom item view to MessageList

* Stores per-message metadata
* Fix a number of todo's in MessageList
* Clicking on checkbox toggles state, updates checked list
* clicking on star toggles favorite state

To do: When one or more messages are checked, we should slide in a
panel with action buttons.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
a396a9bf1492febcb90c89faf1c0528a94bf5eaa 07-Jul-2009 Andrew Stadler <stadler@android.com> Minor cleanups (layout only)
/packages/apps/Email/src/com/android/email/activity/MessageList.java
b6493a07ef625c0e290890c2e60256b47a066e5e 05-Jul-2009 Marc Blank <mblank@google.com> Major refactor and cleanup of EAS code

* Rewrote push logic to encompass multiple folders (i.e. calendar/contacts)
* Change inbox from push frequency to ping frequency after initial sync
* Implement upsync logic for email (i.e. sending changes to the server)
* Did cleanup of some files (there's still some to do) re: format, style
* Initial one-way sync of Contacts data - add and delete are implemented
* Created adapter package for all parts of the EAS adapter
* Created utility package for utility code that will eventually be merged
with code in the Email application (Base64, QuotedPrintable, etc.)
* SyncManager/AbstractSyncService can be used in the future for other
protocols, especially IMAP push
/packages/apps/Email/src/com/android/email/activity/MessageList.java
7c3cca80a0b4dacb7bcb48c65a9999138b5df82b 06-Jul-2009 Andrew Stadler <stadler@android.com> Reenable delete-message UI and write delete-from-provider.

* Longpress delete in MessageList
* Delete or Menu-Delete in MessageView
* Add deleteMessage() to Controller
* Unit tests for the new code in Controller
/packages/apps/Email/src/com/android/email/activity/MessageList.java
bb0f962dbbc65b97fea0dd009cac34b0561f7346 02-Jul-2009 Andrew Stadler <stadler@android.com> Enable message read/unread toggling

* Automatically marked read when entering MessageView
* Marked unread via menu selected during MessageView
* Provider updated (directly - see note)
* Enable context menu in MessageList and enable "open" & toggle unread

NOTE: Does not use the correct service notifications yet; Just updates
the providers.

NOTE: The UI for the context menu is incomplete, it says "mark as read"
but it actually toggles the state. The true UI is to flip the text to
match the current state e.g. "mark as read" or "mark as unread". That
will be much simpler to implement when we switch to a custom list item
view class, where we can cache the read/unread state (and other tidbits).
/packages/apps/Email/src/com/android/email/activity/MessageList.java
7c3de934291814095908cfdd6816a98f89a43096 01-Jul-2009 Andrew Stadler <stadler@android.com> Add attachments, favorites, and selections to MessageList.

* Attachment icon is displayed when message.mAttachment != 0
* Favorite icon is set/cleared from message but not clickable
* Selection icon is not clickable

Further progress requires implementing a custom child view which can
handle sub-clicks properly.
/packages/apps/Email/src/com/android/email/activity/MessageList.java
4765472db80caafae0907d92ff057ddc4b54c9ea 01-Jul-2009 Andrew Stadler <stadler@android.com> Add MessageList activity

* Add MessageList Activity class and Manifest entry
* Add appropriate layouts, views, etc.
* Wire into FolderMessageList

Lots to do, but this gives us a useable screen.
/packages/apps/Email/src/com/android/email/activity/MessageList.java