Commit Graph

57 Commits

Author SHA1 Message Date
Andy Stadler
d8cbeaf7ae AI 148098: Manual merge CL 148086 to fix additional problems with non-ASCII chars
in address fields.
  BUG=1676634

Automated import of CL 148098
2009-04-30 10:18:00 -07:00
Andy Stadler
067d0a87fa AI 148097: Fix bug in exchange account setup (actually it only affects
editing existing accounts).  Added simple functional tests for
  Activity UI.
  BUG=1812798

Automated import of CL 148097
2009-04-30 10:14:00 -07:00
Andy Stadler
05aba0b4ba AI 148096: Fix multiple concurrency bugs in FolderMessageList, which wasn't
being strict enough about decoupling the MessageListener from
  updates to the various lists that should only happen in the UI
  thread.
  BUG=1812798

Automated import of CL 148096
2009-04-30 10:08:25 -07:00
Andy Stadler
c795d8b324 AI 148095: In MessageView, protect the listener callbacks that directly
access mMessageContentView.
  This is a brute-force solution, and I have also left TODO notes
  mentioning that it might make more sense (long term) to use the
  existing handler message mechanism.
  BUG=1812798

Automated import of CL 148095
2009-04-30 10:04:06 -07:00
Andy Stadler
0cfffc5222 AI 148091: Manual merge CL 148078 which resolves bugs when you have non-ASCII
names in email address fields of MessageCompose.
  BUG=1676657

Automated import of CL 148091
2009-04-30 09:38:30 -07:00
Andy Stadler
3c3add638e AI 148027: Fix concurrency failure in Folder.getUnreadMessageCount() and
Folder.getVisibleLimit(), which used local copies of the data from the
  DB.  If there were two Folder objects associated with a single actual
  folder, updating one wouldn't be reflected in the others.
  BUG=1812798

Automated import of CL 148027
2009-04-29 17:17:14 -07:00
Andy Stadler
c05afb24bb AI 148019: Add "accountInstanceLimit" to stores.xml so a given type of connection
(e.g. EAS) can limit itself to n (usually 1) accounts per device.
  The UI for this is really simple - don't show the EAS button when the
  limit is reached.  More work would be required in
  AccountSetupAccountType.java in order to do a more sophisticated UI
  (e.g. show the button but pop a toast if the limit is reached.)
  BUG=1740626

Automated import of CL 148019
2009-04-29 17:10:25 -07:00
Andy Stadler
8264c4fa21 AI 148002: Add X_DOWNLOADED_FULL, X_DOWNLOADED_PARTIAL, and DELETED flags
to the set that are stored in their own columns (and thus can
  be quickly selected from).  Add code to migrate old style
  flags into new flags.  Add tests.
  BUG=1786939

Automated import of CL 148002
2009-04-29 17:07:03 -07:00
Andy Stadler
a13aea24a3 AI 147868: Fix CL 146360 which didn't make the changes persistent. Changed
MessagingController to accept and track a Context, instead of the
  unnecessary Application object, which makes this fix more testable.
  BUG=1790798

Automated import of CL 147868
2009-04-27 17:24:41 -07:00
Andy Stadler
de6b2519be AI 147866: To better support remote stores that write back persistent data
or other changes during a delete operation, we need to explicitly
  open the remote trash folder and give it the callbacks.
  BUG=1807499

Automated import of CL 147866
2009-04-27 17:17:22 -07:00
Andy Stadler
6c0cd49610 AI 147839: In checkMail(), do a listFolders() before the existing sync...()
calls for each account.  This allows the folder list to be
  updated before it is synced, which is necessary for some
  stores.
  BUG=1807499

Automated import of CL 147839
2009-04-27 09:18:01 -07:00
Andy Stadler
b24a1eb3d0 AI 147765: Fix concurrency bugs in MessagingController, in the collections
mCommands and mListeners.
  BUG=1812798

