Commit Graph

2547 Commits

Author SHA1 Message Date
Andy Stadler
b91fe4de91 Merge branch 'readonly-p4-donut' into donut 2009-04-27 17:25:57 -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
0f8a57891f Merge branch 'readonly-p4-donut' into donut 2009-04-27 17:18:43 -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
085757aa51 Merge branch 'readonly-p4-donut' into donut 2009-04-27 09:19:44 -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
4fca6f3dba Merge branch 'readonly-p4-donut' into donut 2009-04-24 16:18:23 -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
The Android Open Source Project
bf3f3a3d7a Merge commit 'korg/donut' 2009-04-24 13:55:02 -07:00
Andy Stadler
eeaad585cd Merge branch 'readonly-p4-donut' into donut 2009-04-24 13:27:00 -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
a63e9a0c86 Merge branch 'readonly-p4-donut' into donut 2009-04-24 11:56:00 -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
f84770309d Merge branch 'readonly-p4-donut' into donut 2009-04-24 11:14:53 -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
1bca9ccac5 Merge branch 'readonly-p4-donut' into donut 2009-04-23 23:17:19 -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
c1a26752c1 Merge branch 'readonly-p4-donut' into donut 2009-04-23 16:43:40 -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
f93b69c167 Merge branch 'readonly-p4-donut' into donut 2009-04-23 16:40:03 -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
Eric Fischer
939d53c761 AI 147492: Update zh_TW translations.
Automated import of CL 147492
2009-04-23 11:59:15 -07:00
Andy Stadler
d4a1c5a232 Merge branch 'readonly-p4-donut' into donut 2009-04-23 10:51:39 -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
6f25a47d4a Merge branch 'readonly-p4-donut' into donut 2009-04-22 23:50:15 -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
28874ce460 Merge branch 'readonly-p4-donut' into donut 2009-04-22 18:46:52 -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
Jean-Baptiste Queru
e7f7338499 Merge donut into master 2009-04-22 18:33:18 -07:00
Jean-Baptiste Queru
2238b75880 merge cupcake into donut 2009-04-22 17:56:59 -07:00
Jean-Baptiste Queru
5c0ed8752d Merge donut into master 2009-04-22 17:12:37 -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
d4b2a71206 Merge branch 'readonly-p4-master' 2009-04-18 21:24:40 -07:00
Andy Stadler
333875ea67 AI 146579: am: CL 146379 Provide a small set of message flags that can be set by stores and will
be persisted by LocalStore.
  Original author: stadler

Automated import of CL 146579
2009-04-18 21:23:22 -07:00
Andy Stadler
b017fbbb77 Merge branch 'readonly-p4-master' 2009-04-18 21:21:55 -07:00
Andy Stadler
31fb7fa03f AI 146577: am: CL 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).
  Original author: stadler

Automated import of CL 146577
2009-04-18 21:20:41 -07:00
Andy Stadler
87f8d74249 Merge branch 'readonly-p4-master' 2009-04-18 21:00:12 -07:00
Andy Stadler
3b44f969f3 AI 146569: am: CL 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
  Original author: stadler

Automated import of CL 146569
2009-04-18 20:58:52 -07:00
Tadashi Takaoka
21daf58a3f Merge branch 'readonly-p4-master' 2009-04-18 20:43:56 -07:00
Tadashi Takaoka
8dfb58e3ec AI 146562: am: CL 146274 am: CL 146273 Fixed "show pictures" button isnot displayed for HTML messages.
Original author: takaoka
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 146562
2009-04-18 20:42:43 -07:00
Andy Stadler
d68dcbe4a8 Merge branch 'readonly-p4-master' 2009-04-18 19:41:48 -07:00
Andy Stadler
f74a45d443 AI 146538: am: CL 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.
  Original author: stadler

Automated import of CL 146538
2009-04-18 19:40:29 -07:00
Andy Stadler
b06e34c65a Merge branch 'readonly-p4-master' 2009-04-18 18:46:33 -07:00
Andy Stadler
0c49f4e321 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-18 18:45:15 -07:00
Andy Stadler
142bc083b0 Merge branch 'readonly-p4-master' 2009-04-18 15:26:24 -07:00
Andy Stadler
c8e41e98cd AI 146538: am: CL 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.
  Original author: stadler

Automated import of CL 146538
2009-04-18 15:25:13 -07:00
Andy Stadler
3c4552eb4a Merge branch 'readonly-p4-master' 2009-04-16 11:56:52 -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
Eric Fischer
31e3dbe0b2 AI 146517: Import translation changes.
DO NOT MERGE

Automated import of CL 146517
2009-04-16 11:01:06 -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