Commit Graph

24 Commits

Author SHA1 Message Date
Makoto Onuki 2ed7a86949 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
2011-05-19 13:47:25 -07:00
Todd Kennedy ff72651145 Clean up shortcut picker
First some cleanup before adding new functionality.

Change-Id: I37339bb8967c2136c8361133d38c2f5ad30ae3e2
2011-05-18 09:59:31 -07:00
Makoto Onuki 0b6cb1c330 Store UUIDs in account shortcuts, rather than IDs.
Bug 4192836

Change-Id: I1d6349ed3ad70867f113b9a9f7eb8717b88b24c1
2011-04-04 14:12:05 -07:00
Makoto Onuki d72f7bdf11 Improve EmailAsyncTask
Added 6 methods:
- execute{Parallel,Serial}
- cancelPreviousAndExecute{Parallel,Serial}
- runAsyncParallel{Parallel,Serial} (replacement for Utility.runAsync)

Bug 4083415

Change-Id: I5ca33000e52fc5265ccc84a6e5acb0d3359d0eb4
2011-03-21 16:41:08 -07:00
Marc Blank 31d9acbf06 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
2011-02-14 12:18:10 -08:00
Marc Blank a7bc0319a7 Email split, part six: EmailContent
* Moved EmailContent to emailcommon

Change-Id: Ib3db1bfcfe74554c0e5afd3cfce6d72f26e9aeb9
2011-02-10 19:44:29 -08:00
Todd Kennedy 5e39f90e9d Resolve build warnings; part 4
Fix unchecked warnings

Change-Id: I872740fca4e5050e6ed2922eabc7e46e5e97ff3c
2011-02-03 12:44:24 -08:00
Justin Ho b5b8e568e2 New Email launcher icon, deprecating old asset
Bug: 3362749

Change-Id: Idb876f38588a9c5d2b4b3c04dbf4dbca082c1618
2011-01-29 14:20:01 -08:00
Andy Stadler 29d79adf4b Fix cursor leaks when canceling AsyncTask
We discovered that AsyncTask.cancel() doesn't quite perform as expected;
In particular, if you call cancel() during a particularly slow background
worker, the result is discarded and onPostExecute() is never called.  If
the result is an open cursor, then we "leak" by not closing it.

For AccountFolderList, which has a multi-step doInBackground():
1.  Check for isCancelled() during the long doInBackground() which will
    reduce the number of discarded cursors in the first place.
2.  Check for isCancelled() at the end of the long doInBackground() and
    if true, close the result cursors and return null.
3.  In the existing isCancelled() code in onPostExecute(), close the
    cursors.

For other AsyncTasks (with simpler configurations):
1.  Check for isCancelled() at the end of doInBackground() and if true,
    close the just-opened cursor and return null.

See also Change-Id: Ie63a3197af563baa8bb0fe6f1ef9423e281cbf4c
Bug: 3088870

Change-Id: I51b11bb5b23f209f8b61962500a063040484fd24
2011-01-06 13:35:57 -08:00
Andy Stadler d87f81e901 Update visual style shortcut picker and make it async
* Use dialog when in XL screen size
* Show different strings in launcher and in dialog/activity title
* Add cancel button to picker
* Move accounts query to AsyncTask
* Remove obsolete AccountsAdapter

Bug: 3093928
Change-Id: Ief771482c6db684c434c21cf92844c37a927d34a
2010-11-23 22:54:49 -08:00
Andy Stadler 5c4c0ab456 Move application icon to mipmap-* directories
Change-Id: Idc5df7046d0fa64ffbfce2869dffb4fe0fd144a0
2010-11-23 12:06:44 -08:00
Makoto Onuki b98f219cf0 Open 2 pane after adding an account.
- After adding an account, and when a shortcut to an account is clicked,
  launch Welcome instead of MessageList.
- Then welcome launches the appropriate activity.
  (MessageList or MessageListXL)

- Welcome no longer launches AccountFolderList, which will be gone
  according to the current plan.

Always going through Welcome makes sure that the account backup/restore
and the reconciler will always get kicked.

Change-Id: Ia57027eba16e98c5d8854e8d3c1d8773bcfbf1e5
2010-08-10 09:50:52 -07:00
Makoto Onuki b3f7dd0169 Clean up member variables.
- Fix misnomered fields.  (e.g. static mMember -> static sMember)
- Reduce visibility.  (e.g. mark as private)
- Mark final / static if possible.