Automated import of CL 147765
2009-04-24 16:17:04 -07:00
Andy Stadler
100867a231 AI 147730: 1. Create an API by which a Store can specify its own custom
synchronizer code.
  2. Refactor (and spell-fix) the core folder synchronizer.  Extract
  the innards that are IMAP/POP specific, leaving common wrapper
  code in a simpler shell.
  3. For each account & folder to sync, check the store and call
  the specialized sync'er (if provided) or the generic one.
  BUG=1807499

Automated import of CL 147730
2009-04-24 13:25:34 -07:00
Andy Stadler
5551f7feb2 AI 147714: New, lighter-weight version of CL 147620. Still touches as many files,
due to API change, but still has a smaller footprint.  Also fixes the
  bug in the original, which is that we actually needed to udpate the
  local trash folder, not the remote one.
  BUG=1807499

Automated import of CL 147714
2009-04-24 11:54:42 -07:00
Andy Stadler
b633efa2b7 AI 147708: Automated g4 rollback of changelist 147620.
*** Reason for rollback ***
  We figured out a simpler solution affecting fewer files - we
  don't actually need the new remotestore API.
  *** Original change description ***
  Some stores require changing the UID of a message when it is
  copied to a new folder (I'm looking at you, EAS).  Add a callback
  to Folder.copyMessages() which allows the store to report back
  such changes.  Then, add a new api to record the new values:
  Folder.updateMessages().
  For now, the two APIs are linked by a common callsite in
  MessagingController, so the existing stores can use a minimal
  implementation - if they don't call the callback, nobody will
  call the update.
  BUG=1807499

Automated import of CL 147708
2009-04-24 11:13:36 -07:00
Andy Stadler
1df530294d AI 147620: Some stores require changing the UID of a message when it is
copied to a new folder (I'm looking at you, EAS).  Add a callback
  to Folder.copyMessages() which allows the store to report back
  such changes.  Then, add a new api to record the new values:
  Folder.updateMessages().
  For now, the two APIs are linked by a common callsite in
  MessagingController, so the existing stores can use a minimal
  implementation - if they don't call the callback, nobody will
  call the update.
  BUG=1807499

Automated import of CL 147620
2009-04-23 23:16:01 -07:00
Andy Stadler
72288724d4 AI 147538: Because mPreferences is transient, we need to pass Context into the
persistent callbacks, in order to recreate it occasionally.
  BUG=1786939

Automated import of CL 147538
2009-04-23 16:42:23 -07:00
Andy Stadler
f2c5f08b32 AI 147537: Fix copy/paste mistake in previous CL.
BUG=1807499

Automated import of CL 147537
2009-04-23 16:38:44 -07:00
Andy Stadler
3f66d3de11 AI 147486: Change the remote/local mapping callback to be folder-by-folder instead
of for the entire store.
  BUG=1807499

Automated import of CL 147486
2009-04-23 10:49:42 -07:00
Andy Stadler
2990ff1f96 AI 147452: Update LocalFolder.fetch() to support STRUCTURE mode, in
addition to existing support for BODY mode.  Add tests.
  BUG=1807499

Automated import of CL 147452
2009-04-22 23:48:59 -07:00
Andy Stadler
912dc3b194 AI 147423: Provide a hook to notify remote stores that local stores are set up.
BUG=1807499

Automated import of CL 147423
2009-04-22 18:45:22 -07:00
Andy Stadler
29bbfd0b97 AI 147401: Redo the implementation of store-specific flags to allow
deeper database-style operations with them.  This enables two
  new LocalStore APIs to be provided:  A new version of
  GetMessages() that can retrieve only flagged (or un-flagged)
  messages, and a new method to set flags for an entire set of
  messages, in a single SQL transaction.
  BUG=1786939

Automated import of CL 147401
2009-04-22 13:49:57 -07:00
Andy Stadler
7e6df9c6aa AI 146379: Provide a small set of message flags that can be set by stores and will
be persisted by LocalStore.
  BUG=1786939

Automated import of CL 146379
2009-04-15 15:29:00 -07:00
Andy Stadler
37e98419d7 AI 146366: Automated g4 rollback of changelist 146361.
*** Reason for rollback ***
  Despite the markings in the CL, this was inadvertently merged.
  This CL restores donut & downstream branches to the desired state.
  *** Original change description ***
  am: CL 146359 D* N*T M***E - we'll keep the fix for donut+
  Automated g4 rollback of changelist 146273.
  *** Reason for rollback ***
  Inadvertently approved for cupcake, past deadline.
  *** Original change description ***
  Fixed "show pictures" button isnot displayed for HTML messages.
  Original author: stadler
  Merged from: //branches/cupcake/...
  BUG=1766880

Automated import of CL 146366
2009-04-15 13:38:26 -07:00
Andy Stadler
af88cfc482 AI 146361: am: CL 146359 DO NOT MERGE - we'll keep the fix for donut+
Automated g4 rollback of changelist 146273.
  *** Reason for rollback ***
  Inadvertently approved for cupcake, past deadline.
  *** Original change description ***
  Fixed "show pictures" button isnot displayed for HTML messages.
  Original author: stadler
  Merged from: //branches/cupcake/...

Automated import of CL 146361
2009-04-15 13:01:48 -07:00
Andy Stadler
1f48259d22 AI 146360: Provide an API by which the server (or store) can tag some
of the role-specific folders such as Drafts, Sent, or Trash.
  This allows us to properly target these folders even on
  systems where they have different names.  I capture the
  tagged names into the existing columns in the account data,
  where they are used elsewhere in the code (no changes
  necessary).
  Use default implementations on POP3 and IMAP for now -
  no change from original behavior.  The new code is
  primarily to support EAS (for now).
  BUG=1790798

Automated import of CL 146360
2009-04-15 12:58:19 -07:00
Andy Stadler
4836f3c289 AI 146331: Make the download window sizing adjustable on a per-store basis.
The default values are 25 (default) and 25 (increment).  This is fine
  for Stores that control downloads by # of messages, but won't work for
  stores that use other measurements - e.g. EAS windows the download in #
  of days.  So for this change:
  1.  Allow the StoreInfo to provide non-default values
  2.  Remove the hardcoded references to the default values
  3.  Use StoreInfo values everywhere
  4.  Set the values to 1,1 in EAS store info
  BUG=1789913

Automated import of CL 146331
2009-04-15 10:58:59 -07:00
Tadashi Takaoka
1464095f9f AI 146274: am: CL 146273 Fixed "show pictures" button isnot displayed for HTML messages.
Original author: takaoka
  Merged from: //branches/cupcake/...

Automated import of CL 146274
2009-04-14 21:42:56 -07:00
Andy Stadler
c6039f7d17 AI 146134: Add persistence API for remote stores & folders to use while
syncing.  This provides a key-value store, per folder, that
  can be used by network Stores to record persistent data such
  as sync status, server keys, etc.
  Note that, by definition, this only applies to remote folders
  (e.g. IMAP, POP3). You'll see everywhere that LocalFolder is
  passed null, and this is correct - LocalFolder *is* persistent
  storage and does not need external help.
  Note to reviewers:  The core changes are Folder.java,
  LocalStore.java, and LocalStoreUnitTests.java, so please give
  them the bulk of your reviewer attention.  The other files
  are just following along with minor API changes.  Of those,
  the one worth close examination is MessagingController.java,
  which is the only place in the system where remote Folders
  are bonded with Local Folders and thus where this new API
  comes into play.
  Note to jham:  Can you please take a look at
  LocalStore.LocalFolder.setPersistentString() and recommend
  better SQL foo than my primitive test-then-update-or-insert
  logic, which is not transactional or threadsafe.
  BUG=1786939

Automated import of CL 146134
2009-04-14 10:15:07 -07:00
Andy Stadler
cd7e5664f9 AI 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).
  BUG=1786939

Automated import of CL 146061
2009-04-13 20:07:56 -07:00
Andy Stadler
8664ecf181 AI 145227: Add callback for push-mode stores to report async updates.
The logic for this is quite simplistic, for now:  When the store
  reports that it has new messages, it triggers a service refresh,
  just as if a pull-mode interval had expired and it is time to
  check the server.
  Note, unfortunately at this time there are no tests, because there
  are not currently any good test seams in MailService.java.
  BUG=1776149

Automated import of CL 145227
2009-04-08 18:42:42 -07:00
Andy Stadler
ea6fea9bb2 AI 144953: Provide UI for push mode accounts.
1.  Generalize the code for the various spinners that control
  account check frequency.
  2.  Provide an API for looking up store attributes (and refactor
  existing instatiateStore logic to use it).
  3.  Cleanup the old code that was used to setup frequency spinners.
  4.  Hardwire Exchange accounts to default into push mode.
  Notes to tester:
  1.  For each account type (POP, IMAP, EAS) we need to check that
  auto & manual creation "do the right thing" for frequencies.
  POP & IMAP should offer "none" or time intervals, while EAS
  should offer "push", "none", or time intervals.
  2.  EAS accounts should default to "push", all others to "15 min"
  3.  Make sure that you can edit existing account settings and see
  the right choices (only EAS should be offered push).
  4.  I couldn't write an automated test for the mail checker service,
  please confirm that POP & IMAP accounts are checked at the right
  intervals (or never, if set for "none".)
  BUG=1776149

Automated import of CL 144953
2009-04-07 17:35:13 -07:00
Andy Stadler
87c43cada6 AI 144525: Add structural support for Exchange transport. The idea is that
the shipping client will include the necessary generic pieces for
  configuring an Exchange client (e.g. account setup) but will not
  include actual Exchange client code (e.g. transport / protocol).
  Also added a "sample code" implementation of Exchange for use
  as a starting point for implementors.  (Note, this will not ship
  in Donut, it's a placeholder for working on the "framework"
  aspects.)
  BUG=1740621,1740626

Automated import of CL 144525
2009-04-03 16:02:55 -07:00
Andy Stadler
2b0c619f1e AI 144520: General cleanup after the integrations in CL 143018. Some spelling
errors, inconsistencies in passing Application/Activity/Context, and
  some error handling cleanups.  These are all changes that would have
  probably been made before the original submits, but I didn't want
  to fix them in the integration step.
  BUG=1740621

Automated import of CL 144520
2009-04-03 15:40:49 -07:00
Andy Stadler
ae8ca3fbd1 Automated import from //branches/donutburger/...@143018,143018 2009-03-26 17:05:25 -07:00
Andy Stadler
dfa98d5e1f Automated import from //branches/donutburger/...@142711,142711 2009-03-25 16:36:11 -07:00
Tadashi Takaoka
2a34cb9c9c Automated import from //branches/donutburger/...@142523,142523 2009-03-25 01:30:24 -07:00
Tadashi Takaoka
d12181df8f Automated import from //branches/donutburger/...@142461,142461 2009-03-24 22:45:09 -07:00
Tadashi Takaoka
b1d72808d7 Automated import from //branches/donutburger/...@142458,142458 2009-03-24 22:44:38 -07:00
Andy Stadler
7265bb729b Automated import from //branches/donutburger/...@142152,142152 2009-03-24 21:31:47 -07:00
Andy Stadler
2b4b8d3e8e Automated import from //branches/donutburger/...@142110,142110 2009-03-24 21:27:36 -07:00
Andy Stadler
7dbeb7d91c Automated import from //branches/donutburger/...@141237,141237 2009-03-24 19:53:32 -07:00
The Android Open Source Project
3469902379 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:48 -07:00
The Android Open Source Project
3b85e2c2b5 auto import from //branches/cupcake_rel/...@138607 2009-03-13 13:04:24 -07:00
The Android Open Source Project
3debc4f25a auto import from //branches/cupcake/...@137873 2009-03-11 12:11:58 -07:00
The Android Open Source Project
3db9542af6 auto import from //depot/cupcake/@136594 2009-03-05 14:34:38 -08: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
1f5bbf66d1 auto import from //depot/cupcake/@132589 2009-03-03 14:04:31 -08:00
The Android Open Source Project
7a8703fda9 auto import from //depot/cupcake/@137055 2009-03-02 22:54:40 -08:00