Note it's on master.

There's a lot more cleanup oppotunities in the activities, but they're going
to go through a major overhaul, so I didn't bother.

Change-Id: I3fde73ba5f1f9ff675fff07c510e1e49521dde42
2010-05-11 17:06:37 -07:00
Makoto Onuki e37881aac5 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
2010-03-03 15:41:10 -08:00
Andrew Stadler 9e2c6bd5f2 Remove saveOrUpdate from EmailContent to prevent stale writes
* Numerous classes modified to deal with this change
  * Fixes bugs 1993292 and 1994671
  * Renamed various setter and getter methods to reflect the underlying
    field names
  * Renamed syncFrequency to syncInterval in Account and Mailbox
  * Convenience method added to AccountSettings to save only user settings
  * Calls to content.update(context, content.toContentValues()), which save
    all fields, should be double-checked for correctness, making sure that
    content has current data and will not conflict with other threads that
    might modify that data
  * Ran all unit tests to confirm proper function

NOTE:  The logic to enforce single default account no longer works,
because that logic is in Account.save() and does not run via
Account.update().  I have patched out a small section of the relevant unit
test and will file a bug to come back for this fix.
2009-07-22 15:13:30 -07:00
Andrew Stadler 4e4abc645c 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
2009-07-21 11:06:14 -07:00
Marc Blank a290f503f1 Refactored EmailStore, EmailContent, EmailProvider
EmailStore goes away, replaced by EmailContent
All database activity is moved to EmailProvider
2009-06-15 14:49:11 -07:00
Andrew Stadler 68a9ccfcde final cleanups to get basic message operations working properly.
* Generate compatibility UUID early enough to stick, so our localstore
db's are created correctly and not recreated over and over again.
* Compose menu items working
* Fix single-account mode (go straight to inbox)
* Lightweight Account projections where possible
* Properly show/hide default account checkbox (during new acct screens)

What works:
* All unit tests
* Editing existing accounts
* Create new accounts
* Checking account settings against server
* Mail sync using accounts
* Viewing mailboxes
* Viewing messages
* Composing messages

What breaks (in approx order of planned fixes)
* Some details of account editing
* Import of existing accounts
2009-06-09 16:13:05 -07:00
Andrew Stadler c0033f24a2 Convert remainder of app to use provider-based accounts
What works:
* Unit tests, except for com.android.email.activity.setup.*
* Editing existing accounts
* Create new accounts
* Checking account settings against server
* Mail sync using accounts
* Viewing mailboxes

What breaks (in approx order of planned fixes)
* Unit tests in com.android.email.activity.setup.*
* Viewing messages
* Composing messages
* Some details of account editing
* Import of existing accounts
2009-06-08 15:42:40 -07:00
Andy Stadler da2794ed80 AI 146514: am: CL 146061 Add persistent storage that Store classes can access.
The current design for Store classes (e.g. IMAP) did not provide for
  any persistent storage.  This is the beginning of a mechanism to
  provide that.  It's quite simplisitic - each Store can read/write one
  persistent string - but that's enough for the first simple use case
  (saving some sync data for EAS).
  The core changes here - suggest reviewing first - are in Account.java,
  Store.java, and AccountUnitTests.java.  Everything else is just
  following the API change that was necessary.
  Note that, by definition, this only applies to remote stores (e.g.
  IMAP, POP3).  You'll see everywhere that LocalStore is passed null, and
  this is correct - LocalStore *is* persistent storage and does not need
  access (so far, at least).
  Original author: stadler

Automated import of CL 146514
2009-04-16 11:55:39 -07:00
The Android Open Source Project 96c5af40d6 auto import from //depot/cupcake/@135843 2009-03-03 19:32:22 -08:00
The Android Open Source Project 8c2158a5eb auto import from //depot/cupcake/@135843 2009-03-03 18:28:50 -08:00
The Android Open Source Project 88a1d6f92d auto import from //branches/cupcake/...@132276 2009-02-19 10:57:35 -08:00
The Android Open Source Project ff4eb775df auto import from //branches/cupcake/...@131421 2009-02-13 12:57:53 -08:00